@xy-planning-network/trees 0.12.3 → 0.12.5

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
@@ -7044,8 +7044,8 @@ const ii = {
7044
7044
  totalPages: 0
7045
7045
  }), s = A(e.defaultSort), i = A(e.defaultSortDir), l = () => {
7046
7046
  const h = {
7047
- maxDate: r.value.maxDate,
7048
- minDate: r.value.minDate,
7047
+ maxDate: r.value.maxDate || null,
7048
+ minDate: r.value.minDate || null,
7049
7049
  page: a.value.page,
7050
7050
  perPage: a.value.perPage,
7051
7051
  q: "",
@@ -8514,8 +8514,8 @@ const Wf = /* @__PURE__ */ Vf(Hf, [["render", qf]]), Yf = { class: "absolute ins
8514
8514
  var Tn;
8515
8515
  const e = t, r = () => {
8516
8516
  const X = {
8517
- minDate: u.value.minDate,
8518
- maxDate: u.value.maxDate,
8517
+ minDate: u.value.minDate || null,
8518
+ maxDate: u.value.maxDate || null,
8519
8519
  page: c.value.page,
8520
8520
  perPage: c.value.perPage,
8521
8521
  sort: i.value,
package/dist/trees.umd.js CHANGED
@@ -13,7 +13,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
13
13
  </span>
14
14
  `}function qn(){e.calendarContainer.classList.add("hasWeeks");const m=U("div","flatpickr-weekwrapper");m.appendChild(U("span","flatpickr-weekday",e.l10n.weekAbbreviation));const b=U("div","flatpickr-weeks");return m.appendChild(b),{weekWrapper:m,weekNumbers:b}}function K(m,b=!0){const x=b?m:m-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,ee("onYearChange"),oe()),te(),ee("onMonthChange"),Xn())}function qt(m=!0,b=!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,b===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){const{hours:x,minutes:k,seconds:v}=Rr(e.config);p(x,k,v)}e.redraw(),m&&ee("onChange")}function Wt(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),ee("onClose")}function Wn(){e.config!==void 0&&ee("onDestroy");for(let m=e._handlers.length;m--;)e._handlers[m].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 m=e.calendarContainer.parentNode;if(m.lastChild&&m.removeChild(m.lastChild),m.parentNode){for(;m.firstChild;)m.parentNode.insertBefore(m.firstChild,m);m.parentNode.removeChild(m)}}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(m=>{try{delete e[m]}catch{}})}function pe(m){return e.config.appendTo&&e.config.appendTo.contains(m)?!0:e.calendarContainer.contains(m)}function Yt(m){if(e.isOpen&&!e.config.inline){const b=ve(m),x=pe(b),k=b===e.input||b===e.altInput||e.element.contains(b)||m.path&&m.path.indexOf&&(~m.path.indexOf(e.input)||~m.path.indexOf(e.altInput)),v=m.type==="blur"?k&&m.relatedTarget&&!pe(m.relatedTarget):!k&&!x&&!pe(m.relatedTarget),D=!e.config.ignoredFocusElements.some(T=>T.contains(b));v&&D&&(e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&l(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&(e.clear(!1),e.redraw()))}}function Yn(m){if(!m||e.config.minDate&&m<e.config.minDate.getFullYear()||e.config.maxDate&&m>e.config.maxDate.getFullYear())return;const b=m,x=e.currentYear!==b;e.currentYear=b||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(),ee("onYearChange"),oe())}function lt(m,b=!0){var x;const k=e.parseDate(m,void 0,b);if(e.config.minDate&&k&&Ve(k,e.config.minDate,b!==void 0?b:!e.minDateHasTime)<0||e.config.maxDate&&k&&Ve(k,e.config.maxDate,b!==void 0?b:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(k===void 0)return!1;const v=!!e.config.enable,D=(x=e.config.enable)!==null&&x!==void 0?x:e.config.disable;for(let T=0,$;T<D.length;T++){if($=D[T],typeof $=="function"&&$(k))return v;if($ instanceof Date&&k!==void 0&&$.getTime()===k.getTime())return v;if(typeof $=="string"){const I=e.parseDate($,void 0,!0);return I&&I.getTime()===k.getTime()?v:!v}else if(typeof $=="object"&&k!==void 0&&$.from&&$.to&&k.getTime()>=$.from.getTime()&&k.getTime()<=$.to.getTime())return v}return!v}function Kn(m){return e.daysContainer!==void 0?m.className.indexOf("hidden")===-1&&m.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(m):!1}function Oh(m){m.target===e._input&&(e.selectedDates.length>0||e._input.value.length>0)&&!(m.relatedTarget&&pe(m.relatedTarget))&&e.setDate(e._input.value,!0,m.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function Ih(m){const b=ve(m),x=e.config.wrap?n.contains(b):b===e._input,k=e.config.allowInput,v=e.isOpen&&(!k||!x),D=e.config.inline&&x&&!k;if(m.keyCode===13&&x){if(k)return e.setDate(e._input.value,!0,b===e.altInput?e.config.altFormat:e.config.dateFormat),b.blur();e.open()}else if(pe(b)||v||D){const T=!!e.timeContainer&&e.timeContainer.contains(b);switch(m.keyCode){case 13:T?(m.preventDefault(),l(),Zr()):ri(m);break;case 27:m.preventDefault(),Zr();break;case 8:case 46:x&&!e.config.allowInput&&(m.preventDefault(),e.clear());break;case 37:case 39:if(!T&&!x){if(m.preventDefault(),e.daysContainer!==void 0&&(k===!1||document.activeElement&&Kn(document.activeElement))){const I=m.keyCode===39?1:-1;m.ctrlKey?(m.stopPropagation(),K(I),L(M(1),0)):L(void 0,I)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:m.preventDefault();const $=m.keyCode===40?1:-1;e.daysContainer&&b.$i!==void 0||b===e.input||b===e.altInput?m.ctrlKey?(m.stopPropagation(),Yn(e.currentYear-$),L(M(1),0)):T||L(void 0,$*7):b===e.currentYearElement?Yn(e.currentYear-$):e.config.enableTime&&(!T&&e.hourElement&&e.hourElement.focus(),l(m),e._debouncedChange());break;case 9:if(T){const I=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(G=>G),H=I.indexOf(b);if(H!==-1){const G=I[H+(m.shiftKey?-1:1)];m.preventDefault(),(G||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(b)&&m.shiftKey&&(m.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&b===e.amPM)switch(m.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],u(),Qe();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],u(),Qe();break}(x||pe(b))&&ee("onKeyDown",m)}function Xr(m){if(e.selectedDates.length!==1||m&&(!m.classList.contains("flatpickr-day")||m.classList.contains("flatpickr-disabled")))return;const b=m?m.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),x=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),k=Math.min(b,e.selectedDates[0].getTime()),v=Math.max(b,e.selectedDates[0].getTime());let D=!1,T=0,$=0;for(let I=k;I<v;I+=nd.DAY)lt(new Date(I),!0)||(D=D||I>k&&I<v,I<x&&(!T||I>T)?T=I:I>x&&(!$||I<$)&&($=I));for(let I=0;I<e.config.showMonths;I++){const H=e.daysContainer.children[I];for(let G=0,Be=H.children.length;G<Be;G++){const me=H.children[G],qe=me.dateObj.getTime(),Kt=T>0&&qe<T||$>0&&qe>$;if(Kt){me.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(Gt=>{me.classList.remove(Gt)});continue}else if(D&&!Kt)continue;["startRange","inRange","endRange","notAllowed"].forEach(Gt=>{me.classList.remove(Gt)}),m!==void 0&&(m.classList.add(b<=e.selectedDates[0].getTime()?"startRange":"endRange"),x<b&&qe===x?me.classList.add("startRange"):x>b&&qe===x&&me.classList.add("endRange"),qe>=T&&($===0||qe<=$)&&td(qe,x,b)&&me.classList.add("inRange"))}}}function Lh(){e.isOpen&&!e.config.static&&!e.config.inline&&Gn()}function Fh(m,b=e._positionElement){if(e.isMobile===!0){if(m){m.preventDefault();const k=ve(m);k&&k.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),ee("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"),ee("onOpen"),Gn(b)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(m===void 0||!e.timeContainer.contains(m.relatedTarget))&&setTimeout(()=>e.hourElement.select(),50)}function Qs(m){return b=>{const x=e.config[`_${m}Date`]=e.parseDate(b,e.config.dateFormat),k=e.config[`_${m==="min"?"max":"min"}Date`];x!==void 0&&(e[m==="min"?"minDateHasTime":"maxDateHasTime"]=x.getHours()>0||x.getMinutes()>0||x.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(v=>lt(v)),!e.selectedDates.length&&m==="min"&&f(x),Qe()),e.daysContainer&&(ni(),x!==void 0?e.currentYearElement[m]=x.getFullYear().toString():e.currentYearElement.removeAttribute(m),e.currentYearElement.disabled=!!k&&x!==void 0&&k.getFullYear()===x.getFullYear())}}function jh(){const m=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],b=Object.assign(Object.assign({},JSON.parse(JSON.stringify(n.dataset||{}))),r),x={};e.config.parseDate=b.parseDate,e.config.formatDate=b.formatDate,Object.defineProperty(e.config,"enable",{get:()=>e.config._enable,set:D=>{e.config._enable=ai(D)}}),Object.defineProperty(e.config,"disable",{get:()=>e.config._disable,set:D=>{e.config._disable=ai(D)}});const k=b.mode==="time";if(!b.dateFormat&&(b.enableTime||k)){const D=re.defaultConfig.dateFormat||xt.dateFormat;x.dateFormat=b.noCalendar||k?"H:i"+(b.enableSeconds?":S":""):D+" H:i"+(b.enableSeconds?":S":"")}if(b.altInput&&(b.enableTime||k)&&!b.altFormat){const D=re.defaultConfig.altFormat||xt.altFormat;x.altFormat=b.noCalendar||k?"h:i"+(b.enableSeconds?":S K":" K"):D+` h:i${b.enableSeconds?":S":""} K`}Object.defineProperty(e.config,"minDate",{get:()=>e.config._minDate,set:Qs("min")}),Object.defineProperty(e.config,"maxDate",{get:()=>e.config._maxDate,set:Qs("max")});const v=D=>T=>{e.config[D==="min"?"_minTime":"_maxTime"]=e.parseDate(T,"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")}),b.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,x,b);for(let D=0;D<m.length;D++)e.config[m[D]]=e.config[m[D]]===!0||e.config[m[D]]==="true";Tr.filter(D=>e.config[D]!==void 0).forEach(D=>{e.config[D]=Mr(e.config[D]||[]).map(s)}),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 T=e.config.plugins[D](e)||{};for(const $ in T)Tr.indexOf($)>-1?e.config[$]=Mr(T[$]).map(s).concat(e.config[$]):typeof b[$]>"u"&&(e.config[$]=T[$])}b.altInputClass||(e.config.altInputClass=ei().className+" "+e.config.altInputClass),ee("onParseConfig")}function ei(){return e.config.wrap?n.querySelector("[data-input]"):n}function ti(){typeof e.config.locale!="object"&&typeof re.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error(`flatpickr: invalid locale ${e.config.locale}`)),e.l10n=Object.assign(Object.assign({},re.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?re.l10ns[e.config.locale]:void 0),Pr.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&&re.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=ls(e),e.parseDate=Ar({config:e.config,l10n:e.l10n})}function Gn(m){if(typeof e.config.position=="function")return void e.config.position(e,m);if(e.calendarContainer===void 0)return;ee("onPreCalendarPosition");const b=m||e._positionElement,x=Array.prototype.reduce.call(e.calendarContainer.children,(Jt,to)=>Jt+to.offsetHeight,0),k=e.calendarContainer.offsetWidth,v=e.config.position.split(" "),D=v[0],T=v.length>1?v[1]:null,$=b.getBoundingClientRect(),I=window.innerHeight-$.bottom,H=D==="above"||D!=="below"&&I<x&&$.top>x,G=window.pageYOffset+$.top+(H?-x-2:b.offsetHeight+2);if(be(e.calendarContainer,"arrowTop",!H),be(e.calendarContainer,"arrowBottom",H),e.config.inline)return;let Be=window.pageXOffset+$.left,me=!1,Zn=!1;T==="center"?(Be-=(k-$.width)/2,me=!0):T==="right"&&(Be-=k-$.width,Zn=!0),be(e.calendarContainer,"arrowLeft",!me&&!Zn),be(e.calendarContainer,"arrowCenter",me),be(e.calendarContainer,"arrowRight",Zn);const qe=window.document.body.offsetWidth-(window.pageXOffset+$.right),Kt=Be+k>window.document.body.offsetWidth,Gt=qe+k>window.document.body.offsetWidth;if(be(e.calendarContainer,"rightMost",Kt),!e.config.static)if(e.calendarContainer.style.top=`${G}px`,!Kt)e.calendarContainer.style.left=`${Be}px`,e.calendarContainer.style.right="auto";else if(!Gt)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=`${qe}px`;else{const Jt=Hh();if(Jt===void 0)return;const to=window.document.body.offsetWidth,Qh=Math.max(0,to/2-k/2),eg=".flatpickr-calendar.centerMost:before",tg=".flatpickr-calendar.centerMost:after",ng=Jt.cssRules.length,rg=`{left:${$.left}px;right:auto;}`;be(e.calendarContainer,"rightMost",!1),be(e.calendarContainer,"centerMost",!0),Jt.insertRule(`${eg},${tg}${rg}`,ng),e.calendarContainer.style.left=`${Qh}px`,e.calendarContainer.style.right="auto"}}function Hh(){let m=null;for(let b=0;b<document.styleSheets.length;b++){const x=document.styleSheets[b];try{x.cssRules}catch{continue}m=x;break}return m??Uh()}function Uh(){const m=document.createElement("style");return document.head.appendChild(m),m.sheet}function ni(){e.config.noCalendar||e.isMobile||(oe(),Xn(),te())}function Zr(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function ri(m){m.preventDefault(),m.stopPropagation();const b=T=>T.classList&&T.classList.contains("flatpickr-day")&&!T.classList.contains("flatpickr-disabled")&&!T.classList.contains("notAllowed"),x=is(ve(m),b);if(x===void 0)return;const k=x,v=e.latestSelectedDateObj=new Date(k.dateObj.getTime()),D=(v.getMonth()<e.currentMonth||v.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=k,e.config.mode==="single")e.selectedDates=[v];else if(e.config.mode==="multiple"){const T=eo(v);T?e.selectedDates.splice(parseInt(T),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),Ve(v,e.selectedDates[0],!0)!==0&&e.selectedDates.sort((T,$)=>T.getTime()-$.getTime()));if(u(),D){const T=e.currentYear!==v.getFullYear();e.currentYear=v.getFullYear(),e.currentMonth=v.getMonth(),T&&(ee("onYearChange"),oe()),ee("onMonthChange")}if(Xn(),te(),Qe(),!D&&e.config.mode!=="range"&&e.config.showMonths===1?j(k):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 T=e.config.mode==="single"&&!e.config.enableTime,$=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(T||$)&&Zr()}y()}const Jn={locale:[ti,Ze],showMonths:[zt,i,R],minDate:[C],maxDate:[C],clickOpens:[()=>{e.config.clickOpens===!0?(h(e._input,"focus",e.open),h(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function zh(m,b){if(m!==null&&typeof m=="object"){Object.assign(e.config,m);for(const x in m)Jn[x]!==void 0&&Jn[x].forEach(k=>k())}else e.config[m]=b,Jn[m]!==void 0?Jn[m].forEach(x=>x()):Tr.indexOf(m)>-1&&(e.config[m]=Mr(b));e.redraw(),Qe(!0)}function oi(m,b){let x=[];if(m instanceof Array)x=m.map(k=>e.parseDate(k,b));else if(m instanceof Date||typeof m=="number")x=[e.parseDate(m,b)];else if(typeof m=="string")switch(e.config.mode){case"single":case"time":x=[e.parseDate(m,b)];break;case"multiple":x=m.split(e.config.conjunction).map(k=>e.parseDate(k,b));break;case"range":x=m.split(e.l10n.rangeSeparator).map(k=>e.parseDate(k,b));break}else e.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(m)}`));e.selectedDates=e.config.allowInvalidPreload?x:x.filter(k=>k instanceof Date&&lt(k,!1)),e.config.mode==="range"&&e.selectedDates.sort((k,v)=>k.getTime()-v.getTime())}function qh(m,b=!1,x=e.config.dateFormat){if(m!==0&&!m||m instanceof Array&&m.length===0)return e.clear(b);oi(m,x),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),C(void 0,b),f(),e.selectedDates.length===0&&e.clear(!1),Qe(b),b&&ee("onChange")}function ai(m){return m.slice().map(b=>typeof b=="string"||typeof b=="number"||b instanceof Date?e.parseDate(b,void 0,!0):b&&typeof b=="object"&&b.from&&b.to?{from:e.parseDate(b.from,void 0),to:e.parseDate(b.to,void 0)}:b).filter(b=>b)}function Wh(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;const m=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);m&&oi(m,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 Yh(){if(e.input=ei(),!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 Kh(){const m=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=m,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=m==="datetime-local"?"Y-m-d\\TH:i:S":m==="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{}h(e.mobileInput,"change",b=>{e.setDate(ve(b).value,!1,e.mobileFormatStr),ee("onChange"),ee("onClose")})}function Gh(m){if(e.isOpen===!0)return e.close();e.open(m)}function ee(m,b){if(e.config===void 0)return;const x=e.config[m];if(x!==void 0&&x.length>0)for(let k=0;x[k]&&k<x.length;k++)x[k](e.selectedDates,e.input.value,e,b);m==="onChange"&&(e.input.dispatchEvent(Qr("change")),e.input.dispatchEvent(Qr("input")))}function Qr(m){const b=document.createEvent("Event");return b.initEvent(m,!0,!0),b}function eo(m){for(let b=0;b<e.selectedDates.length;b++)if(Ve(e.selectedDates[b],m)===0)return""+b;return!1}function Jh(m){return e.config.mode!=="range"||e.selectedDates.length<2?!1:Ve(m,e.selectedDates[0])>=0&&Ve(m,e.selectedDates[1])<=0}function Xn(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach((m,b)=>{const x=new Date(e.currentYear,e.currentMonth,1);x.setMonth(e.currentMonth+b),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[b].textContent=Tn(x.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=x.getMonth().toString(),m.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 si(m){return e.selectedDates.map(b=>e.formatDate(b,m)).filter((b,x,k)=>e.config.mode!=="range"||e.config.enableTime||k.indexOf(b)===x).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function Qe(m=!0){e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=si(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=si(e.config.altFormat)),m!==!1&&ee("onValueUpdate")}function Xh(m){const b=ve(m),x=e.prevMonthNav.contains(b),k=e.nextMonthNav.contains(b);x||k?K(x?-1:1):e.yearElements.indexOf(b)>=0?b.select():b.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):b.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Zh(m){m.preventDefault();const b=m.type==="keydown",x=ve(m),k=x;e.amPM!==void 0&&x===e.amPM&&(e.amPM.textContent=e.l10n.amPM[Me(e.amPM.textContent===e.l10n.amPM[0])]);const v=parseFloat(k.getAttribute("min")),D=parseFloat(k.getAttribute("max")),T=parseFloat(k.getAttribute("step")),$=parseInt(k.value,10),I=m.delta||(b?m.which===38?1:-1:0);let H=$+T*I;if(typeof k.value<"u"&&k.value.length===2){const G=k===e.hourElement,Be=k===e.minuteElement;H<v?(H=D+H+Me(!G)+(Me(G)&&Me(!e.amPM)),Be&&S(void 0,-1,e.hourElement)):H>D&&(H=k===e.hourElement?H-D-Me(!e.amPM):v,Be&&S(void 0,1,e.hourElement)),e.amPM&&G&&(T===1?H+$===23:Math.abs(H-$)>T)&&(e.amPM.textContent=e.l10n.amPM[Me(e.amPM.textContent===e.l10n.amPM[0])]),k.value=Ee(H)}}return a(),e}function Ct(n,r){const e=Array.prototype.slice.call(n).filter(a=>a instanceof HTMLElement),o=[];for(let a=0;a<e.length;a++){const s=e[a];try{if(s.getAttribute("data-fp-omit")!==null)continue;s._flatpickr!==void 0&&(s._flatpickr.destroy(),s._flatpickr=void 0),s._flatpickr=od(s,r||{}),o.push(s._flatpickr)}catch(i){console.error(i)}}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 Ct(this,n)},HTMLElement.prototype.flatpickr=function(n){return Ct([this],n)});var re=function(n,r){return typeof n=="string"?Ct(window.document.querySelectorAll(n),r):n instanceof Node?Ct([n],r):Ct(n,r)};re.defaultConfig={},re.l10ns={en:Object.assign({},It),default:Object.assign({},It)},re.localize=n=>{re.l10ns.default=Object.assign(Object.assign({},re.l10ns.default),n)},re.setDefaults=n=>{re.defaultConfig=Object.assign(Object.assign({},re.defaultConfig),n)},re.parseDate=Ar({}),re.formatDate=ls({}),re.compareDates=Ve,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return Ct(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=re);const ad=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],Mn=t.defineComponent({inheritAttrs:!1,__name:"DateRangePicker",props:t.mergeModels(t.mergeDefaults({modelValue:{},maxDate:{},maxRange:{},startDate:{},label:{},help:{},placeholder:{}},{...Ae,maxDate:()=>new Date,maxRange:0,placeholder:"mm-dd-yyyy range",startDate:0}),{modelValue:{...J,default:{maxDate:0,minDate:0}},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...J,default:{maxDate:0,minDate:0}}),{aria:o,errorState:a,inputID:s,isRequired:i,onInvalid:l,validate:c}=$e(r),d=f=>{e.value=f},u=t.useTemplateRef("wrapper");return t.onMounted(()=>{const f={allowInput:!0,appendTo:u.value||void 0,dateFormat:"m-d-Y",mode:"range",maxDate:r.maxDate,minDate:r.startDate,onClose:p=>{p.length===2?d({minDate:p[0].setUTCHours(0,0,0,0)/1e3,maxDate:Math.floor(p[1].setUTCHours(23,59,59,999)/1e3)}):p.length===0&&d({minDate:0,maxDate:0})},static:!0};e.value&&e.value.minDate!=0&&e.value.maxDate!=0&&(f.defaultDate=[e.value.minDate*1e3,e.value.maxDate*1e3]),r.maxRange&&(f.onChange=(p,g,h)=>{if(p.length===1){var y=new Date(p[0].getTime()),w=new Date(p[0].getTime());y.setDate(y.getDate()+r.maxRange),w.setDate(w.getDate()-r.maxRange);const C=new Date;y>C&&(y=C),h.set("minDate",w),h.set("maxDate",y)}}),re(`#${s.value}`,f)}),(f,p)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"wrapper",ref:u},[t.createVNode(ge,{id:t.unref(o).labelledby,class:"mb-2",for:t.unref(s),label:f.label,required:t.unref(i)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(s),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).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(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:f.placeholder},f.$attrs,{type:"text",onInput:p[0]||(p[0]=(...g)=>t.unref(c)&&t.unref(c)(...g)),onInvalid:p[1]||(p[1]=(...g)=>t.unref(l)&&t.unref(l)(...g))}),null,16,ad),t.createVNode(ie,{id:t.unref(o).describedby,class:"mt-1",text:f.help},null,8,["id","text"]),t.createVNode(_e,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(a)},null,8,["id","text"])],512))}}),sd=["id","aria-labelledby","aria-describedby","aria-errormessage"],id=["textContent"],ld=["value","disabled","textContent"],Bn=t.defineComponent({inheritAttrs:!1,__name:"Select",props:t.mergeModels(t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{}},{...Ae,placeholder:"Select an option"}),{modelValue:J,modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",J),{aria:o,inputID:a,isRequired:s,validate:i,errorState:l,onInvalid:c}=$e(r);return(d,u)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(ge,{id:t.unref(o).labelledby,class:"mb-2",for:t.unref(a),label:d.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("select",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":u[0]||(u[0]=f=>e.value=f),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).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(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"]},d.$attrs,{onChange:u[1]||(u[1]=(...f)=>t.unref(i)&&t.unref(i)(...f)),onInvalid:u[2]||(u[2]=(...f)=>t.unref(c)&&t.unref(c)(...f))}),[t.createElementVNode("option",{value:"",disabled:"",selected:"",textContent:t.toDisplayString(d.placeholder)},null,8,id),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.options,f=>(t.openBlock(),t.createElementBlock("option",{key:f.value,value:f.value,disabled:f.disabled,textContent:t.toDisplayString(f.label)},null,8,ld))),128))],16,sd),[[t.vModelSelect,e.value]]),t.createVNode(ie,{id:t.unref(o).describedby,class:"mt-1",text:d.help},null,8,["id","text"]),t.createVNode(_e,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])]))}}),Or=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),s=[{label:"Newest-Oldest",value:"desc"},{label:"Oldest-Newest",value:"asc"}],i=r,l=d=>{(d==="asc"||d==="desc")&&i("sort-dir-changed",d)},c=d=>{d&&i("date-range-changed",d)};return(d,u)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(Bn,{modelValue:a.value,"onUpdate:modelValue":[u[0]||(u[0]=f=>a.value=f),l],options:s},null,8,["modelValue"]),t.createVNode(Mn,{modelValue:o.value,"onUpdate:modelValue":[u[1]||(u[1]=f=>o.value=f),c],class:"ml-3"},null,8,["modelValue"])],64))}});function Et(n,r="GET",e={}){const o=t.ref(),a=t.shallowRef(),s=t.ref(!1),i=t.ref(!1),l=t.ref(!1),c=t.ref(!1);let d=0,u;const f=()=>{u!==void 0&&u.abort()},p=(g={},h={})=>{d++;const y=d;u=new AbortController,c.value=!1,i.value=!1,l.value=!0;const w={data:["PATCH","patch","POST","post","PUT","put"].includes(r)?g:{},method:r,params:["GET","get"].includes(r)?g:{},signal:u.signal,url:n};return ut(w,{...e,...h}).then(C=>(o.value=C,a.value=void 0,c.value=!1,C),C=>{throw a.value=C,zo(C)&&(c.value=!0),C}).finally(()=>{y==d&&(i.value=!0,l.value=!1),s.value=!0})};return e!=null&&e.immediate&&e.immediate===!0&&p(),{result:o,error:a,isFinished:i,isLoading:l,isAborted:c,hasFetched:s,abort:f,execute:p}}function cd(n,r={}){return Et(n,"GET",r)}function dd(n,r={}){return Et(n,"DELETE",r)}function ud(n,r={}){return Et(n,"PATCH",r)}function fd(n,r={}){return Et(n,"POST",r)}function pd(n,r={}){return Et(n,"PUT",r)}const cs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",md={CreateIdAttribute:(n=8)=>{let r="";for(let e=0;e<n;e++)r+=cs.charAt(Math.floor(Math.random()*cs.length));return r}};function ds(n={}){const r=t.ref(new Map);let e={removeDelay:1e4,email:""};const o=p=>{e={...e,...p}},a=p=>{r.value.delete(p)},s=p=>{const g=md.CreateIdAttribute();return r.value.set(g,p),(p.persistent===void 0||!p.persistent)&&setTimeout(()=>a(g),e.removeDelay),g},i=p=>s(p),l=(p,g=!1)=>s({message:p,persistent:g,type:"error"}),c=(p,g=!1)=>s({message:p,persistent:g,type:"info"}),d=(p,g=!1)=>s({message:p,persistent:g,type:"success"}),u=(p,g=!1)=>s({message:p,persistent:g,type:"warning"}),f=(p="",g=!1)=>{const h=p||e.email,y=h?`Whoops! Something went wrong, please reach out to
