@xy-planning-network/trees 0.10.3 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/trees.es.js CHANGED
@@ -9371,16 +9371,6 @@ const wf = /* @__PURE__ */ gf(vf, [["render", yf]]), xf = { class: "absolute ins
9371
9371
  text: m(s)
9372
9372
  }, null, 8, ["id", "text"])
9373
9373
  ])) : V("", !0),
9374
- p.value ? (w(), k("input", {
9375
- key: 1,
9376
- ref_key: "errorInput",
9377
- ref: g,
9378
- required: "",
9379
- class: "sr-only top-1 left-1",
9380
- "aria-hidden": "",
9381
- type: "checkbox",
9382
- onInvalid: b
9383
- }, null, 544)) : V("", !0),
9384
9374
  v("div", rh, [
9385
9375
  v("div", {
9386
9376
  class: N(["grid gap-y-5", {
@@ -9430,7 +9420,17 @@ const wf = /* @__PURE__ */ gf(vf, [["render", yf]]), xf = { class: "absolute ins
9430
9420
  ]);
9431
9421
  }), 128))
9432
9422
  ], 2)
9433
- ])
9423
+ ]),
9424
+ p.value ? (w(), k("input", {
9425
+ key: 1,
9426
+ ref_key: "errorInput",
9427
+ ref: g,
9428
+ required: "",
9429
+ class: "sr-only top-1 left-1",
9430
+ "aria-hidden": "",
9431
+ type: "checkbox",
9432
+ onInvalid: b
9433
+ }, null, 544)) : V("", !0)
9434
9434
  ], 8, th));
9435
9435
  }