15
15
  <a class="underline text-xy-blue" href="mailto:${h}">${h}</a>
16
- if the issue persists.`:"Whoops! Something went wrong.";return s({message:y,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:s,remove:a,flash:i,error:l,warning:u,info:c,success:d,genericError:f},flashes:r,configure:o}}const hd=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 Ir;function it(){return Ir===void 0&&(Ir=ds()),Ir}const Lr={error(n,r){it().flasher.error(n,r)},info(n,r){it().flasher.info(n,r)},success(n,r){it().flasher.success(n,r)},warning(n,r){it().flasher.warning(n,r)},genericError(n,r){it().flasher.genericError(n,r)}},gd=(n,r)=>{var d;const e=t.ref(n),o={initial:((d=e==null?void 0:e.value[0])==null?void 0:d.value)||"",paramName:(r==null?void 0:r.paramName)||"tab"},a=t.ref(o.initial),s=u=>!!e.value.find(f=>f.value===u),i=u=>a.value===u,c=new URLSearchParams(window.location.search).get(o.paramName);return c&&s(c)&&(a.value=c),t.watch(a,u=>{const f=new URLSearchParams(window.location.search);f.set(o.paramName,u.toString());const p=f.toString()!==""?`?${f.toString()}`:"";window.history.replaceState({tab:u},document.title,`${window.location.pathname}${p}`)}),{activeTab:a,isActiveTab:i,tabs:e}},bd=n=>{const r=t.ref(n);return t.watch(r,e=>{const o=new URLSearchParams(window.location.search);for(const s in e){const i=e[s];if(i==null||i==null){o.delete(s);continue}if(Array.isArray(i)){o.delete(s),i.forEach(l=>{o.append(s,l.toString())});continue}!o.has(s)&&!i||o.set(s,i.toString())}const a=o.toString()!==""?`?${o.toString()}`:"";window.history.replaceState(t.toRaw(e),document.title,`${window.location.pathname}${a}`)},{deep:!0}),r},yd={class:"px-4 flex items-center justify-between sm:px-0"},wd={class:"w-0 flex-1 flex"},xd={class:"hidden md:flex"},Cd=["onClick","textContent"],Ed={class:"w-0 flex-1 flex justify-end"},Fr=t.defineComponent({__name:"Paginator",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(n){const r=t.useModel(n,"modelValue"),e=a=>{r.value={...r.value,page:a}},o=t.computed(()=>{const a=[];if(r.value.totalPages<=4){for(let i=0;i<r.value.totalPages;i++)a.push(i+1);return a}if(r.value.totalPages-r.value.page>=3){for(let i=0;i<4;i++)a.push(r.value.page+i);return a}for(let i=0;i<4;i++)a.unshift(r.value.totalPages-i);return a});return(a,s)=>(t.openBlock(),t.createElementBlock("div",yd,[t.createElementVNode("div",wd,[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",r.value.page==1?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:s[0]||(s[0]=t.withModifiers(i=>e(r.value.page-1),["prevent"]))},s[2]||(s[2]=[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),t.createTextVNode(" Previous ")]),2)]),t.createElementVNode("div",xd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,i=>(t.openBlock(),t.createElementBlock("a",{key:i,href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",r.value.page===i?"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(l=>e(i),["prevent"]),textContent:t.toDisplayString(i)},null,10,Cd))),128))]),t.createElementVNode("div",Ed,[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",r.value.page>=r.value.totalPages?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:s[1]||(s[1]=t.withModifiers(i=>e(r.value.page+1),["prevent"]))},s[3]||(s[3]=[t.createTextVNode(" Next "),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)]),2)])]))}}),kd={key:0,class:"flex"},us=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([]),s=t.ref({page:1,perPage:e.perPage,totalItems:0,totalPages:0}),i=t.ref(e.defaultSort),l=t.ref(e.defaultSortDir),c=()=>{const h={maxDate:o.value.maxDate,minDate:o.value.minDate,page:s.value.page,perPage:s.value.perPage,q:"",sort:i.value,sortDir:l.value};pr.get(e.url,{},h).then(y=>{s.value={page:y.data.page,perPage:y.data.perPage,totalItems:y.data.totalItems,totalPages:y.data.totalPages},a.value=y.data.items},()=>{Lr.genericError()})},d=t.computed(()=>!!a.value.length),u=t.computed(()=>!e.disableDate),f=t.computed(()=>!e.disableNavigation&&d),g={refresh:c,reset:()=>{s.value.page=1,c()}};return t.watch([l,o],()=>{c()}),r(g),c(),(h,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({"mt-4 space-y-2":u.value})},[h.disableDate?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",kd,[t.createVNode(Or,{"date-range":o.value,"sort-dir":l.value,onSortDirChanged:y[0]||(y[0]=w=>l.value=w),onDateRangeChanged:y[1]||(y[1]=w=>o.value=w)},null,8,["date-range","sort-dir"])])),d.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["overflow-hidden",{"shadow sm:rounded-md border":!h.borderless}])},[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(w,C)=>(t.openBlock(),t.createElementBlock("li",{key:C,class:t.normalizeClass({"border-t border-gray-200":C>0})},[t.renderSlot(h.$slots,"default",{item:w})],2))),128))])],2)):t.renderSlot(h.$slots,"empty",{key:2},()=>[y[4]||(y[4]=t.createTextVNode(" No items were found! "))]),f.value?(t.openBlock(),t.createBlock(Fr,{key:3,modelValue:s.value,"onUpdate:modelValue":[y[2]||(y[2]=w=>s.value=w),y[3]||(y[3]=w=>c())]},null,8,["modelValue"])):t.createCommentVNode("",!0)],2))}}),Dd=["href"],fs=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(xc),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,Dd))}}),Nd={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},Sd={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},_d={class:"p-4"},vd={class:"flex items-center"},Vd={class:"w-0 flex-1 flex justify-between"},$d=["innerHTML"],Td={class:"ml-4 shrink-0 flex"},Md=["onClick"],Pn=t.defineComponent({__name:"Flash",setup(n){const{flasher:r,flashes:e}=it(),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(()=>{hd(r)}),(a,s)=>(t.openBlock(),t.createBlock(t.unref(gr),null,{default:t.withCtx(()=>[t.createElementVNode("div",Nd,[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),([i,l])=>(t.openBlock(),t.createElementBlock("div",{key:l.message,class:t.normalizeClass(["bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform z-10",[o(l.type)]])},[t.createElementVNode("div",Sd,[t.createElementVNode("div",_d,[t.createElementVNode("div",vd,[t.createElementVNode("div",Vd,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:l.message},null,8,$d)]),t.createElementVNode("div",Td,[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(i)},s[0]||(s[0]=[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)]),8,Md)])])])])],2))),128))]),_:1})])]),_:1}))}});function Bd(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 Pd(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 Ad(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 ps(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 Ft(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"},Id={class:"ml-2.5"},Ld={key:0,role:"list",class:"list-disc space-y-1 pl-5"},Fd={key:1},jd={key:1,class:"mt-4"},Hd={class:"flex flex-col gap-y-1.5 -mx-2 sm:flex-row sm:gap-x-3 sm:items-center"},Ud={key:0},zd=["href","role"],qd={key:1},Wd=["href","role"],Yd={key:0,class:"ml-auto pl-3"},Kd={class:"-mx-1.5 -my-1.5"},ms=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=r,a=t.ref(!0),s=()=>{a.value=!1,o("close",!0)},i=t.computed(()=>{const c={bgColor:"",btnAction:"",btnClose:"",contentColor:"",iconColor:""};switch(e.kind){case"alert":c.bgColor="bg-red-50",c.btnAction="bg-red-50 text-red-900 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",c.btnClose="bg-red-50 text-red-600 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",c.contentColor="text-red-800",c.iconColor="text-red-400";break;case"info":c.bgColor="bg-blue-50",c.btnAction="bg-blue-50 text-blue-900 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",c.btnClose="bg-blue-50 text-blue-600 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",c.contentColor="text-blue-800",c.iconColor="text-blue-400";break;case"success":c.bgColor="bg-emerald-50",c.btnAction="bg-emerald-50 text-emerald-900 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",c.btnClose="bg-emerald-50 text-emerald-600 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",c.contentColor="text-emerald-800",c.iconColor="text-emerald-400";break;case"warn":c.bgColor="bg-amber-50",c.btnAction="bg-amber-50 text-amber-900 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",c.btnClose="bg-amber-50 text-amber-600 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",c.contentColor="text-amber-800",c.iconColor="text-amber-400";break}return c}),l=t.computed(()=>{let c=null;switch(e.kind){case"alert":c=kc;break;case"info":c=Ec;break;case"success":c=$a;break;case"warn":c=Cc;break}return c});return(c,d)=>a.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",Id,[c.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(c.title),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["text-sm",i.value.contentColor])},[Array.isArray(c.content)?(t.openBlock(),t.createElementBlock("ul",Ld,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.content,(u,f)=>(t.openBlock(),t.createElementBlock("li",{key:f},t.toDisplayString(u),1))),128))])):(t.openBlock(),t.createElementBlock("p",Fd,t.toDisplayString(c.content),1))],2),c.btnText||c.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",jd,[t.createElementVNode("div",Hd,[c.btnText?(t.openBlock(),t.createElementBlock("div",Ud,[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:c.btnLink,role:c.btnLink?"link":"button",onClick:d[0]||(d[0]=u=>c.$emit("click",u))},t.toDisplayString(c.btnText),11,zd)])):t.createCommentVNode("",!0),c.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",qd,[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:c.secondaryBtnLink,role:c.secondaryBtnLink?"link":"button",onClick:d[1]||(d[1]=u=>c.$emit("click:secondary",u))},t.toDisplayString(c.secondaryBtnText),11,Wd)])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),c.dismissable?(t.openBlock(),t.createElementBlock("div",Yd,[t.createElementVNode("div",Kd,[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:s},[d[2]||(d[2]=t.createElementVNode("span",{class:"sr-only"},"close",-1)),t.createVNode(t.unref(Ft),{class:"h-4 w-4"})],2)])])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)}}),Gd={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},Jd={class:"block absolute top-0 right-0 pt-4 pr-4 sm:pt-6 sm:pr-8"},Xd={class:"bg-white px-4 pt-5 pb-4 sm:p-8 sm:pb-6"},Zd={class:"mt-3 sm:mt-0 sm:text-left"},Qd={class:"mt-2"},eu={key:0,class:"bg-gray-50 px-4 py-3 sm:py-4 sm:px-8 sm:flex sm:flex-row-reverse"},tu=["disabled","textContent"],hs=t.defineComponent({__name:"Modal",props:t.mergeModels({destructive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},wide:{type:Boolean,default:!1},submitText:{default:""},title:{default:""}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["close","submit"],["update:modelValue"]),setup(n,{emit:r}){const e=t.useModel(n,"modelValue"),o=r,a=()=>{o("submit")};return t.watch(e,s=>{s||o("close")}),(s,i)=>(t.openBlock(),t.createBlock(t.unref(Pt),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(bn),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",open:e.value,onClose:i[3]||(i[3]=l=>e.value=!1)},{default:t.withCtx(()=>[t.createElementVNode("div",Gd,[t.createVNode(t.unref(We),{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(yn),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),i[5]||(i[5]=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1)),t.createVNode(t.unref(We),{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",s.wide?"sm:max-w-6xl":"sm:max-w-2xl"])},[t.createElementVNode("div",Jd,[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=>e.value=!1)},[i[4]||(i[4]=t.createElementVNode("span",{class:"sr-only"},"Close",-1)),t.createVNode(t.unref(Ft),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",Xd,[t.createElementVNode("div",Zd,[t.createVNode(t.unref(wr),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(s.title),1)]),_:1}),t.createElementVNode("div",Qd,[t.renderSlot(s.$slots,"default")])])]),s.submitText?(t.openBlock(),t.createElementBlock("div",eu,[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["xy-btn w-full sm:ml-3 sm:w-auto sm:text-sm",[s.destructive?"xy-btn-red":"xy-btn"]]),disabled:s.disabled,onClick:i[1]||(i[1]=l=>a()),textContent:t.toDisplayString(s.submitText)},null,10,tu),t.createElementVNode("button",{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=>e.value=!1)}," Cancel ")])):t.createCommentVNode("",!0),t.renderSlot(s.$slots,"buttons")],2)]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),nu={class:"aspect-square overflow-hidden"},ru={class:"flex justify-center relative"},ou={class:"sr-only"},jr=t.defineComponent({__name:"XYSpinner",setup(n){const r=t.useAttrs();return(e,o)=>{var a,s;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass((a=t.unref(r))!=null&&a.class?(s=t.unref(r))==null?void 0:s.class:"h-20 w-20"),role:"status"},[t.createElementVNode("div",nu,[t.createElementVNode("div",ru,[t.createElementVNode("p",ou,[t.renderSlot(e.$slots,"default",{},()=>[o[0]||(o[0]=t.createTextVNode("loading"))])]),o[1]||(o[1]=t.createStaticVNode('<div class="animate-spin-gear drop-shadow-sm"><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"><defs><polygon id="path-1" points="0.000248076923 0.48676924 128.472837 0.48676924 128.472837 128.800648 0.000248076923 128.800648"></polygon></defs><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-6-Copy-3"><g id="Group-3"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><g id="Clip-2"></g><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)"></path></g></g></g></svg></div><div class="absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"><svg viewBox="0 0 280 280" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><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"></path><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"></path></svg></div>',2))])])],2)}}}),au={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"},su={class:"mt-2"},An=t.defineComponent({__name:"Spinner",setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:s,showMsg:i}=Ho(),l=()=>{r.value++,r.value>o.value&&(r.value=0),a.value&&(s.value=a.value[r.value]),i.value=!0},c=()=>{window.setTimeout(()=>{i.value=!1},2500)};return(d,u)=>(t.openBlock(),t.createBlock(t.unref(gr),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",au,[t.createVNode(jr,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",su,[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:l},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:"container font-medium text-lg leading-snug text-center transition-opacity"},t.toDisplayString(t.unref(s)),513),[[t.vShow,t.unref(i)]])]),_:1})],512),[[t.vShow,t.unref(a)]])])):t.createCommentVNode("",!0)]),_:1}))}}),iu={class:"h-screen flex overflow-hidden bg-gray-50"},lu={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},cu={class:"absolute top-0 right-0 -mr-12 pt-2"},du={class:"shrink-0 flex justify-center px-4"},uu=["src"],fu={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},pu={class:"flex-1 px-2"},mu={class:"space-y-1"},hu=["href","target"],gu={key:0,class:"mt-auto"},bu={class:"mt-6 px-2"},yu={class:"hidden lg:flex lg:shrink-0"},wu={class:"flex flex-col w-64"},xu={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},Cu={class:"flex justify-center shrink-0 px-4"},Eu=["src"],ku={class:"mt-5 grow flex flex-col"},Du={class:"flex-1 px-2 bg-white"},Nu={class:"space-y-1"},Su=["href","target"],_u={key:0,class:"mt-atuo"},vu={class:"mt-6 px-2"},Vu={class:"flex flex-col w-0 flex-1 overflow-hidden"},$u={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},Tu={class:"flex-1 px-4 flex justify-between"},Mu={class:"flex-1 flex"},Bu={class:"flex items-center text-base leading-snug sm:text-2xl text-white"},Pu={class:"ml-4 flex items-center lg:ml-6"},Au=["href"],Ru={class:"flex-1 relative overflow-y-auto focus:outline-none"},Ou={class:"mx-auto"},gs=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,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",iu,[t.createVNode(t.unref(Pt),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(bn),{as:"div",static:"",class:"fixed inset-0 flex z-10 lg:hidden",open:e.value,onClose:s[1]||(s[1]=i=>e.value=!1)},{default:t.withCtx(()=>[t.createVNode(t.unref(We),{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(yn),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(We),{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",lu,[t.createVNode(t.unref(We),{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",cu,[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:s[0]||(s[0]=i=>e.value=!1)},[s[3]||(s[3]=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1)),t.createVNode(t.unref(Ft),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",du,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,uu)]),t.createElementVNode("div",fu,[t.createElementVNode("div",pu,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",mu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,i=>(t.openBlock(),t.createElementBlock("a",{key:i.name,href:i.url,class:t.normalizeClass([o(i.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:i.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.icon),{class:t.normalizeClass([o(i.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(i.name),1)],10,hu))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",gu,[t.createElementVNode("div",bu,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),s[4]||(s[4]=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1))]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",yu,[t.createElementVNode("div",wu,[t.createElementVNode("div",xu,[t.createElementVNode("div",Cu,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,Eu)]),t.createElementVNode("div",ku,[t.createElementVNode("div",Du,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",Nu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,i=>(t.openBlock(),t.createElementBlock("a",{key:i.name,href:i.url,class:t.normalizeClass([o(i.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:i.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.icon),{class:t.normalizeClass([o(i.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(i.name),1)],10,Su))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",_u,[t.createElementVNode("div",vu,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",Vu,[t.createElementVNode("div",$u,[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:s[2]||(s[2]=i=>e.value=!0)},[s[5]||(s[5]=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1)),t.createVNode(t.unref(Pd),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",Tu,[t.createElementVNode("div",Mu,[t.createElementVNode("h1",Bu,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Pu,[t.createVNode(t.unref(xr),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Cr),{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(()=>[s[6]||(s[6]=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1)),t.createVNode(t.unref(yc),{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,i=>(t.openBlock(),t.createBlock(t.unref(kr),{key:i.name},{default:t.withCtx(({active:l})=>[t.createElementVNode("a",{href:i.url,class:t.normalizeClass([l?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(i.name),11,Au)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",Ru,[t.createElementVNode("div",Ou,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(Pn),t.createVNode(An)],64))}}),jt=t.defineComponent({__name:"Popover",props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=t.useTemplateRef("trigger"),o=t.useTemplateRef("wrapper"),a=t.computed(()=>{const l=[Pc(5),Rc()];return r.position==="auto"&&l.push(Bc()),l}),s=t.computed(()=>{if(r.position!=="auto")return r.position}),{floatingStyles:i}=rs(e,o,{middleware:a,placement:s,strategy:"fixed",whileElementsMounted:Qa});return(l,c)=>(t.openBlock(),t.createBlock(t.unref(ya),{as:l.as,class:"relative"},{default:t.withCtx(({open:d,close:u})=>[t.createVNode(t.unref(ac),{ref:"trigger"},{default:t.withCtx(()=>[t.renderSlot(l.$slots,"button",{open:d,close:u})]),_:2},1536),t.createElementVNode("div",{ref:"wrapper",class:"z-[5]",style:t.normalizeStyle(t.unref(i))},[t.createVNode(t.unref(sc),null,{default:t.withCtx(()=>[t.renderSlot(l.$slots,"default",{open:d,close:u})]),_:2},1024)],4)]),_:3},8,["as"]))}}),Iu=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e},Lu={},Fu={class:"w-full max-w-xs bg-white rounded-xy p-2 border border-gray-100 shadow-md"};function ju(n,r){return t.openBlock(),t.createElementBlock("div",Fu,[t.renderSlot(n.$slots,"default")])}const bs=Iu(Lu,[["render",ju]]),Hu={class:"absolute inset-0 overflow-hidden"},Uu={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},zu={class:"w-screen max-w-md"},qu={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},Wu={class:"py-6 px-4 bg-xy-blue-700 sm:px-6"},Yu={class:"flex items-center justify-between"},Ku={class:"ml-3 h-7 flex items-center"},Gu={class:"mt-1"},Ju=["textContent"],Xu={class:"relative flex-1 py-6 px-4 sm:px-6"},ys=t.defineComponent({__name:"Slideover",props:t.mergeModels({header:{},description:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["close"],["update:modelValue"]),setup(n,{emit:r}){const e=t.useModel(n,"modelValue"),o=r;return t.watch(e,a=>{a||o("close")}),(a,s)=>(t.openBlock(),t.createBlock(t.unref(Pt),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(bn),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",open:e.value,onClose:s[1]||(s[1]=i=>e.value=!1)},{default:t.withCtx(()=>[t.createElementVNode("div",Hu,[t.createVNode(t.unref(yn),{class:"absolute inset-0"}),t.createElementVNode("div",Uu,[t.createVNode(t.unref(We),{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",zu,[t.createElementVNode("div",qu,[t.createElementVNode("div",Wu,[t.createElementVNode("div",Yu,[t.createVNode(t.unref(wr),{as:"h3",class:"text-white"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.header),1)]),_:1}),t.createElementVNode("div",Ku,[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:s[0]||(s[0]=i=>e.value=!1)},[s[2]||(s[2]=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1)),t.createVNode(t.unref(Ft),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",Gu,[t.createElementVNode("p",{class:"text-gray-50 text-base font-medium",textContent:t.toDisplayString(a.description)},null,8,Ju)])]),t.createElementVNode("div",Xu,[t.renderSlot(a.$slots,"default")]),t.renderSlot(a.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),Zu=["onMouseover","onMouseleave"],Qu=["onMouseleave"],ef={class:"max-w-xs"},ws=t.defineComponent({__name:"Tooltip",props:{as:{default:"span"},position:{default:"auto"}},setup(n){var r=!1,e=null;const o=s=>{r=!1,e&&clearTimeout(e),e=setTimeout(()=>{r||s()},100)},a=(s,i)=>{r=!0,!i&&s.target&&s.target.click()};return(s,i)=>(t.openBlock(),t.createBlock(jt,{position:s.position,as:s.as},{button:t.withCtx(({open:l,close:c})=>[t.createElementVNode("div",{class:"leading-none relative w-4 h-4",onMouseover:d=>a(d,l),onMouseleave:d=>o(c)},[t.createVNode(t.unref(Bd)),i[1]||(i[1]=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1))],40,Zu)]),default:t.withCtx(({close:l})=>[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:i[0]||(i[0]=t.withModifiers(c=>t.isRef(r)?r.value=!0:r=!0,["prevent"])),onMouseleave:t.withModifiers(c=>o(l),["prevent"])},[t.createElementVNode("div",ef,[t.renderSlot(s.$slots,"default")])],40,Qu)]),_:3},8,["position","as"]))}}),tf={class:"min-h-screen bg-gray-50"},nf={class:"mx-auto px-4 sm:px-6 lg:px-8"},rf={class:"flex justify-between h-16"},of={class:"flex"},af={class:"shrink-0 flex items-center"},sf=["src"],lf={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},cf=["href","aria-current"],df={class:"hidden sm:ml-6 sm:flex sm:items-center"},uf=["href"],ff={class:"-mr-2 flex items-center sm:hidden"},pf={class:"pt-2 pb-3 space-y-1"},mf=["href","aria-current"],hf={class:"pt-4 pb-3 border-t border-gray-200"},gf={class:"flex items-center px-4"},bf={class:"shrink-0"},yf={class:"ml-3"},wf=["textContent"],xf=["textContent"],Cf={class:"mt-3 space-y-1"},Ef=["href"],kf={class:"mx-auto sm:px-6 lg:px-8"},Df={class:"px-4 py-8 sm:px-0"},xs=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",tf,[t.createVNode(t.unref(Xl),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:s})=>[t.createElementVNode("div",nf,[t.createElementVNode("div",rf,[t.createElementVNode("div",of,[t.createElementVNode("div",af,[t.createElementVNode("img",{class:"block h-8 w-auto",src:o.iconUrl,alt:"XY Trees"},null,8,sf)]),t.createElementVNode("div",lf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,i=>(t.openBlock(),t.createElementBlock("a",{key:i.name,href:i.url,class:t.normalizeClass([e(i.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(i.url)?"page":void 0},t.toDisplayString(i.name),11,cf))),128))])]),t.createElementVNode("div",df,[t.createVNode(t.unref(xr),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Cr),{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(()=>[a[0]||(a[0]=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1)),t.createVNode(t.unref(ps),{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,i=>(t.openBlock(),t.createBlock(t.unref(kr),{key:i.name},{default:t.withCtx(({active:l})=>[t.createElementVNode("a",{href:i.url,class:t.normalizeClass([l?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(i.name),11,uf)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",ff,[t.createVNode(t.unref(Zl),{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(()=>[a[1]||(a[1]=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1)),s?(t.openBlock(),t.createBlock(t.unref(Ft),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(Ad),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(Ql),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",pf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,i=>(t.openBlock(),t.createElementBlock("a",{key:i.name,href:i.url,class:t.normalizeClass([e(i.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(i.url)?"page":void 0},t.toDisplayString(i.name),11,mf))),128))]),t.createElementVNode("div",hf,[t.createElementVNode("div",gf,[t.createElementVNode("div",bf,[t.createVNode(t.unref(ps),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",yf,[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,wf)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(o.currentUser.email)},null,8,xf)])]),t.createElementVNode("div",Cf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,i=>(t.openBlock(),t.createElementBlock("a",{key:i.name,href:i.url,class:"block px-4 py-2 text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100"},t.toDisplayString(i.name),9,Ef))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",kf,[t.createElementVNode("div",Df,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(Pn),t.createVNode(An)],64))}}),Nf=n=>n==null,Sf={clearSelection(){console.warn("clearSelection() was called on a static table, did you mean to use DynamicTable?")},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?")},selectedData:t.computed(()=>[])},Cs=(n,r,e,o=Sf)=>{const a=t.ref(r),s=t.ref(n),i=t.ref(e),l=t.computed(()=>i.value.actions.length>0),c=t.computed(()=>a.value.filter(u=>u.show??!0).map(u=>{let f="";switch((u==null?void 0:u.alignment)||"left"){case"left":f="text-left";break;case"right":f="text-right";break;case"center":f="text-center";break}return{...u,alignment:f}})),d=t.computed(()=>s.value.map((u,f)=>({actions:i.value.actions.map(p=>({...p,disabled:typeof p.disabled=="function"?p.disabled.apply(void 0,[u,f]):p.disabled,onClick:()=>p.onClick(u,f,o),show:typeof p.show=="function"?p.show.apply(void 0,[u,f]):p.show})),rowData:u,cells:c.value.map(p=>{const g=typeof p.render=="function"?p.render.apply(void 0,[u,f]):u[p.render],h=(p==null?void 0:p.classNames)||"";return{...p,isComponent:t.isVNode(g),classNames:typeof h=="function"?h.apply(void 0,[u,f]):h,val:g}})})));return{columns:c,hasActions:l,isEmptyCellValue:Nf,rows:d}},_f={key:0,class:"flex items-center space-x-2 justify-end"},vf={class:"isolate inline-flex rounded-md shadow-sm"},Vf=["disabled","onClick"],$f={class:"relative inline-flex items-center gap-x-1.5"},Hr=t.defineComponent({__name:"TableActionButtons",props:{actions:{default:()=>[]}},setup(n){const r=n,{actions:e,hasActions:o}=Ma(t.toRef(r,"actions"));return(a,s)=>t.unref(o)?(t.openBlock(),t.createElementBlock("div",_f,[t.createElementVNode("span",vf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(i,l)=>(t.openBlock(),t.createElementBlock("button",{key:l,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":l===0,"-ml-px":l>0,"rounded-r-md":l===t.unref(e).length-1}]),disabled:i.disabled,onClick:t.withModifiers(i.onClick,["stop"])},[t.createElementVNode("span",$f,[i.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.icon),{key:0,class:t.normalizeClass(["-ml-0.5 h-4 w-4 group-disabled:text-gray-300",i.label?"text-gray-400":"text-gray-600"]),"aria-hidden":"true"},null,8,["class"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(i.label),1)])],10,Vf))),128))])])):t.createCommentVNode("",!0)}}),Tf={class:"flex flex-col"},Mf={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},Bf={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},Pf={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},Af={class:"min-w-full divide-y divide-gray-200"},Rf={class:"bg-gray-100"},Of={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},If={class:"bg-white"},Lf={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},Ff={key:0},jf=["colspan"],Es=t.defineComponent({__name:"DataTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableData:{}},setup(n){const r=n,{columns:e,hasActions:o,isEmptyCellValue:a,rows:s}=Cs(t.toRef(r,"tableData"),t.toRef(r,"tableColumns"),t.toRef(r,"tableActions"));return(i,l)=>(t.openBlock(),t.createElementBlock("div",Tf,[t.createElementVNode("div",Mf,[t.createElementVNode("div",Bf,[t.createElementVNode("div",Pf,[t.createElementVNode("table",Af,[t.createElementVNode("thead",Rf,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(c,d)=>(t.openBlock(),t.createElementBlock("th",{key:d,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",Of)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",If,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),(c,d)=>(t.openBlock(),t.createElementBlock("tr",{key:d,class:"even:bg-gray-50"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.cells,(u,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",u.alignment])},{default:t.withCtx(()=>[u.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(u.classNames)},t.toDisplayString(t.unref(a)(u.val)?"-":String(u.val)),3))]),_:2},1032,["class"]))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("td",Lf,[i.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(vn),{key:0,actions:c.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Hr,{key:1,actions:c.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)]))),128)),t.unref(s).length===0?(t.openBlock(),t.createElementBlock("tr",Ff,[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,jf)])):t.createCommentVNode("",!0)])])])])])]))}}),Hf={class:"flex items-center justify-center space-x-8"},Uf={class:"font-medium"},zf={class:"flex items-center space-x-5"},qf={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},Wf={key:1,class:"relative flex items-center justify-center"},Yf={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},Kf={key:0,class:"flex shrink-0"},Gf={key:0,class:"inline-flex rounded-md shadow-sm"},Jf=["textContent"],Xf={class:"ml-3 inline-flex rounded-md shadow-sm"},Zf=["textContent"],ks=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,o=()=>{e("next")},a=()=>{e("previous")};return(s,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",Hf,[t.createElementVNode("p",Uf,"Step "+t.toDisplayString(s.step)+" of "+t.toDisplayString(s.total),1),t.createElementVNode("ul",zf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.total,l=>(t.openBlock(),t.createElementBlock("li",{key:l},[s.step>l?(t.openBlock(),t.createElementBlock("span",qf)):s.step===l?(t.openBlock(),t.createElementBlock("div",Wf,i[0]||(i[0]=[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)]))):(t.openBlock(),t.createElementBlock("span",Yf))]))),128))])]),s.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Kf,[s.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Gf,[t.createElementVNode("button",{type:"button",class:"xy-btn-secondary",onClick:a,textContent:t.toDisplayString(s.previousText)},null,8,Jf)])),t.createElementVNode("span",Xf,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:o,textContent:t.toDisplayString(s.nextText)},null,8,Zf)])]))]))}}),Qf={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},ep={key:0,class:"w-full max-w-lg lg:max-w-xs"},tp={class:"flex items-center gap-x-2"},np={class:"flex-1"},rp={key:1,class:"w-full max-w-lg lg:max-w-xs"},op={class:"flex items-center gap-x-2"},ap={class:"flex-1"},sp={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},ip={class:"min-w-full divide-y divide-gray-200"},lp={class:"bg-gray-100"},cp={key:0,scope:"col",class:"pl-6 w-4 leading-none"},dp=["checked","indeterminate"],up=["onClick"],fp={key:0},pp={key:1},mp={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},hp={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},gp={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},bp={key:1,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},yp={key:0},wp={colspan:"100%",class:"px-6 py-2.5 border-t bg-neutral-50"},xp={class:"flex items-center gap-x-3"},Cp={class:"text-sm shrink-0"},Ep={class:"font-medium"},kp={class:"font-medium"},Dp={class:"bg-white"},Np=["onClick"],Sp={key:0,class:"pl-6 w-4 leading-none"},_p=["disabled","value"],vp={key:1,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},Vp={key:0},$p=["colspan"],Tp={key:0,class:"mt-4"},Ds=t.defineComponent({__name:"DynamicTable",props:t.mergeModels({tableActions:{default:()=>({type:"dropdown",actions:[]})},tableBulkActions:{default:()=>({actions:[]})},tableColumns:{},tableOptions:{}},{selected:{required:!1,default:[]},selectedModifiers:{}}),emits:t.mergeModels(["click:row"],["update:selected"]),setup(n,{expose:r}){var zn;const e=n,o=()=>{const F={minDate:d.value.minDate,maxDate:d.value.maxDate,page:u.value.page,perPage:u.value.perPage,sort:l.value,sortDir:c.value,q:f.value};w(),pr.get(e.tableOptions.url,{skipLoader:!1},F).then(R=>{u.value={page:R.data.page,perPage:R.data.perPage,totalItems:R.data.totalItems,totalPages:R.data.totalPages},i.value=R.data.items},()=>{Lr.genericError()})},a=()=>{u.value.page=1,o()},s=()=>{if(h.value.maxRange){const F=new Date,R=F.setDate(F.getDate()-h.value.maxRange),Ze=new Date;d.value={minDate:Math.floor(R/1e3),maxDate:Math.floor(Ze.getTime()/1e3)}}},i=t.ref([]),l=t.ref(e.tableOptions.defaultSort?e.tableOptions.defaultSort:""),c=t.ref(e.tableOptions.defaultSortDirection?e.tableOptions.defaultSortDirection:"desc"),d=t.ref({minDate:0,maxDate:0}),u=t.ref({page:1,perPage:((zn=e.tableOptions)==null?void 0:zn.perPage)||10,totalItems:0,totalPages:0}),f=t.ref(""),p=F=>{F&&(u.value.page=1,d.value=F,o())},g=F=>{l.value==F?c.value=c.value==="desc"?"asc":"desc":(l.value=F,c.value="desc"),o()},h=t.computed(()=>typeof e.tableOptions.dateSearch=="object"?e.tableOptions.dateSearch:{}),y=t.computed(()=>!!zt.value.length),w=()=>{C.value=[]},C=t.useModel(n,"selected"),N=t.computed(()=>i.value.filter(F=>C.value.includes(F==null?void 0:F.id))),S=t.computed(()=>C.value.filter(F=>j.value.includes(F))),O=t.computed(()=>e.tableBulkActions.actions.filter(F=>F.show??!0).map(F=>({...F,disabled:C.value.length===0||F.disabled,onClick:()=>F.onClick.apply(void 0,[C.value,N.value,z])}))),B=t.computed(()=>O.value.length>0),j=t.computed(()=>i.value.filter(F=>F.id===void 0?!1:!!(e.tableBulkActions.isSelectable===void 0||e.tableBulkActions.isSelectable(F))).map(F=>F.id)),M=t.computed(()=>S.value.length>0&&S.value.length===j.value.length),le=t.computed(()=>S.value.length>0&&S.value.length<j.value.length),L=F=>{if(F.target.checked){C.value=j.value.map(Ze=>Ze);return}w()},z={clearSelection:w,selectedData:N,refresh:o,reset:a},{columns:te,hasActions:oe,isEmptyCellValue:fe,rows:zt}=Cs(i,t.toRef(e,"tableColumns"),t.toRef(e,"tableActions"),z);return t.watch(()=>e.tableOptions.refreshTrigger,()=>{o()}),t.watch(()=>e.tableOptions.reloadTrigger,()=>{a()}),r(z),s(),o(),(F,R)=>{var qn;const Ze=t.resolveComponent("BaseInput");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Qf,[F.tableOptions.search?(t.openBlock(),t.createElementBlock("div",ep,[R[7]||(R[7]=t.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),t.createElementVNode("div",tp,[R[6]||(R[6]=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)),t.createElementVNode("div",np,[t.createVNode(Ze,{id:"table-search",modelValue:f.value,"onUpdate:modelValue":R[0]||(R[0]=K=>f.value=K),modelModifiers:{trim:!0},type:"search",placeholder:"Search",onChange:R[1]||(R[1]=K=>a())},null,8,["modelValue"])])])])):t.createCommentVNode("",!0),F.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",rp,[R[9]||(R[9]=t.createElementVNode("label",{for:"table-date-range",class:"sr-only"},"Date Range",-1)),t.createElementVNode("div",op,[R[8]||(R[8]=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)),t.createElementVNode("div",ap,[t.createVNode(Mn,t.mergeProps({id:"table-date-range",modelValue:d.value,"onUpdate:modelValue":R[2]||(R[2]=K=>d.value=K)},{...h.value},{"onUpdate:modelValue":p}),null,16,["modelValue"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",sp,[t.createElementVNode("table",ip,[t.createElementVNode("thead",lp,[t.createElementVNode("tr",null,[B.value?(t.openBlock(),t.createElementBlock("th",cp,[t.createElementVNode("input",{class:t.normalizeClass(["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","border-gray-300 focus:ring-xy-blue-500"]),checked:M.value,indeterminate:le.value,type:"checkbox",onChange:L},null,40,dp)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(te),(K,qt)=>(t.openBlock(),t.createElementBlock("th",{key:qt,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",K.alignment])},[t.createElementVNode("div",{class:t.normalizeClass(["inline-flex items-center gap-2",{"cursor-pointer":K.sort}]),onClick:t.withModifiers(Wt=>K.sort?g(K.sort):void 0,["prevent"])},[K.title?(t.openBlock(),t.createElementBlock("span",fp,t.toDisplayString(K.title),1)):t.createCommentVNode("",!0),K.sort?(t.openBlock(),t.createElementBlock("span",pp,[l.value!==K.sort?(t.openBlock(),t.createElementBlock("svg",mp,R[10]||(R[10]=[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)]))):c.value=="desc"?(t.openBlock(),t.createElementBlock("svg",hp,R[11]||(R[11]=[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)]))):(t.openBlock(),t.createElementBlock("svg",gp,R[12]||(R[12]=[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)])))])):t.createCommentVNode("",!0)],10,up)],2))),128)),t.unref(oe)?(t.openBlock(),t.createElementBlock("th",bp)):t.createCommentVNode("",!0)]),B.value&&C.value.length>0?(t.openBlock(),t.createElementBlock("tr",yp,[t.createElementVNode("td",wp,[t.createElementVNode("div",xp,[t.createElementVNode("div",Cp,[R[13]||(R[13]=t.createTextVNode(" Selected ")),t.createElementVNode("span",Ep,t.toDisplayString(S.value.length),1),R[14]||(R[14]=t.createTextVNode(" of ")),t.createElementVNode("span",kp,t.toDisplayString(j.value.length),1)]),t.createVNode(Hr,{actions:O.value},null,8,["actions"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("tbody",Dp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(zt),(K,qt)=>{var Wt,Wn;return t.openBlock(),t.createElementBlock("tr",{key:qt,class:"even:bg-gray-50",onClick:pe=>F.$emit("click:row",K.rowData)},[B.value?(t.openBlock(),t.createElementBlock("td",Sp,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":R[3]||(R[3]=pe=>C.value=pe),class:t.normalizeClass(["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","border-gray-300 focus:ring-xy-blue-500"]),disabled:!j.value.includes((Wt=K.rowData)==null?void 0:Wt.id),type:"checkbox",value:(Wn=K.rowData)==null?void 0:Wn.id},null,8,_p),[[t.vModelCheckbox,C.value]])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(K.cells,(pe,Yt)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:Yt,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",pe.alignment])},{default:t.withCtx(()=>[pe.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(pe.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(pe.classNames)},t.toDisplayString(t.unref(fe)(pe.val)?"-":String(pe.val)),3))]),_:2},1032,["class"]))),128)),t.unref(oe)?(t.openBlock(),t.createElementBlock("td",vp,[F.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(vn),{key:0,actions:K.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Hr,{key:1,actions:K.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)],8,Np)}),128)),y.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",Vp,[t.createElementVNode("td",{colspan:t.unref(te).length+(t.unref(oe)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,$p)]))])])]),y.value?(t.openBlock(),t.createElementBlock("div",Tp,[t.createVNode(t.unref(Ur),{modelValue:u.value,"onUpdate:modelValue":[R[4]||(R[4]=K=>u.value=K),R[5]||(R[5]=K=>o())],"page-options":(qn=F.tableOptions)==null?void 0:qn.pageOptions},null,8,["modelValue","page-options"])])):t.createCommentVNode("",!0)])}}}),Mp={class:"flex flex-col items-center space-y-3.5 sm:flex-row sm:space-y-0 sm:gap-x-3 sm:justify-center"},Bp={class:"text-center text-sm text-neutral-700 sm:text-left sm:mr-auto sm:w-1/3"},Pp={class:"font-medium"},Ap={class:"font-medium"},Rp={class:"font-medium"},Op={class:"flex flex-col items-center space-y-3.5 sm:flex-row sm:space-y-0 sm:gap-x-3 sm:flex-1"},Ip={class:"flex gap-3 items-center justify-center shrink-0 md:w-1/2"},Lp=["disabled"],Fp={class:"max-w-[50px]"},jp={class:"text-sm"},Hp={class:"font-medium"},Up=["disabled"],zp={class:"max-w-[150px] sm:ml-auto"},Ur=t.defineComponent({__name:"TablePaginator",props:t.mergeModels({pageOptions:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue"),o=t.computed({get:()=>e.value.page,set:u=>{e.value={...e.value,page:u}}}),a=t.computed({get:()=>e.value.perPage,set:u=>{e.value={...e.value,page:1,perPage:u}}}),s=t.computed(()=>r.pageOptions?r.pageOptions:[{label:"5 per page",value:5},{label:"10 per page",value:10},{label:"20 per page",value:20},{label:"50 per page",value:50}]),i=Vt(u=>{u!==null&&u!==o.value&&(o.value=u)},350),l=Vt(()=>{o.value<=1||(o.value=o.value-1)},250),c=Vt(()=>{o.value>=e.value.totalPages||(o.value=o.value+1)},250),d=t.computed(()=>{const{page:u,perPage:f,totalItems:p}=e.value;return{start:p>0?(u-1)*f+1:0,end:Math.min(u*f,p)}});return(u,f)=>(t.openBlock(),t.createElementBlock("div",Mp,[t.createElementVNode("p",Bp,[f[3]||(f[3]=t.createTextVNode(" Showing ")),t.createElementVNode("span",Pp,t.toDisplayString(d.value.start),1),f[4]||(f[4]=t.createTextVNode(" to ")),t.createElementVNode("span",Ap,t.toDisplayString(d.value.end),1),f[5]||(f[5]=t.createTextVNode(" of ")),t.createElementVNode("span",Rp,t.toDisplayString(e.value.totalItems),1),f[6]||(f[6]=t.createTextVNode(" results "))]),t.createElementVNode("div",Op,[t.createElementVNode("div",Ip,[t.createElementVNode("button",{class:"xy-btn-neutral",disabled:o.value<=1,type:"button",onClick:f[0]||(f[0]=t.withModifiers(p=>o.value--,["prevent"]))},f[7]||(f[7]=[t.createTextVNode(" ← "),t.createElementVNode("span",{class:"sr-only"},"Previous",-1)]),8,Lp),t.createElementVNode("div",Fp,[t.createVNode(t.unref(Jr),{"model-value":o.value,min:1,max:e.value.totalPages,type:"number","onUpdate:modelValue":t.unref(i),onKeydown:[t.withKeys(t.withModifiers(t.unref(l),["prevent"]),["down"]),t.withKeys(t.withModifiers(t.unref(c),["prevent"]),["up"])]},null,8,["model-value","max","onUpdate:modelValue","onKeydown"])]),t.createElementVNode("div",jp,[f[8]||(f[8]=t.createTextVNode(" of ")),t.createElementVNode("span",Hp,t.toDisplayString(e.value.totalPages),1)]),t.createElementVNode("button",{class:"xy-btn-neutral",disabled:o.value>=e.value.totalPages,type:"button",onClick:f[1]||(f[1]=t.withModifiers(p=>o.value++,["prevent"]))},f[9]||(f[9]=[t.createElementVNode("span",{class:"sr-only"},"Next",-1),t.createTextVNode(" → ")]),8,Up)]),t.createElementVNode("div",zp,[t.createVNode(t.unref(Bn),{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=p=>a.value=p),options:s.value},null,8,["modelValue","options"])])])]))}}),qp={class:"hidden sm:block"},Wp=["onClick","textContent"],Ns=t.defineComponent({__name:"Tabs",props:t.mergeModels({pillDesign:{type:Boolean,default:!1},tabs:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue"),o=(s,i)=>{let l="";return r.pillDesign?(l="px-12 py-2 font-semibold text-md leading-5 rounded-t-md focus:outline-none ",e.value===s?l=l+"focus:bg-white text-gray-700 bg-white border-b-2 border-blue-500":l=l+"text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:bg-gray-100 border border-gray-200",l):(l="px-1 py-4 text-sm font-semibold border-b-2 whitespace-nowrap leading-5 focus:outline-none ",e.value===s?l=l+"border-blue-500 text-xy-blue focus:text-blue-800 focus:border-blue-700":l=l+"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:text-gray-900 focus:border-gray-300",i&&(l=l+" ml-8"),l)},a=t.computed(()=>!r.pillDesign);return(s,i)=>{const l=t.resolveComponent("Select");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["sm:hidden",{"mb-4":s.pillDesign}])},[i[1]||(i[1]=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1)),t.createVNode(l,{modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=c=>e.value=c),name:"tabs",options:s.tabs},null,8,["modelValue","options"])],2),t.createElementVNode("div",qp,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":a.value})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[s.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.tabs,(c,d)=>(t.openBlock(),t.createElementBlock("a",{key:d,href:"#",class:t.normalizeClass(o(c.value,d>0)),onClick:t.withModifiers(u=>e.value=c.value,["prevent"]),textContent:t.toDisplayString(c.label)},null,10,Wp))),128))],2)],2)])])}}}),Yp={key:0,class:"sr-only"},Kp={class:"ml-3 mt-0.5"},Ss=t.defineComponent({inheritAttrs:!1,__name:"Toggle",props:t.mergeModels({label:{default:""},help:{default:""}},{modelValue:{type:Boolean,...J},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=t.useModel(n,"modelValue",J),e=t.useAttrs(),o=t.computed(()=>mr(e,"disabled"));return(a,s)=>(t.openBlock(),t.createBlock(t.unref(cc),{as:"div",class:"flex items-start"},{default:t.withCtx(()=>[t.createVNode(t.unref(dc),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),class:t.normalizeClass([r.value?"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},{default:t.withCtx(()=>[a.label?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Yp,"Use")),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([r.value?"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,["modelValue","class","disabled"]),t.createElementVNode("div",Kp,[a.label?(t.openBlock(),t.createBlock(t.unref(uc),{key:0},{default:t.withCtx(()=>[t.createVNode(ge,{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(fc),{key:1},{default:t.withCtx(()=>[t.createVNode(ie,{text:a.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0)])]),_:1}))}}),Gp={"aria-label":"Progress"},Jp={role:"list",class:"flex items-center"},Xp={class:"absolute inset-0 flex items-center","aria-hidden":"true"},Zp=["aria-current"],Qp={key:1,class:"h-3 w-3 rounded-full bg-xy-blue","aria-hidden":"true"},em={class:"sr-only"},tm={key:2,class:"sr-only"},_s=t.defineComponent({__name:"ProgressCircles",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let s;return r.current>a?s="complete":r.current===a?s="current":s="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:s}}));return(o,a)=>(t.openBlock(),t.createElementBlock("nav",Gp,[t.createElementVNode("ol",Jp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(s,i)=>(t.openBlock(),t.createElementBlock("li",{key:s.name,class:t.normalizeClass([i!==e.value.length-1?"pr-8":"","relative"])},[t.createElementVNode("div",Xp,[t.createElementVNode("div",{class:t.normalizeClass(["h-0.5 w-full",s.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":s.status==="complete","border-2 border-indigo-600 bg-white":s.status==="current","border-2 border-gray-300 bg-white":s.status==="incomplete"}),"aria-current":s.status==="current"?!0:void 0},[s.status==="complete"?(t.openBlock(),t.createBlock(t.unref(Ta),{key:0,class:"h-3 w-3 text-white","aria-hidden":"true"})):s.status==="current"?(t.openBlock(),t.createElementBlock("span",Qp)):t.createCommentVNode("",!0),t.createElementVNode("span",em,t.toDisplayString(s.name),1),s.description?(t.openBlock(),t.createElementBlock("span",tm,t.toDisplayString(s.description),1)):t.createCommentVNode("",!0)],10,Zp)],2))),128))])]))}}),nm={"aria-label":"Progress"},rm={role:"list",class:"overflow-hidden"},om=["aria-current"],am={class:"flex h-9 items-center"},sm={key:1,class:"h-2.5 w-2.5 rounded-full bg-xy-blue"},im={class:"ml-4 flex min-w-0 flex-col"},lm={key:0,class:"text-sm text-gray-600"},vs=t.defineComponent({__name:"ProgressCirclesLabeled",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let s;return r.current>a?s="complete":r.current===a?s="current":s="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:s}}));return(o,a)=>(t.openBlock(),t.createElementBlock("div",nm,[t.createElementVNode("ol",rm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(s,i)=>(t.openBlock(),t.createElementBlock("li",{key:i,class:t.normalizeClass([i!==e.value.length-1?"pb-6":"","relative"])},[i!==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",s.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":s.status==="current"?!0:void 0},[t.createElementVNode("span",am,[t.createElementVNode("span",{class:t.normalizeClass({"relative z-10 flex h-6 w-6 items-center justify-center rounded-full":!0,"bg-xy-blue ":s.status==="complete","border-2 border-xy-blue bg-white":s.status==="current","border-2 border-gray-300 bg-white":s.status==="incomplete"})},[s.status==="complete"?(t.openBlock(),t.createBlock(t.unref(Ta),{key:0,class:"h-4 w-4 text-white","aria-hidden":"true"})):s.status==="current"?(t.openBlock(),t.createElementBlock("span",sm)):t.createCommentVNode("",!0)],2)]),t.createElementVNode("span",im,[t.createElementVNode("span",{class:t.normalizeClass({"text-sm font-bold":!0,"text-gray-800":s.status==="complete","text-xy-blue":s.status==="current","text-gray-600":s.status==="incomplete","mt-2":!s.description})},t.toDisplayString(s.name),3),s.description?(t.openBlock(),t.createElementBlock("span",lm,t.toDisplayString(s.description),1)):t.createCommentVNode("",!0)])],8,om)],2))),128))])]))}}),cm=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","type"],Vs=t.defineComponent({inheritAttrs:!1,__name:"BaseInput",props:t.mergeModels(t.mergeDefaults({modelValue:{},type:{},label:{},help:{},placeholder:{}},Ae),{modelValue:{...J,set:n=>props.type==="number"?hr(n):n},modelModifiers:{}}),emits:["update:modelValue"],setup(n,{expose:r}){const e=n,o=t.useModel(n,"modelValue",{...J,set:f=>e.type==="number"?hr(f):f}),a=t.useTemplateRef("input"),{errorState:s,inputID:i,isRequired:l,onInvalid:c,inputValidation:d}=$e(e);r({input:a});const u=t.computed(()=>{switch(e.type){case"number":return{max:Number.MAX_SAFE_INTEGER,min:Number.MIN_SAFE_INTEGER};case"email":return{pattern:qo};case"tel":return{pattern:Wo};case"url":return{pattern:Yo};default:return{}}});return(f,p)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(ge,{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.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(i),ref:"input","onUpdate:modelValue":p[0]||(p[0]=g=>o.value=g),"aria-labelledby":f.label?`${t.unref(i)}-label`:void 0,"aria-describedby":f.help?`${t.unref(i)}-help`:void 0,"aria-errormessage":t.unref(s)?`${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(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"],placeholder:f.placeholder,type:f.type},{...u.value,...f.$attrs},{onInput:p[1]||(p[1]=(...g)=>t.unref(d)&&t.unref(d)(...g)),onInvalid:p[2]||(p[2]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,cm),[[t.vModelDynamic,o.value,void 0,{trim:!0}]]),t.createVNode(ie,{id:`${t.unref(i)}-help`,class:"mt-1",text:f.help},null,8,["id","text"]),t.createVNode(_e,{id:`${t.unref(i)}-error`,class:"mt-0.5",text:t.unref(s)},null,8,["id","text"])]))}}),dm={class:"relative flex items-start"},um={class:"flex items-center h-5"},fm=["id","aria-labelledby","aria-describedby","aria-errormessage","checked"],pm={class:"ml-3"},$s=t.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:t.mergeModels(t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Ae),{modelValue:{type:[Boolean,null],...J},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",J),{aria:o,inputID:a,isDisabled:s,isRequired:i,errorState:l,validate:c,onInvalid:d}=$e(r);return(u,f)=>(t.openBlock(),t.createElementBlock("div",dm,[t.createElementVNode("div",um,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":f[0]||(f[0]=p=>e.value=p),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,checked:e.value||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"},u.$attrs,{onChange:f[1]||(f[1]=(...p)=>t.unref(c)&&t.unref(c)(...p)),onInvalid:f[2]||(f[2]=(...p)=>t.unref(d)&&t.unref(d)(...p))}),null,16,fm),[[t.vModelCheckbox,e.value]])]),t.createElementVNode("div",pm,[t.createVNode(ge,{id:t.unref(o).labelledby,for:t.unref(a),label:u.label,class:t.normalizeClass(t.unref(s)?"cursor-not-allowed":"cursor-pointer"),required:t.unref(i)},null,8,["id","for","label","class","required"]),t.createVNode(ie,{id:t.unref(o).describedby,text:u.help},null,8,["id","text"]),t.createVNode(_e,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])])]))}}),mm=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],Ts=t.defineComponent({inheritAttrs:!1,__name:"DateTimeInput",props:t.mergeModels(t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Ae),{modelValue:{...J,get:n=>n&&Ko(n),set:n=>n&&new Date(n).toISOString()},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...J,get:c=>c&&Ko(c),set:c=>c&&new Date(c).toISOString()}),{errorState:o,inputID:a,isRequired:s,onInvalid:i,inputValidation:l}=$e(r);return(c,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(ge,{id:`${t.unref(a)}-label`,class:"mb-2",for:t.unref(a),label:c.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":d[0]||(d[0]=u=>e.value=u),"aria-labelledby":c.label?`${t.unref(a)}-label`:void 0,"aria-describedby":c.help?`${t.unref(a)}-help`:void 0,"aria-errormessage":t.unref(o)?`${t.unref(a)}-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:c.placeholder,type:"datetime-local"},c.$attrs,{onInput:d[1]||(d[1]=(...u)=>t.unref(l)&&t.unref(l)(...u)),onInvalid:d[2]||(d[2]=(...u)=>t.unref(i)&&t.unref(i)(...u))}),null,16,mm),[[t.vModelText,e.value]]),t.createVNode(ie,{id:`${t.unref(a)}-help`,class:"mt-1",text:c.help},null,8,["id","text"]),t.createVNode(_e,{id:`${t.unref(a)}-error`,class:"mt-0.5",text:t.unref(o)},null,8,["id","text"])]))}}),hm={key:0,class:"text-red-700/80"},kt=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",hm,"*")):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}}),gm=["aria-labelledby","aria-describedby","aria-errormessage"],bm={key:0},ym={class:"flex"},wm={class:"flex items-center h-5"},xm=["id","aria-labelledby","aria-describedby","disabled","value"],Cm={class:"ml-3"},Ms=t.defineComponent({inheritAttrs:!1,__name:"MultiCheckboxes",props:t.mergeModels(t.mergeDefaults({max:{},min:{},modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Ae),{modelValue:{...J,get:n=>Array.isArray(n)?n:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...J,get:g=>Array.isArray(g)?g:[]}),{aria:o,inputID:a,isDisabled:s,errorState:i,validate:l}=$e(r),c=t.computed(()=>r.min||null),d=t.computed(()=>r.max||null),u=t.computed(()=>{var h;const g=((h=e.value)==null?void 0:h.length)||0;return c.value!==null&&g<c.value?`Please select at least ${c.value} of these options.`:d.value!==null&&g>d.value?`Please limit your selection to ${d.value} of these options.`:c.value!==null&&d.value!==null&&(g<c.value||g>d.value)?`Please select between ${c.value} and ${d.value} of these options.`:""}),f=t.useTemplateRef("errorInput"),p=()=>{var g;i.value||(i.value=u.value,(g=f.value)==null||g.setCustomValidity(u.value))};return(g,h)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"relative space-y-6","aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage},[g.label?(t.openBlock(),t.createElementBlock("div",bm,[t.createVNode(kt,{id:t.unref(o).labelledby,label:g.label,required:!!c.value},null,8,["id","label","required"]),g.help?(t.openBlock(),t.createBlock(ie,{key:0,id:t.unref(o).describedby,class:"mt-1",tag:"p",text:g.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(_e,{id:t.unref(o).errormessage,class:"mt-1",text:t.unref(i)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",ym,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-5",{"sm:grid sm:gap-x-10":g.columns!==void 0,"sm:grid-cols-2":g.columns===2,"sm:grid-cols-3":g.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.options,(y,w)=>(t.openBlock(),t.createElementBlock("div",{key:y.value,class:"flex items-start"},[t.createElementVNode("div",wm,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:`${t.unref(a)}-${w}`,"onUpdate:modelValue":h[0]||(h[0]=C=>e.value=C),"aria-labelledby":`${t.unref(a)}-${w}-label`,"aria-describedby":y.help?`${t.unref(a)}-${w}-help`:void 0,disabled:y.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(i)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox",value:y.value,ref_for:!0},g.$attrs,{onChange:h[1]||(h[1]=(...C)=>t.unref(l)&&t.unref(l)(...C))}),null,16,xm),[[t.vModelCheckbox,e.value]])]),t.createElementVNode("div",Cm,[t.createVNode(ge,{id:`${t.unref(a)}-${w}-label`,for:`${t.unref(a)}-${w}`,label:y.label,class:t.normalizeClass(t.unref(s)||y.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(ie,{id:`${t.unref(a)}-${w}-help`,text:y.help},null,8,["id","text"])])]))),128))],2)]),u.value?(t.openBlock(),t.createElementBlock("input",{key:1,ref:"errorInput",required:"",class:"sr-only top-1 left-1","aria-hidden":"",type:"checkbox",onInvalid:p},null,544)):t.createCommentVNode("",!0)],8,gm))}});function Bs(n){const{anchorOffset:r=0,focusOffset:e=0}=n.ownerDocument.getSelection()||{},o=Math.min(r,e),a=Math.max(r,e);return[o,a]}function Em(n,[r,e]){var o,a,s,i;const l=n.ownerDocument,c=l.createRange();c.setStart(n.firstChild||n,Math.min(r,(a=(o=n.textContent)===null||o===void 0?void 0:o.length)!==null&&a!==void 0?a:0)),c.setEnd(n.lastChild||n,Math.min(e,(i=(s=n.textContent)===null||s===void 0?void 0:s.length)!==null&&i!==void 0?i:0));const d=l.getSelection();d&&(d.removeAllRanges(),d.addRange(c))}class km{constructor(r){this.element=r,this.maxLength=1/0}get value(){return this.element.innerText.replace(/\n\n$/,`
16
+ if the issue persists.`:"Whoops! Something went wrong.";return s({message:y,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:s,remove:a,flash:i,error:l,warning:u,info:c,success:d,genericError:f},flashes:r,configure:o}}const hd=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 Ir;function it(){return Ir===void 0&&(Ir=ds()),Ir}const Lr={error(n,r){it().flasher.error(n,r)},info(n,r){it().flasher.info(n,r)},success(n,r){it().flasher.success(n,r)},warning(n,r){it().flasher.warning(n,r)},genericError(n,r){it().flasher.genericError(n,r)}},gd=(n,r)=>{var d;const e=t.ref(n),o={initial:((d=e==null?void 0:e.value[0])==null?void 0:d.value)||"",paramName:(r==null?void 0:r.paramName)||"tab"},a=t.ref(o.initial),s=u=>!!e.value.find(f=>f.value===u),i=u=>a.value===u,c=new URLSearchParams(window.location.search).get(o.paramName);return c&&s(c)&&(a.value=c),t.watch(a,u=>{const f=new URLSearchParams(window.location.search);f.set(o.paramName,u.toString());const p=f.toString()!==""?`?${f.toString()}`:"";window.history.replaceState({tab:u},document.title,`${window.location.pathname}${p}`)}),{activeTab:a,isActiveTab:i,tabs:e}},bd=n=>{const r=t.ref(n);return t.watch(r,e=>{const o=new URLSearchParams(window.location.search);for(const s in e){const i=e[s];if(i==null||i==null){o.delete(s);continue}if(Array.isArray(i)){o.delete(s),i.forEach(l=>{o.append(s,l.toString())});continue}!o.has(s)&&!i||o.set(s,i.toString())}const a=o.toString()!==""?`?${o.toString()}`:"";window.history.replaceState(t.toRaw(e),document.title,`${window.location.pathname}${a}`)},{deep:!0}),r},yd={class:"px-4 flex items-center justify-between sm:px-0"},wd={class:"w-0 flex-1 flex"},xd={class:"hidden md:flex"},Cd=["onClick","textContent"],Ed={class:"w-0 flex-1 flex justify-end"},Fr=t.defineComponent({__name:"Paginator",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(n){const r=t.useModel(n,"modelValue"),e=a=>{r.value={...r.value,page:a}},o=t.computed(()=>{const a=[];if(r.value.totalPages<=4){for(let i=0;i<r.value.totalPages;i++)a.push(i+1);return a}if(r.value.totalPages-r.value.page>=3){for(let i=0;i<4;i++)a.push(r.value.page+i);return a}for(let i=0;i<4;i++)a.unshift(r.value.totalPages-i);return a});return(a,s)=>(t.openBlock(),t.createElementBlock("div",yd,[t.createElementVNode("div",wd,[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",r.value.page==1?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:s[0]||(s[0]=t.withModifiers(i=>e(r.value.page-1),["prevent"]))},s[2]||(s[2]=[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),t.createTextVNode(" Previous ")]),2)]),t.createElementVNode("div",xd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,i=>(t.openBlock(),t.createElementBlock("a",{key:i,href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",r.value.page===i?"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(l=>e(i),["prevent"]),textContent:t.toDisplayString(i)},null,10,Cd))),128))]),t.createElementVNode("div",Ed,[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",r.value.page>=r.value.totalPages?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:s[1]||(s[1]=t.withModifiers(i=>e(r.value.page+1),["prevent"]))},s[3]||(s[3]=[t.createTextVNode(" Next "),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)]),2)])]))}}),kd={key:0,class:"flex"},us=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([]),s=t.ref({page:1,perPage:e.perPage,totalItems:0,totalPages:0}),i=t.ref(e.defaultSort),l=t.ref(e.defaultSortDir),c=()=>{const h={maxDate:o.value.maxDate||null,minDate:o.value.minDate||null,page:s.value.page,perPage:s.value.perPage,q:"",sort:i.value,sortDir:l.value};pr.get(e.url,{},h).then(y=>{s.value={page:y.data.page,perPage:y.data.perPage,totalItems:y.data.totalItems,totalPages:y.data.totalPages},a.value=y.data.items},()=>{Lr.genericError()})},d=t.computed(()=>!!a.value.length),u=t.computed(()=>!e.disableDate),f=t.computed(()=>!e.disableNavigation&&d),g={refresh:c,reset:()=>{s.value.page=1,c()}};return t.watch([l,o],()=>{c()}),r(g),c(),(h,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({"mt-4 space-y-2":u.value})},[h.disableDate?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",kd,[t.createVNode(Or,{"date-range":o.value,"sort-dir":l.value,onSortDirChanged:y[0]||(y[0]=w=>l.value=w),onDateRangeChanged:y[1]||(y[1]=w=>o.value=w)},null,8,["date-range","sort-dir"])])),d.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["overflow-hidden",{"shadow sm:rounded-md border":!h.borderless}])},[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(w,C)=>(t.openBlock(),t.createElementBlock("li",{key:C,class:t.normalizeClass({"border-t border-gray-200":C>0})},[t.renderSlot(h.$slots,"default",{item:w})],2))),128))])],2)):t.renderSlot(h.$slots,"empty",{key:2},()=>[y[4]||(y[4]=t.createTextVNode(" No items were found! "))]),f.value?(t.openBlock(),t.createBlock(Fr,{key:3,modelValue:s.value,"onUpdate:modelValue":[y[2]||(y[2]=w=>s.value=w),y[3]||(y[3]=w=>c())]},null,8,["modelValue"])):t.createCommentVNode("",!0)],2))}}),Dd=["href"],fs=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(xc),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,Dd))}}),Nd={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},Sd={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},_d={class:"p-4"},vd={class:"flex items-center"},Vd={class:"w-0 flex-1 flex justify-between"},$d=["innerHTML"],Td={class:"ml-4 shrink-0 flex"},Md=["onClick"],Pn=t.defineComponent({__name:"Flash",setup(n){const{flasher:r,flashes:e}=it(),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(()=>{hd(r)}),(a,s)=>(t.openBlock(),t.createBlock(t.unref(gr),null,{default:t.withCtx(()=>[t.createElementVNode("div",Nd,[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),([i,l])=>(t.openBlock(),t.createElementBlock("div",{key:l.message,class:t.normalizeClass(["bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform z-10",[o(l.type)]])},[t.createElementVNode("div",Sd,[t.createElementVNode("div",_d,[t.createElementVNode("div",vd,[t.createElementVNode("div",Vd,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:l.message},null,8,$d)]),t.createElementVNode("div",Td,[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(i)},s[0]||(s[0]=[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)]),8,Md)])])])])],2))),128))]),_:1})])]),_:1}))}});function Bd(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 Pd(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 Ad(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 ps(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 Ft(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"},Id={class:"ml-2.5"},Ld={key:0,role:"list",class:"list-disc space-y-1 pl-5"},Fd={key:1},jd={key:1,class:"mt-4"},Hd={class:"flex flex-col gap-y-1.5 -mx-2 sm:flex-row sm:gap-x-3 sm:items-center"},Ud={key:0},zd=["href","role"],qd={key:1},Wd=["href","role"],Yd={key:0,class:"ml-auto pl-3"},Kd={class:"-mx-1.5 -my-1.5"},ms=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=r,a=t.ref(!0),s=()=>{a.value=!1,o("close",!0)},i=t.computed(()=>{const c={bgColor:"",btnAction:"",btnClose:"",contentColor:"",iconColor:""};switch(e.kind){case"alert":c.bgColor="bg-red-50",c.btnAction="bg-red-50 text-red-900 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",c.btnClose="bg-red-50 text-red-600 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",c.contentColor="text-red-800",c.iconColor="text-red-400";break;case"info":c.bgColor="bg-blue-50",c.btnAction="bg-blue-50 text-blue-900 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",c.btnClose="bg-blue-50 text-blue-600 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",c.contentColor="text-blue-800",c.iconColor="text-blue-400";break;case"success":c.bgColor="bg-emerald-50",c.btnAction="bg-emerald-50 text-emerald-900 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",c.btnClose="bg-emerald-50 text-emerald-600 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",c.contentColor="text-emerald-800",c.iconColor="text-emerald-400";break;case"warn":c.bgColor="bg-amber-50",c.btnAction="bg-amber-50 text-amber-900 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",c.btnClose="bg-amber-50 text-amber-600 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",c.contentColor="text-amber-800",c.iconColor="text-amber-400";break}return c}),l=t.computed(()=>{let c=null;switch(e.kind){case"alert":c=kc;break;case"info":c=Ec;break;case"success":c=$a;break;case"warn":c=Cc;break}return c});return(c,d)=>a.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",Id,[c.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(c.title),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["text-sm",i.value.contentColor])},[Array.isArray(c.content)?(t.openBlock(),t.createElementBlock("ul",Ld,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.content,(u,f)=>(t.openBlock(),t.createElementBlock("li",{key:f},t.toDisplayString(u),1))),128))])):(t.openBlock(),t.createElementBlock("p",Fd,t.toDisplayString(c.content),1))],2),c.btnText||c.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",jd,[t.createElementVNode("div",Hd,[c.btnText?(t.openBlock(),t.createElementBlock("div",Ud,[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:c.btnLink,role:c.btnLink?"link":"button",onClick:d[0]||(d[0]=u=>c.$emit("click",u))},t.toDisplayString(c.btnText),11,zd)])):t.createCommentVNode("",!0),c.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",qd,[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:c.secondaryBtnLink,role:c.secondaryBtnLink?"link":"button",onClick:d[1]||(d[1]=u=>c.$emit("click:secondary",u))},t.toDisplayString(c.secondaryBtnText),11,Wd)])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),c.dismissable?(t.openBlock(),t.createElementBlock("div",Yd,[t.createElementVNode("div",Kd,[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:s},[d[2]||(d[2]=t.createElementVNode("span",{class:"sr-only"},"close",-1)),t.createVNode(t.unref(Ft),{class:"h-4 w-4"})],2)])])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)}}),Gd={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},Jd={class:"block absolute top-0 right-0 pt-4 pr-4 sm:pt-6 sm:pr-8"},Xd={class:"bg-white px-4 pt-5 pb-4 sm:p-8 sm:pb-6"},Zd={class:"mt-3 sm:mt-0 sm:text-left"},Qd={class:"mt-2"},eu={key:0,class:"bg-gray-50 px-4 py-3 sm:py-4 sm:px-8 sm:flex sm:flex-row-reverse"},tu=["disabled","textContent"],hs=t.defineComponent({__name:"Modal",props:t.mergeModels({destructive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},wide:{type:Boolean,default:!1},submitText:{default:""},title:{default:""}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["close","submit"],["update:modelValue"]),setup(n,{emit:r}){const e=t.useModel(n,"modelValue"),o=r,a=()=>{o("submit")};return t.watch(e,s=>{s||o("close")}),(s,i)=>(t.openBlock(),t.createBlock(t.unref(Pt),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(bn),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",open:e.value,onClose:i[3]||(i[3]=l=>e.value=!1)},{default:t.withCtx(()=>[t.createElementVNode("div",Gd,[t.createVNode(t.unref(We),{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(yn),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),i[5]||(i[5]=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1)),t.createVNode(t.unref(We),{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",s.wide?"sm:max-w-6xl":"sm:max-w-2xl"])},[t.createElementVNode("div",Jd,[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=>e.value=!1)},[i[4]||(i[4]=t.createElementVNode("span",{class:"sr-only"},"Close",-1)),t.createVNode(t.unref(Ft),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",Xd,[t.createElementVNode("div",Zd,[t.createVNode(t.unref(wr),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(s.title),1)]),_:1}),t.createElementVNode("div",Qd,[t.renderSlot(s.$slots,"default")])])]),s.submitText?(t.openBlock(),t.createElementBlock("div",eu,[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["xy-btn w-full sm:ml-3 sm:w-auto sm:text-sm",[s.destructive?"xy-btn-red":"xy-btn"]]),disabled:s.disabled,onClick:i[1]||(i[1]=l=>a()),textContent:t.toDisplayString(s.submitText)},null,10,tu),t.createElementVNode("button",{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=>e.value=!1)}," Cancel ")])):t.createCommentVNode("",!0),t.renderSlot(s.$slots,"buttons")],2)]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),nu={class:"aspect-square overflow-hidden"},ru={class:"flex justify-center relative"},ou={class:"sr-only"},jr=t.defineComponent({__name:"XYSpinner",setup(n){const r=t.useAttrs();return(e,o)=>{var a,s;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass((a=t.unref(r))!=null&&a.class?(s=t.unref(r))==null?void 0:s.class:"h-20 w-20"),role:"status"},[t.createElementVNode("div",nu,[t.createElementVNode("div",ru,[t.createElementVNode("p",ou,[t.renderSlot(e.$slots,"default",{},()=>[o[0]||(o[0]=t.createTextVNode("loading"))])]),o[1]||(o[1]=t.createStaticVNode('<div class="animate-spin-gear drop-shadow-sm"><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"><defs><polygon id="path-1" points="0.000248076923 0.48676924 128.472837 0.48676924 128.472837 128.800648 0.000248076923 128.800648"></polygon></defs><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-6-Copy-3"><g id="Group-3"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><g id="Clip-2"></g><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)"></path></g></g></g></svg></div><div class="absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"><svg viewBox="0 0 280 280" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><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"></path><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"></path></svg></div>',2))])])],2)}}}),au={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"},su={class:"mt-2"},An=t.defineComponent({__name:"Spinner",setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:s,showMsg:i}=Ho(),l=()=>{r.value++,r.value>o.value&&(r.value=0),a.value&&(s.value=a.value[r.value]),i.value=!0},c=()=>{window.setTimeout(()=>{i.value=!1},2500)};return(d,u)=>(t.openBlock(),t.createBlock(t.unref(gr),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",au,[t.createVNode(jr,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",su,[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:l},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:"container font-medium text-lg leading-snug text-center transition-opacity"},t.toDisplayString(t.unref(s)),513),[[t.vShow,t.unref(i)]])]),_:1})],512),[[t.vShow,t.unref(a)]])])):t.createCommentVNode("",!0)]),_:1}))}}),iu={class:"h-screen flex overflow-hidden bg-gray-50"},lu={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},cu={class:"absolute top-0 right-0 -mr-12 pt-2"},du={class:"shrink-0 flex justify-center px-4"},uu=["src"],fu={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},pu={class:"flex-1 px-2"},mu={class:"space-y-1"},hu=["href","target"],gu={key:0,class:"mt-auto"},bu={class:"mt-6 px-2"},yu={class:"hidden lg:flex lg:shrink-0"},wu={class:"flex flex-col w-64"},xu={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},Cu={class:"flex justify-center shrink-0 px-4"},Eu=["src"],ku={class:"mt-5 grow flex flex-col"},Du={class:"flex-1 px-2 bg-white"},Nu={class:"space-y-1"},Su=["href","target"],_u={key:0,class:"mt-atuo"},vu={class:"mt-6 px-2"},Vu={class:"flex flex-col w-0 flex-1 overflow-hidden"},$u={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},Tu={class:"flex-1 px-4 flex justify-between"},Mu={class:"flex-1 flex"},Bu={class:"flex items-center text-base leading-snug sm:text-2xl text-white"},Pu={class:"ml-4 flex items-center lg:ml-6"},Au=["href"],Ru={class:"flex-1 relative overflow-y-auto focus:outline-none"},Ou={class:"mx-auto"},gs=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,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",iu,[t.createVNode(t.unref(Pt),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(bn),{as:"div",static:"",class:"fixed inset-0 flex z-10 lg:hidden",open:e.value,onClose:s[1]||(s[1]=i=>e.value=!1)},{default:t.withCtx(()=>[t.createVNode(t.unref(We),{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(yn),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(We),{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",lu,[t.createVNode(t.unref(We),{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",cu,[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:s[0]||(s[0]=i=>e.value=!1)},[s[3]||(s[3]=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1)),t.createVNode(t.unref(Ft),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",du,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,uu)]),t.createElementVNode("div",fu,[t.createElementVNode("div",pu,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",mu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,i=>(t.openBlock(),t.createElementBlock("a",{key:i.name,href:i.url,class:t.normalizeClass([o(i.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:i.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.icon),{class:t.normalizeClass([o(i.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(i.name),1)],10,hu))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",gu,[t.createElementVNode("div",bu,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),s[4]||(s[4]=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1))]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",yu,[t.createElementVNode("div",wu,[t.createElementVNode("div",xu,[t.createElementVNode("div",Cu,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,Eu)]),t.createElementVNode("div",ku,[t.createElementVNode("div",Du,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",Nu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,i=>(t.openBlock(),t.createElementBlock("a",{key:i.name,href:i.url,class:t.normalizeClass([o(i.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:i.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.icon),{class:t.normalizeClass([o(i.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(i.name),1)],10,Su))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",_u,[t.createElementVNode("div",vu,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",Vu,[t.createElementVNode("div",$u,[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:s[2]||(s[2]=i=>e.value=!0)},[s[5]||(s[5]=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1)),t.createVNode(t.unref(Pd),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",Tu,[t.createElementVNode("div",Mu,[t.createElementVNode("h1",Bu,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Pu,[t.createVNode(t.unref(xr),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Cr),{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(()=>[s[6]||(s[6]=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1)),t.createVNode(t.unref(yc),{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,i=>(t.openBlock(),t.createBlock(t.unref(kr),{key:i.name},{default:t.withCtx(({active:l})=>[t.createElementVNode("a",{href:i.url,class:t.normalizeClass([l?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(i.name),11,Au)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",Ru,[t.createElementVNode("div",Ou,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(Pn),t.createVNode(An)],64))}}),jt=t.defineComponent({__name:"Popover",props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=t.useTemplateRef("trigger"),o=t.useTemplateRef("wrapper"),a=t.computed(()=>{const l=[Pc(5),Rc()];return r.position==="auto"&&l.push(Bc()),l}),s=t.computed(()=>{if(r.position!=="auto")return r.position}),{floatingStyles:i}=rs(e,o,{middleware:a,placement:s,strategy:"fixed",whileElementsMounted:Qa});return(l,c)=>(t.openBlock(),t.createBlock(t.unref(ya),{as:l.as,class:"relative"},{default:t.withCtx(({open:d,close:u})=>[t.createVNode(t.unref(ac),{ref:"trigger"},{default:t.withCtx(()=>[t.renderSlot(l.$slots,"button",{open:d,close:u})]),_:2},1536),t.createElementVNode("div",{ref:"wrapper",class:"z-[5]",style:t.normalizeStyle(t.unref(i))},[t.createVNode(t.unref(sc),null,{default:t.withCtx(()=>[t.renderSlot(l.$slots,"default",{open:d,close:u})]),_:2},1024)],4)]),_:3},8,["as"]))}}),Iu=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e},Lu={},Fu={class:"w-full max-w-xs bg-white rounded-xy p-2 border border-gray-100 shadow-md"};function ju(n,r){return t.openBlock(),t.createElementBlock("div",Fu,[t.renderSlot(n.$slots,"default")])}const bs=Iu(Lu,[["render",ju]]),Hu={class:"absolute inset-0 overflow-hidden"},Uu={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},zu={class:"w-screen max-w-md"},qu={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},Wu={class:"py-6 px-4 bg-xy-blue-700 sm:px-6"},Yu={class:"flex items-center justify-between"},Ku={class:"ml-3 h-7 flex items-center"},Gu={class:"mt-1"},Ju=["textContent"],Xu={class:"relative flex-1 py-6 px-4 sm:px-6"},ys=t.defineComponent({__name:"Slideover",props:t.mergeModels({header:{},description:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["close"],["update:modelValue"]),setup(n,{emit:r}){const e=t.useModel(n,"modelValue"),o=r;return t.watch(e,a=>{a||o("close")}),(a,s)=>(t.openBlock(),t.createBlock(t.unref(Pt),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(bn),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",open:e.value,onClose:s[1]||(s[1]=i=>e.value=!1)},{default:t.withCtx(()=>[t.createElementVNode("div",Hu,[t.createVNode(t.unref(yn),{class:"absolute inset-0"}),t.createElementVNode("div",Uu,[t.createVNode(t.unref(We),{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",zu,[t.createElementVNode("div",qu,[t.createElementVNode("div",Wu,[t.createElementVNode("div",Yu,[t.createVNode(t.unref(wr),{as:"h3",class:"text-white"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.header),1)]),_:1}),t.createElementVNode("div",Ku,[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:s[0]||(s[0]=i=>e.value=!1)},[s[2]||(s[2]=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1)),t.createVNode(t.unref(Ft),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",Gu,[t.createElementVNode("p",{class:"text-gray-50 text-base font-medium",textContent:t.toDisplayString(a.description)},null,8,Ju)])]),t.createElementVNode("div",Xu,[t.renderSlot(a.$slots,"default")]),t.renderSlot(a.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),Zu=["onMouseover","onMouseleave"],Qu=["onMouseleave"],ef={class:"max-w-xs"},ws=t.defineComponent({__name:"Tooltip",props:{as:{default:"span"},position:{default:"auto"}},setup(n){var r=!1,e=null;const o=s=>{r=!1,e&&clearTimeout(e),e=setTimeout(()=>{r||s()},100)},a=(s,i)=>{r=!0,!i&&s.target&&s.target.click()};return(s,i)=>(t.openBlock(),t.createBlock(jt,{position:s.position,as:s.as},{button:t.withCtx(({open:l,close:c})=>[t.createElementVNode("div",{class:"leading-none relative w-4 h-4",onMouseover:d=>a(d,l),onMouseleave:d=>o(c)},[t.createVNode(t.unref(Bd)),i[1]||(i[1]=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1))],40,Zu)]),default:t.withCtx(({close:l})=>[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:i[0]||(i[0]=t.withModifiers(c=>t.isRef(r)?r.value=!0:r=!0,["prevent"])),onMouseleave:t.withModifiers(c=>o(l),["prevent"])},[t.createElementVNode("div",ef,[t.renderSlot(s.$slots,"default")])],40,Qu)]),_:3},8,["position","as"]))}}),tf={class:"min-h-screen bg-gray-50"},nf={class:"mx-auto px-4 sm:px-6 lg:px-8"},rf={class:"flex justify-between h-16"},of={class:"flex"},af={class:"shrink-0 flex items-center"},sf=["src"],lf={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},cf=["href","aria-current"],df={class:"hidden sm:ml-6 sm:flex sm:items-center"},uf=["href"],ff={class:"-mr-2 flex items-center sm:hidden"},pf={class:"pt-2 pb-3 space-y-1"},mf=["href","aria-current"],hf={class:"pt-4 pb-3 border-t border-gray-200"},gf={class:"flex items-center px-4"},bf={class:"shrink-0"},yf={class:"ml-3"},wf=["textContent"],xf=["textContent"],Cf={class:"mt-3 space-y-1"},Ef=["href"],kf={class:"mx-auto sm:px-6 lg:px-8"},Df={class:"px-4 py-8 sm:px-0"},xs=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",tf,[t.createVNode(t.unref(Xl),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:s})=>[t.createElementVNode("div",nf,[t.createElementVNode("div",rf,[t.createElementVNode("div",of,[t.createElementVNode("div",af,[t.createElementVNode("img",{class:"block h-8 w-auto",src:o.iconUrl,alt:"XY Trees"},null,8,sf)]),t.createElementVNode("div",lf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,i=>(t.openBlock(),t.createElementBlock("a",{key:i.name,href:i.url,class:t.normalizeClass([e(i.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(i.url)?"page":void 0},t.toDisplayString(i.name),11,cf))),128))])]),t.createElementVNode("div",df,[t.createVNode(t.unref(xr),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Cr),{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(()=>[a[0]||(a[0]=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1)),t.createVNode(t.unref(ps),{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,i=>(t.openBlock(),t.createBlock(t.unref(kr),{key:i.name},{default:t.withCtx(({active:l})=>[t.createElementVNode("a",{href:i.url,class:t.normalizeClass([l?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(i.name),11,uf)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",ff,[t.createVNode(t.unref(Zl),{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(()=>[a[1]||(a[1]=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1)),s?(t.openBlock(),t.createBlock(t.unref(Ft),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(Ad),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(Ql),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",pf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,i=>(t.openBlock(),t.createElementBlock("a",{key:i.name,href:i.url,class:t.normalizeClass([e(i.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(i.url)?"page":void 0},t.toDisplayString(i.name),11,mf))),128))]),t.createElementVNode("div",hf,[t.createElementVNode("div",gf,[t.createElementVNode("div",bf,[t.createVNode(t.unref(ps),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",yf,[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,wf)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(o.currentUser.email)},null,8,xf)])]),t.createElementVNode("div",Cf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,i=>(t.openBlock(),t.createElementBlock("a",{key:i.name,href:i.url,class:"block px-4 py-2 text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100"},t.toDisplayString(i.name),9,Ef))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",kf,[t.createElementVNode("div",Df,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(Pn),t.createVNode(An)],64))}}),Nf=n=>n==null,Sf={clearSelection(){console.warn("clearSelection() was called on a static table, did you mean to use DynamicTable?")},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?")},selectedData:t.computed(()=>[])},Cs=(n,r,e,o=Sf)=>{const a=t.ref(r),s=t.ref(n),i=t.ref(e),l=t.computed(()=>i.value.actions.length>0),c=t.computed(()=>a.value.filter(u=>u.show??!0).map(u=>{let f="";switch((u==null?void 0:u.alignment)||"left"){case"left":f="text-left";break;case"right":f="text-right";break;case"center":f="text-center";break}return{...u,alignment:f}})),d=t.computed(()=>s.value.map((u,f)=>({actions:i.value.actions.map(p=>({...p,disabled:typeof p.disabled=="function"?p.disabled.apply(void 0,[u,f]):p.disabled,onClick:()=>p.onClick(u,f,o),show:typeof p.show=="function"?p.show.apply(void 0,[u,f]):p.show})),rowData:u,cells:c.value.map(p=>{const g=typeof p.render=="function"?p.render.apply(void 0,[u,f]):u[p.render],h=(p==null?void 0:p.classNames)||"";return{...p,isComponent:t.isVNode(g),classNames:typeof h=="function"?h.apply(void 0,[u,f]):h,val:g}})})));return{columns:c,hasActions:l,isEmptyCellValue:Nf,rows:d}},_f={key:0,class:"flex items-center space-x-2 justify-end"},vf={class:"isolate inline-flex rounded-md shadow-sm"},Vf=["disabled","onClick"],$f={class:"relative inline-flex items-center gap-x-1.5"},Hr=t.defineComponent({__name:"TableActionButtons",props:{actions:{default:()=>[]}},setup(n){const r=n,{actions:e,hasActions:o}=Ma(t.toRef(r,"actions"));return(a,s)=>t.unref(o)?(t.openBlock(),t.createElementBlock("div",_f,[t.createElementVNode("span",vf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(i,l)=>(t.openBlock(),t.createElementBlock("button",{key:l,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":l===0,"-ml-px":l>0,"rounded-r-md":l===t.unref(e).length-1}]),disabled:i.disabled,onClick:t.withModifiers(i.onClick,["stop"])},[t.createElementVNode("span",$f,[i.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.icon),{key:0,class:t.normalizeClass(["-ml-0.5 h-4 w-4 group-disabled:text-gray-300",i.label?"text-gray-400":"text-gray-600"]),"aria-hidden":"true"},null,8,["class"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(i.label),1)])],10,Vf))),128))])])):t.createCommentVNode("",!0)}}),Tf={class:"flex flex-col"},Mf={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},Bf={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},Pf={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},Af={class:"min-w-full divide-y divide-gray-200"},Rf={class:"bg-gray-100"},Of={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},If={class:"bg-white"},Lf={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},Ff={key:0},jf=["colspan"],Es=t.defineComponent({__name:"DataTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableData:{}},setup(n){const r=n,{columns:e,hasActions:o,isEmptyCellValue:a,rows:s}=Cs(t.toRef(r,"tableData"),t.toRef(r,"tableColumns"),t.toRef(r,"tableActions"));return(i,l)=>(t.openBlock(),t.createElementBlock("div",Tf,[t.createElementVNode("div",Mf,[t.createElementVNode("div",Bf,[t.createElementVNode("div",Pf,[t.createElementVNode("table",Af,[t.createElementVNode("thead",Rf,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(c,d)=>(t.openBlock(),t.createElementBlock("th",{key:d,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",Of)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",If,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),(c,d)=>(t.openBlock(),t.createElementBlock("tr",{key:d,class:"even:bg-gray-50"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.cells,(u,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",u.alignment])},{default:t.withCtx(()=>[u.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(u.classNames)},t.toDisplayString(t.unref(a)(u.val)?"-":String(u.val)),3))]),_:2},1032,["class"]))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("td",Lf,[i.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(vn),{key:0,actions:c.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Hr,{key:1,actions:c.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)]))),128)),t.unref(s).length===0?(t.openBlock(),t.createElementBlock("tr",Ff,[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,jf)])):t.createCommentVNode("",!0)])])])])])]))}}),Hf={class:"flex items-center justify-center space-x-8"},Uf={class:"font-medium"},zf={class:"flex items-center space-x-5"},qf={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},Wf={key:1,class:"relative flex items-center justify-center"},Yf={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},Kf={key:0,class:"flex shrink-0"},Gf={key:0,class:"inline-flex rounded-md shadow-sm"},Jf=["textContent"],Xf={class:"ml-3 inline-flex rounded-md shadow-sm"},Zf=["textContent"],ks=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,o=()=>{e("next")},a=()=>{e("previous")};return(s,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",Hf,[t.createElementVNode("p",Uf,"Step "+t.toDisplayString(s.step)+" of "+t.toDisplayString(s.total),1),t.createElementVNode("ul",zf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.total,l=>(t.openBlock(),t.createElementBlock("li",{key:l},[s.step>l?(t.openBlock(),t.createElementBlock("span",qf)):s.step===l?(t.openBlock(),t.createElementBlock("div",Wf,i[0]||(i[0]=[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)]))):(t.openBlock(),t.createElementBlock("span",Yf))]))),128))])]),s.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Kf,[s.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Gf,[t.createElementVNode("button",{type:"button",class:"xy-btn-secondary",onClick:a,textContent:t.toDisplayString(s.previousText)},null,8,Jf)])),t.createElementVNode("span",Xf,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:o,textContent:t.toDisplayString(s.nextText)},null,8,Zf)])]))]))}}),Qf={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},ep={key:0,class:"w-full max-w-lg lg:max-w-xs"},tp={class:"flex items-center gap-x-2"},np={class:"flex-1"},rp={key:1,class:"w-full max-w-lg lg:max-w-xs"},op={class:"flex items-center gap-x-2"},ap={class:"flex-1"},sp={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},ip={class:"min-w-full divide-y divide-gray-200"},lp={class:"bg-gray-100"},cp={key:0,scope:"col",class:"pl-6 w-4 leading-none"},dp=["checked","indeterminate"],up=["onClick"],fp={key:0},pp={key:1},mp={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},hp={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},gp={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},bp={key:1,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},yp={key:0},wp={colspan:"100%",class:"px-6 py-2.5 border-t bg-neutral-50"},xp={class:"flex items-center gap-x-3"},Cp={class:"text-sm shrink-0"},Ep={class:"font-medium"},kp={class:"font-medium"},Dp={class:"bg-white"},Np=["onClick"],Sp={key:0,class:"pl-6 w-4 leading-none"},_p=["disabled","value"],vp={key:1,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},Vp={key:0},$p=["colspan"],Tp={key:0,class:"mt-4"},Ds=t.defineComponent({__name:"DynamicTable",props:t.mergeModels({tableActions:{default:()=>({type:"dropdown",actions:[]})},tableBulkActions:{default:()=>({actions:[]})},tableColumns:{},tableOptions:{}},{selected:{required:!1,default:[]},selectedModifiers:{}}),emits:t.mergeModels(["click:row"],["update:selected"]),setup(n,{expose:r}){var zn;const e=n,o=()=>{const F={minDate:d.value.minDate||null,maxDate:d.value.maxDate||null,page:u.value.page,perPage:u.value.perPage,sort:l.value,sortDir:c.value,q:f.value};w(),pr.get(e.tableOptions.url,{skipLoader:!1},F).then(R=>{u.value={page:R.data.page,perPage:R.data.perPage,totalItems:R.data.totalItems,totalPages:R.data.totalPages},i.value=R.data.items},()=>{Lr.genericError()})},a=()=>{u.value.page=1,o()},s=()=>{if(h.value.maxRange){const F=new Date,R=F.setDate(F.getDate()-h.value.maxRange),Ze=new Date;d.value={minDate:Math.floor(R/1e3),maxDate:Math.floor(Ze.getTime()/1e3)}}},i=t.ref([]),l=t.ref(e.tableOptions.defaultSort?e.tableOptions.defaultSort:""),c=t.ref(e.tableOptions.defaultSortDirection?e.tableOptions.defaultSortDirection:"desc"),d=t.ref({minDate:0,maxDate:0}),u=t.ref({page:1,perPage:((zn=e.tableOptions)==null?void 0:zn.perPage)||10,totalItems:0,totalPages:0}),f=t.ref(""),p=F=>{F&&(u.value.page=1,d.value=F,o())},g=F=>{l.value==F?c.value=c.value==="desc"?"asc":"desc":(l.value=F,c.value="desc"),o()},h=t.computed(()=>typeof e.tableOptions.dateSearch=="object"?e.tableOptions.dateSearch:{}),y=t.computed(()=>!!zt.value.length),w=()=>{C.value=[]},C=t.useModel(n,"selected"),N=t.computed(()=>i.value.filter(F=>C.value.includes(F==null?void 0:F.id))),S=t.computed(()=>C.value.filter(F=>j.value.includes(F))),O=t.computed(()=>e.tableBulkActions.actions.filter(F=>F.show??!0).map(F=>({...F,disabled:C.value.length===0||F.disabled,onClick:()=>F.onClick.apply(void 0,[C.value,N.value,z])}))),B=t.computed(()=>O.value.length>0),j=t.computed(()=>i.value.filter(F=>F.id===void 0?!1:!!(e.tableBulkActions.isSelectable===void 0||e.tableBulkActions.isSelectable(F))).map(F=>F.id)),M=t.computed(()=>S.value.length>0&&S.value.length===j.value.length),le=t.computed(()=>S.value.length>0&&S.value.length<j.value.length),L=F=>{if(F.target.checked){C.value=j.value.map(Ze=>Ze);return}w()},z={clearSelection:w,selectedData:N,refresh:o,reset:a},{columns:te,hasActions:oe,isEmptyCellValue:fe,rows:zt}=Cs(i,t.toRef(e,"tableColumns"),t.toRef(e,"tableActions"),z);return t.watch(()=>e.tableOptions.refreshTrigger,()=>{o()}),t.watch(()=>e.tableOptions.reloadTrigger,()=>{a()}),r(z),s(),o(),(F,R)=>{var qn;const Ze=t.resolveComponent("BaseInput");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Qf,[F.tableOptions.search?(t.openBlock(),t.createElementBlock("div",ep,[R[7]||(R[7]=t.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),t.createElementVNode("div",tp,[R[6]||(R[6]=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)),t.createElementVNode("div",np,[t.createVNode(Ze,{id:"table-search",modelValue:f.value,"onUpdate:modelValue":R[0]||(R[0]=K=>f.value=K),modelModifiers:{trim:!0},type:"search",placeholder:"Search",onChange:R[1]||(R[1]=K=>a())},null,8,["modelValue"])])])])):t.createCommentVNode("",!0),F.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",rp,[R[9]||(R[9]=t.createElementVNode("label",{for:"table-date-range",class:"sr-only"},"Date Range",-1)),t.createElementVNode("div",op,[R[8]||(R[8]=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)),t.createElementVNode("div",ap,[t.createVNode(Mn,t.mergeProps({id:"table-date-range",modelValue:d.value,"onUpdate:modelValue":R[2]||(R[2]=K=>d.value=K)},{...h.value},{"onUpdate:modelValue":p}),null,16,["modelValue"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",sp,[t.createElementVNode("table",ip,[t.createElementVNode("thead",lp,[t.createElementVNode("tr",null,[B.value?(t.openBlock(),t.createElementBlock("th",cp,[t.createElementVNode("input",{class:t.normalizeClass(["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","border-gray-300 focus:ring-xy-blue-500"]),checked:M.value,indeterminate:le.value,type:"checkbox",onChange:L},null,40,dp)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(te),(K,qt)=>(t.openBlock(),t.createElementBlock("th",{key:qt,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",K.alignment])},[t.createElementVNode("div",{class:t.normalizeClass(["inline-flex items-center gap-2",{"cursor-pointer":K.sort}]),onClick:t.withModifiers(Wt=>K.sort?g(K.sort):void 0,["prevent"])},[K.title?(t.openBlock(),t.createElementBlock("span",fp,t.toDisplayString(K.title),1)):t.createCommentVNode("",!0),K.sort?(t.openBlock(),t.createElementBlock("span",pp,[l.value!==K.sort?(t.openBlock(),t.createElementBlock("svg",mp,R[10]||(R[10]=[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)]))):c.value=="desc"?(t.openBlock(),t.createElementBlock("svg",hp,R[11]||(R[11]=[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)]))):(t.openBlock(),t.createElementBlock("svg",gp,R[12]||(R[12]=[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)])))])):t.createCommentVNode("",!0)],10,up)],2))),128)),t.unref(oe)?(t.openBlock(),t.createElementBlock("th",bp)):t.createCommentVNode("",!0)]),B.value&&C.value.length>0?(t.openBlock(),t.createElementBlock("tr",yp,[t.createElementVNode("td",wp,[t.createElementVNode("div",xp,[t.createElementVNode("div",Cp,[R[13]||(R[13]=t.createTextVNode(" Selected ")),t.createElementVNode("span",Ep,t.toDisplayString(S.value.length),1),R[14]||(R[14]=t.createTextVNode(" of ")),t.createElementVNode("span",kp,t.toDisplayString(j.value.length),1)]),t.createVNode(Hr,{actions:O.value},null,8,["actions"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("tbody",Dp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(zt),(K,qt)=>{var Wt,Wn;return t.openBlock(),t.createElementBlock("tr",{key:qt,class:"even:bg-gray-50",onClick:pe=>F.$emit("click:row",K.rowData)},[B.value?(t.openBlock(),t.createElementBlock("td",Sp,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":R[3]||(R[3]=pe=>C.value=pe),class:t.normalizeClass(["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","border-gray-300 focus:ring-xy-blue-500"]),disabled:!j.value.includes((Wt=K.rowData)==null?void 0:Wt.id),type:"checkbox",value:(Wn=K.rowData)==null?void 0:Wn.id},null,8,_p),[[t.vModelCheckbox,C.value]])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(K.cells,(pe,Yt)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:Yt,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",pe.alignment])},{default:t.withCtx(()=>[pe.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(pe.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(pe.classNames)},t.toDisplayString(t.unref(fe)(pe.val)?"-":String(pe.val)),3))]),_:2},1032,["class"]))),128)),t.unref(oe)?(t.openBlock(),t.createElementBlock("td",vp,[F.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(vn),{key:0,actions:K.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Hr,{key:1,actions:K.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)],8,Np)}),128)),y.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",Vp,[t.createElementVNode("td",{colspan:t.unref(te).length+(t.unref(oe)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,$p)]))])])]),y.value?(t.openBlock(),t.createElementBlock("div",Tp,[t.createVNode(t.unref(Ur),{modelValue:u.value,"onUpdate:modelValue":[R[4]||(R[4]=K=>u.value=K),R[5]||(R[5]=K=>o())],"page-options":(qn=F.tableOptions)==null?void 0:qn.pageOptions},null,8,["modelValue","page-options"])])):t.createCommentVNode("",!0)])}}}),Mp={class:"flex flex-col items-center space-y-3.5 sm:flex-row sm:space-y-0 sm:gap-x-3 sm:justify-center"},Bp={class:"text-center text-sm text-neutral-700 sm:text-left sm:mr-auto sm:w-1/3"},Pp={class:"font-medium"},Ap={class:"font-medium"},Rp={class:"font-medium"},Op={class:"flex flex-col items-center space-y-3.5 sm:flex-row sm:space-y-0 sm:gap-x-3 sm:flex-1"},Ip={class:"flex gap-3 items-center justify-center shrink-0 md:w-1/2"},Lp=["disabled"],Fp={class:"max-w-[50px]"},jp={class:"text-sm"},Hp={class:"font-medium"},Up=["disabled"],zp={class:"max-w-[150px] sm:ml-auto"},Ur=t.defineComponent({__name:"TablePaginator",props:t.mergeModels({pageOptions:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue"),o=t.computed({get:()=>e.value.page,set:u=>{e.value={...e.value,page:u}}}),a=t.computed({get:()=>e.value.perPage,set:u=>{e.value={...e.value,page:1,perPage:u}}}),s=t.computed(()=>r.pageOptions?r.pageOptions:[{label:"5 per page",value:5},{label:"10 per page",value:10},{label:"20 per page",value:20},{label:"50 per page",value:50}]),i=Vt(u=>{u!==null&&u!==o.value&&(o.value=u)},350),l=Vt(()=>{o.value<=1||(o.value=o.value-1)},250),c=Vt(()=>{o.value>=e.value.totalPages||(o.value=o.value+1)},250),d=t.computed(()=>{const{page:u,perPage:f,totalItems:p}=e.value;return{start:p>0?(u-1)*f+1:0,end:Math.min(u*f,p)}});return(u,f)=>(t.openBlock(),t.createElementBlock("div",Mp,[t.createElementVNode("p",Bp,[f[3]||(f[3]=t.createTextVNode(" Showing ")),t.createElementVNode("span",Pp,t.toDisplayString(d.value.start),1),f[4]||(f[4]=t.createTextVNode(" to ")),t.createElementVNode("span",Ap,t.toDisplayString(d.value.end),1),f[5]||(f[5]=t.createTextVNode(" of ")),t.createElementVNode("span",Rp,t.toDisplayString(e.value.totalItems),1),f[6]||(f[6]=t.createTextVNode(" results "))]),t.createElementVNode("div",Op,[t.createElementVNode("div",Ip,[t.createElementVNode("button",{class:"xy-btn-neutral",disabled:o.value<=1,type:"button",onClick:f[0]||(f[0]=t.withModifiers(p=>o.value--,["prevent"]))},f[7]||(f[7]=[t.createTextVNode(" ← "),t.createElementVNode("span",{class:"sr-only"},"Previous",-1)]),8,Lp),t.createElementVNode("div",Fp,[t.createVNode(t.unref(Jr),{"model-value":o.value,min:1,max:e.value.totalPages,type:"number","onUpdate:modelValue":t.unref(i),onKeydown:[t.withKeys(t.withModifiers(t.unref(l),["prevent"]),["down"]),t.withKeys(t.withModifiers(t.unref(c),["prevent"]),["up"])]},null,8,["model-value","max","onUpdate:modelValue","onKeydown"])]),t.createElementVNode("div",jp,[f[8]||(f[8]=t.createTextVNode(" of ")),t.createElementVNode("span",Hp,t.toDisplayString(e.value.totalPages),1)]),t.createElementVNode("button",{class:"xy-btn-neutral",disabled:o.value>=e.value.totalPages,type:"button",onClick:f[1]||(f[1]=t.withModifiers(p=>o.value++,["prevent"]))},f[9]||(f[9]=[t.createElementVNode("span",{class:"sr-only"},"Next",-1),t.createTextVNode(" → ")]),8,Up)]),t.createElementVNode("div",zp,[t.createVNode(t.unref(Bn),{modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=p=>a.value=p),options:s.value},null,8,["modelValue","options"])])])]))}}),qp={class:"hidden sm:block"},Wp=["onClick","textContent"],Ns=t.defineComponent({__name:"Tabs",props:t.mergeModels({pillDesign:{type:Boolean,default:!1},tabs:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue"),o=(s,i)=>{let l="";return r.pillDesign?(l="px-12 py-2 font-semibold text-md leading-5 rounded-t-md focus:outline-none ",e.value===s?l=l+"focus:bg-white text-gray-700 bg-white border-b-2 border-blue-500":l=l+"text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:bg-gray-100 border border-gray-200",l):(l="px-1 py-4 text-sm font-semibold border-b-2 whitespace-nowrap leading-5 focus:outline-none ",e.value===s?l=l+"border-blue-500 text-xy-blue focus:text-blue-800 focus:border-blue-700":l=l+"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:text-gray-900 focus:border-gray-300",i&&(l=l+" ml-8"),l)},a=t.computed(()=>!r.pillDesign);return(s,i)=>{const l=t.resolveComponent("Select");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["sm:hidden",{"mb-4":s.pillDesign}])},[i[1]||(i[1]=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1)),t.createVNode(l,{modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=c=>e.value=c),name:"tabs",options:s.tabs},null,8,["modelValue","options"])],2),t.createElementVNode("div",qp,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":a.value})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[s.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.tabs,(c,d)=>(t.openBlock(),t.createElementBlock("a",{key:d,href:"#",class:t.normalizeClass(o(c.value,d>0)),onClick:t.withModifiers(u=>e.value=c.value,["prevent"]),textContent:t.toDisplayString(c.label)},null,10,Wp))),128))],2)],2)])])}}}),Yp={key:0,class:"sr-only"},Kp={class:"ml-3 mt-0.5"},Ss=t.defineComponent({inheritAttrs:!1,__name:"Toggle",props:t.mergeModels({label:{default:""},help:{default:""}},{modelValue:{type:Boolean,...J},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=t.useModel(n,"modelValue",J),e=t.useAttrs(),o=t.computed(()=>mr(e,"disabled"));return(a,s)=>(t.openBlock(),t.createBlock(t.unref(cc),{as:"div",class:"flex items-start"},{default:t.withCtx(()=>[t.createVNode(t.unref(dc),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),class:t.normalizeClass([r.value?"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},{default:t.withCtx(()=>[a.label?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Yp,"Use")),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([r.value?"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,["modelValue","class","disabled"]),t.createElementVNode("div",Kp,[a.label?(t.openBlock(),t.createBlock(t.unref(uc),{key:0},{default:t.withCtx(()=>[t.createVNode(ge,{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(fc),{key:1},{default:t.withCtx(()=>[t.createVNode(ie,{text:a.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0)])]),_:1}))}}),Gp={"aria-label":"Progress"},Jp={role:"list",class:"flex items-center"},Xp={class:"absolute inset-0 flex items-center","aria-hidden":"true"},Zp=["aria-current"],Qp={key:1,class:"h-3 w-3 rounded-full bg-xy-blue","aria-hidden":"true"},em={class:"sr-only"},tm={key:2,class:"sr-only"},_s=t.defineComponent({__name:"ProgressCircles",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let s;return r.current>a?s="complete":r.current===a?s="current":s="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:s}}));return(o,a)=>(t.openBlock(),t.createElementBlock("nav",Gp,[t.createElementVNode("ol",Jp,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(s,i)=>(t.openBlock(),t.createElementBlock("li",{key:s.name,class:t.normalizeClass([i!==e.value.length-1?"pr-8":"","relative"])},[t.createElementVNode("div",Xp,[t.createElementVNode("div",{class:t.normalizeClass(["h-0.5 w-full",s.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":s.status==="complete","border-2 border-indigo-600 bg-white":s.status==="current","border-2 border-gray-300 bg-white":s.status==="incomplete"}),"aria-current":s.status==="current"?!0:void 0},[s.status==="complete"?(t.openBlock(),t.createBlock(t.unref(Ta),{key:0,class:"h-3 w-3 text-white","aria-hidden":"true"})):s.status==="current"?(t.openBlock(),t.createElementBlock("span",Qp)):t.createCommentVNode("",!0),t.createElementVNode("span",em,t.toDisplayString(s.name),1),s.description?(t.openBlock(),t.createElementBlock("span",tm,t.toDisplayString(s.description),1)):t.createCommentVNode("",!0)],10,Zp)],2))),128))])]))}}),nm={"aria-label":"Progress"},rm={role:"list",class:"overflow-hidden"},om=["aria-current"],am={class:"flex h-9 items-center"},sm={key:1,class:"h-2.5 w-2.5 rounded-full bg-xy-blue"},im={class:"ml-4 flex min-w-0 flex-col"},lm={key:0,class:"text-sm text-gray-600"},vs=t.defineComponent({__name:"ProgressCirclesLabeled",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let s;return r.current>a?s="complete":r.current===a?s="current":s="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:s}}));return(o,a)=>(t.openBlock(),t.createElementBlock("div",nm,[t.createElementVNode("ol",rm,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(s,i)=>(t.openBlock(),t.createElementBlock("li",{key:i,class:t.normalizeClass([i!==e.value.length-1?"pb-6":"","relative"])},[i!==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",s.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":s.status==="current"?!0:void 0},[t.createElementVNode("span",am,[t.createElementVNode("span",{class:t.normalizeClass({"relative z-10 flex h-6 w-6 items-center justify-center rounded-full":!0,"bg-xy-blue ":s.status==="complete","border-2 border-xy-blue bg-white":s.status==="current","border-2 border-gray-300 bg-white":s.status==="incomplete"})},[s.status==="complete"?(t.openBlock(),t.createBlock(t.unref(Ta),{key:0,class:"h-4 w-4 text-white","aria-hidden":"true"})):s.status==="current"?(t.openBlock(),t.createElementBlock("span",sm)):t.createCommentVNode("",!0)],2)]),t.createElementVNode("span",im,[t.createElementVNode("span",{class:t.normalizeClass({"text-sm font-bold":!0,"text-gray-800":s.status==="complete","text-xy-blue":s.status==="current","text-gray-600":s.status==="incomplete","mt-2":!s.description})},t.toDisplayString(s.name),3),s.description?(t.openBlock(),t.createElementBlock("span",lm,t.toDisplayString(s.description),1)):t.createCommentVNode("",!0)])],8,om)],2))),128))])]))}}),cm=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","type"],Vs=t.defineComponent({inheritAttrs:!1,__name:"BaseInput",props:t.mergeModels(t.mergeDefaults({modelValue:{},type:{},label:{},help:{},placeholder:{}},Ae),{modelValue:{...J,set:n=>props.type==="number"?hr(n):n},modelModifiers:{}}),emits:["update:modelValue"],setup(n,{expose:r}){const e=n,o=t.useModel(n,"modelValue",{...J,set:f=>e.type==="number"?hr(f):f}),a=t.useTemplateRef("input"),{errorState:s,inputID:i,isRequired:l,onInvalid:c,inputValidation:d}=$e(e);r({input:a});const u=t.computed(()=>{switch(e.type){case"number":return{max:Number.MAX_SAFE_INTEGER,min:Number.MIN_SAFE_INTEGER};case"email":return{pattern:qo};case"tel":return{pattern:Wo};case"url":return{pattern:Yo};default:return{}}});return(f,p)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(ge,{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.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(i),ref:"input","onUpdate:modelValue":p[0]||(p[0]=g=>o.value=g),"aria-labelledby":f.label?`${t.unref(i)}-label`:void 0,"aria-describedby":f.help?`${t.unref(i)}-help`:void 0,"aria-errormessage":t.unref(s)?`${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(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"],placeholder:f.placeholder,type:f.type},{...u.value,...f.$attrs},{onInput:p[1]||(p[1]=(...g)=>t.unref(d)&&t.unref(d)(...g)),onInvalid:p[2]||(p[2]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,cm),[[t.vModelDynamic,o.value,void 0,{trim:!0}]]),t.createVNode(ie,{id:`${t.unref(i)}-help`,class:"mt-1",text:f.help},null,8,["id","text"]),t.createVNode(_e,{id:`${t.unref(i)}-error`,class:"mt-0.5",text:t.unref(s)},null,8,["id","text"])]))}}),dm={class:"relative flex items-start"},um={class:"flex items-center h-5"},fm=["id","aria-labelledby","aria-describedby","aria-errormessage","checked"],pm={class:"ml-3"},$s=t.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:t.mergeModels(t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Ae),{modelValue:{type:[Boolean,null],...J},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",J),{aria:o,inputID:a,isDisabled:s,isRequired:i,errorState:l,validate:c,onInvalid:d}=$e(r);return(u,f)=>(t.openBlock(),t.createElementBlock("div",dm,[t.createElementVNode("div",um,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":f[0]||(f[0]=p=>e.value=p),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,checked:e.value||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"},u.$attrs,{onChange:f[1]||(f[1]=(...p)=>t.unref(c)&&t.unref(c)(...p)),onInvalid:f[2]||(f[2]=(...p)=>t.unref(d)&&t.unref(d)(...p))}),null,16,fm),[[t.vModelCheckbox,e.value]])]),t.createElementVNode("div",pm,[t.createVNode(ge,{id:t.unref(o).labelledby,for:t.unref(a),label:u.label,class:t.normalizeClass(t.unref(s)?"cursor-not-allowed":"cursor-pointer"),required:t.unref(i)},null,8,["id","for","label","class","required"]),t.createVNode(ie,{id:t.unref(o).describedby,text:u.help},null,8,["id","text"]),t.createVNode(_e,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])])]))}}),mm=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],Ts=t.defineComponent({inheritAttrs:!1,__name:"DateTimeInput",props:t.mergeModels(t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Ae),{modelValue:{...J,get:n=>n&&Ko(n),set:n=>n&&new Date(n).toISOString()},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...J,get:c=>c&&Ko(c),set:c=>c&&new Date(c).toISOString()}),{errorState:o,inputID:a,isRequired:s,onInvalid:i,inputValidation:l}=$e(r);return(c,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(ge,{id:`${t.unref(a)}-label`,class:"mb-2",for:t.unref(a),label:c.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":d[0]||(d[0]=u=>e.value=u),"aria-labelledby":c.label?`${t.unref(a)}-label`:void 0,"aria-describedby":c.help?`${t.unref(a)}-help`:void 0,"aria-errormessage":t.unref(o)?`${t.unref(a)}-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:c.placeholder,type:"datetime-local"},c.$attrs,{onInput:d[1]||(d[1]=(...u)=>t.unref(l)&&t.unref(l)(...u)),onInvalid:d[2]||(d[2]=(...u)=>t.unref(i)&&t.unref(i)(...u))}),null,16,mm),[[t.vModelText,e.value]]),t.createVNode(ie,{id:`${t.unref(a)}-help`,class:"mt-1",text:c.help},null,8,["id","text"]),t.createVNode(_e,{id:`${t.unref(a)}-error`,class:"mt-0.5",text:t.unref(o)},null,8,["id","text"])]))}}),hm={key:0,class:"text-red-700/80"},kt=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",hm,"*")):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}}),gm=["aria-labelledby","aria-describedby","aria-errormessage"],bm={key:0},ym={class:"flex"},wm={class:"flex items-center h-5"},xm=["id","aria-labelledby","aria-describedby","disabled","value"],Cm={class:"ml-3"},Ms=t.defineComponent({inheritAttrs:!1,__name:"MultiCheckboxes",props:t.mergeModels(t.mergeDefaults({max:{},min:{},modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Ae),{modelValue:{...J,get:n=>Array.isArray(n)?n:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...J,get:g=>Array.isArray(g)?g:[]}),{aria:o,inputID:a,isDisabled:s,errorState:i,validate:l}=$e(r),c=t.computed(()=>r.min||null),d=t.computed(()=>r.max||null),u=t.computed(()=>{var h;const g=((h=e.value)==null?void 0:h.length)||0;return c.value!==null&&g<c.value?`Please select at least ${c.value} of these options.`:d.value!==null&&g>d.value?`Please limit your selection to ${d.value} of these options.`:c.value!==null&&d.value!==null&&(g<c.value||g>d.value)?`Please select between ${c.value} and ${d.value} of these options.`:""}),f=t.useTemplateRef("errorInput"),p=()=>{var g;i.value||(i.value=u.value,(g=f.value)==null||g.setCustomValidity(u.value))};return(g,h)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"relative space-y-6","aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage},[g.label?(t.openBlock(),t.createElementBlock("div",bm,[t.createVNode(kt,{id:t.unref(o).labelledby,label:g.label,required:!!c.value},null,8,["id","label","required"]),g.help?(t.openBlock(),t.createBlock(ie,{key:0,id:t.unref(o).describedby,class:"mt-1",tag:"p",text:g.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(_e,{id:t.unref(o).errormessage,class:"mt-1",text:t.unref(i)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",ym,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-5",{"sm:grid sm:gap-x-10":g.columns!==void 0,"sm:grid-cols-2":g.columns===2,"sm:grid-cols-3":g.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.options,(y,w)=>(t.openBlock(),t.createElementBlock("div",{key:y.value,class:"flex items-start"},[t.createElementVNode("div",wm,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:`${t.unref(a)}-${w}`,"onUpdate:modelValue":h[0]||(h[0]=C=>e.value=C),"aria-labelledby":`${t.unref(a)}-${w}-label`,"aria-describedby":y.help?`${t.unref(a)}-${w}-help`:void 0,disabled:y.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(i)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox",value:y.value,ref_for:!0},g.$attrs,{onChange:h[1]||(h[1]=(...C)=>t.unref(l)&&t.unref(l)(...C))}),null,16,xm),[[t.vModelCheckbox,e.value]])]),t.createElementVNode("div",Cm,[t.createVNode(ge,{id:`${t.unref(a)}-${w}-label`,for:`${t.unref(a)}-${w}`,label:y.label,class:t.normalizeClass(t.unref(s)||y.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(ie,{id:`${t.unref(a)}-${w}-help`,text:y.help},null,8,["id","text"])])]))),128))],2)]),u.value?(t.openBlock(),t.createElementBlock("input",{key:1,ref:"errorInput",required:"",class:"sr-only top-1 left-1","aria-hidden":"",type:"checkbox",onInvalid:p},null,544)):t.createCommentVNode("",!0)],8,gm))}});function Bs(n){const{anchorOffset:r=0,focusOffset:e=0}=n.ownerDocument.getSelection()||{},o=Math.min(r,e),a=Math.max(r,e);return[o,a]}function Em(n,[r,e]){var o,a,s,i;const l=n.ownerDocument,c=l.createRange();c.setStart(n.firstChild||n,Math.min(r,(a=(o=n.textContent)===null||o===void 0?void 0:o.length)!==null&&a!==void 0?a:0)),c.setEnd(n.lastChild||n,Math.min(e,(i=(s=n.textContent)===null||s===void 0?void 0:s.length)!==null&&i!==void 0?i:0));const d=l.getSelection();d&&(d.removeAllRanges(),d.addRange(c))}class km{constructor(r){this.element=r,this.maxLength=1/0}get value(){return this.element.innerText.replace(/\n\n$/,`
17
17
  `)}set value(r){this.element.innerHTML=r.replace(/\n$/,`
18
18
 
19
19
  `)}get selectionStart(){return Bs(this.element)[0]}get selectionEnd(){return Bs(this.element)[1]}setSelectionRange(r,e){Em(this.element,[r??0,e??0])}select(){this.setSelectionRange(0,this.value.length)}}function Dm(n){const r=new km(n);return new Proxy(n,{get(e,o){if(o in r)return r[o];const a=e[o];return typeof a=="function"?a.bind(e):a},set(e,o,a,s){return Reflect.set(o in r?r:e,o,a,s)}})}const Nm=n=>n.isContentEditable?Dm(n):n.querySelector("input,textarea")||n,zr={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"};class Sm{constructor(){this.now=null,this.past=[],this.future=[]}undo(){const r=this.past.pop();r&&this.now&&(this.future.push(this.now),this.updateElement(r,"historyUndo"))}redo(){const r=this.future.pop();r&&this.now&&(this.past.push(this.now),this.updateElement(r,"historyRedo"))}updateHistory(r){if(!this.now){this.now=r;return}const e=this.now.value!==r.value,o=this.now.selection.some((a,s)=>a!==r.selection[s]);!e&&!o||(e&&(this.past.push(this.now),this.future=[]),this.now=r)}updateElement(r,e){this.now=r,this.updateElementState(r,{inputType:e,data:null})}}function _m(n,...r){return r.every(({value:e})=>e===n.value)}function vm(n,...r){return r.every(({value:e,selection:o})=>e===n.value&&o[0]===n.selection[0]&&o[1]===n.selection[1])}function Vm({value:n,selection:r},e,o){const[a,s]=r,i=typeof o=="function"?o({value:n,selection:r}):o;return{value:n,selection:i==="replace"?[a,Math.max(a+e.length,s)]:[a,s]}}function Rn(n){return typeof n=="string"}function Ps(n,r,e,o){let a="";for(let s=r.length;s<n.length;s++){const i=n[s]||"",l=(o==null?void 0:o.value[s])===i;if(!Rn(i)||i===e&&!l)return a;a+=i}return a}function As(n,r){return Array.isArray(r)?n.length===r.length&&Array.from(n).every((e,o)=>{const a=r[o]||"";return Rn(a)?e===a:e.match(a)}):r.test(n)}function $m(n,r,e){let o=null,a=null;const s=Array.from(n.value).reduce((l,c,d)=>{const u=Ps(r,l,c,e),f=l+u,p=r[f.length]||"";return o===null&&d>=n.selection[0]&&(o=f.length),a===null&&d>=n.selection[1]&&(a=f.length),Rn(p)?f+p:c.match(p)?f+c:f},""),i=Ps(r,s,"",e);return{value:As(s+i,r)?s+i:s,selection:[o??s.length,a??s.length]}}function Tm({value:n,selection:r},e){const[o,a]=r;let s=o,i=a;const l=Array.from(n).reduce((c,d,u)=>{const f=c+d;return o===u&&(s=c.length),a===u&&(i=c.length),f.match(e)?f:c},"");return{value:l,selection:[Math.min(s,l.length),Math.min(i,l.length)]}}function On(n,r,e=null){if(As(n.value,r))return n;const{value:o,selection:a}=Array.isArray(r)?$m(n,r,e):Tm(n,r);return{selection:a,value:Array.isArray(r)?o.slice(0,r.length):o}}function Rs(n,r){if(!Array.isArray(r))return n;const[e,o]=n.selection,a=[],s=Array.from(n.value).reduce((i,l,c)=>{const d=r[c]||"";return c===e&&a.push(i.length),c===o&&a.push(i.length),Rn(d)&&d===l?i:i+l},"");return a.length<2&&a.push(...new Array(2-a.length).fill(s.length)),{value:s,selection:[a[0],a[1]]}}class qr{constructor(r,e){this.initialElementState=r,this.maskOptions=e,this.value="",this.selection=[0,0];const{value:o,selection:a}=On(this.initialElementState,this.getMaskExpression(this.initialElementState));this.value=o,this.selection=a}addCharacters([r,e],o){const{value:a,maskOptions:s}=this,i=this.getMaskExpression({value:a.slice(0,r)+o+a.slice(e),selection:[r+o.length,r+o.length]}),l={value:a,selection:[r,e]},c=Rs(l,i),[d,u]=Vm(c,o,s.overwriteMode).selection,f=c.value.slice(0,d)+o,p=f.length,g=On({value:f+c.value.slice(u),selection:[p,p]},i,l);if(a.slice(0,r)===On({value:f,selection:[p,p]},i,l).value||vm(this,g))throw new Error("Invalid mask value");this.value=g.value,this.selection=g.selection}deleteCharacters([r,e]){if(r===e||!e)return;const{value:o}=this,a=this.getMaskExpression({value:o.slice(0,r)+o.slice(e),selection:[r,r]}),s={value:o,selection:[r,e]},i=Rs(s,a),[l,c]=i.selection,d=i.value.slice(0,l)+i.value.slice(c),u=On({value:d,selection:[l,l]},a,s);this.value=u.value,this.selection=u.selection}getMaskExpression(r){const{mask:e}=this.maskOptions;return typeof e=="function"?e(r):e}}class Mm{constructor(r){this.element=r,this.listeners=[]}listen(r,e,o){const a=e;this.element.addEventListener(r,a,o),this.listeners.push(()=>this.element.removeEventListener(r,a,o))}destroy(){this.listeners.forEach(r=>r())}}const Fe={CTRL:1,ALT:2,SHIFT:4,META:8},Ht={Y:89,Z:90};function Ut(n,r,e){return n.ctrlKey===!!(r&Fe.CTRL)&&n.altKey===!!(r&Fe.ALT)&&n.shiftKey===!!(r&Fe.SHIFT)&&n.metaKey===!!(r&Fe.META)&&n.keyCode===e}function Bm(n){return Ut(n,Fe.CTRL,Ht.Y)||Ut(n,Fe.CTRL|Fe.SHIFT,Ht.Z)||Ut(n,Fe.META|Fe.SHIFT,Ht.Z)}function Pm(n){return Ut(n,Fe.CTRL,Ht.Z)||Ut(n,Fe.META,Ht.Z)}function Wr(n,r){var e;const o=n.value;if(typeof r=="string")n.value=r;else{const[a,s]=r.selection;n.value=r.value,n.matches(":focus")&&((e=n.setSelectionRange)===null||e===void 0||e.call(n,a,s))}n.value!==o&&n.dispatchEvent(new Event("input",{bubbles:!0}))}function Am({value:n,selection:r},e){const[o,a]=r;if(o!==a)return[o,a];const s=e?n.slice(o).indexOf(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xy-planning-network/trees",
3
- "version": "0.12.3",
3
+ "version": "0.12.5",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "github:xy-planning-network/trees",
@@ -75,8 +75,8 @@ const sortDir = ref(props.defaultSortDir)
75
75
 
76
76
  const loadAndRender = (): void => {
77
77
  const params: Record<string, unknown> = {
78
- maxDate: dateRange.value.maxDate,
79
- minDate: dateRange.value.minDate,
78
+ maxDate: dateRange.value.maxDate || null,
79
+ minDate: dateRange.value.minDate || null,
80
80
  page: pagination.value.page,
81
81
  perPage: pagination.value.perPage,
82
82
  q: "",
@@ -36,8 +36,8 @@ defineEmits<{
36
36
 
37
37
  const loadAndRender = (): void => {
38
38
  const params = {
39
- minDate: dateRange.value.minDate,
40
- maxDate: dateRange.value.maxDate,
39
+ minDate: dateRange.value.minDate || null,
40
+ maxDate: dateRange.value.maxDate || null,
41
41
  page: pagination.value.page,
42
42
  perPage: pagination.value.perPage,
43
43
  sort: currentSort.value,