9436
9436
  }), lh = ["aria-labelledby", "aria-describedby", "aria-errormessage"], uh = { key: 0 }, ch = { class: "flex" }, dh = { class: "flex items-center h-5" }, fh = ["id", "aria-describedby", "aria-labelledby", "checked", "disabled", "name", "value", "onChange"], ph = { class: "ml-3" }, mh = /* @__PURE__ */ I({
package/dist/trees.umd.js CHANGED
@@ -13,4 +13,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
13
13
  </span>
14
14
  `}function sm(){e.calendarContainer.classList.add("hasWeeks");const p=U("div","flatpickr-weekwrapper");p.appendChild(U("span","flatpickr-weekday",e.l10n.weekAbbreviation));const h=U("div","flatpickr-weeks");return p.appendChild(h),{weekWrapper:p,weekNumbers:h}}function xr(p,h=!0){const x=h?p:p-e.currentMonth;x<0&&e._hidePrevMonthArrow===!0||x>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=x,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,J("onYearChange"),ie()),X(),J("onMonthChange"),En())}function cm(p=!0,h=!0){if(e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,h===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){const{hours:x,minutes:E,seconds:V}=mr(e.config);m(x,E,V)}e.redraw(),p&&J("onChange")}function dm(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),J("onClose")}function um(){e.config!==void 0&&J("onDestroy");for(let p=e._handlers.length;p--;)e._handlers[p].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){const p=e.calendarContainer.parentNode;if(p.lastChild&&p.removeChild(p.lastChild),p.parentNode){for(;p.firstChild;)p.parentNode.insertBefore(p.firstChild,p);p.parentNode.removeChild(p)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(p=>{try{delete e[p]}catch{}})}function mt(p){return e.config.appendTo&&e.config.appendTo.contains(p)?!0:e.calendarContainer.contains(p)}function Cr(p){if(e.isOpen&&!e.config.inline){const h=we(p),x=mt(h),E=h===e.input||h===e.altInput||e.element.contains(h)||p.path&&p.path.indexOf&&(~p.path.indexOf(e.input)||~p.path.indexOf(e.altInput)),V=p.type==="blur"?E&&p.relatedTarget&&!mt(p.relatedTarget):!E&&!x&&!mt(p.relatedTarget),D=!e.config.ignoredFocusElements.some(v=>v.contains(h));V&&D&&(e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&s(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&(e.clear(!1),e.redraw()))}}function wn(p){if(!p||e.config.minDate&&p<e.config.minDate.getFullYear()||e.config.maxDate&&p>e.config.maxDate.getFullYear())return;const h=p,x=e.currentYear!==h;e.currentYear=h||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),x&&(e.redraw(),J("onYearChange"),ie())}function Ze(p,h=!0){var x;const E=e.parseDate(p,void 0,h);if(e.config.minDate&&E&&xe(E,e.config.minDate,h!==void 0?h:!e.minDateHasTime)<0||e.config.maxDate&&E&&xe(E,e.config.maxDate,h!==void 0?h:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(E===void 0)return!1;const V=!!e.config.enable,D=(x=e.config.enable)!==null&&x!==void 0?x:e.config.disable;for(let v=0,B;v<D.length;v++){if(B=D[v],typeof B=="function"&&B(E))return V;if(B instanceof Date&&E!==void 0&&B.getTime()===E.getTime())return V;if(typeof B=="string"){const L=e.parseDate(B,void 0,!0);return L&&L.getTime()===E.getTime()?V:!V}else if(typeof B=="object"&&E!==void 0&&B.from&&B.to&&E.getTime()>=B.from.getTime()&&E.getTime()<=B.to.getTime())return V}return!V}function xn(p){return e.daysContainer!==void 0?p.className.indexOf("hidden")===-1&&p.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(p):!1}function fm(p){p.target===e._input&&(e.selectedDates.length>0||e._input.value.length>0)&&!(p.relatedTarget&&mt(p.relatedTarget))&&e.setDate(e._input.value,!0,p.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function pm(p){const h=we(p),x=e.config.wrap?n.contains(h):h===e._input,E=e.config.allowInput,V=e.isOpen&&(!E||!x),D=e.config.inline&&x&&!E;if(p.keyCode===13&&x){if(E)return e.setDate(e._input.value,!0,h===e.altInput?e.config.altFormat:e.config.dateFormat),h.blur();e.open()}else if(mt(h)||V||D){const v=!!e.timeContainer&&e.timeContainer.contains(h);switch(p.keyCode){case 13:v?(p.preventDefault(),s(),Er()):xi(p);break;case 27:p.preventDefault(),Er();break;case 8:case 46:x&&!e.config.allowInput&&(p.preventDefault(),e.clear());break;case 37:case 39:if(!v&&!x){if(p.preventDefault(),e.daysContainer!==void 0&&(E===!1||document.activeElement&&xn(document.activeElement))){const L=p.keyCode===39?1:-1;p.ctrlKey?(p.stopPropagation(),xr(L),I(T(1),0)):I(void 0,L)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:p.preventDefault();const B=p.keyCode===40?1:-1;e.daysContainer&&h.$i!==void 0||h===e.input||h===e.altInput?p.ctrlKey?(p.stopPropagation(),wn(e.currentYear-B),I(T(1),0)):v||I(void 0,B*7):h===e.currentYearElement?wn(e.currentYear-B):e.config.enableTime&&(!v&&e.hourElement&&e.hourElement.focus(),s(p),e._debouncedChange());break;case 9:if(v){const L=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(Y=>Y),F=L.indexOf(h);if(F!==-1){const Y=L[F+(p.shiftKey?-1:1)];p.preventDefault(),(Y||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(h)&&p.shiftKey&&(p.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&h===e.amPM)switch(p.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],d(),qe();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],d(),qe();break}(x||mt(h))&&J("onKeyDown",p)}function kr(p){if(e.selectedDates.length!==1||p&&(!p.classList.contains("flatpickr-day")||p.classList.contains("flatpickr-disabled")))return;const h=p?p.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),x=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),E=Math.min(h,e.selectedDates[0].getTime()),V=Math.max(h,e.selectedDates[0].getTime());let D=!1,v=0,B=0;for(let L=E;L<V;L+=Cc.DAY)Ze(new Date(L),!0)||(D=D||L>E&&L<V,L<x&&(!v||L>v)?v=L:L>x&&(!B||L<B)&&(B=L));for(let L=0;L<e.config.showMonths;L++){const F=e.daysContainer.children[L];for(let Y=0,_e=F.children.length;Y<_e;Y++){const le=F.children[Y],Ae=le.dateObj.getTime(),Bt=v>0&&Ae<v||B>0&&Ae>B;if(Bt){le.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(vt=>{le.classList.remove(vt)});continue}else if(D&&!Bt)continue;["startRange","inRange","endRange","notAllowed"].forEach(vt=>{le.classList.remove(vt)}),p!==void 0&&(p.classList.add(h<=e.selectedDates[0].getTime()?"startRange":"endRange"),x<h&&Ae===x?le.classList.add("startRange"):x>h&&Ae===x&&le.classList.add("endRange"),Ae>=v&&(B===0||Ae<=B)&&xc(Ae,x,h)&&le.classList.add("inRange"))}}}function mm(){e.isOpen&&!e.config.static&&!e.config.inline&&Cn()}function hm(p,h=e._positionElement){if(e.isMobile===!0){if(p){p.preventDefault();const E=we(p);E&&E.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),J("onOpen");return}else if(e._input.disabled||e.config.inline)return;const x=e.isOpen;e.isOpen=!0,x||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),J("onOpen"),Cn(h)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(p===void 0||!e.timeContainer.contains(p.relatedTarget))&&setTimeout(()=>e.hourElement.select(),50)}function gi(p){return h=>{const x=e.config[`_${p}Date`]=e.parseDate(h,e.config.dateFormat),E=e.config[`_${p==="min"?"max":"min"}Date`];x!==void 0&&(e[p==="min"?"minDateHasTime":"maxDateHasTime"]=x.getHours()>0||x.getMinutes()>0||x.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(V=>Ze(V)),!e.selectedDates.length&&p==="min"&&f(x),qe()),e.daysContainer&&(wi(),x!==void 0?e.currentYearElement[p]=x.getFullYear().toString():e.currentYearElement.removeAttribute(p),e.currentYearElement.disabled=!!E&&x!==void 0&&E.getFullYear()===x.getFullYear())}}function gm(){const p=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],h=Object.assign(Object.assign({},JSON.parse(JSON.stringify(n.dataset||{}))),r),x={};e.config.parseDate=h.parseDate,e.config.formatDate=h.formatDate,Object.defineProperty(e.config,"enable",{get:()=>e.config._enable,set:D=>{e.config._enable=ki(D)}}),Object.defineProperty(e.config,"disable",{get:()=>e.config._disable,set:D=>{e.config._disable=ki(D)}});const E=h.mode==="time";if(!h.dateFormat&&(h.enableTime||E)){const D=ee.defaultConfig.dateFormat||dt.dateFormat;x.dateFormat=h.noCalendar||E?"H:i"+(h.enableSeconds?":S":""):D+" H:i"+(h.enableSeconds?":S":"")}if(h.altInput&&(h.enableTime||E)&&!h.altFormat){const D=ee.defaultConfig.altFormat||dt.altFormat;x.altFormat=h.noCalendar||E?"h:i"+(h.enableSeconds?":S K":" K"):D+` h:i${h.enableSeconds?":S":""} K`}Object.defineProperty(e.config,"minDate",{get:()=>e.config._minDate,set:gi("min")}),Object.defineProperty(e.config,"maxDate",{get:()=>e.config._maxDate,set:gi("max")});const V=D=>v=>{e.config[D==="min"?"_minTime":"_maxTime"]=e.parseDate(v,"H:i:S")};Object.defineProperty(e.config,"minTime",{get:()=>e.config._minTime,set:V("min")}),Object.defineProperty(e.config,"maxTime",{get:()=>e.config._maxTime,set:V("max")}),h.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,x,h);for(let D=0;D<p.length;D++)e.config[p[D]]=e.config[p[D]]===!0||e.config[p[D]]==="true";cr.filter(D=>e.config[D]!==void 0).forEach(D=>{e.config[D]=dr(e.config[D]||[]).map(i)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let D=0;D<e.config.plugins.length;D++){const v=e.config.plugins[D](e)||{};for(const B in v)cr.indexOf(B)>-1?e.config[B]=dr(v[B]).map(i).concat(e.config[B]):typeof h[B]>"u"&&(e.config[B]=v[B])}h.altInputClass||(e.config.altInputClass=bi().className+" "+e.config.altInputClass),J("onParseConfig")}function bi(){return e.config.wrap?n.querySelector("[data-input]"):n}function yi(){typeof e.config.locale!="object"&&typeof ee.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error(`flatpickr: invalid locale ${e.config.locale}`)),e.l10n=Object.assign(Object.assign({},ee.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?ee.l10ns[e.config.locale]:void 0),fr.K=`(${e.l10n.amPM[0]}|${e.l10n.amPM[1]}|${e.l10n.amPM[0].toLowerCase()}|${e.l10n.amPM[1].toLowerCase()})`,Object.assign(Object.assign({},r),JSON.parse(JSON.stringify(n.dataset||{}))).time_24hr===void 0&&ee.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=La(e),e.parseDate=pr({config:e.config,l10n:e.l10n})}function Cn(p){if(typeof e.config.position=="function")return void e.config.position(e,p);if(e.calendarContainer===void 0)return;J("onPreCalendarPosition");const h=p||e._positionElement,x=Array.prototype.reduce.call(e.calendarContainer.children,(Tt,Nr)=>Tt+Nr.offsetHeight,0),E=e.calendarContainer.offsetWidth,V=e.config.position.split(" "),D=V[0],v=V.length>1?V[1]:null,B=h.getBoundingClientRect(),L=window.innerHeight-B.bottom,F=D==="above"||D!=="below"&&L<x&&B.top>x,Y=window.pageYOffset+B.top+(F?-x-2:h.offsetHeight+2);if(ce(e.calendarContainer,"arrowTop",!F),ce(e.calendarContainer,"arrowBottom",F),e.config.inline)return;let _e=window.pageXOffset+B.left,le=!1,_n=!1;v==="center"?(_e-=(E-B.width)/2,le=!0):v==="right"&&(_e-=E-B.width,_n=!0),ce(e.calendarContainer,"arrowLeft",!le&&!_n),ce(e.calendarContainer,"arrowCenter",le),ce(e.calendarContainer,"arrowRight",_n);const Ae=window.document.body.offsetWidth-(window.pageXOffset+B.right),Bt=_e+E>window.document.body.offsetWidth,vt=Ae+E>window.document.body.offsetWidth;if(ce(e.calendarContainer,"rightMost",Bt),!e.config.static)if(e.calendarContainer.style.top=`${Y}px`,!Bt)e.calendarContainer.style.left=`${_e}px`,e.calendarContainer.style.right="auto";else if(!vt)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=`${Ae}px`;else{const Tt=bm();if(Tt===void 0)return;const Nr=window.document.body.offsetWidth,Vm=Math.max(0,Nr/2-E/2),$m=".flatpickr-calendar.centerMost:before",Bm=".flatpickr-calendar.centerMost:after",vm=Tt.cssRules.length,Tm=`{left:${B.left}px;right:auto;}`;ce(e.calendarContainer,"rightMost",!1),ce(e.calendarContainer,"centerMost",!0),Tt.insertRule(`${$m},${Bm}${Tm}`,vm),e.calendarContainer.style.left=`${Vm}px`,e.calendarContainer.style.right="auto"}}function bm(){let p=null;for(let h=0;h<document.styleSheets.length;h++){const x=document.styleSheets[h];try{x.cssRules}catch{continue}p=x;break}return p??ym()}function ym(){const p=document.createElement("style");return document.head.appendChild(p),p.sheet}function wi(){e.config.noCalendar||e.isMobile||(ie(),En(),X())}function Er(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function xi(p){p.preventDefault(),p.stopPropagation();const h=v=>v.classList&&v.classList.contains("flatpickr-day")&&!v.classList.contains("flatpickr-disabled")&&!v.classList.contains("notAllowed"),x=Ra(we(p),h);if(x===void 0)return;const E=x,V=e.latestSelectedDateObj=new Date(E.dateObj.getTime()),D=(V.getMonth()<e.currentMonth||V.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=E,e.config.mode==="single")e.selectedDates=[V];else if(e.config.mode==="multiple"){const v=Dr(V);v?e.selectedDates.splice(parseInt(v),1):e.selectedDates.push(V)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=V,e.selectedDates.push(V),xe(V,e.selectedDates[0],!0)!==0&&e.selectedDates.sort((v,B)=>v.getTime()-B.getTime()));if(d(),D){const v=e.currentYear!==V.getFullYear();e.currentYear=V.getFullYear(),e.currentMonth=V.getMonth(),v&&(J("onYearChange"),ie()),J("onMonthChange")}if(En(),X(),qe(),!D&&e.config.mode!=="range"&&e.config.showMonths===1?M(E):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){const v=e.config.mode==="single"&&!e.config.enableTime,B=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(v||B)&&Er()}y()}const kn={locale:[yi,hi],showMonths:[pi,l,mi],minDate:[k],maxDate:[k],clickOpens:[()=>{e.config.clickOpens===!0?(b(e._input,"focus",e.open),b(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function wm(p,h){if(p!==null&&typeof p=="object"){Object.assign(e.config,p);for(const x in p)kn[x]!==void 0&&kn[x].forEach(E=>E())}else e.config[p]=h,kn[p]!==void 0?kn[p].forEach(x=>x()):cr.indexOf(p)>-1&&(e.config[p]=dr(h));e.redraw(),qe(!0)}function Ci(p,h){let x=[];if(p instanceof Array)x=p.map(E=>e.parseDate(E,h));else if(p instanceof Date||typeof p=="number")x=[e.parseDate(p,h)];else if(typeof p=="string")switch(e.config.mode){case"single":case"time":x=[e.parseDate(p,h)];break;case"multiple":x=p.split(e.config.conjunction).map(E=>e.parseDate(E,h));break;case"range":x=p.split(e.l10n.rangeSeparator).map(E=>e.parseDate(E,h));break}else e.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(p)}`));e.selectedDates=e.config.allowInvalidPreload?x:x.filter(E=>E instanceof Date&&Ze(E,!1)),e.config.mode==="range"&&e.selectedDates.sort((E,V)=>E.getTime()-V.getTime())}function xm(p,h=!1,x=e.config.dateFormat){if(p!==0&&!p||p instanceof Array&&p.length===0)return e.clear(h);Ci(p,x),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),k(void 0,h),f(),e.selectedDates.length===0&&e.clear(!1),qe(h),h&&J("onChange")}function ki(p){return p.slice().map(h=>typeof h=="string"||typeof h=="number"||h instanceof Date?e.parseDate(h,void 0,!0):h&&typeof h=="object"&&h.from&&h.to?{from:e.parseDate(h.from,void 0),to:e.parseDate(h.to,void 0)}:h).filter(h=>h)}function Cm(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;const p=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);p&&Ci(p,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function km(){if(e.input=bi(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=U(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),e._positionElement=e.config.positionElement||e._input}function Em(){const p=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=U("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=p,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=p==="datetime-local"?"Y-m-d\\TH:i:S":p==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}b(e.mobileInput,"change",h=>{e.setDate(we(h).value,!1,e.mobileFormatStr),J("onChange"),J("onClose")})}function _m(p){if(e.isOpen===!0)return e.close();e.open(p)}function J(p,h){if(e.config===void 0)return;const x=e.config[p];if(x!==void 0&&x.length>0)for(let E=0;x[E]&&E<x.length;E++)x[E](e.selectedDates,e.input.value,e,h);p==="onChange"&&(e.input.dispatchEvent(_r("change")),e.input.dispatchEvent(_r("input")))}function _r(p){const h=document.createEvent("Event");return h.initEvent(p,!0,!0),h}function Dr(p){for(let h=0;h<e.selectedDates.length;h++)if(xe(e.selectedDates[h],p)===0)return""+h;return!1}function Dm(p){return e.config.mode!=="range"||e.selectedDates.length<2?!1:xe(p,e.selectedDates[0])>=0&&xe(p,e.selectedDates[1])<=0}function En(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach((p,h)=>{const x=new Date(e.currentYear,e.currentMonth,1);x.setMonth(e.currentMonth+h),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[h].textContent=mn(x.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=x.getMonth().toString(),p.value=x.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function Ei(p){return e.selectedDates.map(h=>e.formatDate(h,p)).filter((h,x,E)=>e.config.mode!=="range"||e.config.enableTime||E.indexOf(h)===x).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function qe(p=!0){e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Ei(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Ei(e.config.altFormat)),p!==!1&&J("onValueUpdate")}function Nm(p){const h=we(p),x=e.prevMonthNav.contains(h),E=e.nextMonthNav.contains(h);x||E?xr(x?-1:1):e.yearElements.indexOf(h)>=0?h.select():h.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):h.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Sm(p){p.preventDefault();const h=p.type==="keydown",x=we(p),E=x;e.amPM!==void 0&&x===e.amPM&&(e.amPM.textContent=e.l10n.amPM[Ee(e.amPM.textContent===e.l10n.amPM[0])]);const V=parseFloat(E.getAttribute("min")),D=parseFloat(E.getAttribute("max")),v=parseFloat(E.getAttribute("step")),B=parseInt(E.value,10),L=p.delta||(h?p.which===38?1:-1:0);let F=B+v*L;if(typeof E.value<"u"&&E.value.length===2){const Y=E===e.hourElement,_e=E===e.minuteElement;F<V?(F=D+F+Ee(!Y)+(Ee(Y)&&Ee(!e.amPM)),_e&&_(void 0,-1,e.hourElement)):F>D&&(F=E===e.hourElement?F-D-Ee(!e.amPM):V,_e&&_(void 0,1,e.hourElement)),e.amPM&&Y&&(v===1?F+B===23:Math.abs(F-B)>v)&&(e.amPM.textContent=e.l10n.amPM[Ee(e.amPM.textContent===e.l10n.amPM[0])]),E.value=pe(F)}}return a(),e}function ut(n,r){const e=Array.prototype.slice.call(n).filter(a=>a instanceof HTMLElement),o=[];for(let a=0;a<e.length;a++){const i=e[a];try{if(i.getAttribute("data-fp-omit")!==null)continue;i._flatpickr!==void 0&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=Ec(i,r||{}),o.push(i._flatpickr)}catch(l){console.error(l)}}return o.length===1?o[0]:o}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return ut(this,n)},HTMLElement.prototype.flatpickr=function(n){return ut([this],n)});var ee=function(n,r){return typeof n=="string"?ut(window.document.querySelectorAll(n),r):n instanceof Node?ut([n],r):ut(n,r)};ee.defaultConfig={},ee.l10ns={en:Object.assign({},Nt),default:Object.assign({},Nt)},ee.localize=n=>{ee.l10ns.default=Object.assign(Object.assign({},ee.l10ns.default),n)},ee.setDefaults=n=>{ee.defaultConfig=Object.assign(Object.assign({},ee.defaultConfig),n)},ee.parseDate=pr({}),ee.formatDate=La({}),ee.compareDates=xe,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return ut(this,n)}),Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))},typeof window<"u"&&(window.flatpickr=ee);const Um="",_c=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],hn=t.defineComponent({inheritAttrs:!1,__name:"DateRangePicker",props:t.mergeDefaults({modelValue:{},maxRange:{},startDate:{},label:{},help:{},placeholder:{}},{...Me,maxRange:0,modelValue:()=>({maxDate:0,minDate:0}),placeholder:"mm-dd-yyyy range",startDate:0}),setup(n){const r=n,{aria:e,errorState:o,modelState:a,inputID:i,isRequired:l,onInvalid:s,validate:c}=Ve(r),u=d=>{a.value=d};return t.onMounted(()=>{const d={allowInput:!0,dateFormat:"m-d-Y",mode:"range",maxDate:new Date,minDate:r.startDate,onClose:f=>{f.length===2?u({minDate:f[0].setUTCHours(0,0,0,0)/1e3,maxDate:Math.floor(f[1].setUTCHours(23,59,59,999)/1e3)}):f.length===0&&u({minDate:0,maxDate:0})}};r.modelValue.minDate!=0&&r.modelValue.maxDate!=0&&(d.defaultDate=[r.modelValue.minDate*1e3,r.modelValue.maxDate*1e3]),r.maxRange&&(d.onChange=(f,m,g)=>{if(f.length===1){var b=new Date(f[0].getTime()),y=new Date(f[0].getTime());b.setDate(b.getDate()+r.maxRange),y.setDate(y.getDate()-r.maxRange);const w=new Date;b>w&&(b=w),g.set("minDate",y),g.set("maxDate",b)}}),ee(`#${i.value}`,d)}),(d,f)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(fe,{id:t.unref(e).labelledby,class:"mb-2",for:t.unref(i),label:d.label,required:t.unref(l)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(i),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(o)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:d.placeholder},d.$attrs,{type:"text",onInput:f[0]||(f[0]=(...m)=>t.unref(c)&&t.unref(c)(...m)),onInvalid:f[1]||(f[1]=(...m)=>t.unref(s)&&t.unref(s)(...m))}),null,16,_c),t.createVNode(ae,{id:t.unref(e).describedby,class:"mt-1",text:d.help},null,8,["id","text"]),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(o)},null,8,["id","text"])]))}}),Dc=["id","aria-labelledby","aria-describedby","aria-errormessage","value"],Nc=["textContent"],Sc=["value","disabled","textContent"],hr=t.defineComponent({inheritAttrs:!1,__name:"Select",props:t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{}},{...Me,placeholder:"Select an option"}),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isRequired:a,validate:i,modelState:l,errorState:s,onInvalid:c}=Ve(r),u=d=>{const f=d.target.selectedIndex;f>0&&(l.value=r.options[f-1].value,i(d))};return(d,f)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(fe,{id:t.unref(e).labelledby,class:"mb-2",for:t.unref(o),label:d.label,required:t.unref(a)},null,8,["id","for","label","required"]),t.createElementVNode("select",t.mergeProps({id:t.unref(o),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6 pl-3 pr-10","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200 disabled:opacity-100",t.unref(s)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],value:t.unref(l)},d.$attrs,{onChange:u,onInvalid:f[0]||(f[0]=(...m)=>t.unref(c)&&t.unref(c)(...m))}),[t.createElementVNode("option",{value:"",disabled:"",selected:"",textContent:t.toDisplayString(d.placeholder)},null,8,Nc),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.options,m=>(t.openBlock(),t.createElementBlock("option",{key:m.value,value:m.value,disabled:m.disabled,textContent:t.toDisplayString(m.label)},null,8,Sc))),128))],16,Dc),t.createVNode(ae,{id:t.unref(e).describedby,class:"mt-1",text:d.help},null,8,["id","text"]),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(s)},null,8,["id","text"])]))}}),gr=t.defineComponent({__name:"DateFilter",props:{dateRange:{},sortDir:{}},emits:["sort-dir-changed","date-range-changed"],setup(n,{emit:r}){const e=n,o=t.ref(e.dateRange),a=t.ref(e.sortDir),i=[{label:"Newest-Oldest",value:"desc"},{label:"Oldest-Newest",value:"asc"}],l=c=>{r("sort-dir-changed",c)},s=c=>{r("date-range-changed",c)};return(c,u)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(hr,{modelValue:a.value,"onUpdate:modelValue":[u[0]||(u[0]=d=>a.value=d),l],options:i},null,8,["modelValue"]),t.createVNode(hn,{modelValue:o.value,"onUpdate:modelValue":[u[1]||(u[1]=d=>o.value=d),s],class:"ml-3"},null,8,["modelValue"])],64))}});function ft(n,r="GET",e={}){const o=t.ref(),a=t.shallowRef(),i=t.ref(!1),l=t.ref(!1),s=t.ref(!1),c=t.ref(!1);let u=0,d;const f=()=>{d!==void 0&&d.abort()},m=(g={},b={})=>{u++;const y=u;d=new AbortController,c.value=!1,l.value=!1,s.value=!0;const w={data:["PATCH","patch","POST","post","PUT","put"].includes(r)?g:{},method:r,params:["GET","get"].includes(r)?g:{},signal:d.signal,url:n};return tt(w,{...e,...b}).then(k=>(o.value=k,a.value=void 0,c.value=!1,k),k=>{throw a.value=k,bo(k)&&(c.value=!0),k}).finally(()=>{y==u&&(l.value=!0,s.value=!1),i.value=!0})};return e!=null&&e.immediate&&e.immediate===!0&&m(),{result:o,error:a,isFinished:l,isLoading:s,isAborted:c,hasFetched:i,abort:f,execute:m}}function Vc(n,r={}){return ft(n,"GET",r)}function $c(n,r={}){return ft(n,"DELETE",r)}function Bc(n,r={}){return ft(n,"PATCH",r)}function vc(n,r={}){return ft(n,"POST",r)}function Tc(n,r={}){return ft(n,"PUT",r)}function Ia(n={}){const r=t.ref(new Map);let e={removeDelay:1e4,email:""};const o=m=>{e={...e,...m}},a=m=>{r.value.delete(m)},i=m=>{const g=wo.CreateIdAttribute();return r.value.set(g,m),(m.persistent===void 0||!m.persistent)&&setTimeout(()=>a(g),e.removeDelay),g},l=m=>i(m),s=(m,g=!1)=>i({message:m,persistent:g,type:"error"}),c=(m,g=!1)=>i({message:m,persistent:g,type:"info"}),u=(m,g=!1)=>i({message:m,persistent:g,type:"success"}),d=(m,g=!1)=>i({message:m,persistent:g,type:"warning"}),f=(m="",g=!1)=>{const b=m||e.email,y=b?`Whoops! Something went wrong, please reach out to
15
15
  <a class="underline text-xy-blue" href="mailto:${b}">${b}</a>
16
- if the issue persists.`:"Whoops! Something went wrong.";return i({message:y,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:i,remove:a,flash:l,error:s,warning:d,info:c,success:u,genericError:f},flashes:r,configure:o}}const Mc=n=>{if(window.Flashes)for(const r of window.Flashes){if(typeof r.type>"u"){const e=r.message.split(": ");n.add({type:e[0],message:e[1]});continue}n.add(r)}};let br;function Xe(){return br===void 0&&(br=Ia()),br}const yr={error(n,r){Xe().flasher.error(n,r)},info(n,r){Xe().flasher.info(n,r)},success(n,r){Xe().flasher.success(n,r)},warning(n,r){Xe().flasher.warning(n,r)},genericError(n,r){Xe().flasher.genericError(n,r)}},Oc=(n,r)=>{var u;const e=t.ref(n),o={initial:((u=e==null?void 0:e.value[0])==null?void 0:u.value)||"",paramName:(r==null?void 0:r.paramName)||"tab"},a=t.ref(o.initial),i=d=>!!e.value.find(f=>f.value===d),l=d=>a.value===d,c=new URLSearchParams(window.location.search).get(o.paramName);return c&&i(c)&&(a.value=c),t.watch(a,d=>{const f=new URLSearchParams(window.location.search);f.set(o.paramName,d.toString());const m=f.toString()!==""?`?${f.toString()}`:"";window.history.replaceState({tab:d},document.title,`${window.location.pathname}${m}`)}),{activeTab:a,isActiveTab:l,tabs:e}},Pc=n=>{const r=t.ref(n);return t.watch(r,e=>{const o=new URLSearchParams(window.location.search);for(const i in e){const l=e[i];if(l==null||l==null){o.delete(i);continue}if(Array.isArray(l)){o.delete(i),l.forEach(s=>{o.append(i,s.toString())});continue}!o.has(i)&&!l||o.set(i,l.toString())}const a=o.toString()!==""?`?${o.toString()}`:"";window.history.replaceState(t.toRaw(e),document.title,`${window.location.pathname}${a}`)},{deep:!0}),r},Ac={class:"px-4 flex items-center justify-between sm:px-0"},Rc={class:"w-0 flex-1 flex"},Lc=t.createElementVNode("svg",{class:"mr-3 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1),Ic={class:"hidden md:flex"},Fc=["onClick","textContent"],jc={class:"w-0 flex-1 flex justify-end"},Hc=t.createElementVNode("svg",{class:"ml-3 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),gn=t.defineComponent({__name:"Paginator",props:{modelValue:{}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=i=>{r("update:modelValue",{...e.modelValue,page:i})},a=t.computed(()=>{const i=[];if(e.modelValue.totalPages<=4){for(let s=0;s<e.modelValue.totalPages;s++)i.push(s+1);return i}if(e.modelValue.totalPages-e.modelValue.page>=3){for(let s=0;s<4;s++)i.push(e.modelValue.page+s);return i}for(let s=0;s<4;s++)i.unshift(e.modelValue.totalPages-s);return i});return(i,l)=>(t.openBlock(),t.createElementBlock("div",Ac,[t.createElementVNode("div",Rc,[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 border-transparent pt-4 pr-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400",i.modelValue.page==1?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:l[0]||(l[0]=t.withModifiers(s=>o(i.modelValue.page-1),["prevent"]))},[Lc,t.createTextVNode(" Previous ")],2)]),t.createElementVNode("div",Ic,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,s=>(t.openBlock(),t.createElementBlock("a",{key:s,href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",i.modelValue.page===s?"border-blue-500 text-blue-600 focus:outline-none focus:text-blue-800 focus:border-blue-700":"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-400"]),onClick:t.withModifiers(c=>o(s),["prevent"]),textContent:t.toDisplayString(s)},null,10,Fc))),128))]),t.createElementVNode("div",jc,[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 border-transparent pt-4 pl-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400",i.modelValue.page>=i.modelValue.totalPages?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:l[1]||(l[1]=t.withModifiers(s=>o(i.modelValue.page+1),["prevent"]))},[t.createTextVNode(" Next "),Hc],2)])]))}}),Uc={key:0,class:"flex"},Fa=t.defineComponent({__name:"DetailList",props:{borderless:{type:Boolean,default:!1},defaultSort:{default:"created_at"},defaultSortDir:{default:"desc"},disableDate:{type:Boolean,default:!1},disableNavigation:{type:Boolean,default:!1},perPage:{default:10},url:{}},setup(n,{expose:r}){const e=n,o=t.ref({minDate:0,maxDate:0}),a=t.ref([]),i=t.ref({page:1,perPage:e.perPage,totalItems:0,totalPages:0}),l=t.ref(e.defaultSort),s=t.ref(e.defaultSortDir),c=()=>{const b={maxDate:o.value.maxDate,minDate:o.value.minDate,page:i.value.page,perPage:i.value.perPage,q:"",sort:l.value,sortDir:s.value};Wn.get(e.url,{},b).then(y=>{i.value={page:y.data.page,perPage:y.data.perPage,totalItems:y.data.totalItems,totalPages:y.data.totalPages},a.value=y.data.items},()=>{yr.genericError()})},u=t.computed(()=>!!a.value.length),d=t.computed(()=>!e.disableDate),f=t.computed(()=>!e.disableNavigation&&u),g={refresh:c,reset:()=>{i.value.page=1,c()}};return t.watch([s,o],()=>{c()}),r(g),c(),(b,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({"mt-4 space-y-2":d.value})},[b.disableDate?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Uc,[t.createVNode(gr,{"date-range":o.value,"sort-dir":s.value,onSortDirChanged:y[0]||(y[0]=w=>s.value=w),onDateRangeChanged:y[1]||(y[1]=w=>o.value=w)},null,8,["date-range","sort-dir"])])),u.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["overflow-hidden",{"shadow sm:rounded-md border":!b.borderless}])},[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(w,k)=>(t.openBlock(),t.createElementBlock("li",{key:k,class:t.normalizeClass({"border-t border-gray-200":k>0})},[t.renderSlot(b.$slots,"default",{item:w})],2))),128))])],2)):t.renderSlot(b.$slots,"empty",{key:2},()=>[t.createTextVNode(" No items were found! ")]),f.value?(t.openBlock(),t.createBlock(gn,{key:3,modelValue:i.value,"onUpdate:modelValue":[y[2]||(y[2]=w=>i.value=w),y[3]||(y[3]=w=>c())]},null,8,["modelValue"])):t.createCommentVNode("",!0)],2))}}),zc=["href"],ja=t.defineComponent({__name:"DownloadCell",props:{propsData:{},attribute:{}},setup(n){return(r,e)=>(t.openBlock(),t.createElementBlock("a",{href:r.propsData[r.attribute]},[t.createVNode(t.unref(Rs),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,zc))}}),qc={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},Wc={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},Yc={class:"p-4"},Kc={class:"flex items-center"},Gc={class:"w-0 flex-1 flex justify-between"},Jc=["innerHTML"],Xc={class:"ml-4 shrink-0 flex"},Zc=["onClick"],Qc=[t.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)],bn=t.defineComponent({__name:"Flash",setup(n){const{flasher:r,flashes:e}=Xe(),o=a=>{switch(a){case"warning":return"border-orange-500";case"error":return"border-red-500";case"info":return"border-blue-500";case"success":return"border-green-500"}};return t.onMounted(()=>{Mc(r)}),(a,i)=>(t.openBlock(),t.createBlock(t.unref(Kn),null,{default:t.withCtx(()=>[t.createElementVNode("div",qc,[t.createVNode(t.TransitionGroup,{tag:"div",class:"max-w-sm space-y-2 w-full","enter-active-class":"ease-out duration-300","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),([l,s])=>(t.openBlock(),t.createElementBlock("div",{key:s.message,class:t.normalizeClass(["bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform z-10",[o(s.type)]])},[t.createElementVNode("div",Wc,[t.createElementVNode("div",Yc,[t.createElementVNode("div",Kc,[t.createElementVNode("div",Gc,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:s.message},null,8,Jc)]),t.createElementVNode("div",Xc,[t.createElementVNode("button",{class:"inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150",onClick:c=>t.unref(r).remove(l)},Qc,8,Zc)])])])])],2))),128))]),_:1})])]),_:1}))}}),qm="";function ed(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])}function td(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h7"})])}function nd(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})])}function Ha(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})])}function Vt(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})])}const rd={class:"flex"},od={class:"flex-shrink-0"},ad={class:"ml-2.5"},id={key:0,role:"list",class:"list-disc space-y-1 pl-5"},ld={key:1},sd={key:1,class:"mt-4"},cd={class:"flex flex-col gap-y-1.5 -mx-2 sm:flex-row sm:gap-x-3 sm:items-center"},dd={key:0},ud=["href","role"],fd={key:1},pd=["href","role"],md={key:0,class:"ml-auto pl-3"},hd={class:"-mx-1.5 -my-1.5"},gd=t.createElementVNode("span",{class:"sr-only"},"close",-1),Ua=t.defineComponent({__name:"InlineAlert",props:{btnLink:{default:""},btnText:{default:""},content:{},dismissable:{type:Boolean,default:!1},secondaryBtnLink:{default:""},secondaryBtnText:{default:""},title:{default:""},kind:{}},emits:["close","click","click:secondary"],setup(n,{emit:r}){const e=n,o=t.ref(!0),a=()=>{o.value=!1,r("close",!0)},i=t.computed(()=>{const s={bgColor:"",btnAction:"",btnClose:"",contentColor:"",iconColor:""};switch(e.kind){case"alert":s.bgColor="bg-red-50",s.btnAction="bg-red-50 text-red-900 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",s.btnClose="bg-red-50 text-red-600 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",s.contentColor="text-red-800",s.iconColor="text-red-400";break;case"info":s.bgColor="bg-blue-50",s.btnAction="bg-blue-50 text-blue-900 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",s.btnClose="bg-blue-50 text-blue-600 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",s.contentColor="text-blue-800",s.iconColor="text-blue-400";break;case"success":s.bgColor="bg-emerald-50",s.btnAction="bg-emerald-50 text-emerald-900 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",s.btnClose="bg-emerald-50 text-emerald-600 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",s.contentColor="text-emerald-800",s.iconColor="text-emerald-400";break;case"warn":s.bgColor="bg-amber-50",s.btnAction="bg-amber-50 text-amber-900 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",s.btnClose="bg-amber-50 text-amber-600 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",s.contentColor="text-amber-800",s.iconColor="text-amber-400";break}return s}),l=t.computed(()=>{let s=null;switch(e.kind){case"alert":s=Fs;break;case"info":s=Is;break;case"success":s=ia;break;case"warn":s=Ls;break}return s});return(s,c)=>o.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["rounded-xy p-4",i.value.bgColor])},[t.createElementVNode("div",rd,[t.createElementVNode("div",od,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),{class:t.normalizeClass(["h-5 w-5",i.value.iconColor]),"aria-hidden":"true"},null,8,["class"]))]),t.createElementVNode("div",ad,[s.title?(t.openBlock(),t.createElementBlock("h3",{key:0,class:t.normalizeClass(["text-sm leading-snug font-semibold mb-1.5",i.value.contentColor])},t.toDisplayString(s.title),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["text-sm",i.value.contentColor])},[Array.isArray(s.content)?(t.openBlock(),t.createElementBlock("ul",id,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.content,(u,d)=>(t.openBlock(),t.createElementBlock("li",{key:d},t.toDisplayString(u),1))),128))])):(t.openBlock(),t.createElementBlock("p",ld,t.toDisplayString(s.content),1))],2),s.btnText||s.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",sd,[t.createElementVNode("div",cd,[s.btnText?(t.openBlock(),t.createElementBlock("div",dd,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-3xl px-2.5 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnAction]),href:s.btnLink,role:s.btnLink?"link":"button",onClick:c[0]||(c[0]=u=>s.$emit("click",u))},t.toDisplayString(s.btnText),11,ud)])):t.createCommentVNode("",!0),s.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",fd,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-3xl px-2.5 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnAction]),href:s.secondaryBtnLink,role:s.secondaryBtnLink?"link":"button",onClick:c[1]||(c[1]=u=>s.$emit("click:secondary",u))},t.toDisplayString(s.secondaryBtnText),11,pd)])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),s.dismissable?(t.openBlock(),t.createElementBlock("div",md,[t.createElementVNode("div",hd,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex rounded-md p-1.5 focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnClose]),type:"button",onClick:a},[gd,t.createVNode(t.unref(Vt),{class:"h-4 w-4"})],2)])])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)}}),bd={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},yd=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1),wd={class:"block absolute top-0 right-0 pt-4 pr-4 sm:pt-6 sm:pr-8"},xd=t.createElementVNode("span",{class:"sr-only"},"Close",-1),Cd={class:"bg-white px-4 pt-5 pb-4 sm:p-8 sm:pb-6"},kd={class:"mt-3 sm:mt-0 sm:text-left"},Ed={class:"mt-2"},_d={key:0,class:"bg-gray-50 px-4 py-3 sm:py-4 sm:px-8 sm:flex sm:flex-row-reverse"},Dd=["disabled","textContent"],za=t.defineComponent({__name:"Modal",props:{destructive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},modelValue:{type:Boolean},wide:{type:Boolean,default:!1},submitText:{default:""},title:{default:""}},emits:["submit","update:modelValue"],setup(n,{emit:r}){const e=()=>{r("submit")},o=a=>{r("update:modelValue",a)};return(a,i)=>(t.openBlock(),t.createBlock(t.unref(kt),{as:"template",show:a.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Qt),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",open:a.modelValue,onClose:i[3]||(i[3]=l=>o(!1))},{default:t.withCtx(()=>[t.createElementVNode("div",bd,[t.createVNode(t.unref(Re),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(en),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),yd,t.createVNode(t.unref(Re),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["inline-block align-bottom bg-white rounded-xy text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:rounded-xy-lg w-full",a.wide?"sm:max-w-6xl":"sm:max-w-2xl"])},[t.createElementVNode("div",wd,[t.createElementVNode("button",{type:"button",class:"bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",onClick:i[0]||(i[0]=l=>o(!1))},[xd,t.createVNode(t.unref(Vt),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",Cd,[t.createElementVNode("div",kd,[t.createVNode(t.unref(Xn),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.title),1)]),_:1}),t.createElementVNode("div",Ed,[t.renderSlot(a.$slots,"default")])])]),a.submitText?(t.openBlock(),t.createElementBlock("div",_d,[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["xy-btn w-full sm:ml-3 sm:w-auto sm:text-sm",[a.destructive?"xy-btn-red":"xy-btn"]]),disabled:a.disabled,onClick:i[1]||(i[1]=l=>e()),textContent:t.toDisplayString(a.submitText)},null,10,Dd),t.createElementVNode("button",{ref:"cancelButtonRef",type:"button",class:"xy-btn-neutral mt-3 w-full sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",onClick:i[2]||(i[2]=l=>o(!1))}," Cancel ",512)])):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"buttons")],2)]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),Nd={class:"aspect-square overflow-hidden"},Sd={class:"flex justify-center relative"},Vd={class:"sr-only"},$d=t.createElementVNode("div",{class:"animate-spin-gear drop-shadow-sm"},[t.createElementVNode("svg",{class:"h-full w-full text-xy-green-300",viewBox:"0 0 129 129",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[t.createElementVNode("defs",null,[t.createElementVNode("polygon",{id:"path-1",points:"0.000248076923 0.48676924 128.472837 0.48676924 128.472837 128.800648 0.000248076923 128.800648"})]),t.createElementVNode("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createElementVNode("g",{id:"Group-6-Copy-3"},[t.createElementVNode("g",{id:"Group-3"},[t.createElementVNode("mask",{id:"mask-2",fill:"white"},[t.createElementVNode("use",{"xlink:href":"#path-1"})]),t.createElementVNode("g",{id:"Clip-2"}),t.createElementVNode("path",{id:"Fill-1",d:"M86.3955173,100.279324 C86.3955173,100.279324 79.4778923,106.213874 64.2360462,106.755809 C48.9954404,106.213874 42.0778154,100.279324 42.0778154,100.279324 C11.8756904,81.4963011 25.2309115,49.088357 25.2309115,49.088357 C36.5680269,24.1350542 59.1839596,22.5554236 63.8105942,22.4983139 L63.8105942,22.5043894 C63.8105942,22.5043894 63.9681231,22.4983139 64.2360462,22.4958837 C64.5052096,22.4983139 64.6627385,22.5043894 64.6627385,22.5043894 L64.6627385,22.4983139 C69.2881327,22.5554236 91.9053058,24.1350542 103.241181,49.088357 C103.241181,49.088357 116.596402,81.4963011 86.3955173,100.279324 L86.3955173,100.279324 Z M128.473085,68.8191581 L128.473085,60.4677727 L117.036738,58.80187 L115.10794,49.3726905 L124.970238,43.4186983 L121.675777,35.7307578 L110.49619,38.6214817 L106.161046,32.1486416 L113.220075,23.080347 L107.361738,17.0716753 L97.9645846,23.7437918 L89.14545,17.842049 L91.8693346,6.72144964 L84.04995,3.59378109 L78.2114596,13.4628269 L69.5907865,11.8127205 L67.908825,0.48676924 L64.6627385,0.48676924 L63.8105942,0.48676924 L60.5645077,0.48676924 L58.8813058,11.8127205 L50.2618731,13.4628269 L44.4233827,3.59378109 L36.6039981,6.72144964 L39.3278827,17.842049 L30.5087481,23.7437918 L21.1103538,17.0716753 L15.2520173,23.080347 L22.3122865,32.1486416 L17.9771423,38.6214817 L6.79755577,35.7307578 L3.50185385,43.4186983 L13.3641519,49.3726905 L11.4365942,58.80187 L0.000248076923,60.4677727 L0.000248076923,68.8191581 L11.4365942,70.4850608 L13.1036712,79.0223566 L3.13718077,84.8050196 L6.29644038,92.5488548 L17.5244019,89.8513318 L23.4832096,98.5854738 L16.7466808,107.893143 L22.8134019,113.695248 L31.9699212,106.70356 L38.5067481,110.99651 L35.5881231,122.068505 L43.35045,125.332265 L49.3625942,115.565287 L58.8813058,117.47421 L60.5645077,128.801377 L63.6927577,128.801377 L64.780575,128.801377 L67.908825,128.801377 L69.5907865,117.47421 L79.1107385,115.565287 L85.1228827,125.332265 L92.8852096,122.068505 L89.9665846,110.99651 L96.5034115,106.70356 L105.659931,113.695248 L111.725412,107.893143 L104.988883,98.5854738 L110.94769,89.8513318 L122.175652,92.5488548 L125.334912,84.8050196 L115.369662,79.0223566 L117.035498,70.4850608 L128.473085,68.8191581 Z",fill:"currentColor",mask:"url(#mask-2)"})])])])])],-1),Bd=t.createElementVNode("div",{class:"absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"},[t.createElementVNode("svg",{viewBox:"0 0 280 280",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[t.createElementVNode("path",{class:"fill-xy-green",d:"m17.57,94.37c-3.36,13.54-5.07,28.73-5.07,45.63,0,32.02,6.04,58,18.1,77.95,3.81,4.98,7.46,9.94,10.95,14.66,21.21,23.24,54.01,34.89,98.45,34.89.71,0,1.39-.03,2.09-.03-3.62-46.93-22.27-88.31-54.36-124.11-19.79-22.07-42.96-38.86-70.16-48.99Z"}),t.createElementVNode("path",{class:"fill-xy-blue",d:"m267.5,140c0-85-42.5-127.5-127.5-127.5-55.06,0-92.27,17.86-111.66,53.53,28.32,8.48,56.67,16.85,84.98,25.37,27.05,8.14,54.01,16.55,81.06,24.67,5.45,1.64,7.5,4.76,6.63,10.27-.69,4.35-1.04,8.75-1.57,13.13-4.95,40.77-8.32,81.74-12.43,122.61,53.64-13.88,80.49-54.56,80.49-122.08Z"})])],-1),wr=t.defineComponent({__name:"XYSpinner",setup(n){const r=t.useAttrs();return(e,o)=>{var a,i;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass((a=t.unref(r))!=null&&a.class?(i=t.unref(r))==null?void 0:i.class:"h-20 w-20"),role:"status"},[t.createElementVNode("div",Nd,[t.createElementVNode("div",Sd,[t.createElementVNode("p",Vd,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode("loading")])]),$d,Bd])])],2)}}}),vd={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-40 bg-gray-50 bg-opacity-60"},Td={class:"mt-2"},yn=t.defineComponent({__name:"Spinner",setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:i,showMsg:l}=ho(),s=()=>{r.value++,r.value>o.value&&(r.value=0),a.value&&(i.value=a.value[r.value]),l.value=!0},c=()=>{window.setTimeout(()=>{l.value=!1},2500)};return(u,d)=>(t.openBlock(),t.createBlock(t.unref(Kn),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",vd,[t.createVNode(wr,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",Td,[t.createVNode(t.Transition,{appear:"","enter-active-class":"ease-out duration-1000","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onAfterEnter:c,onAfterLeave:s},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:"container font-medium text-lg leading-snug text-center transition-opacity"},t.toDisplayString(t.unref(i)),513),[[t.vShow,t.unref(l)]])]),_:1})],512),[[t.vShow,t.unref(a)]])])):t.createCommentVNode("",!0)]),_:1}))}}),Md={class:"h-screen flex overflow-hidden bg-gray-50"},Od={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},Pd={class:"absolute top-0 right-0 -mr-12 pt-2"},Ad=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1),Rd={class:"shrink-0 flex justify-center px-4"},Ld=["src"],Id={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},Fd={class:"flex-1 px-2"},jd={class:"space-y-1"},Hd=["href","target"],Ud={key:0,class:"mt-auto"},zd={class:"mt-6 px-2"},qd=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1),Wd={class:"hidden lg:flex lg:shrink-0"},Yd={class:"flex flex-col w-64"},Kd={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},Gd={class:"flex justify-center shrink-0 px-4"},Jd=["src"],Xd={class:"mt-5 grow flex flex-col"},Zd={class:"flex-1 px-2 bg-white"},Qd={class:"space-y-1"},eu=["href","target"],tu={key:0,class:"mt-atuo"},nu={class:"mt-6 px-2"},ru={class:"flex flex-col w-0 flex-1 overflow-hidden"},ou={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},au=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1),iu={class:"flex-1 px-4 flex justify-between"},lu={class:"flex-1 flex"},su={class:"flex items-center text-base leading-snug sm:text-2xl text-white"},cu={class:"ml-4 flex items-center lg:ml-6"},du=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),uu=["href"],fu={class:"flex-1 relative overflow-y-auto focus:outline-none"},pu={class:"mx-auto"},qa=t.defineComponent({__name:"SidebarLayout",props:{activeUrl:{default:""},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=t.ref(!1),o=a=>r.activeUrl===a;return(a,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Md,[t.createVNode(t.unref(kt),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Qt),{as:"div",static:"",class:"fixed inset-0 flex z-10 lg:hidden",open:e.value,onClose:i[1]||(i[1]=l=>e.value=!1)},{default:t.withCtx(()=>[t.createVNode(t.unref(Re),{as:"template",enter:"transition-opacity ease-linear duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"transition-opacity ease-linear duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(en),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(Re),{as:"template",enter:"transition ease-in-out duration-300 transform","enter-from":"-translate-x-full","enter-to":"translate-x-0",leave:"transition ease-in-out duration-300 transform","leave-from":"translate-x-0","leave-to":"-translate-x-full"},{default:t.withCtx(()=>[t.createElementVNode("div",Od,[t.createVNode(t.unref(Re),{as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createElementVNode("div",Pd,[t.createElementVNode("button",{class:"ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",onClick:i[0]||(i[0]=l=>e.value=!1)},[Ad,t.createVNode(t.unref(Vt),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",Rd,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,Ld)]),t.createElementVNode("div",Id,[t.createElementVNode("div",Fd,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",jd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-700 hover:bg-gray-50 hover:text-gray-900","group flex items-center px-2 py-2 text-base font-semibold rounded-md"]),target:l.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{class:t.normalizeClass([o(l.url)?"text-gray-600":"text-gray-500 group-hover:text-gray-600","mr-4 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,Hd))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",Ud,[t.createElementVNode("div",zd,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),qd]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",Wd,[t.createElementVNode("div",Yd,[t.createElementVNode("div",Kd,[t.createElementVNode("div",Gd,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,Jd)]),t.createElementVNode("div",Xd,[t.createElementVNode("div",Zd,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",Qd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-800 hover:bg-gray-100 hover:text-gray-900","group flex items-center px-2 py-2 text-sm font-semibold rounded-md"]),target:l.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{class:t.normalizeClass([o(l.url)?"text-gray-600":"text-gray-400 group-hover:text-gray-600","mr-3 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,eu))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",tu,[t.createElementVNode("div",nu,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",ru,[t.createElementVNode("div",ou,[t.createElementVNode("button",{class:"px-4 border-r border-gray-200 text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500 lg:hidden",onClick:i[2]||(i[2]=l=>e.value=!0)},[au,t.createVNode(t.unref(td),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",iu,[t.createElementVNode("div",lu,[t.createElementVNode("h1",su,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",cu,[t.createVNode(t.unref(Zn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Qn),{class:"max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-900 hover:text-gray-50 focus:outline-none focus:ring focus:text-white"},{default:t.withCtx(()=>[du,t.createVNode(t.unref(Ps),{class:"h-8 w-8",fill:"currentColor"})]),_:1})]),t.createVNode(t.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:t.withCtx(()=>[t.createVNode(t.unref(er),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(tr),{key:l.name},{default:t.withCtx(({active:s})=>[t.createElementVNode("a",{href:l.url,class:t.normalizeClass([s?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(l.name),11,uu)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",fu,[t.createElementVNode("div",pu,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(bn),t.createVNode(yn)],64))}}),$t=t.defineComponent({__name:"Popover",props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=t.ref(null),o=t.ref(null),a=t.computed(()=>{const s=[Xs(5),Qs()];return r.position==="auto"&&s.push(Js()),s}),i=t.computed(()=>{if(r.position!=="auto")return r.position}),{floatingStyles:l}=Ma(e,o,{middleware:a,placement:i,strategy:"fixed",whileElementsMounted:$a});return(s,c)=>(t.openBlock(),t.createBlock(t.unref(Ko),{as:s.as,class:"relative"},{default:t.withCtx(({open:u,close:d})=>[t.createVNode(t.unref(ks),{ref_key:"trigger",ref:e},{default:t.withCtx(()=>[t.renderSlot(s.$slots,"button",{open:u,close:d})]),_:2},1536),t.createElementVNode("div",{ref_key:"wrapper",ref:o,class:"z-[5]",style:t.normalizeStyle(t.unref(l))},[t.createVNode(t.unref(Es),null,{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default",{open:u,close:d})]),_:2},1024)],4)]),_:3},8,["as"]))}}),mu=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e},hu={},gu={class:"w-full max-w-xs bg-white rounded-xy p-2 border border-gray-100 shadow-md"};function bu(n,r){return t.openBlock(),t.createElementBlock("div",gu,[t.renderSlot(n.$slots,"default")])}const Wa=mu(hu,[["render",bu]]),yu={class:"absolute inset-0 overflow-hidden"},wu={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},xu={class:"w-screen max-w-md"},Cu={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},ku={class:"py-6 px-4 bg-xy-blue-700 sm:px-6"},Eu={class:"flex items-center justify-between"},_u={class:"ml-3 h-7 flex items-center"},Du=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1),Nu={class:"mt-1"},Su=["textContent"],Vu={class:"relative flex-1 py-6 px-4 sm:px-6"},Ya=t.defineComponent({__name:"Slideover",props:{header:{},description:{},modelValue:{type:Boolean}},emits:["close","update:modelValue"],setup(n,{emit:r}){const e=n,o=t.ref(e.modelValue),a=()=>{o.value=!1,r("close",o.value),r("update:modelValue",o.value)};return(i,l)=>(t.openBlock(),t.createBlock(t.unref(kt),{as:"template",show:i.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Qt),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",open:i.modelValue,onClose:l[1]||(l[1]=s=>a())},{default:t.withCtx(()=>[t.createElementVNode("div",yu,[t.createVNode(t.unref(en),{class:"absolute inset-0"}),t.createElementVNode("div",wu,[t.createVNode(t.unref(Re),{as:"template",enter:"transform transition ease-in-out duration-500 sm:duration-700","enter-from":"translate-x-full","enter-to":"translate-x-0",leave:"transform transition ease-in-out duration-500 sm:duration-700","leave-from":"translate-x-0","leave-to":"translate-x-full"},{default:t.withCtx(()=>[t.createElementVNode("div",xu,[t.createElementVNode("div",Cu,[t.createElementVNode("div",ku,[t.createElementVNode("div",Eu,[t.createVNode(t.unref(Xn),{as:"h3",class:"text-white"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.header),1)]),_:1}),t.createElementVNode("div",_u,[t.createElementVNode("button",{class:"bg-xy-blue-600 rounded-md text-gray-50 hover:text-white focus:outline-none focus:ring-2 focus:ring-white",onClick:l[0]||(l[0]=s=>a())},[Du,t.createVNode(t.unref(Vt),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",Nu,[t.createElementVNode("p",{class:"text-gray-50 text-base font-medium",textContent:t.toDisplayString(i.description)},null,8,Su)])]),t.createElementVNode("div",Vu,[t.renderSlot(i.$slots,"default")]),t.renderSlot(i.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),$u=["onMouseover","onMouseleave"],Bu=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1),vu=["onMouseleave"],Tu={class:"max-w-xs"},Ka=t.defineComponent({__name:"Tooltip",props:{as:{default:"span"},position:{default:"auto"}},setup(n){var r=!1,e=null;const o=i=>{r=!1,e&&clearTimeout(e),e=setTimeout(()=>{r||i()},100)},a=(i,l)=>{r=!0,!l&&i.target&&i.target.click()};return(i,l)=>(t.openBlock(),t.createBlock($t,{position:i.position,as:i.as},{button:t.withCtx(({open:s,close:c})=>[t.createElementVNode("div",{class:"leading-none relative w-4 h-4",onMouseover:u=>a(u,s),onMouseleave:u=>o(c)},[t.createVNode(t.unref(ed)),Bu],40,$u)]),default:t.withCtx(({close:s})=>[t.createElementVNode("div",{class:"sm:min-w-max bg-white rounded-xy px-3.5 py-2.5 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium",onMouseover:l[0]||(l[0]=t.withModifiers(c=>t.isRef(r)?r.value=!0:r=!0,["prevent"])),onMouseleave:t.withModifiers(c=>o(s),["prevent"])},[t.createElementVNode("div",Tu,[t.renderSlot(i.$slots,"default")])],40,vu)]),_:3},8,["position","as"]))}}),Mu={class:"min-h-screen bg-gray-50"},Ou={class:"mx-auto px-4 sm:px-6 lg:px-8"},Pu={class:"flex justify-between h-16"},Au={class:"flex"},Ru={class:"shrink-0 flex items-center"},Lu=["src"],Iu={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},Fu=["href","aria-current"],ju={class:"hidden sm:ml-6 sm:flex sm:items-center"},Hu=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),Uu=["href"],zu={class:"-mr-2 flex items-center sm:hidden"},qu=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1),Wu={class:"pt-2 pb-3 space-y-1"},Yu=["href","aria-current"],Ku={class:"pt-4 pb-3 border-t border-gray-200"},Gu={class:"flex items-center px-4"},Ju={class:"shrink-0"},Xu={class:"ml-3"},Zu=["textContent"],Qu=["textContent"],ef={class:"mt-3 space-y-1"},tf=["href"],nf={class:"mx-auto sm:px-6 lg:px-8"},rf={class:"px-4 py-8 sm:px-0"},Ga=t.defineComponent({__name:"StackedLayout",props:{activeUrl:{default:""},currentUser:{},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=o=>r.activeUrl===o;return(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Mu,[t.createVNode(t.unref(ms),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:i})=>[t.createElementVNode("div",Ou,[t.createElementVNode("div",Pu,[t.createElementVNode("div",Au,[t.createElementVNode("div",Ru,[t.createElementVNode("img",{class:"block h-8 w-auto",src:o.iconUrl,alt:"XY Trees"},null,8,Lu)]),t.createElementVNode("div",Iu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"border-blue-500 text-gray-900":"border-transparent text-gray-700 hover:text-gray-900 hover:border-blue-500","inline-flex items-center px-1 pt-1 border-b-2 text-sm font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,Fu))),128))])]),t.createElementVNode("div",ju,[t.createVNode(t.unref(Zn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Qn),{class:"bg-white flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:t.withCtx(()=>[Hu,t.createVNode(t.unref(Ha),{class:"text-gray-500 h-8 w-8 rounded-full"})]),_:1})]),t.createVNode(t.Transition,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:t.withCtx(()=>[t.createVNode(t.unref(er),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(tr),{key:l.name},{default:t.withCtx(({active:s})=>[t.createElementVNode("a",{href:l.url,class:t.normalizeClass([s?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(l.name),11,Uu)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",zu,[t.createVNode(t.unref(hs),{class:"bg-white inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:t.withCtx(()=>[qu,i?(t.openBlock(),t.createBlock(t.unref(Vt),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(nd),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(gs),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",Wu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"bg-blue-50 border-blue-500 text-blue-700":"border-transparent text-gray-700 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-900","block pl-3 pr-4 py-2 border-l-4 text-base font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,Yu))),128))]),t.createElementVNode("div",Ku,[t.createElementVNode("div",Gu,[t.createElementVNode("div",Ju,[t.createVNode(t.unref(Ha),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",Xu,[o.currentUser.name?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-base font-medium text-gray-800",textContent:t.toDisplayString(o.currentUser.name)},null,8,Zu)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(o.currentUser.email)},null,8,Qu)])]),t.createElementVNode("div",ef,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:"block px-4 py-2 text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100"},t.toDisplayString(l.name),9,tf))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",nf,[t.createElementVNode("div",rf,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(bn),t.createVNode(yn)],64))}}),of=n=>n==null,af={refresh(){console.warn("refresh() was called on a static table, did you mean to use DynamicTable?")},reset(){console.warn("reset() was called on a static table, did you mean to use DynamicTable?")}},Ja=(n,r,e,o=af)=>{const a=t.ref(r),i=t.ref(n),l=t.ref(e),s=t.computed(()=>l.value.actions.length>0),c=t.computed(()=>a.value.map(d=>{let f="";switch((d==null?void 0:d.alignment)||"left"){case"left":f="text-left";break;case"right":f="text-right";break;case"center":f="text-center";break}return{...d,alignment:f}})),u=t.computed(()=>i.value.map((d,f)=>({actions:l.value.actions.map(m=>({...m,disabled:typeof m.disabled=="function"?m.disabled.apply(void 0,[d,f]):m.disabled,onClick:()=>m.onClick(d,f,o),show:typeof m.show=="function"?m.show.apply(void 0,[d,f]):m.show})),rowData:d,cells:c.value.map(m=>{const g=typeof m.render=="string"?d[m.render]:m.render(d,f),b=(m==null?void 0:m.classNames)||"";return{...m,isComponent:t.isVNode(g),classNames:typeof b=="function"?b.apply(void 0,[d,f]):b,val:g}})})));return{columns:c,hasActions:s,isEmptyCellValue:of,rows:u}},lf={key:0,class:"flex items-center space-x-2 justify-end"},sf={class:"isolate inline-flex rounded-md shadow-sm"},cf=["disabled","onClick"],df={class:"relative inline-flex items-center gap-x-1.5"},Xa=t.defineComponent({__name:"TableActionButtons",props:{actions:{default:()=>[]}},setup(n){const r=n,{actions:e,hasActions:o}=sa(t.toRef(r,"actions"));return(a,i)=>t.unref(o)?(t.openBlock(),t.createElementBlock("div",lf,[t.createElementVNode("span",sf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(l,s)=>(t.openBlock(),t.createElementBlock("button",{key:s,type:"button",class:t.normalizeClass(["group relative inline-flex items-center bg-white px-3 py-2 text-sm font-semibold text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 disabled:text-gray-400 disabled:cursor-not-allowed",{"rounded-l-md":s===0,"-ml-px":s>0,"rounded-r-md":s===t.unref(e).length-1}]),disabled:l.disabled,onClick:t.withModifiers(l.onClick,["stop"])},[t.createElementVNode("span",df,[l.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{key:0,class:t.normalizeClass(["-ml-0.5 h-4 w-4 group-disabled:text-gray-300",l.label?"text-gray-400":"text-gray-600"]),"aria-hidden":"true"},null,8,["class"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(l.label),1)])],10,cf))),128))])])):t.createCommentVNode("",!0)}}),uf={class:"flex flex-col"},ff={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},pf={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},mf={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},hf={class:"min-w-full divide-y divide-gray-200"},gf={class:"bg-gray-100"},bf={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},yf={class:"bg-white"},wf={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},xf={key:0},Cf=["colspan"],Za=t.defineComponent({__name:"DataTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableData:{}},setup(n){const r=n,{columns:e,hasActions:o,isEmptyCellValue:a,rows:i}=Ja(t.toRef(r,"tableData"),t.toRef(r,"tableColumns"),t.toRef(r,"tableActions"));return(l,s)=>(t.openBlock(),t.createElementBlock("div",uf,[t.createElementVNode("div",ff,[t.createElementVNode("div",pf,[t.createElementVNode("div",mf,[t.createElementVNode("table",hf,[t.createElementVNode("thead",gf,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(c,u)=>(t.openBlock(),t.createElementBlock("th",{key:u,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",c.alignment])},t.toDisplayString(c.title),3))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("th",bf)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",yf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(i),(c,u)=>(t.openBlock(),t.createElementBlock("tr",{key:u,class:"even:bg-gray-50"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.cells,(d,f)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:f,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",d.alignment])},{default:t.withCtx(()=>[d.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(d.classNames)},t.toDisplayString(t.unref(a)(d.val)?"-":String(d.val)),3))]),_:2},1032,["class"]))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("td",wf,[l.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(un),{key:0,actions:c.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Xa,{key:1,actions:c.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)]))),128)),t.unref(i).length===0?(t.openBlock(),t.createElementBlock("tr",xf,[t.createElementVNode("td",{colspan:t.unref(e).length+(t.unref(o)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Cf)])):t.createCommentVNode("",!0)])])])])])]))}}),kf={class:"flex items-center justify-center space-x-8"},Ef={class:"font-medium"},_f={class:"flex items-center space-x-5"},Df={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},Nf={key:1,class:"relative flex items-center justify-center"},Sf=[t.createElementVNode("span",{class:"absolute w-5 h-5 p-px flex"},[t.createElementVNode("span",{class:"w-full h-full rounded-full bg-green-100"})],-1),t.createElementVNode("span",{class:"relative block w-2.5 h-2.5 bg-xy-green rounded-full"},null,-1)],Vf={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},$f={key:0,class:"flex shrink-0"},Bf={key:0,class:"inline-flex rounded-md shadow-sm"},vf=["textContent"],Tf={class:"ml-3 inline-flex rounded-md shadow-sm"},Mf=["textContent"],Qa=t.defineComponent({__name:"Steps",props:{hideActions:{type:Boolean,default:!1},hidePrevious:{type:Boolean,default:!1},nextText:{default:"Next"},previousText:{default:"Back"},step:{},total:{}},emits:["next","previous"],setup(n,{emit:r}){const e=()=>{r("next")},o=()=>{r("previous")};return(a,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",kf,[t.createElementVNode("p",Ef,"Step "+t.toDisplayString(a.step)+" of "+t.toDisplayString(a.total),1),t.createElementVNode("ul",_f,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.total,l=>(t.openBlock(),t.createElementBlock("li",{key:l},[a.step>l?(t.openBlock(),t.createElementBlock("span",Df)):a.step===l?(t.openBlock(),t.createElementBlock("div",Nf,Sf)):(t.openBlock(),t.createElementBlock("span",Vf))]))),128))])]),a.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",$f,[a.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Bf,[t.createElementVNode("button",{type:"button",class:"xy-btn-secondary",onClick:o,textContent:t.toDisplayString(a.previousText)},null,8,vf)])),t.createElementVNode("span",Tf,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:e,textContent:t.toDisplayString(a.nextText)},null,8,Mf)])]))]))}}),Of={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},Pf={key:0,class:"w-full max-w-lg lg:max-w-xs"},Af=t.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),Rf={class:"flex items-center gap-x-2"},Lf=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),If={class:"flex-1"},Ff={key:1,class:"w-full max-w-lg lg:max-w-xs"},jf=t.createElementVNode("label",{for:"table-date-range",class:"sr-only"},"Date Range",-1),Hf={class:"flex items-center gap-x-2"},Uf=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1),zf={class:"flex-1"},qf={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},Wf={class:"min-w-full divide-y divide-gray-200"},Yf={class:"bg-gray-100"},Kf=["onClick"],Gf={key:0},Jf={key:1},Xf={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},Zf=[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 9l4-4 4 4m0 6l-4 4-4-4"},null,-1)],Qf={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},ep=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"},null,-1)],tp={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},np=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)],rp={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},op={class:"bg-white"},ap=["onClick"],ip={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},lp={key:0},sp=["colspan"],ei=t.defineComponent({__name:"DynamicTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableOptions:{}},emits:["click:row"],setup(n,{expose:r}){const e=n,o=()=>{const A={minDate:b.value.minDate,maxDate:b.value.maxDate,page:y.value.page,perPage:y.value.perPage,sort:m.value,sortDir:g.value,q:w.value};Wn.get(e.tableOptions.url,{skipLoader:!1},A).then(M=>{y.value={page:M.data.page,perPage:M.data.perPage,totalItems:M.data.totalItems,totalPages:M.data.totalPages},l.value=M.data.items},()=>{yr.genericError()})},a=()=>{y.value.page=1,o()},i=()=>{if(_.value.maxRange){const A=new Date,M=A.setDate(A.getDate()-_.value.maxRange),T=new Date;b.value={minDate:Math.floor(M/1e3),maxDate:Math.floor(T.getTime()/1e3)}}},l=t.ref([]),s={refresh:o,reset:a},{columns:c,hasActions:u,isEmptyCellValue:d,rows:f}=Ja(l,t.toRef(e,"tableColumns"),t.toRef(e,"tableActions"),s),m=t.ref(e.tableOptions.defaultSort?e.tableOptions.defaultSort:""),g=t.ref(e.tableOptions.defaultSortDirection?e.tableOptions.defaultSortDirection:"desc"),b=t.ref({minDate:0,maxDate:0}),y=t.ref({page:1,perPage:10,totalItems:0,totalPages:0}),w=t.ref(""),k=A=>{y.value.page=1,b.value=A,o()},N=A=>{m.value==A?g.value=g.value==="desc"?"asc":"desc":(m.value=A,g.value="desc"),o()},_=t.computed(()=>typeof e.tableOptions.dateSearch=="object"?e.tableOptions.dateSearch:{}),R=t.computed(()=>!!f.value.length);return t.watch(()=>e.tableOptions.refreshTrigger,()=>{o()}),t.watch(()=>e.tableOptions.reloadTrigger,()=>{a()}),r(s),i(),o(),(A,M)=>{const T=t.resolveComponent("BaseInput");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Of,[A.tableOptions.search?(t.openBlock(),t.createElementBlock("div",Pf,[Af,t.createElementVNode("div",Rf,[Lf,t.createElementVNode("div",If,[t.createVNode(T,{id:"table-search",modelValue:w.value,"onUpdate:modelValue":M[0]||(M[0]=j=>w.value=j),modelModifiers:{trim:!0},type:"search",placeholder:"Search",onChange:M[1]||(M[1]=j=>a())},null,8,["modelValue"])])])])):t.createCommentVNode("",!0),A.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",Ff,[jf,t.createElementVNode("div",Hf,[Uf,t.createElementVNode("div",zf,[t.createVNode(hn,t.mergeProps({id:"table-date-range",modelValue:b.value,"onUpdate:modelValue":M[2]||(M[2]=j=>b.value=j)},{..._.value},{"onUpdate:modelValue":k}),null,16,["modelValue"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",qf,[t.createElementVNode("table",Wf,[t.createElementVNode("thead",Yf,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),(j,I)=>(t.openBlock(),t.createElementBlock("th",{key:I,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",j.alignment])},[t.createElementVNode("div",{class:t.normalizeClass(["inline-flex items-center gap-2",{"cursor-pointer":j.sort}]),onClick:t.withModifiers(H=>j.sort?N(j.sort):void 0,["prevent"])},[j.title?(t.openBlock(),t.createElementBlock("span",Gf,t.toDisplayString(j.title),1)):t.createCommentVNode("",!0),j.sort?(t.openBlock(),t.createElementBlock("span",Jf,[m.value!==j.sort?(t.openBlock(),t.createElementBlock("svg",Xf,Zf)):g.value=="desc"?(t.openBlock(),t.createElementBlock("svg",Qf,ep)):(t.openBlock(),t.createElementBlock("svg",tp,np))])):t.createCommentVNode("",!0)],10,Kf)],2))),128)),t.unref(u)?(t.openBlock(),t.createElementBlock("th",rp)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",op,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(f),(j,I)=>(t.openBlock(),t.createElementBlock("tr",{key:I,class:"even:bg-gray-50",onClick:H=>A.$emit("click:row",j.rowData)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(j.cells,(H,X)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:X,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",H.alignment])},{default:t.withCtx(()=>[H.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(H.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(H.classNames)},t.toDisplayString(t.unref(d)(H.val)?"-":String(H.val)),3))]),_:2},1032,["class"]))),128)),t.unref(u)?(t.openBlock(),t.createElementBlock("td",ip,[A.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(un),{key:0,actions:j.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Xa,{key:1,actions:j.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)],8,ap))),128)),R.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",lp,[t.createElementVNode("td",{colspan:t.unref(c).length+(t.unref(u)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,sp)]))])])]),R.value?(t.openBlock(),t.createBlock(gn,{key:0,modelValue:y.value,"onUpdate:modelValue":[M[3]||(M[3]=j=>y.value=j),M[4]||(M[4]=j=>o())]},null,8,["modelValue"])):t.createCommentVNode("",!0)])}}}),cp=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1),dp={class:"hidden sm:block"},up=["onClick","textContent"],ti=t.defineComponent({__name:"Tabs",props:{modelValue:{},pillDesign:{type:Boolean,default:!1},tabs:{}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=l=>{r("update:modelValue",l)},a=(l,s)=>{let c="";return e.pillDesign?(c="px-12 py-2 font-semibold text-md leading-5 rounded-t-md focus:outline-none ",e.modelValue===l?c=c+"focus:bg-white text-gray-700 bg-white border-b-2 border-blue-500":c=c+"text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:bg-gray-100 border border-gray-200",c):(c="px-1 py-4 text-sm font-semibold border-b-2 whitespace-nowrap leading-5 focus:outline-none ",e.modelValue===l?c=c+"border-blue-500 text-xy-blue focus:text-blue-800 focus:border-blue-700":c=c+"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:text-gray-900 focus:border-gray-300",s&&(c=c+" ml-8"),c)},i=t.computed(()=>!e.pillDesign);return(l,s)=>{const c=t.resolveComponent("Select");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["sm:hidden",{"mb-4":l.pillDesign}])},[cp,t.createVNode(c,{name:"tabs","model-value":l.modelValue,options:l.tabs,"onUpdate:modelValue":s[0]||(s[0]=u=>o(u))},null,8,["model-value","options"])],2),t.createElementVNode("div",dp,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":i.value})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[l.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.tabs,(u,d)=>(t.openBlock(),t.createElementBlock("a",{key:d,href:"#",class:t.normalizeClass(a(u.value,d>0)),onClick:t.withModifiers(f=>o(u.value),["prevent"]),textContent:t.toDisplayString(u.label)},null,10,up))),128))],2)],2)])])}}}),fp={key:0,class:"sr-only"},pp={class:"ml-3 mt-0.5"},ni=t.defineComponent({inheritAttrs:!1,__name:"Toggle",props:{modelValue:{type:Boolean},label:{default:""},help:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const e=t.useAttrs(),o=t.computed(()=>Yn(e,"disabled"));return(a,i)=>(t.openBlock(),t.createBlock(t.unref(Ns),{as:"div",class:"flex items-start"},{default:t.withCtx(()=>[t.createVNode(t.unref(Ss),{class:t.normalizeClass([a.modelValue?"bg-xy-blue":"bg-gray-200",o.value?"opacity-75 cursor-not-allowed":"cursor-pointer","relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500"]),disabled:o.value,"model-value":a.modelValue,"onUpdate:modelValue":i[0]||(i[0]=l=>r("update:modelValue",l))},{default:t.withCtx(()=>[a.label?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",fp,"Use")),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([a.modelValue?"translate-x-5":"translate-x-0","pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200"])},null,2)]),_:1},8,["class","disabled","model-value"]),t.createElementVNode("div",pp,[a.label?(t.openBlock(),t.createBlock(t.unref(Vs),{key:0},{default:t.withCtx(()=>[t.createVNode(fe,{label:a.label,class:t.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer")},null,8,["label","class"])]),_:1})):t.createCommentVNode("",!0),a.help?(t.openBlock(),t.createBlock(t.unref($s),{key:1},{default:t.withCtx(()=>[t.createVNode(ae,{text:a.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0)])]),_:1}))}}),mp={"aria-label":"Progress"},hp={role:"list",class:"flex items-center"},gp={class:"absolute inset-0 flex items-center","aria-hidden":"true"},bp=["aria-current"],yp={key:1,class:"h-3 w-3 rounded-full bg-xy-blue","aria-hidden":"true"},wp={class:"sr-only"},xp={key:2,class:"sr-only"},ri=t.defineComponent({__name:"ProgressCircles",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let i;return r.current>a?i="complete":r.current===a?i="current":i="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:i}}));return(o,a)=>(t.openBlock(),t.createElementBlock("nav",mp,[t.createElementVNode("ol",hp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(i,l)=>(t.openBlock(),t.createElementBlock("li",{key:i.name,class:t.normalizeClass([l!==e.value.length-1?"pr-8":"","relative"])},[t.createElementVNode("div",gp,[t.createElementVNode("div",{class:t.normalizeClass(["h-0.5 w-full",i.status==="complete"?"bg-xy-blue":"bg-gray-300"])},null,2)]),t.createElementVNode("div",{class:t.normalizeClass({"relative flex h-5 w-5 items-center justify-center rounded-full":!0,"bg-xy-blue":i.status==="complete","border-2 border-indigo-600 bg-white":i.status==="current","border-2 border-gray-300 bg-white":i.status==="incomplete"}),"aria-current":i.status==="current"?!0:void 0},[i.status==="complete"?(t.openBlock(),t.createBlock(t.unref(la),{key:0,class:"h-3 w-3 text-white","aria-hidden":"true"})):i.status==="current"?(t.openBlock(),t.createElementBlock("span",yp)):t.createCommentVNode("",!0),t.createElementVNode("span",wp,t.toDisplayString(i.name),1),i.description?(t.openBlock(),t.createElementBlock("span",xp,t.toDisplayString(i.description),1)):t.createCommentVNode("",!0)],10,bp)],2))),128))])]))}}),Cp={"aria-label":"Progress"},kp={role:"list",class:"overflow-hidden"},Ep=["aria-current"],_p={class:"flex h-9 items-center"},Dp={key:1,class:"h-2.5 w-2.5 rounded-full bg-xy-blue"},Np={class:"ml-4 flex min-w-0 flex-col"},Sp={key:0,class:"text-sm text-gray-600"},oi=t.defineComponent({__name:"ProgressCirclesLabeled",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let i;return r.current>a?i="complete":r.current===a?i="current":i="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:i}}));return(o,a)=>(t.openBlock(),t.createElementBlock("div",Cp,[t.createElementVNode("ol",kp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(i,l)=>(t.openBlock(),t.createElementBlock("li",{key:l,class:t.normalizeClass([l!==e.value.length-1?"pb-6":"","relative"])},[l!==e.value.length-1?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["absolute left-3 top-3 -ml-px mt-0.5 h-full w-0.5",i.status==="complete"?"bg-xy-blue":"bg-gray-300"]),"aria-hidden":"true"},null,2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"group relative flex items-start","aria-current":i.status==="current"?!0:void 0},[t.createElementVNode("span",_p,[t.createElementVNode("span",{class:t.normalizeClass({"relative z-10 flex h-6 w-6 items-center justify-center rounded-full":!0,"bg-xy-blue ":i.status==="complete","border-2 border-xy-blue bg-white":i.status==="current","border-2 border-gray-300 bg-white":i.status==="incomplete"})},[i.status==="complete"?(t.openBlock(),t.createBlock(t.unref(la),{key:0,class:"h-4 w-4 text-white","aria-hidden":"true"})):i.status==="current"?(t.openBlock(),t.createElementBlock("span",Dp)):t.createCommentVNode("",!0)],2)]),t.createElementVNode("span",Np,[t.createElementVNode("span",{class:t.normalizeClass({"text-sm font-bold":!0,"text-gray-800":i.status==="complete","text-xy-blue":i.status==="current","text-gray-600":i.status==="incomplete","mt-2":!i.description})},t.toDisplayString(i.name),3),i.description?(t.openBlock(),t.createElementBlock("span",Sp,t.toDisplayString(i.description),1)):t.createCommentVNode("",!0)])],8,Ep)],2))),128))])]))}}),Vp=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","type","value"],ai=t.defineComponent({inheritAttrs:!1,__name:"BaseInput",props:t.mergeDefaults({modelValue:{},type:{},label:{},help:{},placeholder:{}},Me),emits:["update:modelValue","update:error"],setup(n,{expose:r}){const e=n,o=t.ref(null),{errorState:a,modelState:i,inputID:l,isRequired:s,onInvalid:c,inputValidation:u}=Ve(e);r({input:o});const d=t.computed(()=>{switch(e.type){case"number":return{max:Number.MAX_SAFE_INTEGER,min:Number.MIN_SAFE_INTEGER};case"email":return{pattern:ko};case"tel":return{pattern:Eo};default:return{}}}),f=m=>{let g=m.target.value;e.type==="number"&&(g=_o(g)),typeof g=="string"&&(g=g.trim()),i.value=g,u(m)};return(m,g)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(fe,{id:`${t.unref(l)}-label`,class:"mb-2",for:t.unref(l),label:m.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(l),ref_key:"input",ref:o,"aria-labelledby":m.label?`${t.unref(l)}-label`:void 0,"aria-describedby":m.help?`${t.unref(l)}-help`:void 0,"aria-errormessage":t.unref(a)?`${t.unref(l)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(a)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:m.placeholder,type:m.type,value:t.unref(i)},{...d.value,...m.$attrs},{onInput:f,onInvalid:g[0]||(g[0]=(...b)=>t.unref(c)&&t.unref(c)(...b))}),null,16,Vp),t.createVNode(ae,{id:`${t.unref(l)}-help`,class:"mt-1",text:m.help},null,8,["id","text"]),t.createVNode(ke,{id:`${t.unref(l)}-error`,class:"mt-0.5",text:t.unref(a)},null,8,["id","text"])]))}}),$p={class:"relative flex items-start"},Bp={class:"flex items-center h-5"},vp=["id","aria-labelledby","aria-describedby","aria-errormessage","checked"],Tp={class:"ml-3"},ii=t.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isDisabled:a,isRequired:i,errorState:l,modelState:s,validate:c,onInvalid:u}=Ve(r),d=f=>{s.value=f.target.checked,c(f)};return(f,m)=>(t.openBlock(),t.createElementBlock("div",$p,[t.createElementVNode("div",Bp,[t.createElementVNode("input",t.mergeProps({id:t.unref(o),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,checked:t.unref(s)||void 0,class:["h-4 w-4 rounded text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},f.$attrs,{onChange:d,onInvalid:m[0]||(m[0]=(...g)=>t.unref(u)&&t.unref(u)(...g))}),null,16,vp)]),t.createElementVNode("div",Tp,[t.createVNode(fe,{id:t.unref(e).labelledby,for:t.unref(o),label:f.label,class:t.normalizeClass(t.unref(a)?"cursor-not-allowed":"cursor-pointer"),required:t.unref(i)},null,8,["id","for","label","class","required"]),t.createVNode(ae,{id:t.unref(e).describedby,text:f.help},null,8,["id","text"]),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])])]))}}),Mp=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","value"],li=t.defineComponent({inheritAttrs:!1,__name:"DateTimeInput",props:t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,e=t.ref(null),{errorState:o,modelState:a,inputID:i,isRequired:l,onInvalid:s,inputValidation:c}=Ve(r),u=t.computed(()=>Zl(a.value)),d=f=>{let m=f.target.value;a.value=m&&new Date(m).toISOString(),c(f)};return(f,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(fe,{id:`${t.unref(i)}-label`,class:"mb-2",for:t.unref(i),label:f.label,required:t.unref(l)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(i),ref_key:"input",ref:e,"aria-labelledby":f.label?`${t.unref(i)}-label`:void 0,"aria-describedby":f.help?`${t.unref(i)}-help`:void 0,"aria-errormessage":t.unref(o)?`${t.unref(i)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(o)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:f.placeholder,type:"datetime-local",value:u.value},f.$attrs,{onInput:d,onInvalid:m[0]||(m[0]=(...g)=>t.unref(s)&&t.unref(s)(...g))}),null,16,Mp),t.createVNode(ae,{id:`${t.unref(i)}-help`,class:"mt-1",text:f.help},null,8,["id","text"]),t.createVNode(ke,{id:`${t.unref(i)}-error`,class:"mt-0.5",text:t.unref(o)},null,8,["id","text"])]))}}),Op={key:0,class:"text-red-700/80"},pt=t.defineComponent({__name:"FieldsetLegend",props:{label:{default:""},required:{type:Boolean,default:!1},tag:{default:"legend"}},setup(n){const r=n,e=t.computed(()=>r.required&&/\*$/gm.exec(r.label)!==null?r.label.substring(0,r.label.length-1):r.label);return(o,a)=>o.label?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),t.mergeProps({key:0,class:"block text-sm leading-6 font-semibold text-gray-800"},o.$attrs),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.value)+" ",1),r.required?(t.openBlock(),t.createElementBlock("span",Op,"*")):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}}),Pp=["aria-labelledby","aria-describedby","aria-errormessage"],Ap={key:0},Rp={class:"flex"},Lp={class:"flex items-center h-5"},Ip=["id","aria-labelledby","aria-describedby","checked","disabled","onChange"],Fp={class:"ml-3"},si=t.defineComponent({inheritAttrs:!1,__name:"MultiCheckboxes",props:t.mergeDefaults({max:{},min:{},modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isDisabled:a,modelState:i,errorState:l,validate:s}=Ve(r),c=(y,w)=>{const k=y.target.checked;Array.isArray(i.value)||(i.value=[]),k?i.value.push(w):i.value.splice(i.value.indexOf(w),1),s(y)},u=t.computed(()=>Array.isArray(i.value)?i.value.length:0),d=t.computed(()=>r.min||0),f=t.computed(()=>r.max||r.options.filter(y=>!y.disabled).length),m=t.computed(()=>u.value<d.value&&!r.max?`Please select at least ${d.value} of these options.`:u.value>f.value&&!r.min?`Please limit your selection to ${f.value} of these options.`:u.value<d.value||u.value>f.value?`Please select between ${d.value} and ${f.value} of these options.`:""),g=t.ref(null),b=()=>{var y;l.value||(l.value=m.value,(y=g.value)==null||y.setCustomValidity(m.value))};return(y,w)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"relative space-y-6","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[y.label?(t.openBlock(),t.createElementBlock("div",Ap,[t.createVNode(pt,{id:t.unref(e).labelledby,label:y.label,required:d.value>0},null,8,["id","label","required"]),y.help?(t.openBlock(),t.createBlock(ae,{key:0,id:t.unref(e).describedby,class:"mt-1",tag:"p",text:y.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-1",text:t.unref(l)},null,8,["id","text"])])):t.createCommentVNode("",!0),m.value?(t.openBlock(),t.createElementBlock("input",{key:1,ref_key:"errorInput",ref:g,required:"",class:"sr-only top-1 left-1","aria-hidden":"",type:"checkbox",onInvalid:b},null,544)):t.createCommentVNode("",!0),t.createElementVNode("div",Rp,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-5",{"sm:grid sm:gap-x-10":y.columns!==void 0,"sm:grid-cols-2":y.columns===2,"sm:grid-cols-3":y.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.options,(k,N)=>{var _;return t.openBlock(),t.createElementBlock("div",{key:k.value,class:"flex items-start"},[t.createElementVNode("div",Lp,[t.createElementVNode("input",t.mergeProps({id:`${t.unref(o)}-${N}`,"aria-labelledby":`${t.unref(o)}-${N}-label`,"aria-describedby":k.help?`${t.unref(o)}-${N}-help`:void 0,checked:(_=y.modelValue)==null?void 0:_.includes(k.value),disabled:k.disabled,class:["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},y.$attrs,{onChange:R=>c(R,k.value)}),null,16,Ip)]),t.createElementVNode("div",Fp,[t.createVNode(fe,{id:`${t.unref(o)}-${N}-label`,for:`${t.unref(o)}-${N}`,label:k.label,class:t.normalizeClass(t.unref(a)||k.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(ae,{id:`${t.unref(o)}-${N}-help`,text:k.help},null,8,["id","text"])])])}),128))],2)])],8,Pp))}}),jp=["aria-labelledby","aria-describedby","aria-errormessage"],Hp={key:0},Up={class:"flex"},zp={class:"flex items-center h-5"},qp=["id","aria-describedby","aria-labelledby","checked","disabled","name","value","onChange"],Wp={class:"ml-3"},ci=t.defineComponent({inheritAttrs:!1,__name:"Radio",props:t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,errorState:o,modelState:a,inputID:i,isDisabled:l,isRequired:s,onInvalid:c,validate:u}=Ve(r),d=(f,m)=>{a.value=m,u(f)};return(f,m)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-6","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[f.label?(t.openBlock(),t.createElementBlock("div",Hp,[t.createVNode(pt,{id:t.unref(e).labelledby,label:f.label,required:t.unref(s)},null,8,["id","label","required"]),f.help?(t.openBlock(),t.createBlock(ae,{key:0,id:t.unref(e).describedby,class:"mt-1",tag:"p",text:f.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-1",text:t.unref(o)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Up,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-5",{"sm:grid sm:gap-x-10":f.columns!==void 0,"sm:grid-cols-2":f.columns===2,"sm:grid-cols-3":f.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.options,(g,b)=>(t.openBlock(),t.createElementBlock("div",{key:g.value,class:"flex items-start"},[t.createElementVNode("div",zp,[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-${b}`,"aria-describedby":g.help?`${t.unref(i)}-${b}-help`:void 0,"aria-labelledby":`${t.unref(i)}-${b}-label`,checked:t.unref(a)===g.value,class:["h-4 w-4 cursor-pointer text-xy-blue","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(o)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],disabled:g.disabled,name:t.unref(i),type:"radio",value:g.value},f.$attrs,{onChange:y=>d(y,g.value),onInvalid:m[0]||(m[0]=(...y)=>t.unref(c)&&t.unref(c)(...y))}),null,16,qp)]),t.createElementVNode("div",Wp,[t.createVNode(fe,{id:`${t.unref(i)}-${b}-label`,for:`${t.unref(i)}-${b}`,label:g.label,class:t.normalizeClass(t.unref(l)||g.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(ae,{id:`${t.unref(i)}-${b}-help`,text:g.help},null,8,["id","text"])])]))),128))],2)])],8,jp))}}),Yp={class:"flex-1 flex pr-1"},Kp={class:"flex flex-col"},Gp={key:1,class:"mt-auto mb-0"},Jp=["checked","name","required","value"],di=t.defineComponent({inheritAttrs:!1,__name:"RadioCards",props:t.mergeDefaults({options:{},modelValue:{},label:{},help:{},placeholder:{},columns:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,isDisabled:o,isRequired:a,nameAttr:i,modelState:l,errorState:s,onInvalid:c}=Ve(r),u=d=>{d&&(s.value="")};return(d,f)=>(t.openBlock(),t.createBlock(t.unref(_s),{modelValue:t.unref(l),"onUpdate:modelValue":[f[1]||(f[1]=m=>t.isRef(l)?l.value=m:null),u],disabled:t.unref(o),"aria-invalid":t.unref(s)?"true":null,"aria-errormessage":t.unref(e).errormessage},{default:t.withCtx(()=>[d.label?(t.openBlock(),t.createBlock(t.unref(ea),{key:0,class:"block"},{default:t.withCtx(()=>[t.createVNode(pt,{tag:"div",label:d.label,required:t.unref(a)},null,8,["label","required"])]),_:1})):t.createCommentVNode("",!0),d.help?(t.openBlock(),t.createBlock(t.unref(rr),{key:1,class:"mt-1"},{default:t.withCtx(()=>[t.createVNode(ae,{text:d.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-1",text:t.unref(s)},null,8,["id","text"]),t.createElementVNode("div",{class:t.normalizeClass(["mt-6 grid grid-cols-1 gap-y-5 gap-x-4 relative",{"sm:grid-cols-2":d.columns===2,"sm:grid-cols-3":d.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.options,m=>(t.openBlock(),t.createBlock(t.unref(Ds),{key:m.value,as:"template",disabled:t.unref(o)||m.disabled,value:m.value},{default:t.withCtx(({active:g,checked:b,disabled:y})=>[t.createElementVNode("div",{class:t.normalizeClass(["relative border rounded-lg shadow-sm p-4 flex focus:outline-none",[y?"cursor-not-allowed bg-gray-50 border-gray-200 opacity-90":"cursor-pointer bg-white border-gray-300",t.unref(s)&&!y?"border-red-700":"",b?"border-transparent":"",g?"border-xy-blue ring-2 ring-xy-blue-500":""]])},[t.createElementVNode("div",Yp,[t.createElementVNode("div",Kp,[t.createVNode(t.unref(ea),{as:"div"},{default:t.withCtx(()=>[t.createVNode(fe,{tag:"div",class:"mt-auto mb-auto",label:m.label},null,8,["label"])]),_:2},1024),m.help?(t.openBlock(),t.createBlock(t.unref(rr),{key:0,as:"div"},{default:t.withCtx(()=>[t.createVNode(ae,{tag:"div",class:"mt-auto",text:m.help},null,8,["text"])]),_:2},1024)):t.createCommentVNode("",!0),m.sublabel||d.$slots.sublabel?(t.openBlock(),t.createElementBlock("div",Gp,[t.createVNode(t.unref(rr),{as:"div",class:"text-sm/5 font-medium mt-4 text-gray-800"},{default:t.withCtx(()=>[t.renderSlot(d.$slots,"sublabel",{active:g,checked:b,disabled:y,option:m},()=>[t.createTextVNode(t.toDisplayString(m.sublabel),1)])]),_:2},1024)])):t.createCommentVNode("",!0)])]),t.createVNode(t.unref(ia),{class:t.normalizeClass([b?"":"invisible","h-5 w-5 text-xy-blue"]),"aria-hidden":"true"},null,8,["class"]),t.createElementVNode("div",{class:t.normalizeClass([g?"border":"border-2",b?"border-xy-blue":"border-transparent","absolute -inset-px rounded-lg pointer-events-none"]),"aria-hidden":"true"},null,2),t.createElementVNode("input",{class:"sr-only top-1 left-1","aria-hidden":"true",checked:b,name:t.unref(i),required:t.unref(a),tabindex:"-1",type:"radio",value:m.value,onInvalid:f[0]||(f[0]=(...w)=>t.unref(c)&&t.unref(c)(...w))},null,40,Jp)],2)]),_:2},1032,["disabled","value"]))),128))],2)]),_:3},8,["modelValue","disabled","aria-invalid","aria-errormessage"]))}}),Xp=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","value"],ui=t.defineComponent({inheritAttrs:!1,__name:"TextArea",props:t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isRequired:a,modelState:i,errorState:l,onInvalid:s,inputValidation:c}=Ve(r),u=d=>{i.value=d.target.value.trim(),c(d)};return(d,f)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(fe,{id:t.unref(e).labelledby,class:"mb-2",for:t.unref(o),label:d.label,required:t.unref(a)},null,8,["id","for","label","required"]),t.createElementVNode("textarea",t.mergeProps({id:t.unref(o),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(l)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:d.placeholder,value:t.unref(i)||void 0},d.$attrs,{onInput:u,onInvalid:f[0]||(f[0]=(...m)=>t.unref(s)&&t.unref(s)(...m))}),null,16,Xp),t.createVNode(ae,{id:t.unref(e).describedby,class:"mt-1",text:d.help},null,8,["id","text"]),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])]))}}),Zp=["aria-labelledby","aria-describedby","aria-errormessage"],Qp={key:0},em=["for"],tm=["id","name","checked"],nm=["for"],rm=["id","name","checked"],fi=t.defineComponent({inheritAttrs:!1,__name:"YesOrNoRadio",props:t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,isDisabled:o,isRequired:a,nameAttr:i,modelState:l,errorState:s,onInvalid:c,validate:u}=Ve(r),d=(f,m)=>{l.value=m,u(f)};return(f,m)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-6","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[f.label?(t.openBlock(),t.createElementBlock("div",Qp,[t.createVNode(pt,{id:t.unref(e).labelledby,class:"block my-auto",label:f.label,required:t.unref(a),tag:"legend"},null,8,["id","label","required"]),f.help?(t.openBlock(),t.createBlock(ae,{key:0,id:t.unref(e).describedby,class:"mt-1",tag:"p",text:f.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-1",text:t.unref(s)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",null,[t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center group",t.unref(o)?"cursor-not-allowed":"cursor-pointer"]),for:`${t.unref(i)}-true`},[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-true`,type:"radio",class:["h-4 w-4 text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],name:t.unref(i),value:!0,checked:t.unref(l)===!0},f.$attrs,{onChange:m[0]||(m[0]=g=>d(g,!0)),onInvalid:m[1]||(m[1]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,tm),t.createVNode(fe,{class:"ml-3",label:"Yes",tag:"span"})],10,em),t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center ml-6",t.unref(o)?"cursor-not-allowed":"cursor-pointer"]),for:`${t.unref(i)}-false`},[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-false`,type:"radio",class:["h-4 w-4 text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],name:t.unref(i),value:!1,checked:t.unref(l)===!1},f.$attrs,{onChange:m[2]||(m[2]=g=>d(g,!1)),onInvalid:m[3]||(m[3]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,rm),t.createVNode(fe,{class:"ml-3",label:"No",tag:"span"})],10,nm)])],8,Zp))}}),om=Object.freeze(Object.defineProperty({__proto__:null,ActionsDropdown:un,BaseInput:ai,Cards:Oa,Checkbox:ii,ContentModal:Pa,DataTable:Za,DateFilter:gr,DateRangePicker:hn,DateTime:li,DetailList:Fa,DownloadCell:ja,DynamicTable:ei,FieldsetLegend:pt,Flash:bn,InlineAlert:Ua,InputError:ke,InputHelp:ae,InputLabel:fe,Modal:za,MultiCheckboxes:si,Paginator:gn,Popover:$t,PopoverContent:Wa,PopoverPosition:$t,ProgressCircles:ri,ProgressCirclesLabeled:oi,Radio:ci,RadioCards:di,Select:hr,SidebarLayout:qa,Slideover:Ya,Spinner:yn,StackedLayout:Ga,Steps:Qa,Tabs:ti,TextArea:ui,Toggle:ni,Tooltip:Ka,XYSpinner:wr,YesOrNoRadio:fi},Symbol.toStringTag,{value:"Module"})),am=function(r){Object.entries(om).forEach(([e,o])=>{r.component(e,o)})};S.ActionsDropdown=un,S.BaseAPI=Wn,S.BaseInput=ai,S.Cards=Oa,S.Checkbox=ii,S.ContentModal=Pa,S.DataTable=Za,S.DateFilter=gr,S.DateRangePicker=hn,S.DateTime=li,S.DetailList=Fa,S.DownloadCell=ja,S.DynamicTable=ei,S.FieldsetLegend=pt,S.Flash=bn,S.InlineAlert=Ua,S.InputError=ke,S.InputHelp=ae,S.InputLabel=fe,S.Modal=za,S.MultiCheckboxes=si,S.Paginator=gn,S.Popover=$t,S.PopoverContent=Wa,S.PopoverPosition=$t,S.ProgressCircles=ri,S.ProgressCirclesLabeled=oi,S.Radio=ci,S.RadioCards=di,S.Select=hr,S.SidebarLayout=qa,S.Slideover=Ya,S.Spinner=yn,S.StackedLayout=Ga,S.Steps=Qa,S.Tabs=ti,S.TextArea=ui,S.Toggle=ni,S.Tooltip=Ka,S.XYSpinner=wr,S.YesOrNoRadio=fi,S.debounceFn=xo,S.debounceLeading=Jl,S.default=am,S.emailPattern=ko,S.isHttpCancel=bo,S.isHttpError=go,S.looseToNumber=_o,S.phonePattern=Eo,S.setBaseAPIDefaults=Gl,S.textInputTypes=Xl,S.throttleFn=Ql,S.useAppFlasher=yr,S.useAppFlashes=Xe,S.useAppSpinner=qn,S.useBaseAPI=ft,S.useBaseAPIDelete=$c,S.useBaseAPIGet=Vc,S.useBaseAPIPatch=Bc,S.useBaseAPIPost=vc,S.useBaseAPIPut=Tc,S.useFlashes=Ia,S.useInputField=Ve,S.useModel=Co,S.useSpinnerDisplay=mo,S.useTabHistory=Oc,S.useUrlSearchParams=Pc,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
16
+ if the issue persists.`:"Whoops! Something went wrong.";return i({message:y,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:i,remove:a,flash:l,error:s,warning:d,info:c,success:u,genericError:f},flashes:r,configure:o}}const Mc=n=>{if(window.Flashes)for(const r of window.Flashes){if(typeof r.type>"u"){const e=r.message.split(": ");n.add({type:e[0],message:e[1]});continue}n.add(r)}};let br;function Xe(){return br===void 0&&(br=Ia()),br}const yr={error(n,r){Xe().flasher.error(n,r)},info(n,r){Xe().flasher.info(n,r)},success(n,r){Xe().flasher.success(n,r)},warning(n,r){Xe().flasher.warning(n,r)},genericError(n,r){Xe().flasher.genericError(n,r)}},Oc=(n,r)=>{var u;const e=t.ref(n),o={initial:((u=e==null?void 0:e.value[0])==null?void 0:u.value)||"",paramName:(r==null?void 0:r.paramName)||"tab"},a=t.ref(o.initial),i=d=>!!e.value.find(f=>f.value===d),l=d=>a.value===d,c=new URLSearchParams(window.location.search).get(o.paramName);return c&&i(c)&&(a.value=c),t.watch(a,d=>{const f=new URLSearchParams(window.location.search);f.set(o.paramName,d.toString());const m=f.toString()!==""?`?${f.toString()}`:"";window.history.replaceState({tab:d},document.title,`${window.location.pathname}${m}`)}),{activeTab:a,isActiveTab:l,tabs:e}},Pc=n=>{const r=t.ref(n);return t.watch(r,e=>{const o=new URLSearchParams(window.location.search);for(const i in e){const l=e[i];if(l==null||l==null){o.delete(i);continue}if(Array.isArray(l)){o.delete(i),l.forEach(s=>{o.append(i,s.toString())});continue}!o.has(i)&&!l||o.set(i,l.toString())}const a=o.toString()!==""?`?${o.toString()}`:"";window.history.replaceState(t.toRaw(e),document.title,`${window.location.pathname}${a}`)},{deep:!0}),r},Ac={class:"px-4 flex items-center justify-between sm:px-0"},Rc={class:"w-0 flex-1 flex"},Lc=t.createElementVNode("svg",{class:"mr-3 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1),Ic={class:"hidden md:flex"},Fc=["onClick","textContent"],jc={class:"w-0 flex-1 flex justify-end"},Hc=t.createElementVNode("svg",{class:"ml-3 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),gn=t.defineComponent({__name:"Paginator",props:{modelValue:{}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=i=>{r("update:modelValue",{...e.modelValue,page:i})},a=t.computed(()=>{const i=[];if(e.modelValue.totalPages<=4){for(let s=0;s<e.modelValue.totalPages;s++)i.push(s+1);return i}if(e.modelValue.totalPages-e.modelValue.page>=3){for(let s=0;s<4;s++)i.push(e.modelValue.page+s);return i}for(let s=0;s<4;s++)i.unshift(e.modelValue.totalPages-s);return i});return(i,l)=>(t.openBlock(),t.createElementBlock("div",Ac,[t.createElementVNode("div",Rc,[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 border-transparent pt-4 pr-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400",i.modelValue.page==1?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:l[0]||(l[0]=t.withModifiers(s=>o(i.modelValue.page-1),["prevent"]))},[Lc,t.createTextVNode(" Previous ")],2)]),t.createElementVNode("div",Ic,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,s=>(t.openBlock(),t.createElementBlock("a",{key:s,href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",i.modelValue.page===s?"border-blue-500 text-blue-600 focus:outline-none focus:text-blue-800 focus:border-blue-700":"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-400"]),onClick:t.withModifiers(c=>o(s),["prevent"]),textContent:t.toDisplayString(s)},null,10,Fc))),128))]),t.createElementVNode("div",jc,[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 border-transparent pt-4 pl-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400",i.modelValue.page>=i.modelValue.totalPages?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:l[1]||(l[1]=t.withModifiers(s=>o(i.modelValue.page+1),["prevent"]))},[t.createTextVNode(" Next "),Hc],2)])]))}}),Uc={key:0,class:"flex"},Fa=t.defineComponent({__name:"DetailList",props:{borderless:{type:Boolean,default:!1},defaultSort:{default:"created_at"},defaultSortDir:{default:"desc"},disableDate:{type:Boolean,default:!1},disableNavigation:{type:Boolean,default:!1},perPage:{default:10},url:{}},setup(n,{expose:r}){const e=n,o=t.ref({minDate:0,maxDate:0}),a=t.ref([]),i=t.ref({page:1,perPage:e.perPage,totalItems:0,totalPages:0}),l=t.ref(e.defaultSort),s=t.ref(e.defaultSortDir),c=()=>{const b={maxDate:o.value.maxDate,minDate:o.value.minDate,page:i.value.page,perPage:i.value.perPage,q:"",sort:l.value,sortDir:s.value};Wn.get(e.url,{},b).then(y=>{i.value={page:y.data.page,perPage:y.data.perPage,totalItems:y.data.totalItems,totalPages:y.data.totalPages},a.value=y.data.items},()=>{yr.genericError()})},u=t.computed(()=>!!a.value.length),d=t.computed(()=>!e.disableDate),f=t.computed(()=>!e.disableNavigation&&u),g={refresh:c,reset:()=>{i.value.page=1,c()}};return t.watch([s,o],()=>{c()}),r(g),c(),(b,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({"mt-4 space-y-2":d.value})},[b.disableDate?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Uc,[t.createVNode(gr,{"date-range":o.value,"sort-dir":s.value,onSortDirChanged:y[0]||(y[0]=w=>s.value=w),onDateRangeChanged:y[1]||(y[1]=w=>o.value=w)},null,8,["date-range","sort-dir"])])),u.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["overflow-hidden",{"shadow sm:rounded-md border":!b.borderless}])},[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(w,k)=>(t.openBlock(),t.createElementBlock("li",{key:k,class:t.normalizeClass({"border-t border-gray-200":k>0})},[t.renderSlot(b.$slots,"default",{item:w})],2))),128))])],2)):t.renderSlot(b.$slots,"empty",{key:2},()=>[t.createTextVNode(" No items were found! ")]),f.value?(t.openBlock(),t.createBlock(gn,{key:3,modelValue:i.value,"onUpdate:modelValue":[y[2]||(y[2]=w=>i.value=w),y[3]||(y[3]=w=>c())]},null,8,["modelValue"])):t.createCommentVNode("",!0)],2))}}),zc=["href"],ja=t.defineComponent({__name:"DownloadCell",props:{propsData:{},attribute:{}},setup(n){return(r,e)=>(t.openBlock(),t.createElementBlock("a",{href:r.propsData[r.attribute]},[t.createVNode(t.unref(Rs),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,zc))}}),qc={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},Wc={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},Yc={class:"p-4"},Kc={class:"flex items-center"},Gc={class:"w-0 flex-1 flex justify-between"},Jc=["innerHTML"],Xc={class:"ml-4 shrink-0 flex"},Zc=["onClick"],Qc=[t.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)],bn=t.defineComponent({__name:"Flash",setup(n){const{flasher:r,flashes:e}=Xe(),o=a=>{switch(a){case"warning":return"border-orange-500";case"error":return"border-red-500";case"info":return"border-blue-500";case"success":return"border-green-500"}};return t.onMounted(()=>{Mc(r)}),(a,i)=>(t.openBlock(),t.createBlock(t.unref(Kn),null,{default:t.withCtx(()=>[t.createElementVNode("div",qc,[t.createVNode(t.TransitionGroup,{tag:"div",class:"max-w-sm space-y-2 w-full","enter-active-class":"ease-out duration-300","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),([l,s])=>(t.openBlock(),t.createElementBlock("div",{key:s.message,class:t.normalizeClass(["bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform z-10",[o(s.type)]])},[t.createElementVNode("div",Wc,[t.createElementVNode("div",Yc,[t.createElementVNode("div",Kc,[t.createElementVNode("div",Gc,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:s.message},null,8,Jc)]),t.createElementVNode("div",Xc,[t.createElementVNode("button",{class:"inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150",onClick:c=>t.unref(r).remove(l)},Qc,8,Zc)])])])])],2))),128))]),_:1})])]),_:1}))}}),qm="";function ed(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])}function td(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h7"})])}function nd(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})])}function Ha(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})])}function Vt(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})])}const rd={class:"flex"},od={class:"flex-shrink-0"},ad={class:"ml-2.5"},id={key:0,role:"list",class:"list-disc space-y-1 pl-5"},ld={key:1},sd={key:1,class:"mt-4"},cd={class:"flex flex-col gap-y-1.5 -mx-2 sm:flex-row sm:gap-x-3 sm:items-center"},dd={key:0},ud=["href","role"],fd={key:1},pd=["href","role"],md={key:0,class:"ml-auto pl-3"},hd={class:"-mx-1.5 -my-1.5"},gd=t.createElementVNode("span",{class:"sr-only"},"close",-1),Ua=t.defineComponent({__name:"InlineAlert",props:{btnLink:{default:""},btnText:{default:""},content:{},dismissable:{type:Boolean,default:!1},secondaryBtnLink:{default:""},secondaryBtnText:{default:""},title:{default:""},kind:{}},emits:["close","click","click:secondary"],setup(n,{emit:r}){const e=n,o=t.ref(!0),a=()=>{o.value=!1,r("close",!0)},i=t.computed(()=>{const s={bgColor:"",btnAction:"",btnClose:"",contentColor:"",iconColor:""};switch(e.kind){case"alert":s.bgColor="bg-red-50",s.btnAction="bg-red-50 text-red-900 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",s.btnClose="bg-red-50 text-red-600 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",s.contentColor="text-red-800",s.iconColor="text-red-400";break;case"info":s.bgColor="bg-blue-50",s.btnAction="bg-blue-50 text-blue-900 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",s.btnClose="bg-blue-50 text-blue-600 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",s.contentColor="text-blue-800",s.iconColor="text-blue-400";break;case"success":s.bgColor="bg-emerald-50",s.btnAction="bg-emerald-50 text-emerald-900 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",s.btnClose="bg-emerald-50 text-emerald-600 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",s.contentColor="text-emerald-800",s.iconColor="text-emerald-400";break;case"warn":s.bgColor="bg-amber-50",s.btnAction="bg-amber-50 text-amber-900 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",s.btnClose="bg-amber-50 text-amber-600 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",s.contentColor="text-amber-800",s.iconColor="text-amber-400";break}return s}),l=t.computed(()=>{let s=null;switch(e.kind){case"alert":s=Fs;break;case"info":s=Is;break;case"success":s=ia;break;case"warn":s=Ls;break}return s});return(s,c)=>o.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["rounded-xy p-4",i.value.bgColor])},[t.createElementVNode("div",rd,[t.createElementVNode("div",od,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),{class:t.normalizeClass(["h-5 w-5",i.value.iconColor]),"aria-hidden":"true"},null,8,["class"]))]),t.createElementVNode("div",ad,[s.title?(t.openBlock(),t.createElementBlock("h3",{key:0,class:t.normalizeClass(["text-sm leading-snug font-semibold mb-1.5",i.value.contentColor])},t.toDisplayString(s.title),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["text-sm",i.value.contentColor])},[Array.isArray(s.content)?(t.openBlock(),t.createElementBlock("ul",id,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.content,(u,d)=>(t.openBlock(),t.createElementBlock("li",{key:d},t.toDisplayString(u),1))),128))])):(t.openBlock(),t.createElementBlock("p",ld,t.toDisplayString(s.content),1))],2),s.btnText||s.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",sd,[t.createElementVNode("div",cd,[s.btnText?(t.openBlock(),t.createElementBlock("div",dd,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-3xl px-2.5 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnAction]),href:s.btnLink,role:s.btnLink?"link":"button",onClick:c[0]||(c[0]=u=>s.$emit("click",u))},t.toDisplayString(s.btnText),11,ud)])):t.createCommentVNode("",!0),s.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",fd,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-3xl px-2.5 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnAction]),href:s.secondaryBtnLink,role:s.secondaryBtnLink?"link":"button",onClick:c[1]||(c[1]=u=>s.$emit("click:secondary",u))},t.toDisplayString(s.secondaryBtnText),11,pd)])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),s.dismissable?(t.openBlock(),t.createElementBlock("div",md,[t.createElementVNode("div",hd,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex rounded-md p-1.5 focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnClose]),type:"button",onClick:a},[gd,t.createVNode(t.unref(Vt),{class:"h-4 w-4"})],2)])])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)}}),bd={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},yd=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1),wd={class:"block absolute top-0 right-0 pt-4 pr-4 sm:pt-6 sm:pr-8"},xd=t.createElementVNode("span",{class:"sr-only"},"Close",-1),Cd={class:"bg-white px-4 pt-5 pb-4 sm:p-8 sm:pb-6"},kd={class:"mt-3 sm:mt-0 sm:text-left"},Ed={class:"mt-2"},_d={key:0,class:"bg-gray-50 px-4 py-3 sm:py-4 sm:px-8 sm:flex sm:flex-row-reverse"},Dd=["disabled","textContent"],za=t.defineComponent({__name:"Modal",props:{destructive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},modelValue:{type:Boolean},wide:{type:Boolean,default:!1},submitText:{default:""},title:{default:""}},emits:["submit","update:modelValue"],setup(n,{emit:r}){const e=()=>{r("submit")},o=a=>{r("update:modelValue",a)};return(a,i)=>(t.openBlock(),t.createBlock(t.unref(kt),{as:"template",show:a.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Qt),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",open:a.modelValue,onClose:i[3]||(i[3]=l=>o(!1))},{default:t.withCtx(()=>[t.createElementVNode("div",bd,[t.createVNode(t.unref(Re),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(en),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),yd,t.createVNode(t.unref(Re),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["inline-block align-bottom bg-white rounded-xy text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:rounded-xy-lg w-full",a.wide?"sm:max-w-6xl":"sm:max-w-2xl"])},[t.createElementVNode("div",wd,[t.createElementVNode("button",{type:"button",class:"bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",onClick:i[0]||(i[0]=l=>o(!1))},[xd,t.createVNode(t.unref(Vt),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",Cd,[t.createElementVNode("div",kd,[t.createVNode(t.unref(Xn),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.title),1)]),_:1}),t.createElementVNode("div",Ed,[t.renderSlot(a.$slots,"default")])])]),a.submitText?(t.openBlock(),t.createElementBlock("div",_d,[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["xy-btn w-full sm:ml-3 sm:w-auto sm:text-sm",[a.destructive?"xy-btn-red":"xy-btn"]]),disabled:a.disabled,onClick:i[1]||(i[1]=l=>e()),textContent:t.toDisplayString(a.submitText)},null,10,Dd),t.createElementVNode("button",{ref:"cancelButtonRef",type:"button",class:"xy-btn-neutral mt-3 w-full sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",onClick:i[2]||(i[2]=l=>o(!1))}," Cancel ",512)])):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"buttons")],2)]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),Nd={class:"aspect-square overflow-hidden"},Sd={class:"flex justify-center relative"},Vd={class:"sr-only"},$d=t.createElementVNode("div",{class:"animate-spin-gear drop-shadow-sm"},[t.createElementVNode("svg",{class:"h-full w-full text-xy-green-300",viewBox:"0 0 129 129",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[t.createElementVNode("defs",null,[t.createElementVNode("polygon",{id:"path-1",points:"0.000248076923 0.48676924 128.472837 0.48676924 128.472837 128.800648 0.000248076923 128.800648"})]),t.createElementVNode("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createElementVNode("g",{id:"Group-6-Copy-3"},[t.createElementVNode("g",{id:"Group-3"},[t.createElementVNode("mask",{id:"mask-2",fill:"white"},[t.createElementVNode("use",{"xlink:href":"#path-1"})]),t.createElementVNode("g",{id:"Clip-2"}),t.createElementVNode("path",{id:"Fill-1",d:"M86.3955173,100.279324 C86.3955173,100.279324 79.4778923,106.213874 64.2360462,106.755809 C48.9954404,106.213874 42.0778154,100.279324 42.0778154,100.279324 C11.8756904,81.4963011 25.2309115,49.088357 25.2309115,49.088357 C36.5680269,24.1350542 59.1839596,22.5554236 63.8105942,22.4983139 L63.8105942,22.5043894 C63.8105942,22.5043894 63.9681231,22.4983139 64.2360462,22.4958837 C64.5052096,22.4983139 64.6627385,22.5043894 64.6627385,22.5043894 L64.6627385,22.4983139 C69.2881327,22.5554236 91.9053058,24.1350542 103.241181,49.088357 C103.241181,49.088357 116.596402,81.4963011 86.3955173,100.279324 L86.3955173,100.279324 Z M128.473085,68.8191581 L128.473085,60.4677727 L117.036738,58.80187 L115.10794,49.3726905 L124.970238,43.4186983 L121.675777,35.7307578 L110.49619,38.6214817 L106.161046,32.1486416 L113.220075,23.080347 L107.361738,17.0716753 L97.9645846,23.7437918 L89.14545,17.842049 L91.8693346,6.72144964 L84.04995,3.59378109 L78.2114596,13.4628269 L69.5907865,11.8127205 L67.908825,0.48676924 L64.6627385,0.48676924 L63.8105942,0.48676924 L60.5645077,0.48676924 L58.8813058,11.8127205 L50.2618731,13.4628269 L44.4233827,3.59378109 L36.6039981,6.72144964 L39.3278827,17.842049 L30.5087481,23.7437918 L21.1103538,17.0716753 L15.2520173,23.080347 L22.3122865,32.1486416 L17.9771423,38.6214817 L6.79755577,35.7307578 L3.50185385,43.4186983 L13.3641519,49.3726905 L11.4365942,58.80187 L0.000248076923,60.4677727 L0.000248076923,68.8191581 L11.4365942,70.4850608 L13.1036712,79.0223566 L3.13718077,84.8050196 L6.29644038,92.5488548 L17.5244019,89.8513318 L23.4832096,98.5854738 L16.7466808,107.893143 L22.8134019,113.695248 L31.9699212,106.70356 L38.5067481,110.99651 L35.5881231,122.068505 L43.35045,125.332265 L49.3625942,115.565287 L58.8813058,117.47421 L60.5645077,128.801377 L63.6927577,128.801377 L64.780575,128.801377 L67.908825,128.801377 L69.5907865,117.47421 L79.1107385,115.565287 L85.1228827,125.332265 L92.8852096,122.068505 L89.9665846,110.99651 L96.5034115,106.70356 L105.659931,113.695248 L111.725412,107.893143 L104.988883,98.5854738 L110.94769,89.8513318 L122.175652,92.5488548 L125.334912,84.8050196 L115.369662,79.0223566 L117.035498,70.4850608 L128.473085,68.8191581 Z",fill:"currentColor",mask:"url(#mask-2)"})])])])])],-1),Bd=t.createElementVNode("div",{class:"absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"},[t.createElementVNode("svg",{viewBox:"0 0 280 280",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[t.createElementVNode("path",{class:"fill-xy-green",d:"m17.57,94.37c-3.36,13.54-5.07,28.73-5.07,45.63,0,32.02,6.04,58,18.1,77.95,3.81,4.98,7.46,9.94,10.95,14.66,21.21,23.24,54.01,34.89,98.45,34.89.71,0,1.39-.03,2.09-.03-3.62-46.93-22.27-88.31-54.36-124.11-19.79-22.07-42.96-38.86-70.16-48.99Z"}),t.createElementVNode("path",{class:"fill-xy-blue",d:"m267.5,140c0-85-42.5-127.5-127.5-127.5-55.06,0-92.27,17.86-111.66,53.53,28.32,8.48,56.67,16.85,84.98,25.37,27.05,8.14,54.01,16.55,81.06,24.67,5.45,1.64,7.5,4.76,6.63,10.27-.69,4.35-1.04,8.75-1.57,13.13-4.95,40.77-8.32,81.74-12.43,122.61,53.64-13.88,80.49-54.56,80.49-122.08Z"})])],-1),wr=t.defineComponent({__name:"XYSpinner",setup(n){const r=t.useAttrs();return(e,o)=>{var a,i;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass((a=t.unref(r))!=null&&a.class?(i=t.unref(r))==null?void 0:i.class:"h-20 w-20"),role:"status"},[t.createElementVNode("div",Nd,[t.createElementVNode("div",Sd,[t.createElementVNode("p",Vd,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode("loading")])]),$d,Bd])])],2)}}}),vd={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-40 bg-gray-50 bg-opacity-60"},Td={class:"mt-2"},yn=t.defineComponent({__name:"Spinner",setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:i,showMsg:l}=ho(),s=()=>{r.value++,r.value>o.value&&(r.value=0),a.value&&(i.value=a.value[r.value]),l.value=!0},c=()=>{window.setTimeout(()=>{l.value=!1},2500)};return(u,d)=>(t.openBlock(),t.createBlock(t.unref(Kn),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",vd,[t.createVNode(wr,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",Td,[t.createVNode(t.Transition,{appear:"","enter-active-class":"ease-out duration-1000","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onAfterEnter:c,onAfterLeave:s},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:"container font-medium text-lg leading-snug text-center transition-opacity"},t.toDisplayString(t.unref(i)),513),[[t.vShow,t.unref(l)]])]),_:1})],512),[[t.vShow,t.unref(a)]])])):t.createCommentVNode("",!0)]),_:1}))}}),Md={class:"h-screen flex overflow-hidden bg-gray-50"},Od={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},Pd={class:"absolute top-0 right-0 -mr-12 pt-2"},Ad=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1),Rd={class:"shrink-0 flex justify-center px-4"},Ld=["src"],Id={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},Fd={class:"flex-1 px-2"},jd={class:"space-y-1"},Hd=["href","target"],Ud={key:0,class:"mt-auto"},zd={class:"mt-6 px-2"},qd=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1),Wd={class:"hidden lg:flex lg:shrink-0"},Yd={class:"flex flex-col w-64"},Kd={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},Gd={class:"flex justify-center shrink-0 px-4"},Jd=["src"],Xd={class:"mt-5 grow flex flex-col"},Zd={class:"flex-1 px-2 bg-white"},Qd={class:"space-y-1"},eu=["href","target"],tu={key:0,class:"mt-atuo"},nu={class:"mt-6 px-2"},ru={class:"flex flex-col w-0 flex-1 overflow-hidden"},ou={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},au=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1),iu={class:"flex-1 px-4 flex justify-between"},lu={class:"flex-1 flex"},su={class:"flex items-center text-base leading-snug sm:text-2xl text-white"},cu={class:"ml-4 flex items-center lg:ml-6"},du=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),uu=["href"],fu={class:"flex-1 relative overflow-y-auto focus:outline-none"},pu={class:"mx-auto"},qa=t.defineComponent({__name:"SidebarLayout",props:{activeUrl:{default:""},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=t.ref(!1),o=a=>r.activeUrl===a;return(a,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Md,[t.createVNode(t.unref(kt),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Qt),{as:"div",static:"",class:"fixed inset-0 flex z-10 lg:hidden",open:e.value,onClose:i[1]||(i[1]=l=>e.value=!1)},{default:t.withCtx(()=>[t.createVNode(t.unref(Re),{as:"template",enter:"transition-opacity ease-linear duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"transition-opacity ease-linear duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(en),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(Re),{as:"template",enter:"transition ease-in-out duration-300 transform","enter-from":"-translate-x-full","enter-to":"translate-x-0",leave:"transition ease-in-out duration-300 transform","leave-from":"translate-x-0","leave-to":"-translate-x-full"},{default:t.withCtx(()=>[t.createElementVNode("div",Od,[t.createVNode(t.unref(Re),{as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createElementVNode("div",Pd,[t.createElementVNode("button",{class:"ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",onClick:i[0]||(i[0]=l=>e.value=!1)},[Ad,t.createVNode(t.unref(Vt),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",Rd,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,Ld)]),t.createElementVNode("div",Id,[t.createElementVNode("div",Fd,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",jd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-700 hover:bg-gray-50 hover:text-gray-900","group flex items-center px-2 py-2 text-base font-semibold rounded-md"]),target:l.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{class:t.normalizeClass([o(l.url)?"text-gray-600":"text-gray-500 group-hover:text-gray-600","mr-4 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,Hd))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",Ud,[t.createElementVNode("div",zd,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),qd]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",Wd,[t.createElementVNode("div",Yd,[t.createElementVNode("div",Kd,[t.createElementVNode("div",Gd,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,Jd)]),t.createElementVNode("div",Xd,[t.createElementVNode("div",Zd,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",Qd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-800 hover:bg-gray-100 hover:text-gray-900","group flex items-center px-2 py-2 text-sm font-semibold rounded-md"]),target:l.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{class:t.normalizeClass([o(l.url)?"text-gray-600":"text-gray-400 group-hover:text-gray-600","mr-3 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,eu))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",tu,[t.createElementVNode("div",nu,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",ru,[t.createElementVNode("div",ou,[t.createElementVNode("button",{class:"px-4 border-r border-gray-200 text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500 lg:hidden",onClick:i[2]||(i[2]=l=>e.value=!0)},[au,t.createVNode(t.unref(td),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",iu,[t.createElementVNode("div",lu,[t.createElementVNode("h1",su,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",cu,[t.createVNode(t.unref(Zn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Qn),{class:"max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-900 hover:text-gray-50 focus:outline-none focus:ring focus:text-white"},{default:t.withCtx(()=>[du,t.createVNode(t.unref(Ps),{class:"h-8 w-8",fill:"currentColor"})]),_:1})]),t.createVNode(t.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:t.withCtx(()=>[t.createVNode(t.unref(er),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(tr),{key:l.name},{default:t.withCtx(({active:s})=>[t.createElementVNode("a",{href:l.url,class:t.normalizeClass([s?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(l.name),11,uu)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",fu,[t.createElementVNode("div",pu,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(bn),t.createVNode(yn)],64))}}),$t=t.defineComponent({__name:"Popover",props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=t.ref(null),o=t.ref(null),a=t.computed(()=>{const s=[Xs(5),Qs()];return r.position==="auto"&&s.push(Js()),s}),i=t.computed(()=>{if(r.position!=="auto")return r.position}),{floatingStyles:l}=Ma(e,o,{middleware:a,placement:i,strategy:"fixed",whileElementsMounted:$a});return(s,c)=>(t.openBlock(),t.createBlock(t.unref(Ko),{as:s.as,class:"relative"},{default:t.withCtx(({open:u,close:d})=>[t.createVNode(t.unref(ks),{ref_key:"trigger",ref:e},{default:t.withCtx(()=>[t.renderSlot(s.$slots,"button",{open:u,close:d})]),_:2},1536),t.createElementVNode("div",{ref_key:"wrapper",ref:o,class:"z-[5]",style:t.normalizeStyle(t.unref(l))},[t.createVNode(t.unref(Es),null,{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default",{open:u,close:d})]),_:2},1024)],4)]),_:3},8,["as"]))}}),mu=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e},hu={},gu={class:"w-full max-w-xs bg-white rounded-xy p-2 border border-gray-100 shadow-md"};function bu(n,r){return t.openBlock(),t.createElementBlock("div",gu,[t.renderSlot(n.$slots,"default")])}const Wa=mu(hu,[["render",bu]]),yu={class:"absolute inset-0 overflow-hidden"},wu={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},xu={class:"w-screen max-w-md"},Cu={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},ku={class:"py-6 px-4 bg-xy-blue-700 sm:px-6"},Eu={class:"flex items-center justify-between"},_u={class:"ml-3 h-7 flex items-center"},Du=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1),Nu={class:"mt-1"},Su=["textContent"],Vu={class:"relative flex-1 py-6 px-4 sm:px-6"},Ya=t.defineComponent({__name:"Slideover",props:{header:{},description:{},modelValue:{type:Boolean}},emits:["close","update:modelValue"],setup(n,{emit:r}){const e=n,o=t.ref(e.modelValue),a=()=>{o.value=!1,r("close",o.value),r("update:modelValue",o.value)};return(i,l)=>(t.openBlock(),t.createBlock(t.unref(kt),{as:"template",show:i.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Qt),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",open:i.modelValue,onClose:l[1]||(l[1]=s=>a())},{default:t.withCtx(()=>[t.createElementVNode("div",yu,[t.createVNode(t.unref(en),{class:"absolute inset-0"}),t.createElementVNode("div",wu,[t.createVNode(t.unref(Re),{as:"template",enter:"transform transition ease-in-out duration-500 sm:duration-700","enter-from":"translate-x-full","enter-to":"translate-x-0",leave:"transform transition ease-in-out duration-500 sm:duration-700","leave-from":"translate-x-0","leave-to":"translate-x-full"},{default:t.withCtx(()=>[t.createElementVNode("div",xu,[t.createElementVNode("div",Cu,[t.createElementVNode("div",ku,[t.createElementVNode("div",Eu,[t.createVNode(t.unref(Xn),{as:"h3",class:"text-white"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.header),1)]),_:1}),t.createElementVNode("div",_u,[t.createElementVNode("button",{class:"bg-xy-blue-600 rounded-md text-gray-50 hover:text-white focus:outline-none focus:ring-2 focus:ring-white",onClick:l[0]||(l[0]=s=>a())},[Du,t.createVNode(t.unref(Vt),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",Nu,[t.createElementVNode("p",{class:"text-gray-50 text-base font-medium",textContent:t.toDisplayString(i.description)},null,8,Su)])]),t.createElementVNode("div",Vu,[t.renderSlot(i.$slots,"default")]),t.renderSlot(i.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),$u=["onMouseover","onMouseleave"],Bu=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1),vu=["onMouseleave"],Tu={class:"max-w-xs"},Ka=t.defineComponent({__name:"Tooltip",props:{as:{default:"span"},position:{default:"auto"}},setup(n){var r=!1,e=null;const o=i=>{r=!1,e&&clearTimeout(e),e=setTimeout(()=>{r||i()},100)},a=(i,l)=>{r=!0,!l&&i.target&&i.target.click()};return(i,l)=>(t.openBlock(),t.createBlock($t,{position:i.position,as:i.as},{button:t.withCtx(({open:s,close:c})=>[t.createElementVNode("div",{class:"leading-none relative w-4 h-4",onMouseover:u=>a(u,s),onMouseleave:u=>o(c)},[t.createVNode(t.unref(ed)),Bu],40,$u)]),default:t.withCtx(({close:s})=>[t.createElementVNode("div",{class:"sm:min-w-max bg-white rounded-xy px-3.5 py-2.5 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium",onMouseover:l[0]||(l[0]=t.withModifiers(c=>t.isRef(r)?r.value=!0:r=!0,["prevent"])),onMouseleave:t.withModifiers(c=>o(s),["prevent"])},[t.createElementVNode("div",Tu,[t.renderSlot(i.$slots,"default")])],40,vu)]),_:3},8,["position","as"]))}}),Mu={class:"min-h-screen bg-gray-50"},Ou={class:"mx-auto px-4 sm:px-6 lg:px-8"},Pu={class:"flex justify-between h-16"},Au={class:"flex"},Ru={class:"shrink-0 flex items-center"},Lu=["src"],Iu={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},Fu=["href","aria-current"],ju={class:"hidden sm:ml-6 sm:flex sm:items-center"},Hu=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),Uu=["href"],zu={class:"-mr-2 flex items-center sm:hidden"},qu=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1),Wu={class:"pt-2 pb-3 space-y-1"},Yu=["href","aria-current"],Ku={class:"pt-4 pb-3 border-t border-gray-200"},Gu={class:"flex items-center px-4"},Ju={class:"shrink-0"},Xu={class:"ml-3"},Zu=["textContent"],Qu=["textContent"],ef={class:"mt-3 space-y-1"},tf=["href"],nf={class:"mx-auto sm:px-6 lg:px-8"},rf={class:"px-4 py-8 sm:px-0"},Ga=t.defineComponent({__name:"StackedLayout",props:{activeUrl:{default:""},currentUser:{},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=o=>r.activeUrl===o;return(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",Mu,[t.createVNode(t.unref(ms),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:i})=>[t.createElementVNode("div",Ou,[t.createElementVNode("div",Pu,[t.createElementVNode("div",Au,[t.createElementVNode("div",Ru,[t.createElementVNode("img",{class:"block h-8 w-auto",src:o.iconUrl,alt:"XY Trees"},null,8,Lu)]),t.createElementVNode("div",Iu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"border-blue-500 text-gray-900":"border-transparent text-gray-700 hover:text-gray-900 hover:border-blue-500","inline-flex items-center px-1 pt-1 border-b-2 text-sm font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,Fu))),128))])]),t.createElementVNode("div",ju,[t.createVNode(t.unref(Zn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Qn),{class:"bg-white flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:t.withCtx(()=>[Hu,t.createVNode(t.unref(Ha),{class:"text-gray-500 h-8 w-8 rounded-full"})]),_:1})]),t.createVNode(t.Transition,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:t.withCtx(()=>[t.createVNode(t.unref(er),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(tr),{key:l.name},{default:t.withCtx(({active:s})=>[t.createElementVNode("a",{href:l.url,class:t.normalizeClass([s?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(l.name),11,Uu)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",zu,[t.createVNode(t.unref(hs),{class:"bg-white inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:t.withCtx(()=>[qu,i?(t.openBlock(),t.createBlock(t.unref(Vt),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(nd),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(gs),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",Wu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"bg-blue-50 border-blue-500 text-blue-700":"border-transparent text-gray-700 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-900","block pl-3 pr-4 py-2 border-l-4 text-base font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,Yu))),128))]),t.createElementVNode("div",Ku,[t.createElementVNode("div",Gu,[t.createElementVNode("div",Ju,[t.createVNode(t.unref(Ha),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",Xu,[o.currentUser.name?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-base font-medium text-gray-800",textContent:t.toDisplayString(o.currentUser.name)},null,8,Zu)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(o.currentUser.email)},null,8,Qu)])]),t.createElementVNode("div",ef,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:"block px-4 py-2 text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100"},t.toDisplayString(l.name),9,tf))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",nf,[t.createElementVNode("div",rf,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(bn),t.createVNode(yn)],64))}}),of=n=>n==null,af={refresh(){console.warn("refresh() was called on a static table, did you mean to use DynamicTable?")},reset(){console.warn("reset() was called on a static table, did you mean to use DynamicTable?")}},Ja=(n,r,e,o=af)=>{const a=t.ref(r),i=t.ref(n),l=t.ref(e),s=t.computed(()=>l.value.actions.length>0),c=t.computed(()=>a.value.map(d=>{let f="";switch((d==null?void 0:d.alignment)||"left"){case"left":f="text-left";break;case"right":f="text-right";break;case"center":f="text-center";break}return{...d,alignment:f}})),u=t.computed(()=>i.value.map((d,f)=>({actions:l.value.actions.map(m=>({...m,disabled:typeof m.disabled=="function"?m.disabled.apply(void 0,[d,f]):m.disabled,onClick:()=>m.onClick(d,f,o),show:typeof m.show=="function"?m.show.apply(void 0,[d,f]):m.show})),rowData:d,cells:c.value.map(m=>{const g=typeof m.render=="string"?d[m.render]:m.render(d,f),b=(m==null?void 0:m.classNames)||"";return{...m,isComponent:t.isVNode(g),classNames:typeof b=="function"?b.apply(void 0,[d,f]):b,val:g}})})));return{columns:c,hasActions:s,isEmptyCellValue:of,rows:u}},lf={key:0,class:"flex items-center space-x-2 justify-end"},sf={class:"isolate inline-flex rounded-md shadow-sm"},cf=["disabled","onClick"],df={class:"relative inline-flex items-center gap-x-1.5"},Xa=t.defineComponent({__name:"TableActionButtons",props:{actions:{default:()=>[]}},setup(n){const r=n,{actions:e,hasActions:o}=sa(t.toRef(r,"actions"));return(a,i)=>t.unref(o)?(t.openBlock(),t.createElementBlock("div",lf,[t.createElementVNode("span",sf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(l,s)=>(t.openBlock(),t.createElementBlock("button",{key:s,type:"button",class:t.normalizeClass(["group relative inline-flex items-center bg-white px-3 py-2 text-sm font-semibold text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 disabled:text-gray-400 disabled:cursor-not-allowed",{"rounded-l-md":s===0,"-ml-px":s>0,"rounded-r-md":s===t.unref(e).length-1}]),disabled:l.disabled,onClick:t.withModifiers(l.onClick,["stop"])},[t.createElementVNode("span",df,[l.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{key:0,class:t.normalizeClass(["-ml-0.5 h-4 w-4 group-disabled:text-gray-300",l.label?"text-gray-400":"text-gray-600"]),"aria-hidden":"true"},null,8,["class"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(l.label),1)])],10,cf))),128))])])):t.createCommentVNode("",!0)}}),uf={class:"flex flex-col"},ff={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},pf={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},mf={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},hf={class:"min-w-full divide-y divide-gray-200"},gf={class:"bg-gray-100"},bf={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},yf={class:"bg-white"},wf={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},xf={key:0},Cf=["colspan"],Za=t.defineComponent({__name:"DataTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableData:{}},setup(n){const r=n,{columns:e,hasActions:o,isEmptyCellValue:a,rows:i}=Ja(t.toRef(r,"tableData"),t.toRef(r,"tableColumns"),t.toRef(r,"tableActions"));return(l,s)=>(t.openBlock(),t.createElementBlock("div",uf,[t.createElementVNode("div",ff,[t.createElementVNode("div",pf,[t.createElementVNode("div",mf,[t.createElementVNode("table",hf,[t.createElementVNode("thead",gf,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(c,u)=>(t.openBlock(),t.createElementBlock("th",{key:u,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",c.alignment])},t.toDisplayString(c.title),3))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("th",bf)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",yf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(i),(c,u)=>(t.openBlock(),t.createElementBlock("tr",{key:u,class:"even:bg-gray-50"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.cells,(d,f)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:f,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",d.alignment])},{default:t.withCtx(()=>[d.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(d.classNames)},t.toDisplayString(t.unref(a)(d.val)?"-":String(d.val)),3))]),_:2},1032,["class"]))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("td",wf,[l.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(un),{key:0,actions:c.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Xa,{key:1,actions:c.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)]))),128)),t.unref(i).length===0?(t.openBlock(),t.createElementBlock("tr",xf,[t.createElementVNode("td",{colspan:t.unref(e).length+(t.unref(o)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Cf)])):t.createCommentVNode("",!0)])])])])])]))}}),kf={class:"flex items-center justify-center space-x-8"},Ef={class:"font-medium"},_f={class:"flex items-center space-x-5"},Df={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},Nf={key:1,class:"relative flex items-center justify-center"},Sf=[t.createElementVNode("span",{class:"absolute w-5 h-5 p-px flex"},[t.createElementVNode("span",{class:"w-full h-full rounded-full bg-green-100"})],-1),t.createElementVNode("span",{class:"relative block w-2.5 h-2.5 bg-xy-green rounded-full"},null,-1)],Vf={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},$f={key:0,class:"flex shrink-0"},Bf={key:0,class:"inline-flex rounded-md shadow-sm"},vf=["textContent"],Tf={class:"ml-3 inline-flex rounded-md shadow-sm"},Mf=["textContent"],Qa=t.defineComponent({__name:"Steps",props:{hideActions:{type:Boolean,default:!1},hidePrevious:{type:Boolean,default:!1},nextText:{default:"Next"},previousText:{default:"Back"},step:{},total:{}},emits:["next","previous"],setup(n,{emit:r}){const e=()=>{r("next")},o=()=>{r("previous")};return(a,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",kf,[t.createElementVNode("p",Ef,"Step "+t.toDisplayString(a.step)+" of "+t.toDisplayString(a.total),1),t.createElementVNode("ul",_f,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.total,l=>(t.openBlock(),t.createElementBlock("li",{key:l},[a.step>l?(t.openBlock(),t.createElementBlock("span",Df)):a.step===l?(t.openBlock(),t.createElementBlock("div",Nf,Sf)):(t.openBlock(),t.createElementBlock("span",Vf))]))),128))])]),a.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",$f,[a.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Bf,[t.createElementVNode("button",{type:"button",class:"xy-btn-secondary",onClick:o,textContent:t.toDisplayString(a.previousText)},null,8,vf)])),t.createElementVNode("span",Tf,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:e,textContent:t.toDisplayString(a.nextText)},null,8,Mf)])]))]))}}),Of={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},Pf={key:0,class:"w-full max-w-lg lg:max-w-xs"},Af=t.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),Rf={class:"flex items-center gap-x-2"},Lf=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),If={class:"flex-1"},Ff={key:1,class:"w-full max-w-lg lg:max-w-xs"},jf=t.createElementVNode("label",{for:"table-date-range",class:"sr-only"},"Date Range",-1),Hf={class:"flex items-center gap-x-2"},Uf=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1),zf={class:"flex-1"},qf={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},Wf={class:"min-w-full divide-y divide-gray-200"},Yf={class:"bg-gray-100"},Kf=["onClick"],Gf={key:0},Jf={key:1},Xf={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},Zf=[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 9l4-4 4 4m0 6l-4 4-4-4"},null,-1)],Qf={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},ep=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"},null,-1)],tp={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},np=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)],rp={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},op={class:"bg-white"},ap=["onClick"],ip={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},lp={key:0},sp=["colspan"],ei=t.defineComponent({__name:"DynamicTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableOptions:{}},emits:["click:row"],setup(n,{expose:r}){const e=n,o=()=>{const A={minDate:b.value.minDate,maxDate:b.value.maxDate,page:y.value.page,perPage:y.value.perPage,sort:m.value,sortDir:g.value,q:w.value};Wn.get(e.tableOptions.url,{skipLoader:!1},A).then(M=>{y.value={page:M.data.page,perPage:M.data.perPage,totalItems:M.data.totalItems,totalPages:M.data.totalPages},l.value=M.data.items},()=>{yr.genericError()})},a=()=>{y.value.page=1,o()},i=()=>{if(_.value.maxRange){const A=new Date,M=A.setDate(A.getDate()-_.value.maxRange),T=new Date;b.value={minDate:Math.floor(M/1e3),maxDate:Math.floor(T.getTime()/1e3)}}},l=t.ref([]),s={refresh:o,reset:a},{columns:c,hasActions:u,isEmptyCellValue:d,rows:f}=Ja(l,t.toRef(e,"tableColumns"),t.toRef(e,"tableActions"),s),m=t.ref(e.tableOptions.defaultSort?e.tableOptions.defaultSort:""),g=t.ref(e.tableOptions.defaultSortDirection?e.tableOptions.defaultSortDirection:"desc"),b=t.ref({minDate:0,maxDate:0}),y=t.ref({page:1,perPage:10,totalItems:0,totalPages:0}),w=t.ref(""),k=A=>{y.value.page=1,b.value=A,o()},N=A=>{m.value==A?g.value=g.value==="desc"?"asc":"desc":(m.value=A,g.value="desc"),o()},_=t.computed(()=>typeof e.tableOptions.dateSearch=="object"?e.tableOptions.dateSearch:{}),R=t.computed(()=>!!f.value.length);return t.watch(()=>e.tableOptions.refreshTrigger,()=>{o()}),t.watch(()=>e.tableOptions.reloadTrigger,()=>{a()}),r(s),i(),o(),(A,M)=>{const T=t.resolveComponent("BaseInput");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Of,[A.tableOptions.search?(t.openBlock(),t.createElementBlock("div",Pf,[Af,t.createElementVNode("div",Rf,[Lf,t.createElementVNode("div",If,[t.createVNode(T,{id:"table-search",modelValue:w.value,"onUpdate:modelValue":M[0]||(M[0]=j=>w.value=j),modelModifiers:{trim:!0},type:"search",placeholder:"Search",onChange:M[1]||(M[1]=j=>a())},null,8,["modelValue"])])])])):t.createCommentVNode("",!0),A.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",Ff,[jf,t.createElementVNode("div",Hf,[Uf,t.createElementVNode("div",zf,[t.createVNode(hn,t.mergeProps({id:"table-date-range",modelValue:b.value,"onUpdate:modelValue":M[2]||(M[2]=j=>b.value=j)},{..._.value},{"onUpdate:modelValue":k}),null,16,["modelValue"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",qf,[t.createElementVNode("table",Wf,[t.createElementVNode("thead",Yf,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),(j,I)=>(t.openBlock(),t.createElementBlock("th",{key:I,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",j.alignment])},[t.createElementVNode("div",{class:t.normalizeClass(["inline-flex items-center gap-2",{"cursor-pointer":j.sort}]),onClick:t.withModifiers(H=>j.sort?N(j.sort):void 0,["prevent"])},[j.title?(t.openBlock(),t.createElementBlock("span",Gf,t.toDisplayString(j.title),1)):t.createCommentVNode("",!0),j.sort?(t.openBlock(),t.createElementBlock("span",Jf,[m.value!==j.sort?(t.openBlock(),t.createElementBlock("svg",Xf,Zf)):g.value=="desc"?(t.openBlock(),t.createElementBlock("svg",Qf,ep)):(t.openBlock(),t.createElementBlock("svg",tp,np))])):t.createCommentVNode("",!0)],10,Kf)],2))),128)),t.unref(u)?(t.openBlock(),t.createElementBlock("th",rp)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",op,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(f),(j,I)=>(t.openBlock(),t.createElementBlock("tr",{key:I,class:"even:bg-gray-50",onClick:H=>A.$emit("click:row",j.rowData)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(j.cells,(H,X)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:X,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",H.alignment])},{default:t.withCtx(()=>[H.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(H.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(H.classNames)},t.toDisplayString(t.unref(d)(H.val)?"-":String(H.val)),3))]),_:2},1032,["class"]))),128)),t.unref(u)?(t.openBlock(),t.createElementBlock("td",ip,[A.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(un),{key:0,actions:j.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Xa,{key:1,actions:j.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)],8,ap))),128)),R.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",lp,[t.createElementVNode("td",{colspan:t.unref(c).length+(t.unref(u)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,sp)]))])])]),R.value?(t.openBlock(),t.createBlock(gn,{key:0,modelValue:y.value,"onUpdate:modelValue":[M[3]||(M[3]=j=>y.value=j),M[4]||(M[4]=j=>o())]},null,8,["modelValue"])):t.createCommentVNode("",!0)])}}}),cp=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1),dp={class:"hidden sm:block"},up=["onClick","textContent"],ti=t.defineComponent({__name:"Tabs",props:{modelValue:{},pillDesign:{type:Boolean,default:!1},tabs:{}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=l=>{r("update:modelValue",l)},a=(l,s)=>{let c="";return e.pillDesign?(c="px-12 py-2 font-semibold text-md leading-5 rounded-t-md focus:outline-none ",e.modelValue===l?c=c+"focus:bg-white text-gray-700 bg-white border-b-2 border-blue-500":c=c+"text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:bg-gray-100 border border-gray-200",c):(c="px-1 py-4 text-sm font-semibold border-b-2 whitespace-nowrap leading-5 focus:outline-none ",e.modelValue===l?c=c+"border-blue-500 text-xy-blue focus:text-blue-800 focus:border-blue-700":c=c+"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:text-gray-900 focus:border-gray-300",s&&(c=c+" ml-8"),c)},i=t.computed(()=>!e.pillDesign);return(l,s)=>{const c=t.resolveComponent("Select");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["sm:hidden",{"mb-4":l.pillDesign}])},[cp,t.createVNode(c,{name:"tabs","model-value":l.modelValue,options:l.tabs,"onUpdate:modelValue":s[0]||(s[0]=u=>o(u))},null,8,["model-value","options"])],2),t.createElementVNode("div",dp,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":i.value})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[l.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.tabs,(u,d)=>(t.openBlock(),t.createElementBlock("a",{key:d,href:"#",class:t.normalizeClass(a(u.value,d>0)),onClick:t.withModifiers(f=>o(u.value),["prevent"]),textContent:t.toDisplayString(u.label)},null,10,up))),128))],2)],2)])])}}}),fp={key:0,class:"sr-only"},pp={class:"ml-3 mt-0.5"},ni=t.defineComponent({inheritAttrs:!1,__name:"Toggle",props:{modelValue:{type:Boolean},label:{default:""},help:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const e=t.useAttrs(),o=t.computed(()=>Yn(e,"disabled"));return(a,i)=>(t.openBlock(),t.createBlock(t.unref(Ns),{as:"div",class:"flex items-start"},{default:t.withCtx(()=>[t.createVNode(t.unref(Ss),{class:t.normalizeClass([a.modelValue?"bg-xy-blue":"bg-gray-200",o.value?"opacity-75 cursor-not-allowed":"cursor-pointer","relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500"]),disabled:o.value,"model-value":a.modelValue,"onUpdate:modelValue":i[0]||(i[0]=l=>r("update:modelValue",l))},{default:t.withCtx(()=>[a.label?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",fp,"Use")),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([a.modelValue?"translate-x-5":"translate-x-0","pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200"])},null,2)]),_:1},8,["class","disabled","model-value"]),t.createElementVNode("div",pp,[a.label?(t.openBlock(),t.createBlock(t.unref(Vs),{key:0},{default:t.withCtx(()=>[t.createVNode(fe,{label:a.label,class:t.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer")},null,8,["label","class"])]),_:1})):t.createCommentVNode("",!0),a.help?(t.openBlock(),t.createBlock(t.unref($s),{key:1},{default:t.withCtx(()=>[t.createVNode(ae,{text:a.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0)])]),_:1}))}}),mp={"aria-label":"Progress"},hp={role:"list",class:"flex items-center"},gp={class:"absolute inset-0 flex items-center","aria-hidden":"true"},bp=["aria-current"],yp={key:1,class:"h-3 w-3 rounded-full bg-xy-blue","aria-hidden":"true"},wp={class:"sr-only"},xp={key:2,class:"sr-only"},ri=t.defineComponent({__name:"ProgressCircles",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let i;return r.current>a?i="complete":r.current===a?i="current":i="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:i}}));return(o,a)=>(t.openBlock(),t.createElementBlock("nav",mp,[t.createElementVNode("ol",hp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(i,l)=>(t.openBlock(),t.createElementBlock("li",{key:i.name,class:t.normalizeClass([l!==e.value.length-1?"pr-8":"","relative"])},[t.createElementVNode("div",gp,[t.createElementVNode("div",{class:t.normalizeClass(["h-0.5 w-full",i.status==="complete"?"bg-xy-blue":"bg-gray-300"])},null,2)]),t.createElementVNode("div",{class:t.normalizeClass({"relative flex h-5 w-5 items-center justify-center rounded-full":!0,"bg-xy-blue":i.status==="complete","border-2 border-indigo-600 bg-white":i.status==="current","border-2 border-gray-300 bg-white":i.status==="incomplete"}),"aria-current":i.status==="current"?!0:void 0},[i.status==="complete"?(t.openBlock(),t.createBlock(t.unref(la),{key:0,class:"h-3 w-3 text-white","aria-hidden":"true"})):i.status==="current"?(t.openBlock(),t.createElementBlock("span",yp)):t.createCommentVNode("",!0),t.createElementVNode("span",wp,t.toDisplayString(i.name),1),i.description?(t.openBlock(),t.createElementBlock("span",xp,t.toDisplayString(i.description),1)):t.createCommentVNode("",!0)],10,bp)],2))),128))])]))}}),Cp={"aria-label":"Progress"},kp={role:"list",class:"overflow-hidden"},Ep=["aria-current"],_p={class:"flex h-9 items-center"},Dp={key:1,class:"h-2.5 w-2.5 rounded-full bg-xy-blue"},Np={class:"ml-4 flex min-w-0 flex-col"},Sp={key:0,class:"text-sm text-gray-600"},oi=t.defineComponent({__name:"ProgressCirclesLabeled",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let i;return r.current>a?i="complete":r.current===a?i="current":i="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:i}}));return(o,a)=>(t.openBlock(),t.createElementBlock("div",Cp,[t.createElementVNode("ol",kp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(i,l)=>(t.openBlock(),t.createElementBlock("li",{key:l,class:t.normalizeClass([l!==e.value.length-1?"pb-6":"","relative"])},[l!==e.value.length-1?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["absolute left-3 top-3 -ml-px mt-0.5 h-full w-0.5",i.status==="complete"?"bg-xy-blue":"bg-gray-300"]),"aria-hidden":"true"},null,2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"group relative flex items-start","aria-current":i.status==="current"?!0:void 0},[t.createElementVNode("span",_p,[t.createElementVNode("span",{class:t.normalizeClass({"relative z-10 flex h-6 w-6 items-center justify-center rounded-full":!0,"bg-xy-blue ":i.status==="complete","border-2 border-xy-blue bg-white":i.status==="current","border-2 border-gray-300 bg-white":i.status==="incomplete"})},[i.status==="complete"?(t.openBlock(),t.createBlock(t.unref(la),{key:0,class:"h-4 w-4 text-white","aria-hidden":"true"})):i.status==="current"?(t.openBlock(),t.createElementBlock("span",Dp)):t.createCommentVNode("",!0)],2)]),t.createElementVNode("span",Np,[t.createElementVNode("span",{class:t.normalizeClass({"text-sm font-bold":!0,"text-gray-800":i.status==="complete","text-xy-blue":i.status==="current","text-gray-600":i.status==="incomplete","mt-2":!i.description})},t.toDisplayString(i.name),3),i.description?(t.openBlock(),t.createElementBlock("span",Sp,t.toDisplayString(i.description),1)):t.createCommentVNode("",!0)])],8,Ep)],2))),128))])]))}}),Vp=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","type","value"],ai=t.defineComponent({inheritAttrs:!1,__name:"BaseInput",props:t.mergeDefaults({modelValue:{},type:{},label:{},help:{},placeholder:{}},Me),emits:["update:modelValue","update:error"],setup(n,{expose:r}){const e=n,o=t.ref(null),{errorState:a,modelState:i,inputID:l,isRequired:s,onInvalid:c,inputValidation:u}=Ve(e);r({input:o});const d=t.computed(()=>{switch(e.type){case"number":return{max:Number.MAX_SAFE_INTEGER,min:Number.MIN_SAFE_INTEGER};case"email":return{pattern:ko};case"tel":return{pattern:Eo};default:return{}}}),f=m=>{let g=m.target.value;e.type==="number"&&(g=_o(g)),typeof g=="string"&&(g=g.trim()),i.value=g,u(m)};return(m,g)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(fe,{id:`${t.unref(l)}-label`,class:"mb-2",for:t.unref(l),label:m.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(l),ref_key:"input",ref:o,"aria-labelledby":m.label?`${t.unref(l)}-label`:void 0,"aria-describedby":m.help?`${t.unref(l)}-help`:void 0,"aria-errormessage":t.unref(a)?`${t.unref(l)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(a)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:m.placeholder,type:m.type,value:t.unref(i)},{...d.value,...m.$attrs},{onInput:f,onInvalid:g[0]||(g[0]=(...b)=>t.unref(c)&&t.unref(c)(...b))}),null,16,Vp),t.createVNode(ae,{id:`${t.unref(l)}-help`,class:"mt-1",text:m.help},null,8,["id","text"]),t.createVNode(ke,{id:`${t.unref(l)}-error`,class:"mt-0.5",text:t.unref(a)},null,8,["id","text"])]))}}),$p={class:"relative flex items-start"},Bp={class:"flex items-center h-5"},vp=["id","aria-labelledby","aria-describedby","aria-errormessage","checked"],Tp={class:"ml-3"},ii=t.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isDisabled:a,isRequired:i,errorState:l,modelState:s,validate:c,onInvalid:u}=Ve(r),d=f=>{s.value=f.target.checked,c(f)};return(f,m)=>(t.openBlock(),t.createElementBlock("div",$p,[t.createElementVNode("div",Bp,[t.createElementVNode("input",t.mergeProps({id:t.unref(o),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,checked:t.unref(s)||void 0,class:["h-4 w-4 rounded text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},f.$attrs,{onChange:d,onInvalid:m[0]||(m[0]=(...g)=>t.unref(u)&&t.unref(u)(...g))}),null,16,vp)]),t.createElementVNode("div",Tp,[t.createVNode(fe,{id:t.unref(e).labelledby,for:t.unref(o),label:f.label,class:t.normalizeClass(t.unref(a)?"cursor-not-allowed":"cursor-pointer"),required:t.unref(i)},null,8,["id","for","label","class","required"]),t.createVNode(ae,{id:t.unref(e).describedby,text:f.help},null,8,["id","text"]),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])])]))}}),Mp=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","value"],li=t.defineComponent({inheritAttrs:!1,__name:"DateTimeInput",props:t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,e=t.ref(null),{errorState:o,modelState:a,inputID:i,isRequired:l,onInvalid:s,inputValidation:c}=Ve(r),u=t.computed(()=>Zl(a.value)),d=f=>{let m=f.target.value;a.value=m&&new Date(m).toISOString(),c(f)};return(f,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(fe,{id:`${t.unref(i)}-label`,class:"mb-2",for:t.unref(i),label:f.label,required:t.unref(l)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(i),ref_key:"input",ref:e,"aria-labelledby":f.label?`${t.unref(i)}-label`:void 0,"aria-describedby":f.help?`${t.unref(i)}-help`:void 0,"aria-errormessage":t.unref(o)?`${t.unref(i)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(o)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:f.placeholder,type:"datetime-local",value:u.value},f.$attrs,{onInput:d,onInvalid:m[0]||(m[0]=(...g)=>t.unref(s)&&t.unref(s)(...g))}),null,16,Mp),t.createVNode(ae,{id:`${t.unref(i)}-help`,class:"mt-1",text:f.help},null,8,["id","text"]),t.createVNode(ke,{id:`${t.unref(i)}-error`,class:"mt-0.5",text:t.unref(o)},null,8,["id","text"])]))}}),Op={key:0,class:"text-red-700/80"},pt=t.defineComponent({__name:"FieldsetLegend",props:{label:{default:""},required:{type:Boolean,default:!1},tag:{default:"legend"}},setup(n){const r=n,e=t.computed(()=>r.required&&/\*$/gm.exec(r.label)!==null?r.label.substring(0,r.label.length-1):r.label);return(o,a)=>o.label?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),t.mergeProps({key:0,class:"block text-sm leading-6 font-semibold text-gray-800"},o.$attrs),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.value)+" ",1),r.required?(t.openBlock(),t.createElementBlock("span",Op,"*")):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}}),Pp=["aria-labelledby","aria-describedby","aria-errormessage"],Ap={key:0},Rp={class:"flex"},Lp={class:"flex items-center h-5"},Ip=["id","aria-labelledby","aria-describedby","checked","disabled","onChange"],Fp={class:"ml-3"},si=t.defineComponent({inheritAttrs:!1,__name:"MultiCheckboxes",props:t.mergeDefaults({max:{},min:{},modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isDisabled:a,modelState:i,errorState:l,validate:s}=Ve(r),c=(y,w)=>{const k=y.target.checked;Array.isArray(i.value)||(i.value=[]),k?i.value.push(w):i.value.splice(i.value.indexOf(w),1),s(y)},u=t.computed(()=>Array.isArray(i.value)?i.value.length:0),d=t.computed(()=>r.min||0),f=t.computed(()=>r.max||r.options.filter(y=>!y.disabled).length),m=t.computed(()=>u.value<d.value&&!r.max?`Please select at least ${d.value} of these options.`:u.value>f.value&&!r.min?`Please limit your selection to ${f.value} of these options.`:u.value<d.value||u.value>f.value?`Please select between ${d.value} and ${f.value} of these options.`:""),g=t.ref(null),b=()=>{var y;l.value||(l.value=m.value,(y=g.value)==null||y.setCustomValidity(m.value))};return(y,w)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"relative space-y-6","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[y.label?(t.openBlock(),t.createElementBlock("div",Ap,[t.createVNode(pt,{id:t.unref(e).labelledby,label:y.label,required:d.value>0},null,8,["id","label","required"]),y.help?(t.openBlock(),t.createBlock(ae,{key:0,id:t.unref(e).describedby,class:"mt-1",tag:"p",text:y.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-1",text:t.unref(l)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Rp,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-5",{"sm:grid sm:gap-x-10":y.columns!==void 0,"sm:grid-cols-2":y.columns===2,"sm:grid-cols-3":y.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.options,(k,N)=>{var _;return t.openBlock(),t.createElementBlock("div",{key:k.value,class:"flex items-start"},[t.createElementVNode("div",Lp,[t.createElementVNode("input",t.mergeProps({id:`${t.unref(o)}-${N}`,"aria-labelledby":`${t.unref(o)}-${N}-label`,"aria-describedby":k.help?`${t.unref(o)}-${N}-help`:void 0,checked:(_=y.modelValue)==null?void 0:_.includes(k.value),disabled:k.disabled,class:["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},y.$attrs,{onChange:R=>c(R,k.value)}),null,16,Ip)]),t.createElementVNode("div",Fp,[t.createVNode(fe,{id:`${t.unref(o)}-${N}-label`,for:`${t.unref(o)}-${N}`,label:k.label,class:t.normalizeClass(t.unref(a)||k.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(ae,{id:`${t.unref(o)}-${N}-help`,text:k.help},null,8,["id","text"])])])}),128))],2)]),m.value?(t.openBlock(),t.createElementBlock("input",{key:1,ref_key:"errorInput",ref:g,required:"",class:"sr-only top-1 left-1","aria-hidden":"",type:"checkbox",onInvalid:b},null,544)):t.createCommentVNode("",!0)],8,Pp))}}),jp=["aria-labelledby","aria-describedby","aria-errormessage"],Hp={key:0},Up={class:"flex"},zp={class:"flex items-center h-5"},qp=["id","aria-describedby","aria-labelledby","checked","disabled","name","value","onChange"],Wp={class:"ml-3"},ci=t.defineComponent({inheritAttrs:!1,__name:"Radio",props:t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,errorState:o,modelState:a,inputID:i,isDisabled:l,isRequired:s,onInvalid:c,validate:u}=Ve(r),d=(f,m)=>{a.value=m,u(f)};return(f,m)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-6","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[f.label?(t.openBlock(),t.createElementBlock("div",Hp,[t.createVNode(pt,{id:t.unref(e).labelledby,label:f.label,required:t.unref(s)},null,8,["id","label","required"]),f.help?(t.openBlock(),t.createBlock(ae,{key:0,id:t.unref(e).describedby,class:"mt-1",tag:"p",text:f.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-1",text:t.unref(o)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Up,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-5",{"sm:grid sm:gap-x-10":f.columns!==void 0,"sm:grid-cols-2":f.columns===2,"sm:grid-cols-3":f.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(f.options,(g,b)=>(t.openBlock(),t.createElementBlock("div",{key:g.value,class:"flex items-start"},[t.createElementVNode("div",zp,[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-${b}`,"aria-describedby":g.help?`${t.unref(i)}-${b}-help`:void 0,"aria-labelledby":`${t.unref(i)}-${b}-label`,checked:t.unref(a)===g.value,class:["h-4 w-4 cursor-pointer text-xy-blue","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(o)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],disabled:g.disabled,name:t.unref(i),type:"radio",value:g.value},f.$attrs,{onChange:y=>d(y,g.value),onInvalid:m[0]||(m[0]=(...y)=>t.unref(c)&&t.unref(c)(...y))}),null,16,qp)]),t.createElementVNode("div",Wp,[t.createVNode(fe,{id:`${t.unref(i)}-${b}-label`,for:`${t.unref(i)}-${b}`,label:g.label,class:t.normalizeClass(t.unref(l)||g.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(ae,{id:`${t.unref(i)}-${b}-help`,text:g.help},null,8,["id","text"])])]))),128))],2)])],8,jp))}}),Yp={class:"flex-1 flex pr-1"},Kp={class:"flex flex-col"},Gp={key:1,class:"mt-auto mb-0"},Jp=["checked","name","required","value"],di=t.defineComponent({inheritAttrs:!1,__name:"RadioCards",props:t.mergeDefaults({options:{},modelValue:{},label:{},help:{},placeholder:{},columns:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,isDisabled:o,isRequired:a,nameAttr:i,modelState:l,errorState:s,onInvalid:c}=Ve(r),u=d=>{d&&(s.value="")};return(d,f)=>(t.openBlock(),t.createBlock(t.unref(_s),{modelValue:t.unref(l),"onUpdate:modelValue":[f[1]||(f[1]=m=>t.isRef(l)?l.value=m:null),u],disabled:t.unref(o),"aria-invalid":t.unref(s)?"true":null,"aria-errormessage":t.unref(e).errormessage},{default:t.withCtx(()=>[d.label?(t.openBlock(),t.createBlock(t.unref(ea),{key:0,class:"block"},{default:t.withCtx(()=>[t.createVNode(pt,{tag:"div",label:d.label,required:t.unref(a)},null,8,["label","required"])]),_:1})):t.createCommentVNode("",!0),d.help?(t.openBlock(),t.createBlock(t.unref(rr),{key:1,class:"mt-1"},{default:t.withCtx(()=>[t.createVNode(ae,{text:d.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-1",text:t.unref(s)},null,8,["id","text"]),t.createElementVNode("div",{class:t.normalizeClass(["mt-6 grid grid-cols-1 gap-y-5 gap-x-4 relative",{"sm:grid-cols-2":d.columns===2,"sm:grid-cols-3":d.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.options,m=>(t.openBlock(),t.createBlock(t.unref(Ds),{key:m.value,as:"template",disabled:t.unref(o)||m.disabled,value:m.value},{default:t.withCtx(({active:g,checked:b,disabled:y})=>[t.createElementVNode("div",{class:t.normalizeClass(["relative border rounded-lg shadow-sm p-4 flex focus:outline-none",[y?"cursor-not-allowed bg-gray-50 border-gray-200 opacity-90":"cursor-pointer bg-white border-gray-300",t.unref(s)&&!y?"border-red-700":"",b?"border-transparent":"",g?"border-xy-blue ring-2 ring-xy-blue-500":""]])},[t.createElementVNode("div",Yp,[t.createElementVNode("div",Kp,[t.createVNode(t.unref(ea),{as:"div"},{default:t.withCtx(()=>[t.createVNode(fe,{tag:"div",class:"mt-auto mb-auto",label:m.label},null,8,["label"])]),_:2},1024),m.help?(t.openBlock(),t.createBlock(t.unref(rr),{key:0,as:"div"},{default:t.withCtx(()=>[t.createVNode(ae,{tag:"div",class:"mt-auto",text:m.help},null,8,["text"])]),_:2},1024)):t.createCommentVNode("",!0),m.sublabel||d.$slots.sublabel?(t.openBlock(),t.createElementBlock("div",Gp,[t.createVNode(t.unref(rr),{as:"div",class:"text-sm/5 font-medium mt-4 text-gray-800"},{default:t.withCtx(()=>[t.renderSlot(d.$slots,"sublabel",{active:g,checked:b,disabled:y,option:m},()=>[t.createTextVNode(t.toDisplayString(m.sublabel),1)])]),_:2},1024)])):t.createCommentVNode("",!0)])]),t.createVNode(t.unref(ia),{class:t.normalizeClass([b?"":"invisible","h-5 w-5 text-xy-blue"]),"aria-hidden":"true"},null,8,["class"]),t.createElementVNode("div",{class:t.normalizeClass([g?"border":"border-2",b?"border-xy-blue":"border-transparent","absolute -inset-px rounded-lg pointer-events-none"]),"aria-hidden":"true"},null,2),t.createElementVNode("input",{class:"sr-only top-1 left-1","aria-hidden":"true",checked:b,name:t.unref(i),required:t.unref(a),tabindex:"-1",type:"radio",value:m.value,onInvalid:f[0]||(f[0]=(...w)=>t.unref(c)&&t.unref(c)(...w))},null,40,Jp)],2)]),_:2},1032,["disabled","value"]))),128))],2)]),_:3},8,["modelValue","disabled","aria-invalid","aria-errormessage"]))}}),Xp=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","value"],ui=t.defineComponent({inheritAttrs:!1,__name:"TextArea",props:t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isRequired:a,modelState:i,errorState:l,onInvalid:s,inputValidation:c}=Ve(r),u=d=>{i.value=d.target.value.trim(),c(d)};return(d,f)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(fe,{id:t.unref(e).labelledby,class:"mb-2",for:t.unref(o),label:d.label,required:t.unref(a)},null,8,["id","for","label","required"]),t.createElementVNode("textarea",t.mergeProps({id:t.unref(o),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(l)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:d.placeholder,value:t.unref(i)||void 0},d.$attrs,{onInput:u,onInvalid:f[0]||(f[0]=(...m)=>t.unref(s)&&t.unref(s)(...m))}),null,16,Xp),t.createVNode(ae,{id:t.unref(e).describedby,class:"mt-1",text:d.help},null,8,["id","text"]),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])]))}}),Zp=["aria-labelledby","aria-describedby","aria-errormessage"],Qp={key:0},em=["for"],tm=["id","name","checked"],nm=["for"],rm=["id","name","checked"],fi=t.defineComponent({inheritAttrs:!1,__name:"YesOrNoRadio",props:t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Me),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,isDisabled:o,isRequired:a,nameAttr:i,modelState:l,errorState:s,onInvalid:c,validate:u}=Ve(r),d=(f,m)=>{l.value=m,u(f)};return(f,m)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-6","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[f.label?(t.openBlock(),t.createElementBlock("div",Qp,[t.createVNode(pt,{id:t.unref(e).labelledby,class:"block my-auto",label:f.label,required:t.unref(a),tag:"legend"},null,8,["id","label","required"]),f.help?(t.openBlock(),t.createBlock(ae,{key:0,id:t.unref(e).describedby,class:"mt-1",tag:"p",text:f.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(ke,{id:t.unref(e).errormessage,class:"mt-1",text:t.unref(s)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",null,[t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center group",t.unref(o)?"cursor-not-allowed":"cursor-pointer"]),for:`${t.unref(i)}-true`},[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-true`,type:"radio",class:["h-4 w-4 text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],name:t.unref(i),value:!0,checked:t.unref(l)===!0},f.$attrs,{onChange:m[0]||(m[0]=g=>d(g,!0)),onInvalid:m[1]||(m[1]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,tm),t.createVNode(fe,{class:"ml-3",label:"Yes",tag:"span"})],10,em),t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center ml-6",t.unref(o)?"cursor-not-allowed":"cursor-pointer"]),for:`${t.unref(i)}-false`},[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-false`,type:"radio",class:["h-4 w-4 text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],name:t.unref(i),value:!1,checked:t.unref(l)===!1},f.$attrs,{onChange:m[2]||(m[2]=g=>d(g,!1)),onInvalid:m[3]||(m[3]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,rm),t.createVNode(fe,{class:"ml-3",label:"No",tag:"span"})],10,nm)])],8,Zp))}}),om=Object.freeze(Object.defineProperty({__proto__:null,ActionsDropdown:un,BaseInput:ai,Cards:Oa,Checkbox:ii,ContentModal:Pa,DataTable:Za,DateFilter:gr,DateRangePicker:hn,DateTime:li,DetailList:Fa,DownloadCell:ja,DynamicTable:ei,FieldsetLegend:pt,Flash:bn,InlineAlert:Ua,InputError:ke,InputHelp:ae,InputLabel:fe,Modal:za,MultiCheckboxes:si,Paginator:gn,Popover:$t,PopoverContent:Wa,PopoverPosition:$t,ProgressCircles:ri,ProgressCirclesLabeled:oi,Radio:ci,RadioCards:di,Select:hr,SidebarLayout:qa,Slideover:Ya,Spinner:yn,StackedLayout:Ga,Steps:Qa,Tabs:ti,TextArea:ui,Toggle:ni,Tooltip:Ka,XYSpinner:wr,YesOrNoRadio:fi},Symbol.toStringTag,{value:"Module"})),am=function(r){Object.entries(om).forEach(([e,o])=>{r.component(e,o)})};S.ActionsDropdown=un,S.BaseAPI=Wn,S.BaseInput=ai,S.Cards=Oa,S.Checkbox=ii,S.ContentModal=Pa,S.DataTable=Za,S.DateFilter=gr,S.DateRangePicker=hn,S.DateTime=li,S.DetailList=Fa,S.DownloadCell=ja,S.DynamicTable=ei,S.FieldsetLegend=pt,S.Flash=bn,S.InlineAlert=Ua,S.InputError=ke,S.InputHelp=ae,S.InputLabel=fe,S.Modal=za,S.MultiCheckboxes=si,S.Paginator=gn,S.Popover=$t,S.PopoverContent=Wa,S.PopoverPosition=$t,S.ProgressCircles=ri,S.ProgressCirclesLabeled=oi,S.Radio=ci,S.RadioCards=di,S.Select=hr,S.SidebarLayout=qa,S.Slideover=Ya,S.Spinner=yn,S.StackedLayout=Ga,S.Steps=Qa,S.Tabs=ti,S.TextArea=ui,S.Toggle=ni,S.Tooltip=Ka,S.XYSpinner=wr,S.YesOrNoRadio=fi,S.debounceFn=xo,S.debounceLeading=Jl,S.default=am,S.emailPattern=ko,S.isHttpCancel=bo,S.isHttpError=go,S.looseToNumber=_o,S.phonePattern=Eo,S.setBaseAPIDefaults=Gl,S.textInputTypes=Xl,S.throttleFn=Ql,S.useAppFlasher=yr,S.useAppFlashes=Xe,S.useAppSpinner=qn,S.useBaseAPI=ft,S.useBaseAPIDelete=$c,S.useBaseAPIGet=Vc,S.useBaseAPIPatch=Bc,S.useBaseAPIPost=vc,S.useBaseAPIPut=Tc,S.useFlashes=Ia,S.useInputField=Ve,S.useModel=Co,S.useSpinnerDisplay=mo,S.useTabHistory=Oc,S.useUrlSearchParams=Pc,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xy-planning-network/trees",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "github:xy-planning-network/trees",
@@ -112,17 +112,6 @@ const setValidationError = () => {
112
112
  <InputError :id="aria.errormessage" class="mt-1" :text="errorState" />
113
113
  </div>
114
114
 
115
- <!--Hidden input for custom validation-->
116
- <input
117
- v-if="countError"
118
- ref="errorInput"
119
- required
120
- class="sr-only top-1 left-1"
121
- aria-hidden
122
- type="checkbox"
123
- @invalid="setValidationError"
124
- />
125
-
126
115
  <div class="flex">
127
116
  <div
128
117
  class="grid gap-y-5"
@@ -175,5 +164,15 @@ const setValidationError = () => {
175
164
  </div>
176
165
  </div>
177
166
  </div>
167
+ <!--Hidden input for custom validation-->
168
+ <input
169
+ v-if="countError"
170
+ ref="errorInput"
171
+ required
172
+ class="sr-only top-1 left-1"
173
+ aria-hidden
174
+ type="checkbox"
175
+ @invalid="setValidationError"
176
+ />
178
177
  </fieldset>
179
178
  </template>