@gemafajarramadhan/dynamic-ui 1.2.71 → 1.2.72
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/dynamic-ui.es.js +7969 -7840
- package/dist/dynamic-ui.umd.js +21 -21
- package/package.json +1 -1
package/dist/dynamic-ui.umd.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
(function(ce,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("lucide-vue-next"),require("reka-ui"),require("@vueuse/core"),require("vue-i18n"),require("@vuepic/vue-datepicker"),require("@uppy/core"),require("@uppy/dashboard"),require("@uppy/image-editor"),require("vue-router"),require("vue3-lottie")):typeof define=="function"&&define.amd?define(["exports","vue","lucide-vue-next","reka-ui","@vueuse/core","vue-i18n","@vuepic/vue-datepicker","@uppy/core","@uppy/dashboard","@uppy/image-editor","vue-router","vue3-lottie"],t):(ce=typeof globalThis<"u"?globalThis:ce||self,t(ce.DynamicUI={},ce.Vue,ce.LucideIcons,ce.rekaUi,ce.core,ce.VueI18n,ce.VueDatePicker,ce.Uppy,ce.UppyDashboard,ce.UppyImageEditor,ce.VueRouter,ce.Vue3Lottie))})(this,(function(ce,t,ne,xe,Xe,kt,Cu,_u,Di,Eu,wo,Bu){"use strict";var lN=Object.defineProperty;var cN=(ce,t,ne)=>t in ce?lN(ce,t,{enumerable:!0,configurable:!0,writable:!0,value:ne}):ce[t]=ne;var be=(ce,t,ne)=>cN(ce,typeof t!="symbol"?t+"":t,ne);var wa;function Su(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const Pt=Su(ne);let At={};function Ni(e){At={...At,...e}}function Au(){return At}function vu(){return At.apiBaseUrl?At.apiBaseUrl:typeof window<"u"&&window.__MICRO_API_BASE_URL__?window.__MICRO_API_BASE_URL__:""}function Du(){const e={"Content-Type":"application/json",Accept:"application/json"};let o=null;if(At.getAuthToken?o=At.getAuthToken():typeof window<"u"&&window.__MICRO_AUTH_TOKEN__?o=window.__MICRO_AUTH_TOKEN__:typeof localStorage<"u"&&(o=localStorage.getItem("token")||sessionStorage.getItem("token")),o&&(e.Authorization=`Bearer ${o}`),At.getHeaders){const n=At.getHeaders();return{...e,...n}}return e}function Nu(){At.onUnauthorized&&At.onUnauthorized()}async function Vu(e,o,n,r){const a=Au();if(a.apiClient)return a.apiClient(e,o||"GET",n);if(!e||!e.trim())throw new Error("[DynamicUI][useApi] URL tidak boleh kosong. Pastikan prop `endpoint.apiUrl` sudah diisi dengan benar.");const s=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],i=(o||"").trim().toUpperCase(),l=s.includes(i)?i:"GET";s.includes(i)||console.warn(`[DynamicUI][useApi] HTTP method '${o}' tidak valid, fallback ke 'GET'.`);const c=vu(),d=e.startsWith("http")?e:`${c}${e}`,f={method:l,headers:{...Du(),...r||{}}};n&&!["GET","DELETE"].includes(l)&&(n instanceof FormData?(f.body=n,f.headers&&f.headers["Content-Type"]&&delete f.headers["Content-Type"],f.headers&&f.headers["content-type"]&&delete f.headers["content-type"]):f.body=JSON.stringify(n));let u=d;if(n&&l==="GET"){const p=new URLSearchParams;Object.entries(n).forEach(([b,g])=>{g!=null&&p.append(b,String(g))});const y=p.toString();y&&(u=`${d}${d.includes("?")?"&":"?"}${y}`)}const h=await fetch(u,f);if(h.status===401&&Nu(),!h.ok){const p=await h.text();throw new Error(`HTTP ${h.status}: ${p}`)}return(h.headers.get("content-type")||"").includes("application/json")?h.json():{status:!0,data:await h.text()}}function Qe(){const e=(o,n,r,a)=>{let s=o,i=n,l=r,c=a;return a&&typeof a=="object"?(a._url&&(s=a._url,i=a._method||i||"POST",a._data&&(l={...l||{},...a._data})),a.headers&&(c=a.headers)):o&&n&&(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].includes(n.toUpperCase())||(s=`${o.endsWith("/")?o.slice(0,-1):o}/${n}`,i="POST")),Vu(s,i,l,c)};return{apiUrl:e,DCodeApi:e}}const Uo=Math.min,ht=Math.max,er=Math.round,tr=Math.floor,Ot=e=>({x:e,y:e}),Mu={left:"right",right:"left",bottom:"top",top:"bottom"};function Vi(e,o,n){return ht(e,Uo(o,n))}function yn(e,o){return typeof e=="function"?e(o):e}function io(e){return e.split("-")[0]}function xn(e){return e.split("-")[1]}function Mi(e){return e==="x"?"y":"x"}function Ti(e){return e==="y"?"height":"width"}function Ht(e){const o=e[0];return o==="t"||o==="b"?"y":"x"}function Pi(e){return Mi(Ht(e))}function Tu(e,o,n){n===void 0&&(n=!1);const r=xn(e),a=Pi(e),s=Ti(a);let i=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(i=or(i)),[i,or(i)]}function Pu(e){const o=or(e);return[Aa(e),o,Aa(o)]}function Aa(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Oi=["left","right"],Li=["right","left"],Ou=["top","bottom"],Lu=["bottom","top"];function Ru(e,o,n){switch(e){case"top":case"bottom":return n?o?Li:Oi:o?Oi:Li;case"left":case"right":return o?Ou:Lu;default:return[]}}function Iu(e,o,n,r){const a=xn(e);let s=Ru(io(e),n==="start",r);return a&&(s=s.map(i=>i+"-"+a),o&&(s=s.concat(s.map(Aa)))),s}function or(e){const o=io(e);return Mu[o]+e.slice(o.length)}function Fu(e){return{top:0,right:0,bottom:0,left:0,...e}}function zu(e){return typeof e!="number"?Fu(e):{top:e,right:e,bottom:e,left:e}}function nr(e){const{x:o,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:o,right:o+r,bottom:n+a,x:o,y:n}}function Ri(e,o,n){let{reference:r,floating:a}=e;const s=Ht(o),i=Pi(o),l=Ti(i),c=io(o),d=s==="y",f=r.x+r.width/2-a.width/2,u=r.y+r.height/2-a.height/2,h=r[l]/2-a[l]/2;let m;switch(c){case"top":m={x:f,y:r.y-a.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-a.width,y:u};break;default:m={x:r.x,y:r.y}}switch(xn(o)){case"start":m[i]-=h*(n&&d?-1:1);break;case"end":m[i]+=h*(n&&d?-1:1);break}return m}async function $u(e,o){var n;o===void 0&&(o={});const{x:r,y:a,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:m=0}=yn(o,e),p=zu(m),b=l[h?u==="floating"?"reference":"floating":u],g=nr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),_=u==="floating"?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),B=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},A=nr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:E,strategy:c}):_);return{top:(g.top-A.top+p.top)/B.y,bottom:(A.bottom-g.bottom+p.bottom)/B.y,left:(g.left-A.left+p.left)/B.x,right:(A.right-g.right+p.right)/B.x}}const ju=50,Uu=async(e,o,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:$u},c=await(i.isRTL==null?void 0:i.isRTL(o));let d=await i.getElementRects({reference:e,floating:o,strategy:a}),{x:f,y:u}=Ri(d,r,c),h=r,m=0;const p={};for(let y=0;y<s.length;y++){const b=s[y];if(!b)continue;const{name:g,fn:_}=b,{x:E,y:B,data:A,reset:C}=await _({x:f,y:u,initialPlacement:r,placement:h,strategy:a,middlewareData:p,rects:d,platform:l,elements:{reference:e,floating:o}});f=E??f,u=B??u,p[g]={...p[g],...A},C&&m<ju&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(d=C.rects===!0?await i.getElementRects({reference:e,floating:o,strategy:a}):C.rects),{x:f,y:u}=Ri(d,h,c)),y=-1)}return{x:f,y:u,placement:h,strategy:a,middlewareData:p}},Wu=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(o){var n,r;const{placement:a,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:d}=o,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:y=!0,...b}=yn(e,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=io(a),_=Ht(l),E=io(l)===l,B=await(c.isRTL==null?void 0:c.isRTL(d.floating)),A=h||(E||!y?[or(l)]:Pu(l)),C=p!=="none";!h&&C&&A.push(...Iu(l,y,p,B));const x=[l,...A],w=await c.detectOverflow(o,b),D=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&D.push(w[g]),u){const V=Tu(a,i,B);D.push(w[V[0]],w[V[1]])}if(k=[...k,{placement:a,overflows:D}],!D.every(V=>V<=0)){var v,S;const V=(((v=s.flip)==null?void 0:v.index)||0)+1,L=x[V];if(L&&(!(u==="alignment"?_!==Ht(L):!1)||k.every(R=>Ht(R.placement)===_?R.overflows[0]>0:!0)))return{data:{index:V,overflows:k},reset:{placement:L}};let O=(S=k.filter(P=>P.overflows[0]<=0).sort((P,R)=>P.overflows[1]-R.overflows[1])[0])==null?void 0:S.placement;if(!O)switch(m){case"bestFit":{var N;const P=(N=k.filter(R=>{if(C){const j=Ht(R.placement);return j===_||j==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(j=>j>0).reduce((j,M)=>j+M,0)]).sort((R,j)=>R[1]-j[1])[0])==null?void 0:N[0];P&&(O=P);break}case"initialPlacement":O=l;break}if(a!==O)return{reset:{placement:O}}}return{}}}},Hu=new Set(["left","top"]);async function qu(e,o){const{placement:n,platform:r,elements:a}=e,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),i=io(n),l=xn(n),c=Ht(n)==="y",d=Hu.has(i)?-1:1,f=s&&c?-1:1,u=yn(o,e);let{mainAxis:h,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof p=="number"&&(m=l==="end"?p*-1:p),c?{x:m*f,y:h*d}:{x:h*d,y:m*f}}const Gu=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(o){var n,r;const{x:a,y:s,placement:i,middlewareData:l}=o,c=await qu(o,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:s+c.y,data:{...c,placement:i}}}}},Ku=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(o){const{x:n,y:r,placement:a,platform:s}=o,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:g=>{let{x:_,y:E}=g;return{x:_,y:E}}},...d}=yn(e,o),f={x:n,y:r},u=await s.detectOverflow(o,d),h=Ht(io(a)),m=Mi(h);let p=f[m],y=f[h];if(i){const g=m==="y"?"top":"left",_=m==="y"?"bottom":"right",E=p+u[g],B=p-u[_];p=Vi(E,p,B)}if(l){const g=h==="y"?"top":"left",_=h==="y"?"bottom":"right",E=y+u[g],B=y-u[_];y=Vi(E,y,B)}const b=c.fn({...o,[m]:p,[h]:y});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:i,[h]:l}}}}}},Xu=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(o){var n,r;const{placement:a,rects:s,platform:i,elements:l}=o,{apply:c=()=>{},...d}=yn(e,o),f=await i.detectOverflow(o,d),u=io(a),h=xn(a),m=Ht(a)==="y",{width:p,height:y}=s.floating;let b,g;u==="top"||u==="bottom"?(b=u,g=h===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(g=u,b=h==="end"?"top":"bottom");const _=y-f.top-f.bottom,E=p-f.left-f.right,B=Uo(y-f[b],_),A=Uo(p-f[g],E),C=!o.middlewareData.shift;let x=B,w=A;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(w=E),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(x=_),C&&!h){const k=ht(f.left,0),v=ht(f.right,0),S=ht(f.top,0),N=ht(f.bottom,0);m?w=p-2*(k!==0||v!==0?k+v:ht(f.left,f.right)):x=y-2*(S!==0||N!==0?S+N:ht(f.top,f.bottom))}await c({...o,availableWidth:w,availableHeight:x});const D=await i.getDimensions(l.floating);return p!==D.width||y!==D.height?{reset:{rects:!0}}:{}}}};function rr(){return typeof window<"u"}function Co(e){return va(e)?(e.nodeName||"").toLowerCase():"#document"}function mt(e){var o;return(e==null||(o=e.ownerDocument)==null?void 0:o.defaultView)||window}function Lt(e){var o;return(o=(va(e)?e.ownerDocument:e.document)||window.document)==null?void 0:o.documentElement}function va(e){return rr()?e instanceof Node||e instanceof mt(e).Node:!1}function vt(e){return rr()?e instanceof Element||e instanceof mt(e).Element:!1}function qt(e){return rr()?e instanceof HTMLElement||e instanceof mt(e).HTMLElement:!1}function Ii(e){return!rr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mt(e).ShadowRoot}function kn(e){const{overflow:o,overflowX:n,overflowY:r,display:a}=Dt(e);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&a!=="inline"&&a!=="contents"}function Yu(e){return/^(table|td|th)$/.test(Co(e))}function ar(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ju=/transform|translate|scale|rotate|perspective|filter/,Qu=/paint|layout|strict|content/,_o=e=>!!e&&e!=="none";let Da;function Na(e){const o=vt(e)?Dt(e):e;return _o(o.transform)||_o(o.translate)||_o(o.scale)||_o(o.rotate)||_o(o.perspective)||!Va()&&(_o(o.backdropFilter)||_o(o.filter))||Ju.test(o.willChange||"")||Qu.test(o.contain||"")}function Zu(e){let o=lo(e);for(;qt(o)&&!Wo(o);){if(Na(o))return o;if(ar(o))return null;o=lo(o)}return null}function Va(){return Da==null&&(Da=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Da}function Wo(e){return/^(html|body|#document)$/.test(Co(e))}function Dt(e){return mt(e).getComputedStyle(e)}function sr(e){return vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function lo(e){if(Co(e)==="html")return e;const o=e.assignedSlot||e.parentNode||Ii(e)&&e.host||Lt(e);return Ii(o)?o.host:o}function Fi(e){const o=lo(e);return Wo(o)?e.ownerDocument?e.ownerDocument.body:e.body:qt(o)&&kn(o)?o:Fi(o)}function wn(e,o,n){var r;o===void 0&&(o=[]),n===void 0&&(n=!0);const a=Fi(e),s=a===((r=e.ownerDocument)==null?void 0:r.body),i=mt(a);if(s){const l=Ma(i);return o.concat(i,i.visualViewport||[],kn(a)?a:[],l&&n?wn(l):[])}else return o.concat(a,wn(a,[],n))}function Ma(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zi(e){const o=Dt(e);let n=parseFloat(o.width)||0,r=parseFloat(o.height)||0;const a=qt(e),s=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=er(n)!==s||er(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function Ta(e){return vt(e)?e:e.contextElement}function Ho(e){const o=Ta(e);if(!qt(o))return Ot(1);const n=o.getBoundingClientRect(),{width:r,height:a,$:s}=zi(o);let i=(s?er(n.width):n.width)/r,l=(s?er(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const eh=Ot(0);function $i(e){const o=mt(e);return!Va()||!o.visualViewport?eh:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function th(e,o,n){return o===void 0&&(o=!1),!n||o&&n!==mt(e)?!1:o}function Eo(e,o,n,r){o===void 0&&(o=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=Ta(e);let i=Ot(1);o&&(r?vt(r)&&(i=Ho(r)):i=Ho(e));const l=th(s,n,r)?$i(s):Ot(0);let c=(a.left+l.x)/i.x,d=(a.top+l.y)/i.y,f=a.width/i.x,u=a.height/i.y;if(s){const h=mt(s),m=r&&vt(r)?mt(r):r;let p=h,y=Ma(p);for(;y&&r&&m!==p;){const b=Ho(y),g=y.getBoundingClientRect(),_=Dt(y),E=g.left+(y.clientLeft+parseFloat(_.paddingLeft))*b.x,B=g.top+(y.clientTop+parseFloat(_.paddingTop))*b.y;c*=b.x,d*=b.y,f*=b.x,u*=b.y,c+=E,d+=B,p=mt(y),y=Ma(p)}}return nr({width:f,height:u,x:c,y:d})}function ir(e,o){const n=sr(e).scrollLeft;return o?o.left+n:Eo(Lt(e)).left+n}function ji(e,o){const n=e.getBoundingClientRect(),r=n.left+o.scrollLeft-ir(e,n),a=n.top+o.scrollTop;return{x:r,y:a}}function oh(e){let{elements:o,rect:n,offsetParent:r,strategy:a}=e;const s=a==="fixed",i=Lt(r),l=o?ar(o.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},d=Ot(1);const f=Ot(0),u=qt(r);if((u||!u&&!s)&&((Co(r)!=="body"||kn(i))&&(c=sr(r)),u)){const m=Eo(r);d=Ho(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const h=i&&!u&&!s?ji(i,c):Ot(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-c.scrollTop*d.y+f.y+h.y}}function nh(e){return Array.from(e.getClientRects())}function rh(e){const o=Lt(e),n=sr(e),r=e.ownerDocument.body,a=ht(o.scrollWidth,o.clientWidth,r.scrollWidth,r.clientWidth),s=ht(o.scrollHeight,o.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ir(e);const l=-n.scrollTop;return Dt(r).direction==="rtl"&&(i+=ht(o.clientWidth,r.clientWidth)-a),{width:a,height:s,x:i,y:l}}const Ui=25;function ah(e,o){const n=mt(e),r=Lt(e),a=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){s=a.width,i=a.height;const f=Va();(!f||f&&o==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}const d=ir(r);if(d<=0){const f=r.ownerDocument,u=f.body,h=getComputedStyle(u),m=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(r.clientWidth-u.clientWidth-m);p<=Ui&&(s-=p)}else d<=Ui&&(s+=d);return{width:s,height:i,x:l,y:c}}function sh(e,o){const n=Eo(e,!0,o==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,s=qt(e)?Ho(e):Ot(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=a*s.x,d=r*s.y;return{width:i,height:l,x:c,y:d}}function Wi(e,o,n){let r;if(o==="viewport")r=ah(e,n);else if(o==="document")r=rh(Lt(e));else if(vt(o))r=sh(o,n);else{const a=$i(e);r={x:o.x-a.x,y:o.y-a.y,width:o.width,height:o.height}}return nr(r)}function Hi(e,o){const n=lo(e);return n===o||!vt(n)||Wo(n)?!1:Dt(n).position==="fixed"||Hi(n,o)}function ih(e,o){const n=o.get(e);if(n)return n;let r=wn(e,[],!1).filter(l=>vt(l)&&Co(l)!=="body"),a=null;const s=Dt(e).position==="fixed";let i=s?lo(e):e;for(;vt(i)&&!Wo(i);){const l=Dt(i),c=Na(i);!c&&l.position==="fixed"&&(a=null),(s?!c&&!a:!c&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||kn(i)&&!c&&Hi(e,i))?r=r.filter(f=>f!==i):a=l,i=lo(i)}return o.set(e,r),r}function lh(e){let{element:o,boundary:n,rootBoundary:r,strategy:a}=e;const i=[...n==="clippingAncestors"?ar(o)?[]:ih(o,this._c):[].concat(n),r],l=Wi(o,i[0],a);let c=l.top,d=l.right,f=l.bottom,u=l.left;for(let h=1;h<i.length;h++){const m=Wi(o,i[h],a);c=ht(m.top,c),d=Uo(m.right,d),f=Uo(m.bottom,f),u=ht(m.left,u)}return{width:d-u,height:f-c,x:u,y:c}}function ch(e){const{width:o,height:n}=zi(e);return{width:o,height:n}}function dh(e,o,n){const r=qt(o),a=Lt(o),s=n==="fixed",i=Eo(e,!0,s,o);let l={scrollLeft:0,scrollTop:0};const c=Ot(0);function d(){c.x=ir(a)}if(r||!r&&!s)if((Co(o)!=="body"||kn(a))&&(l=sr(o)),r){const m=Eo(o,!0,s,o);c.x=m.x+o.clientLeft,c.y=m.y+o.clientTop}else a&&d();s&&!r&&a&&d();const f=a&&!r&&!s?ji(a,l):Ot(0),u=i.left+l.scrollLeft-c.x-f.x,h=i.top+l.scrollTop-c.y-f.y;return{x:u,y:h,width:i.width,height:i.height}}function Pa(e){return Dt(e).position==="static"}function qi(e,o){if(!qt(e)||Dt(e).position==="fixed")return null;if(o)return o(e);let n=e.offsetParent;return Lt(e)===n&&(n=n.ownerDocument.body),n}function Gi(e,o){const n=mt(e);if(ar(e))return n;if(!qt(e)){let a=lo(e);for(;a&&!Wo(a);){if(vt(a)&&!Pa(a))return a;a=lo(a)}return n}let r=qi(e,o);for(;r&&Yu(r)&&Pa(r);)r=qi(r,o);return r&&Wo(r)&&Pa(r)&&!Na(r)?n:r||Zu(e)||n}const fh=async function(e){const o=this.getOffsetParent||Gi,n=this.getDimensions,r=await n(e.floating);return{reference:dh(e.reference,await o(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uh(e){return Dt(e).direction==="rtl"}const hh={convertOffsetParentRelativeRectToViewportRelativeRect:oh,getDocumentElement:Lt,getClippingRect:lh,getOffsetParent:Gi,getElementRects:fh,getClientRects:nh,getDimensions:ch,getScale:Ho,isElement:vt,isRTL:uh};function Ki(e,o){return e.x===o.x&&e.y===o.y&&e.width===o.width&&e.height===o.height}function mh(e,o){let n=null,r;const a=Lt(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const d=e.getBoundingClientRect(),{left:f,top:u,width:h,height:m}=d;if(l||o(),!h||!m)return;const p=tr(u),y=tr(a.clientWidth-(f+h)),b=tr(a.clientHeight-(u+m)),g=tr(f),E={rootMargin:-p+"px "+-y+"px "+-b+"px "+-g+"px",threshold:ht(0,Uo(1,c))||1};let B=!0;function A(C){const x=C[0].intersectionRatio;if(x!==c){if(!B)return i();x?i(!1,x):r=setTimeout(()=>{i(!1,1e-7)},1e3)}x===1&&!Ki(d,e.getBoundingClientRect())&&i(),B=!1}try{n=new IntersectionObserver(A,{...E,root:a.ownerDocument})}catch{n=new IntersectionObserver(A,E)}n.observe(e)}return i(!0),s}function Oa(e,o,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=Ta(e),f=a||s?[...d?wn(d):[],...o?wn(o):[]]:[];f.forEach(g=>{a&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const u=d&&l?mh(d,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(g=>{let[_]=g;_&&_.target===d&&m&&o&&(m.unobserve(o),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(o)})),n()}),d&&!c&&m.observe(d),o&&m.observe(o));let p,y=c?Eo(e):null;c&&b();function b(){const g=Eo(e);y&&!Ki(y,g)&&n(),y=g,p=requestAnimationFrame(b)}return n(),()=>{var g;f.forEach(_=>{a&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),u==null||u(),(g=m)==null||g.disconnect(),m=null,c&&cancelAnimationFrame(p)}}const La=Gu,Ra=Ku,Ia=Wu,Fa=Xu,ph=(e,o,n)=>{const r=new Map,a={platform:hh,...n},s={...a.platform,_c:r};return Uu(e,o,{...a,platform:s})};function gh(e){return e!=null&&typeof e=="object"&&"$el"in e}function Xi(e){if(gh(e)){const o=e.$el;return va(o)&&Co(o)==="#comment"?null:o}return e}function Cn(e){return typeof e=="function"?e():t.unref(e)}function Yi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ji(e,o){const n=Yi(e);return Math.round(o*n)/n}function za(e,o,n){n===void 0&&(n={});const r=n.whileElementsMounted,a=t.computed(()=>{var x;return(x=Cn(n.open))!=null?x:!0}),s=t.computed(()=>Cn(n.middleware)),i=t.computed(()=>{var x;return(x=Cn(n.placement))!=null?x:"bottom"}),l=t.computed(()=>{var x;return(x=Cn(n.strategy))!=null?x:"absolute"}),c=t.computed(()=>{var x;return(x=Cn(n.transform))!=null?x:!0}),d=t.computed(()=>Xi(e.value)),f=t.computed(()=>Xi(o.value)),u=t.ref(0),h=t.ref(0),m=t.ref(l.value),p=t.ref(i.value),y=t.shallowRef({}),b=t.ref(!1),g=t.computed(()=>{const x={position:m.value,left:"0",top:"0"};if(!f.value)return x;const w=Ji(f.value,u.value),D=Ji(f.value,h.value);return c.value?{...x,transform:"translate("+w+"px, "+D+"px)",...Yi(f.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:w+"px",top:D+"px"}});let _;function E(){if(d.value==null||f.value==null)return;const x=a.value;ph(d.value,f.value,{middleware:s.value,placement:i.value,strategy:l.value}).then(w=>{u.value=w.x,h.value=w.y,m.value=w.strategy,p.value=w.placement,y.value=w.middlewareData,b.value=x!==!1})}function B(){typeof _=="function"&&(_(),_=void 0)}function A(){if(B(),r===void 0){E();return}if(d.value!=null&&f.value!=null){_=r(d.value,f.value,E);return}}function C(){a.value||(b.value=!1)}return t.watch([s,i,l,a],E,{flush:"sync"}),t.watch([d,f],A,{flush:"sync"}),t.watch(a,C,{flush:"sync"}),t.getCurrentScope()&&t.onScopeDispose(B),{x:t.shallowReadonly(u),y:t.shallowReadonly(h),strategy:t.shallowReadonly(m),placement:t.shallowReadonly(p),middlewareData:t.shallowReadonly(y),isPositioned:t.shallowReadonly(b),floatingStyles:g,update:E}}const bh=["aria-busy"],yh={key:0,class:"mb-1 h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},xh=["for"],kh={key:0,class:"ml-1 text-destructive"},wh={class:"relative"},Ch={key:0,class:"flex items-center text-gray-500 gap-2"},_h=["id","placeholder","disabled","readonly","value"],Eh={key:1,class:"h-6 w-6 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},Bh=["disabled"],Sh={class:"overflow-y-auto overflow-x-hidden",style:{"max-height":"350px"}},Ah=["onMouseenter","onClick"],vh={key:0},Dh={class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},Nh={key:0},Vh={key:1},Mh={key:2},Th={key:1,class:"mt-1 text-xs text-red-600"},lr=t.defineComponent({name:"DCodeAutoComplete",inheritAttrs:!1,__name:"DCodeAutoComplete",props:{modelValue:{},apiModule:{},apiAction:{},apiOptions:{},autoFetchOnOpen:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},skeleton:{type:Boolean,default:!1},error:{default:null},errorMessage:{default:null},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},returnObject:{type:Boolean,default:!1},endpoint:{},apiParams:{default:()=>({})},fetchItems:{},icon:{}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,a=t.useAttrs(),s=t.computed(()=>a.label??void 0),i=q=>{const se=a[q];return se===""||se===!0||se==="true"||se===1||se==="1"},l=t.ref(!1),c=t.computed(()=>n.itemTitle||a["item-title"]||a.itemTitle||"name"),d=t.computed(()=>n.itemValue||a["item-value"]||a.itemValue||"id"),f=t.computed(()=>n.disabled),u=t.computed(()=>i("required")),h=t.computed(()=>n.readonly||i("readonly")),m=t.computed(()=>n.returnObject||i("return-object")||i("returnObject")),p=t.computed(()=>u.value||i("aria-required")),y=t.computed(()=>n.error||n.errorMessage||a["error-message"]),b=t.computed(()=>a.placeholder??""),g=t.computed(()=>{const q=a.minChars??a["min-chars"];if(q==null||q==="")return 0;const se=typeof q=="number"?q:Number.parseInt(String(q),10);return Number.isFinite(se)&&se>0?se:0}),_=t.computed(()=>{const q=a.rules;return Array.isArray(q)?q:[]}),E=t.computed(()=>{const q=a.id||a.label;return q?`app-autocomplete-${q}-${Math.random().toString(36).slice(2,7)}`:void 0}),B=t.ref(n.modelValue),A=t.ref([]),C=t.ref(!1),x=t.ref(!1),w=t.computed(()=>a.items),D=t.computed(()=>{const q=V.value;return q.apiModule&&q.apiAction||q.apiUrl||n.fetchItems?A.value:w.value??[]}),k=t.computed(()=>!!a.loading),v=t.computed(()=>k.value||C.value),S=t.computed(()=>{const{label:q,items:se,loading:de,rules:oe,"item-title":le,"item-value":G,itemTitle:ee,itemValue:ae,minChars:ye,"min-chars":Ge,clearable:Tt,required:nu,"aria-required":ru,disabled:Ut,readonly:bn,visible:au,"return-object":su,returnObject:nt,class:Ca,"fetch-items":iu,fetchItems:lu,error:_i,errorMessage:cu,"error-message":Ei,...Zn}=a||{};return Zn}),N=()=>{if(n.apiOptions)return typeof n.apiOptions=="function"?n.apiOptions():n.apiOptions},V=t.computed(()=>{const q=n.endpoint||{};return{apiModule:n.apiModule||q.apiModule,apiAction:n.apiAction||q.apiAction,apiUrl:q.apiUrl,apiMethod:q.apiMethod||"GET"}}),L=t.ref(null),O=t.ref(null),P=t.ref(null),{floatingStyles:R}=za(O,P,{placement:"bottom-start",whileElementsMounted:Oa,middleware:[La(4),Ia(),Ra(),Fa({apply({rects:q,elements:se,availableHeight:de}){Object.assign(se.floating.style,{width:`${q.reference.width}px`,maxHeight:`${de}px`})}})]}),j=t.ref(!1),M=t.ref(""),I=t.ref(-1),K=t.ref(null),H=t.computed(()=>!g.value||(M.value||"").trim().length>=g.value?"":`Ketik minimal ${g.value} karakter`),W=q=>{if(q==null)return"";if(typeof q=="string"||typeof q=="number")return String(q);const se=c.value;return typeof se=="function"?se(q):(q==null?void 0:q[se])??(q==null?void 0:q.name)??(q==null?void 0:q.nama)??(q==null?void 0:q.label)??(q==null?void 0:q.title)??"-"},Z=q=>{if(q==null)return null;if(typeof q=="string"||typeof q=="number")return q;const se=d.value;return typeof se=="function"?se(q):(q==null?void 0:q[se])??(q==null?void 0:q.id)??(q==null?void 0:q.value)??(q==null?void 0:q.code)??null},te=t.computed(()=>{const q=B.value;if(q==null||q==="")return"";if(Array.isArray(q))return q.length?q.map(oe=>{if(m.value&&typeof oe=="object"||typeof oe=="object")return W(oe);const le=D.value.find(G=>Z(G)==oe);return le?W(le):String(oe)}).join(", "):"";if(typeof q=="object")return W(q);const se=D.value.find(de=>Z(de)==q);return se?W(se):String(q)}),ie=t.computed(()=>{const q=D.value||[],se=(M.value||"").trim().toLowerCase(),de=(te.value||"").toLowerCase(),oe=!se||se===de;let le=q;if(oe||(le=q.filter(G=>W(G).toLowerCase().includes(se))),le.length>0){const G=ee=>{const ae=Z(ee);return Array.isArray(B.value)?B.value.some(ye=>ye==ae):B.value==ae};le=[...le].sort((ee,ae)=>{const ye=G(ee),Ge=G(ae);return ye&&!Ge?-1:!ye&&Ge?1:0})}return le}),Ae=q=>Array.isArray(q)?q.length===0:q==null||q==="",ke=q=>{if(K.value=null,u.value&&Ae(q)&&!_.value.length)return K.value="This field is required",!1;for(const se of _.value){const de=se(q);if(de===!1)return K.value="Invalid value",!1;if(typeof de=="string")return K.value=de,!1}return!0},J=async()=>{if(f.value||h.value)return;j.value=!0,I.value=ie.value.length?0:-1,M.value=te.value||"";const q=V.value,se=q.apiModule&&q.apiAction||q.apiUrl||n.fetchItems;n.autoFetchOnOpen&&se&&!x.value&&(await We(),I.value=ie.value.length?0:-1)},$=()=>{j.value=!1,I.value=-1,M.value=te.value||""},X=q=>{const se=m.value?q:Z(q);let de=se;Array.isArray(B.value)&&(de=[se]),B.value=de,r("update:modelValue",de),K.value=null,ke(de),M.value=W(q),$()},re=()=>{A.value=[],x.value=!1,B.value=Array.isArray(B.value)?[]:null,r("update:modelValue",B.value),M.value="",K.value=null},me=()=>{l.value=!0,re(),$(),setTimeout(()=>{l.value=!1},0)},De=q=>{if(f.value||h.value)return;const se=q.target.value;M.value=se,K.value&&(K.value=null),j.value||(j.value=!0),I.value=ie.value.length?0:-1;const de=V.value.apiModule&&V.value.apiAction||V.value.apiUrl||n.fetchItems;n.autoFetchOnOpen&&de&&!v.value&&!x.value&&We()},Ee=q=>{var de;if(f.value||h.value)return;const se={ArrowDown:()=>{if(q.preventDefault(),!j.value){J();return}ie.value.length&&(I.value=Math.min(I.value+1,ie.value.length-1))},ArrowUp:()=>{!j.value||!ie.value.length||(q.preventDefault(),I.value=Math.max(I.value-1,0))},Enter:()=>{if(!j.value)return;q.preventDefault();const oe=ie.value[I.value];oe&&X(oe)},Escape:()=>{q.preventDefault(),$()},Tab:()=>{$()}};(de=se[q.key])==null||de.call(se)},We=async()=>{const q=V.value;if(q.apiModule&&q.apiAction||q.apiUrl||n.fetchItems){C.value=!0;try{let de;if(n.fetchItems){const oe=N()||{},le={page:1,perPage:100,search:(M.value||"").trim(),...oe,...n.apiParams},G=await n.fetchItems(le),ee=(G==null?void 0:G.data)??G;de=(ee==null?void 0:ee.data)??ee}else{const le=Qe().DCodeApi;if(typeof le!="function"){console.error("[DCodeAutoComplete] useApi() must expose DCodeApi()");return}const ee={page:1,perPage:100,...N()||{},...n.apiParams};let ae;q.apiUrl?ae=await le("","",ee,{_url:q.apiUrl,_method:q.apiMethod||"POST"}):ae=await le(q.apiModule,q.apiAction,ee);const ye=(ae==null?void 0:ae.data)??ae;de=(ye==null?void 0:ye.data)??ye}A.value=Array.isArray(de)?de:[],x.value=!0}catch(de){console.error("[DCodeAutoComplete][fetchOptions] ERROR:",de),K.value=`[DCodeAutoComplete][fetchOptions] ERROR: Error: ${(de==null?void 0:de.message)||(de==null?void 0:de.toString())||"Failed to load options"}`,A.value=[],x.value=!0}finally{C.value=!1}}},Te=q=>{const se=Z(q);return m.value?B.value?Array.isArray(B.value)?B.value.some(de=>Z(de)==se):Z(B.value)==se:!1:Array.isArray(B.value)?B.value.some(de=>de==se):B.value==se};t.watch(()=>[N(),V.value,n.apiParams],([q,se,de],[oe,le,G])=>{const ee=V.value;if(!(ee.apiModule&&ee.apiAction||ee.apiUrl||n.fetchItems)){re();return}const ye=JSON.stringify(q??null)===JSON.stringify(oe??null),Ge=JSON.stringify(de??null)===JSON.stringify(G??null);ye&&Ge||(re(),Ge||We())},{deep:!0}),t.watch(()=>n.modelValue,(q,se)=>{B.value=q,!l.value&&(q==null||q==="")&&se!=null&&n.apiModule&&n.apiAction&&(A.value=[],x.value=!1),M.value=te.value||""},{immediate:!0});const he=V.value;(he.apiModule&&he.apiAction||he.apiUrl||n.fetchItems)&&(n.autoFetchOnMount||!Ae(n.modelValue))&&We();const Pe=q=>{const se=L.value,de=P.value,oe=q.target;se&&se.contains(oe)||de&&de.contains(oe)||j.value&&$()},Be=t.computed(()=>{const q=n.modelValue;return q==null?!1:typeof q=="string"?q.trim().length>0:Array.isArray(q)?q.length>0:typeof q=="object"?Object.keys(q).length>0:!0}),Fe=t.computed(()=>!!n.clearable&&Be.value&&!n.disabled);return t.onMounted(()=>{document.addEventListener("mousedown",Pe)}),t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",Pe)}),(q,se)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref_key:"rootEl",ref:L,class:t.normalizeClass(["w-full",[t.unref(a).class,f.value?"cursor-not-allowed":""]]),"aria-busy":e.skeleton},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.value?(t.openBlock(),t.createElementBlock("div",yh)):t.createCommentVNode("",!0),se[6]||(se[6]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:E.value,class:"mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"},[t.createTextVNode(t.toDisplayString(s.value)+" ",1),p.value?(t.openBlock(),t.createElementBlock("span",kh,"*")):t.createCommentVNode("",!0)],8,xh)):t.createCommentVNode("",!0),t.createElementVNode("div",wh,[t.createElementVNode("div",{ref_key:"reference",ref:O,class:t.normalizeClass(["flex items-center gap-2 rounded-lg border px-3 py-2 bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 h-10 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",[f.value||h.value?"opacity-60 cursor-not-allowed":"",K.value||y.value?"border-red-500 focus-within:ring-red-500":""]])},[n.icon||q.$slots["prepend-inner"]?(t.openBlock(),t.createElementBlock("div",Ch,[t.renderSlot(q.$slots,"prepend-inner",{},()=>[n.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps(S.value,{id:E.value,type:"text",class:["w-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",f.value||h.value?"cursor-not-allowed":"cursor-text"],placeholder:b.value,disabled:f.value,readonly:h.value,value:j.value?M.value:te.value||M.value,onFocus:se[0]||(se[0]=()=>{j.value||J()}),onClick:se[1]||(se[1]=()=>{j.value||J()}),onInput:De,onKeydown:Ee,onBlur:se[2]||(se[2]=()=>ke(B.value))}),null,16,_h),v.value?(t.openBlock(),t.createElementBlock("svg",Eh,[...se[7]||(se[7]=[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):Fe.value?(t.openBlock(),t.createElementBlock("button",{key:2,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onMousedown:se[3]||(se[3]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(me,["stop"]),"aria-label":"Clear"}," ✕ ",32)):(t.openBlock(),t.createElementBlock("button",{key:3,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",disabled:f.value||h.value,onClick:se[4]||(se[4]=de=>j.value?$():J()),"aria-label":"Toggle"},[t.createVNode(t.unref(ne.ChevronDown),{class:t.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":j.value}])},null,8,["class"])],8,Bh))],2),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[j.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"floating",ref:P,style:t.normalizeStyle(t.unref(R)),class:"z-[50] overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[t.createElementVNode("div",Sh,[ie.value.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(ie.value,(de,oe)=>(t.openBlock(),t.createElementBlock("button",{key:Z(de)??oe,type:"button",class:t.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",oe===I.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:le=>I.value=oe,onMousedown:se[5]||(se[5]=t.withModifiers(()=>{},["prevent"])),onClick:le=>X(de)},[t.createTextVNode(t.toDisplayString(W(de))+" ",1),Te(de)?(t.openBlock(),t.createElementBlock("span",vh," ✓ ")):t.createCommentVNode("",!0)],42,Ah))),128)):t.renderSlot(q.$slots,"no-data",{key:1},()=>[t.createElementVNode("div",Dh,[v.value?(t.openBlock(),t.createElementBlock("span",Nh,"Loading data…")):H.value?(t.openBlock(),t.createElementBlock("span",Vh,t.toDisplayString(H.value),1)):(t.openBlock(),t.createElementBlock("span",Mh,"No data available"))])])])],4)):t.createCommentVNode("",!0)]))]),K.value||y.value?(t.openBlock(),t.createElementBlock("p",Th,t.toDisplayString(K.value||y.value),1)):t.createCommentVNode("",!0)],64))],10,bh)),[[t.vShow,e.visible]])}}),Ph=["aria-busy"],Oh={key:0,class:"mb-1 h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Lh=["for"],Rh={key:0,class:"ml-1 text-destructive"},Ih={class:"relative"},Fh={key:0,class:"flex items-center text-gray-500 gap-2"},zh=["id","placeholder","disabled","value"],$h={key:1,class:"h-6 w-6 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},jh=["disabled"],Uh={key:0,class:"p-3 space-y-2"},Wh=["onMouseenter","onClick"],Hh={class:"flex items-center space-x-3"},qh={class:"flex-1"},Gh={class:"text-sm font-medium text-gray-900 dark:text-gray-100"},Kh={key:0,class:"text-xs text-gray-500 dark:text-gray-400"},Xh={key:0},Yh={key:2,class:"p-3 text-center"},Jh={class:"inline-flex items-center space-x-2"},Qh={class:"text-sm text-gray-500"},Zh={key:3,class:"p-3 text-center"},em={class:"text-xs text-gray-400"},tm={key:4,class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},om={key:1,class:"mt-1 text-xs text-red-600"},nm={key:2,class:"mt-1 text-xs text-gray-500"},Qi=t.defineComponent({name:"DCodeInfiniteAutoComplete",inheritAttrs:!1,__name:"DCodeInfiniteAutoComplete",props:{modelValue:{},apiModule:{},apiAction:{},apiOptions:{},autoFetchOnOpen:{type:Boolean,default:!0},refreshOnOpen:{type:Boolean,default:!1},autoFetchOnMount:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},skeleton:{type:Boolean,default:!1},error:{default:null},errorMessage:{default:null},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},itemSubtitle:{},returnObject:{type:Boolean,default:!1},endpoint:{},apiParams:{},fetchItems:{},icon:{},label:{},placeholder:{default:"Select an option"},required:{type:Boolean,default:!1},inputType:{default:"text"},helperText:{default:""},noResultsText:{default:"No results found"},loadingText:{default:"Loading more..."},endOfResultsText:{default:"End of results"},pageSize:{default:10},threshold:{default:100},debounceMs:{default:300}},emits:["update:modelValue","focus","blur","select","search","load-more","end-of-results","error"],setup(e,{emit:o}){const n=e,r=o,a=t.useAttrs(),s=t.ref(),i=t.ref(),l=t.ref(),c=t.ref(),d=t.ref(),f=t.computed(()=>{const I=n.label||n.placeholder;return I?`app-infinite-autocomplete-${I}-${Math.random().toString(36).slice(2,7)}`:void 0}),u=t.ref(""),h=t.ref([]),m=t.ref(!1),p=t.ref(!1),y=t.ref(-1),b=t.ref(1),g=t.ref(!0),_=t.ref(0),E=t.ref(),{floatingStyles:B}=za(c,d,{placement:"bottom-start",whileElementsMounted:Oa,middleware:[La(4),Ia(),Ra(),Fa({apply({rects:I,elements:K}){Object.assign(K.floating.style,{width:`${I.reference.width}px`})}})]});t.computed(()=>({"opacity-50 pointer-events-none":n.disabled,relative:!0}));const A=t.computed(()=>u.value?h.value.filter(I=>D(I).toLowerCase().includes(u.value.toLowerCase())):h.value),C=t.computed(()=>{if(p.value&&u.value)return u.value;if(n.modelValue){if(n.returnObject)return D(n.modelValue);{const I=h.value.find(K=>k(K)===n.modelValue);return I?D(I):String(n.modelValue)}}return""}),x=()=>{p.value=!0},w=()=>{p.value=!1},D=I=>typeof n.itemTitle=="function"?n.itemTitle(I):I[n.itemTitle]||"",k=I=>typeof n.itemValue=="function"?n.itemValue(I):I[n.itemValue]||I,v=I=>n.itemSubtitle?typeof n.itemSubtitle=="function"?n.itemSubtitle(I):I[n.itemSubtitle]||"":"",S=I=>n.modelValue?n.returnObject?k(I)===k(n.modelValue):k(I)===n.modelValue:!1,N=I=>{var H;const K=n.returnObject?I:k(I);r("update:modelValue",K),r("select",I),p.value=!1,u.value="",(H=s.value)==null||H.blur()},V=()=>{var I;r("update:modelValue",null),u.value="",(I=s.value)==null||I.focus()},L=I=>{p.value=!0,r("focus",I),n.autoFetchOnOpen&&!m.value&&(n.refreshOnOpen||h.value.length===0)&&M(!0)},O=I=>{setTimeout(()=>{p.value=!1,r("blur",I)},200)},P=I=>{const K=I.target;u.value=K.value,E.value&&clearTimeout(E.value),E.value=setTimeout(()=>{r("search",u.value),b.value=1,g.value=!0,M(!0)},n.debounceMs)},R=I=>{if(p.value)switch(I.key){case"ArrowDown":I.preventDefault(),y.value=Math.min(y.value+1,A.value.length-1);break;case"ArrowUp":I.preventDefault(),y.value=Math.max(y.value-1,0);break;case"Enter":I.preventDefault(),y.value>=0&&A.value[y.value]&&N(A.value[y.value]);break;case"Escape":p.value=!1;break}},j=I=>{if(!g.value||m.value)return;const K=I.target,{scrollTop:H,scrollHeight:W,clientHeight:Z}=K;H+Z>=W-n.threshold&&M()},M=async(I=!1)=>{var K,H;if(!m.value){m.value=!0;try{let W=[];if(n.fetchItems)W=await n.fetchItems();else{const Z=Qe(),te=((K=n.endpoint)==null?void 0:K.apiModule)||n.apiModule,ie=((H=n.endpoint)==null?void 0:H.apiAction)||n.apiAction;if(!te||!ie)throw new Error("API module and action are required");const Ae={page:I?1:b.value,pageSize:n.pageSize,search:u.value,...n.apiParams},ke=await Z.apiUrl(`/${te}/${ie}`,"GET",Ae);W=ke.data||ke.items||ke||[],_.value=ke.total||ke.totalItems||W.length}I?(h.value=W,b.value=1):(h.value.push(...W),b.value++),g.value=W.length>=n.pageSize,g.value||r("end-of-results"),r("load-more",{items:W,page:b.value,hasMore:g.value,total:_.value})}catch(W){console.error("Error fetching items:",W),r("error",W)}finally{m.value=!1}}};return t.onMounted(()=>{n.autoFetchOnMount&&M()}),t.onUnmounted(()=>{E.value&&clearTimeout(E.value)}),t.watch(()=>n.modelValue,I=>{I||(u.value="")}),(I,K)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref_key:"rootEl",ref:l,class:t.normalizeClass(["w-full",t.unref(a).class]),"aria-busy":e.skeleton},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",Oh)):t.createCommentVNode("",!0),K[3]||(K[3]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:f.value,class:"mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Rh,"*")):t.createCommentVNode("",!0)],8,Lh)):t.createCommentVNode("",!0),t.createElementVNode("div",Ih,[t.createElementVNode("div",{ref_key:"reference",ref:c,class:t.normalizeClass(["flex items-center gap-2 rounded-lg border px-3 py-2 bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 h-10 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",[e.disabled?"opacity-60 cursor-not-allowed":"",e.error?"border-red-500 focus-within:ring-red-500":""]])},[n.icon?(t.openBlock(),t.createElementBlock("div",Fh,[n.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps({ref_key:"inputRef",ref:s},I.$attrs,{id:f.value,type:"text",class:["w-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",e.disabled?"cursor-not-allowed":"cursor-text"],placeholder:e.placeholder,disabled:e.disabled,value:C.value,onFocus:L,onBlur:O,onInput:P,onKeydown:R}),null,16,zh),m.value?(t.openBlock(),t.createElementBlock("svg",$h,[...K[4]||(K[4]=[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):e.clearable&&e.modelValue?(t.openBlock(),t.createElementBlock("button",{key:2,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onMousedown:K[0]||(K[0]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(V,["stop"]),"aria-label":"Clear"}," ✕ ",32)):(t.openBlock(),t.createElementBlock("button",{key:3,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",disabled:e.disabled,onClick:K[1]||(K[1]=H=>p.value?w():x()),"aria-label":"Toggle"},[t.createVNode(t.unref(ne.ChevronDown),{class:t.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":p.value}])},null,8,["class"])],8,jh))],2),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[p.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"floating",ref:d,style:t.normalizeStyle(t.unref(B)),class:"z-[9999] overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[t.createElementVNode("div",{ref_key:"scrollContainer",ref:i,class:"max-h-64 overflow-auto",onScroll:j},[m.value&&h.value.length===0?(t.openBlock(),t.createElementBlock("div",Uh,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(5,H=>t.createElementVNode("div",{key:H,class:"flex items-center space-x-3"},[...K[5]||(K[5]=[t.createElementVNode("div",{class:"skeleton h-4 w-4 bg-gray-200 rounded"},null,-1),t.createElementVNode("div",{class:"skeleton h-4 flex-1 bg-gray-200 rounded"},null,-1)])])),64))])):A.value.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(A.value,(H,W)=>(t.openBlock(),t.createElementBlock("button",{key:k(H)??W,type:"button",class:t.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",W===y.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:Z=>y.value=W,onMousedown:K[2]||(K[2]=t.withModifiers(()=>{},["prevent"])),onClick:Z=>N(H)},[t.renderSlot(I.$slots,"item",{item:H,index:W},()=>[t.createElementVNode("div",Hh,[t.createElementVNode("div",qh,[t.createElementVNode("div",Gh,t.toDisplayString(D(H)),1),e.itemSubtitle?(t.openBlock(),t.createElementBlock("div",Kh,t.toDisplayString(v(H)),1)):t.createCommentVNode("",!0)])])]),S(H)?(t.openBlock(),t.createElementBlock("span",Xh," ✓ ")):t.createCommentVNode("",!0)],42,Wh))),128)):t.createCommentVNode("",!0),m.value&&h.value.length>0?(t.openBlock(),t.createElementBlock("div",Yh,[t.createElementVNode("div",Jh,[K[6]||(K[6]=t.createElementVNode("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"},null,-1)),t.createElementVNode("span",Qh,t.toDisplayString(e.loadingText),1)])])):t.createCommentVNode("",!0),!g.value&&h.value.length>0?(t.openBlock(),t.createElementBlock("div",Zh,[t.createElementVNode("div",em,t.toDisplayString(e.endOfResultsText),1)])):!m.value&&h.value.length===0?(t.openBlock(),t.createElementBlock("div",tm,t.toDisplayString(e.noResultsText),1)):t.createCommentVNode("",!0)],544)],4)):t.createCommentVNode("",!0)]))]),e.error?(t.openBlock(),t.createElementBlock("p",om,t.toDisplayString(e.errorMessage||e.error),1)):e.helperText?(t.openBlock(),t.createElementBlock("p",nm,t.toDisplayString(e.helperText),1)):t.createCommentVNode("",!0)],64))],10,Ph)),[[t.vShow,e.visible]])}});function Zi(e){var o,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(o=0;o<a;o++)e[o]&&(n=Zi(e[o]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function el(){for(var e,o,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(o=Zi(e))&&(r&&(r+=" "),r+=o);return r}const rm=(e,o)=>{const n=new Array(e.length+o.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<o.length;r++)n[e.length+r]=o[r];return n},am=(e,o)=>({classGroupId:e,validator:o}),tl=(e=new Map,o=null,n)=>({nextPart:e,validators:o,classGroupId:n}),cr="-",ol=[],sm="arbitrary..",im=e=>{const o=cm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return lm(i);const l=i.split(cr),c=l[0]===""&&l.length>1?1:0;return nl(l,c,o)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],d=n[i];return c?d?rm(d,c):c:d||ol}return n[i]||ol}}},nl=(e,o,n)=>{if(e.length-o===0)return n.classGroupId;const a=e[o],s=n.nextPart.get(a);if(s){const d=nl(e,o+1,s);if(d)return d}const i=n.validators;if(i===null)return;const l=o===0?e.join(cr):e.slice(o).join(cr),c=i.length;for(let d=0;d<c;d++){const f=i[d];if(f.validator(l))return f.classGroupId}},lm=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=e.slice(1,-1),n=o.indexOf(":"),r=o.slice(0,n);return r?sm+r:void 0})(),cm=e=>{const{theme:o,classGroups:n}=e;return dm(n,o)},dm=(e,o)=>{const n=tl();for(const r in e){const a=e[r];$a(a,n,r,o)}return n},$a=(e,o,n,r)=>{const a=e.length;for(let s=0;s<a;s++){const i=e[s];fm(i,o,n,r)}},fm=(e,o,n,r)=>{if(typeof e=="string"){um(e,o,n);return}if(typeof e=="function"){hm(e,o,n,r);return}mm(e,o,n,r)},um=(e,o,n)=>{const r=e===""?o:rl(o,e);r.classGroupId=n},hm=(e,o,n,r)=>{if(pm(e)){$a(e(r),o,n,r);return}o.validators===null&&(o.validators=[]),o.validators.push(am(n,e))},mm=(e,o,n,r)=>{const a=Object.entries(e),s=a.length;for(let i=0;i<s;i++){const[l,c]=a[i];$a(c,rl(o,l),n,r)}},rl=(e,o)=>{let n=e;const r=o.split(cr),a=r.length;for(let s=0;s<a;s++){const i=r[s];let l=n.nextPart.get(i);l||(l=tl(),n.nextPart.set(i,l)),n=l}return n},pm=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,gm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let o=0,n=Object.create(null),r=Object.create(null);const a=(s,i)=>{n[s]=i,o++,o>e&&(o=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return a(s,i),i},set(s,i){s in n?n[s]=i:a(s,i)}}},ja="!",al=":",bm=[],sl=(e,o,n,r,a)=>({modifiers:e,hasImportantModifier:o,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),ym=e=>{const{prefix:o,experimentalParseClassName:n}=e;let r=a=>{const s=[];let i=0,l=0,c=0,d;const f=a.length;for(let y=0;y<f;y++){const b=a[y];if(i===0&&l===0){if(b===al){s.push(a.slice(c,y)),c=y+1;continue}if(b==="/"){d=y;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const u=s.length===0?a:a.slice(c);let h=u,m=!1;u.endsWith(ja)?(h=u.slice(0,-1),m=!0):u.startsWith(ja)&&(h=u.slice(1),m=!0);const p=d&&d>c?d-c:void 0;return sl(s,m,h,p)};if(o){const a=o+al,s=r;r=i=>i.startsWith(a)?s(i.slice(a.length)):sl(bm,!1,i,void 0,!0)}if(n){const a=r;r=s=>n({className:s,parseClassName:a})}return r},xm=e=>{const o=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{o.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let s=0;s<n.length;s++){const i=n[s],l=i[0]==="[",c=o.has(i);l||c?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(i)):a.push(i)}return a.length>0&&(a.sort(),r.push(...a)),r}},km=e=>({cache:gm(e.cacheSize),parseClassName:ym(e),sortModifiers:xm(e),...im(e)}),wm=/\s+/,Cm=(e,o)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:s}=o,i=[],l=e.trim().split(wm);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:u,modifiers:h,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:y}=n(f);if(u){c=f+(c.length>0?" "+c:c);continue}let b=!!y,g=r(b?p.substring(0,y):p);if(!g){if(!b){c=f+(c.length>0?" "+c:c);continue}if(g=r(p),!g){c=f+(c.length>0?" "+c:c);continue}b=!1}const _=h.length===0?"":h.length===1?h[0]:s(h).join(":"),E=m?_+ja:_,B=E+g;if(i.indexOf(B)>-1)continue;i.push(B);const A=a(g,b);for(let C=0;C<A.length;++C){const x=A[C];i.push(E+x)}c=f+(c.length>0?" "+c:c)}return c},_m=(...e)=>{let o=0,n,r,a="";for(;o<e.length;)(n=e[o++])&&(r=il(n))&&(a&&(a+=" "),a+=r);return a},il=e=>{if(typeof e=="string")return e;let o,n="";for(let r=0;r<e.length;r++)e[r]&&(o=il(e[r]))&&(n&&(n+=" "),n+=o);return n},Em=(e,...o)=>{let n,r,a,s;const i=c=>{const d=o.reduce((f,u)=>u(f),e());return n=km(d),r=n.cache.get,a=n.cache.set,s=l,l(c)},l=c=>{const d=r(c);if(d)return d;const f=Cm(c,n);return a(c,f),f};return s=i,(...c)=>s(_m(...c))},Bm=[],et=e=>{const o=n=>n[e]||Bm;return o.isThemeGetter=!0,o},ll=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,cl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sm=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Am=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vm=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Dm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Nm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,co=e=>Sm.test(e),ve=e=>!!e&&!Number.isNaN(Number(e)),fo=e=>!!e&&Number.isInteger(Number(e)),Ua=e=>e.endsWith("%")&&ve(e.slice(0,-1)),Gt=e=>Am.test(e),dl=()=>!0,Mm=e=>vm.test(e)&&!Dm.test(e),Wa=()=>!1,Tm=e=>Nm.test(e),Pm=e=>Vm.test(e),Om=e=>!pe(e)&&!ge(e),Lm=e=>uo(e,gl,Wa),pe=e=>ll.test(e),Bo=e=>uo(e,bl,Mm),fl=e=>uo(e,Wm,ve),Rm=e=>uo(e,xl,dl),Im=e=>uo(e,yl,Wa),ul=e=>uo(e,ml,Wa),Fm=e=>uo(e,pl,Pm),dr=e=>uo(e,kl,Tm),ge=e=>cl.test(e),_n=e=>So(e,bl),zm=e=>So(e,yl),hl=e=>So(e,ml),$m=e=>So(e,gl),jm=e=>So(e,pl),fr=e=>So(e,kl,!0),Um=e=>So(e,xl,!0),uo=(e,o,n)=>{const r=ll.exec(e);return r?r[1]?o(r[1]):n(r[2]):!1},So=(e,o,n=!1)=>{const r=cl.exec(e);return r?r[1]?o(r[1]):n:!1},ml=e=>e==="position"||e==="percentage",pl=e=>e==="image"||e==="url",gl=e=>e==="length"||e==="size"||e==="bg-size",bl=e=>e==="length",Wm=e=>e==="number",yl=e=>e==="family-name",xl=e=>e==="number"||e==="weight",kl=e=>e==="shadow",Hm=Em(()=>{const e=et("color"),o=et("font"),n=et("text"),r=et("font-weight"),a=et("tracking"),s=et("leading"),i=et("breakpoint"),l=et("container"),c=et("spacing"),d=et("radius"),f=et("shadow"),u=et("inset-shadow"),h=et("text-shadow"),m=et("drop-shadow"),p=et("blur"),y=et("perspective"),b=et("aspect"),g=et("ease"),_=et("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...B(),ge,pe],C=()=>["auto","hidden","clip","visible","scroll"],x=()=>["auto","contain","none"],w=()=>[ge,pe,c],D=()=>[co,"full","auto",...w()],k=()=>[fo,"none","subgrid",ge,pe],v=()=>["auto",{span:["full",fo,ge,pe]},fo,ge,pe],S=()=>[fo,"auto",ge,pe],N=()=>["auto","min","max","fr",ge,pe],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...w()],P=()=>[co,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],R=()=>[co,"screen","full","dvw","lvw","svw","min","max","fit",...w()],j=()=>[co,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],M=()=>[e,ge,pe],I=()=>[...B(),hl,ul,{position:[ge,pe]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",$m,Lm,{size:[ge,pe]}],W=()=>[Ua,_n,Bo],Z=()=>["","none","full",d,ge,pe],te=()=>["",ve,_n,Bo],ie=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ke=()=>[ve,Ua,hl,ul],J=()=>["","none",p,ge,pe],$=()=>["none",ve,ge,pe],X=()=>["none",ve,ge,pe],re=()=>[ve,ge,pe],me=()=>[co,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Gt],breakpoint:[Gt],color:[dl],container:[Gt],"drop-shadow":[Gt],ease:["in","out","in-out"],font:[Om],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Gt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Gt],shadow:[Gt],spacing:["px",ve],text:[Gt],"text-shadow":[Gt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",co,pe,ge,b]}],container:["container"],columns:[{columns:[ve,pe,ge,l]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[fo,"auto",ge,pe]}],basis:[{basis:[co,"full","auto",l,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ve,co,"auto","initial","none",pe]}],grow:[{grow:["",ve,ge,pe]}],shrink:[{shrink:["",ve,ge,pe]}],order:[{order:[fo,"first","last","none",ge,pe]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:v()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:v()}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...R()]}],"min-inline-size":[{"min-inline":["auto",...R()]}],"max-inline-size":[{"max-inline":["none",...R()]}],"block-size":[{block:["auto",...j()]}],"min-block-size":[{"min-block":["auto",...j()]}],"max-block-size":[{"max-block":["none",...j()]}],w:[{w:[l,"screen",...P()]}],"min-w":[{"min-w":[l,"screen","none",...P()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,_n,Bo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Um,Rm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ua,pe]}],"font-family":[{font:[zm,Im,o]}],"font-features":[{"font-features":[pe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ge,pe]}],"line-clamp":[{"line-clamp":[ve,"none",ge,fl]}],leading:[{leading:[s,...w()]}],"list-image":[{"list-image":["none",ge,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[ve,"from-font","auto",ge,Bo]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[ve,"auto",ge,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fo,ge,pe],radial:["",ge,pe],conic:[fo,ge,pe]},jm,Fm]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-bs":[{"border-bs":te()}],"border-w-be":[{"border-be":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ve,ge,pe]}],"outline-w":[{outline:["",ve,_n,Bo]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",f,fr,dr]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",u,fr,dr]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[ve,Bo]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",h,fr,dr]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[ve,ge,pe]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":ke()}],"mask-image-linear-to-pos":[{"mask-linear-to":ke()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ke()}],"mask-image-t-to-pos":[{"mask-t-to":ke()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ke()}],"mask-image-r-to-pos":[{"mask-r-to":ke()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ke()}],"mask-image-b-to-pos":[{"mask-b-to":ke()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ke()}],"mask-image-l-to-pos":[{"mask-l-to":ke()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ke()}],"mask-image-x-to-pos":[{"mask-x-to":ke()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ke()}],"mask-image-y-to-pos":[{"mask-y-to":ke()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[ge,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ke()}],"mask-image-radial-to-pos":[{"mask-radial-to":ke()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":B()}],"mask-image-conic-pos":[{"mask-conic":[ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":ke()}],"mask-image-conic-to-pos":[{"mask-conic-to":ke()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,pe]}],filter:[{filter:["","none",ge,pe]}],blur:[{blur:J()}],brightness:[{brightness:[ve,ge,pe]}],contrast:[{contrast:[ve,ge,pe]}],"drop-shadow":[{"drop-shadow":["","none",m,fr,dr]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",ve,ge,pe]}],"hue-rotate":[{"hue-rotate":[ve,ge,pe]}],invert:[{invert:["",ve,ge,pe]}],saturate:[{saturate:[ve,ge,pe]}],sepia:[{sepia:["",ve,ge,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,pe]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[ve,ge,pe]}],"backdrop-contrast":[{"backdrop-contrast":[ve,ge,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ve,ge,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ve,ge,pe]}],"backdrop-invert":[{"backdrop-invert":["",ve,ge,pe]}],"backdrop-opacity":[{"backdrop-opacity":[ve,ge,pe]}],"backdrop-saturate":[{"backdrop-saturate":[ve,ge,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",ve,ge,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ve,"initial",ge,pe]}],ease:[{ease:["linear","initial",g,ge,pe]}],delay:[{delay:[ve,ge,pe]}],animate:[{animate:["none",_,ge,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,ge,pe]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[ge,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,pe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,pe]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[ve,_n,Bo,fl]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Ve(...e){return Hm(el(e))}function wl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ha={},qa={},ur={exports:{}},Cl;function qm(){if(Cl)return ur.exports;Cl=1;var e=String,o=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return ur.exports=o(),ur.exports.createColors=o,ur.exports}var _l;function Gm(){return _l||(_l=1,(function(e){var o={};Object.defineProperty(e,"__esModule",{value:!0});function n(d,f){for(var u in f)Object.defineProperty(d,u,{enumerable:!0,get:f[u]})}n(e,{dim:function(){return l},default:function(){return c}});const r=a(qm());function a(d){return d&&d.__esModule?d:{default:d}}let s=new Set;function i(d,f,u){typeof process<"u"&&o.JEST_WORKER_ID||u&&s.has(u)||(u&&s.add(u),console.warn(""),f.forEach(h=>console.warn(d,"-",h)))}function l(d){return r.default.dim(d)}const c={info(d,f){i(r.default.bold(r.default.cyan("info")),...Array.isArray(d)?[d]:[f,d])},warn(d,f){i(r.default.bold(r.default.yellow("warn")),...Array.isArray(d)?[d]:[f,d])},risk(d,f){i(r.default.bold(r.default.magenta("risk")),...Array.isArray(d)?[d]:[f,d])}}})(qa)),qa}var El;function Km(){return El||(El=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});const o=n(Gm());function n(s){return s&&s.__esModule?s:{default:s}}function r({version:s,from:i,to:l}){o.default.warn(`${i}-color-renamed`,[`As of Tailwind CSS ${s}, \`${i}\` has been renamed to \`${l}\`.`,"Update your configuration file to silence this warning."])}const a={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return r({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return r({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return r({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return r({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return r({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}})(Ha)),Ha}var Ga,Bl;function Xm(){if(Bl)return Ga;Bl=1;let e=Km();return Ga=(e.__esModule?e:{default:e}).default,Ga}var Ym=Xm();const Jm=wl(Ym),Qm=(e,o="short",n="id-ID")=>{const r=typeof e=="string"?new Date(e):e,a=c=>String(c).padStart(2,"0"),s=c=>`${a(c.getHours())}:${a(c.getMinutes())}:${a(c.getSeconds())}`,l={id:"id-ID",en:"en-GB"}[n]||n;return o==="time"?s(r):o==="datetime"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r):o==="long"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(r):new Intl.DateTimeFormat(l,{day:"2-digit",month:"short",year:"numeric"}).format(r)},Zm=e=>new Promise((o,n)=>{const r=document.createElement("textarea");r.value=e,r.style.top="0",r.style.left="0",r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?o():n(new Error("Copy command was unsuccessful"))}catch(a){n(a)}finally{document.body.removeChild(r)}}),ep=async e=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e):Zm(e),Ao=(e,o)=>{if(!e)return null;if(o[e])return o[e];const n=e.split(/[-_]/).map(r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join("");return o[n]||null},Sl=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Al=el,hr=(e,o)=>n=>{var r;if((o==null?void 0:o.variants)==null)return Al(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:s}=o,i=Object.keys(a).map(d=>{const f=n==null?void 0:n[d],u=s==null?void 0:s[d];if(f===null)return null;const h=Sl(f)||Sl(u);return a[d][h]}),l=n&&Object.entries(n).reduce((d,f)=>{let[u,h]=f;return h===void 0||(d[u]=h),d},{}),c=o==null||(r=o.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:u,className:h,...m}=f;return Object.entries(m).every(p=>{let[y,b]=p;return Array.isArray(b)?b.includes({...s,...l}[y]):{...s,...l}[y]===b})?[...d,u,h]:d},[]);return Al(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Nt=t.defineComponent({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(xe.Primitive),{as:e.as,"as-child":e.asChild,class:t.normalizeClass(t.unref(Ve)(t.unref(qo)({variant:e.variant,size:e.size}),o.class))},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),qo=hr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-8 w-8","icon-sm":"size-7","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),vl=t.defineComponent({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:o}){const n=e,r=o,a=xe.useForwardPropsEmits(n,r);return(s,i)=>(t.openBlock(),t.createBlock(t.unref(xe.TooltipRoot),t.normalizeProps(t.guardReactiveProps(t.unref(a))),{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:3},16))}}),Dl=t.defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=xe.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(xe.TooltipPortal),null,{default:t.withCtx(()=>[t.createVNode(t.unref(xe.TooltipContent),t.mergeProps({...t.unref(s),...i.$attrs},{class:t.unref(Ve)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:t.withCtx(()=>[t.renderSlot(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),Nl=t.defineComponent({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(xe.TooltipProvider),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),Vl=t.defineComponent({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(xe.TooltipTrigger),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),tp={class:"relative z-10"},op="font-medium transition-all duration-300 ease-in-out hover:-translate-y-0.5 hover:scale-[1.02] active:translate-y-0 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-60 disabled:cursor-not-allowed disabled:shadow-none disabled:translate-y-0 disabled:scale-100 relative overflow-hidden before:absolute before:inset-0 before:bg-white/20 before:translate-y-full before:transition-transform before:duration-300 hover:before:translate-y-0",np=t.defineComponent({name:"DCodeButton",inheritAttrs:!1,__name:"DCodeButton",props:{icon:{},text:{default:""},variant:{default:"default"},size:{default:"default"},tooltip:{default:""},bgColor:{default:""},textColor:{default:""},borderColor:{default:""},rounded:{default:"lg"},borderStyle:{default:"solid"},disabled:{type:Boolean,default:!1},type:{default:"button"},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},setup(e){const o=t.useAttrs(),n=e,r=t.computed(()=>Ao(n.icon,Pt)),a=t.computed(()=>!!n.tooltip),s=t.computed(()=>n.visible??!0),i=t.computed(()=>{const H=String(n.variant||"default").toLowerCase();return H==="tonal"?"secondary":H==="elevated"?"default":H}),l=t.computed(()=>String(n.bgColor||"").toLowerCase()),c=t.computed(()=>String(n.type||"button").toLowerCase()),d=t.computed(()=>{const{class:H,...W}=o;return W}),f=t.computed(()=>Ve(o.class)),u=t.computed(()=>((f.value??"").match(/\b(?:w|h|min-w|min-h|max-w|max-h)-[^\s]+\b/g)??[]).join(" ")),h=t.computed(()=>n.size==="sm"?"h-9":n.size==="lg"?"h-11":n.size==="icon"?"h-10 w-10":"h-10"),m=t.computed(()=>n.size==="icon"?"":!n.text&&n.icon?"w-10":"w-28"),p=t.computed(()=>n.rounded?n.rounded.startsWith("rounded")?n.rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"}[n.rounded]||`rounded-${n.rounded}`:""),y=t.computed(()=>!n.borderStyle||n.borderStyle==="none"?"border-0":n.borderStyle==="solid"?"border-2":{dashed:"border-[3px] border-dashed",dotted:"border-[3px] border-dotted",double:"border-[6px] border-double"}[n.borderStyle]||"border-2"),b=t.computed(()=>Ve("inline-flex items-center justify-center bg-gray-200 dark:bg-gray-700 animate-pulse",p.value,h.value,m.value,u.value)),g=t.computed(()=>{const W=(f.value??"").match(/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return W?W[0]:null}),_=t.computed(()=>{const W=(f.value??"").match(/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return W?W[0]:null}),E=t.computed(()=>!!g.value),B=t.computed(()=>/\bborder-/.test(f.value??"")),A=t.computed(()=>/\bhover:/.test(f.value??"")),C=t.computed(()=>{const H=f.value??"";return i.value!=="outline"?H:H.replaceAll(/\bbg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\bhover:bg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\s+/gu," ").trim()}),x=t.ref(null),w=H=>{const W=H.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/u);return W?{r:Number(W[1]),g:Number(W[2]),b:Number(W[3]),a:W[4]?Number(W[4]):1}:null},D=(H,W)=>{const Z=w(H);if(!Z)return H;const te=ie=>Math.max(0,Math.min(255,Math.round(ie)));return`rgba(${te(Z.r*(1-W))}, ${te(Z.g*(1-W))}, ${te(Z.b*(1-W))}, ${Z.a})`},k=H=>{if(globalThis.window===void 0)return null;const W=document.createElement("div");W.className=H,W.style.position="absolute",W.style.visibility="hidden",W.style.pointerEvents="none",W.style.width="1px",W.style.height="1px",document.body.appendChild(W);const Z=globalThis.getComputedStyle(W).backgroundColor;return W.remove(),!Z||Z==="transparent"||Z==="rgba(0, 0, 0, 0)"?null:Z},v=[50,100,200,300,400,500,600,700,800,900,950],S=H=>{const W=v.indexOf(H);return W===-1?H:v[Math.min(v.length-1,W+2)]},N=(H,W)=>{const Z=Jm[H];if(!Z)return null;if(typeof Z=="string")return Z;if(!W)return null;const te=Z[W];return typeof te=="string"?te:null},V=(H,W=!1)=>{if(!H)return null;const Z=W?/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u:/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u,te=H.match(Z);return te?{colorName:te[1],shade:te[2]?Number.parseInt(te[2],10):null}:null},L=()=>{const H=g.value;if(!H){x.value=null;return}const W=V(H),Z=W==null?void 0:W.colorName,te=(W==null?void 0:W.shade)??null,ie=(Z?N(Z,te):null)??k(H);if(!ie){x.value=null;return}let Ae;const ke=V(_.value,!0),J=ke?N(ke.colorName,ke.shade??null):null;if(J)Ae=J;else if(Z&&te){const $=S(te);Ae=N(Z,$)??D(ie,.2)}else Ae=D(ie,.2);x.value={"--btn-color":ie,"--btn-color-hover":Ae}};t.onMounted(()=>{L()}),t.watch([g,_],async()=>{await t.nextTick(),L()});const O=t.computed(()=>{const H=/\bdark:bg-/.test(f.value??"");return!E.value||i.value==="outline"||H?"":x.value?"dcode-btn--fill dcode-btn--fill-hover":A.value?"":"hover:brightness-90"}),P=t.computed(()=>{if(!E.value||i.value!=="outline")return"";const H=["dcode-btn--outline","dcode-btn--outline-hover"];return B.value||H.push("border"),!x.value&&!A.value&&H.push("hover:brightness-90"),H.join(" ")}),R=t.computed(()=>x.value??void 0),j={primary:{bg:"bg-blue-600 dark:bg-blue-500",border:"border-blue-700 dark:border-blue-400",text:"text-white",hoverBg:"hover:bg-blue-700 dark:hover:bg-blue-600",hoverBorder:"hover:border-blue-800 dark:hover:border-blue-500",hoverText:"hover:text-white"},success:{bg:"bg-green-600 dark:bg-green-500",border:"border-green-700 dark:border-green-400",text:"text-white",hoverBg:"hover:bg-green-700 dark:hover:bg-green-600",hoverBorder:"hover:border-green-800 dark:hover:border-green-500",hoverText:"hover:text-white"},warning:{bg:"bg-yellow-500 dark:bg-yellow-400",border:"border-yellow-600 dark:border-yellow-300",text:"text-white",hoverBg:"hover:bg-yellow-600 dark:hover:bg-yellow-500",hoverBorder:"hover:border-yellow-700 dark:hover:border-yellow-400",hoverText:"hover:text-white"},danger:{bg:"bg-red-600 dark:bg-red-500",border:"border-red-700 dark:border-red-400",text:"text-white",hoverBg:"hover:bg-red-700 dark:hover:bg-red-600",hoverBorder:"hover:border-red-800 dark:hover:border-red-500",hoverText:"hover:text-white"},info:{bg:"bg-cyan-600 dark:bg-cyan-500",border:"border-cyan-700 dark:border-cyan-400",text:"text-white",hoverBg:"hover:bg-cyan-700 dark:hover:bg-cyan-600",hoverBorder:"hover:border-cyan-800 dark:hover:border-cyan-500",hoverText:"hover:text-white"},secondary:{bg:"bg-gray-600 dark:bg-gray-500",border:"border-gray-700 dark:border-gray-400",text:"text-white",hoverBg:"hover:bg-gray-700 dark:hover:bg-gray-600",hoverBorder:"hover:border-gray-800 dark:hover:border-gray-500",hoverText:"hover:text-white"},purple:{bg:"bg-purple-600 dark:bg-purple-500",border:"border-purple-700 dark:border-purple-400",text:"text-white",hoverBg:"hover:bg-purple-700 dark:hover:bg-purple-600",hoverBorder:"hover:border-purple-800 dark:hover:border-purple-500",hoverText:"hover:text-white"},pink:{bg:"bg-pink-600 dark:bg-pink-500",border:"border-pink-700 dark:border-pink-400",text:"text-white",hoverBg:"hover:bg-pink-700 dark:hover:bg-pink-600",hoverBorder:"hover:border-pink-800 dark:hover:border-pink-500",hoverText:"hover:text-white"},dark:{bg:"bg-gray-900 dark:bg-gray-800",border:"border-black dark:border-gray-700",text:"text-white",hoverBg:"hover:bg-black dark:hover:bg-gray-950",hoverBorder:"hover:border-black dark:hover:border-gray-600",hoverText:"hover:text-white"},light:{bg:"bg-gray-100 dark:bg-gray-800",border:"border-gray-300 dark:border-gray-600",text:"text-gray-900 dark:text-gray-100",hoverBg:"hover:bg-gray-200 dark:hover:bg-gray-700",hoverBorder:"hover:border-gray-400 dark:hover:border-gray-500",hoverText:"hover:text-gray-900 dark:hover:text-gray-100"}},M={"gradient-blue":{bg:"bg-gradient-to-r from-blue-500 to-cyan-500",text:"text-white",hover:"hover:from-blue-600 hover:to-cyan-600"},"gradient-purple":{bg:"bg-gradient-to-r from-purple-500 to-pink-500",text:"text-white",hover:"hover:from-purple-600 hover:to-pink-600"},"gradient-sunset":{bg:"bg-gradient-to-r from-orange-500 to-red-500",text:"text-white",hover:"hover:from-orange-600 hover:to-red-600"},"gradient-emerald":{bg:"bg-gradient-to-r from-emerald-500 to-teal-500",text:"text-white",hover:"hover:from-emerald-600 hover:to-teal-600"}},I=t.computed(()=>{const H=[],W=l.value,Z=String(n.borderColor||"").toLowerCase(),te=W?j[W]:null,ie=W?M[W]:null,Ae=Z?j[Z]:null;return W&&(te?Ae&&Z!==W?(H.push(te.bg,Ae.hoverBg),n.textColor||H.push(te.text,Ae.hoverText)):(H.push(te.bg,te.hoverBg),n.textColor||H.push(te.text,te.hoverText)):ie?(H.push(ie.bg,ie.hover),n.textColor||H.push(ie.text)):W==="transparent"?Ae?(H.push("bg-transparent",Ae.hoverBg),n.textColor||H.push("text-inherit",Ae.hoverText)):H.push("bg-transparent hover:bg-black/5 dark:hover:bg-white/5"):H.push(W)),Z?Ae?H.push(Ae.border,Ae.hoverBorder):H.push(Z):te&&i.value!=="ghost"&&i.value!=="link"&&H.push(te.border,te.hoverBorder),n.textColor&&H.push(n.textColor),H.join(" ")}),K=t.computed(()=>Ve(op,p.value,y.value,C.value,O.value,P.value,I.value));return(H,W)=>s.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.skeleton?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.value),"aria-hidden":"true"},null,2)):(t.openBlock(),t.createBlock(t.unref(Nl),{key:1,"delay-duration":0},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createBlock(t.unref(vl),{key:0},{default:t.withCtx(()=>[t.createVNode(t.unref(Vl),{"as-child":""},{default:t.withCtx(()=>[t.createVNode(t.unref(Nt),t.mergeProps({variant:i.value,size:n.size,disabled:n.disabled,type:c.value,class:K.value,style:R.value},d.value),{default:t.withCtx(()=>[r.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.value),{key:0,class:"h-[18px] w-[18px]"})):t.createCommentVNode("",!0),n.text?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(r.value?"ml-1":"")},t.toDisplayString(n.text),3)):t.createCommentVNode("",!0)]),_:1},16,["variant","size","disabled","type","class","style"])]),_:1}),t.createVNode(t.unref(Dl),{side:"top","side-offset":8,class:"animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0"},{default:t.withCtx(()=>[t.createElementVNode("span",tp,t.toDisplayString(n.tooltip),1)]),_:1})]),_:1})):(t.openBlock(),t.createBlock(t.unref(Nt),t.mergeProps({key:1,variant:i.value,size:n.size,disabled:n.disabled,type:c.value,class:K.value,style:R.value},d.value),{default:t.withCtx(()=>[t.renderSlot(H.$slots,"default",{},()=>[r.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.value),{key:0,class:"h-[18px] w-[18px]"})):t.createCommentVNode("",!0),n.text?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(r.value?"ml-1":"")},t.toDisplayString(n.text),3)):t.createCommentVNode("",!0)],!0)]),_:3},16,["variant","size","disabled","type","class","style"]))]),_:3}))],64)):t.createCommentVNode("",!0)}}),lt=(e,o)=>{const n=e.__vccOpts||e;for(const[r,a]of o)n[r]=a;return n},He=lt(np,[["__scopeId","data-v-c123cb99"]]),rp={class:"flex flex-col gap-1"},ap={key:0,class:"text-sm font-semibold text-neutral-900 dark:text-neutral-100 leading-tight"},sp={key:1,class:"text-xs text-neutral-500 dark:text-neutral-400"},ip={key:0,class:"flex items-center gap-2"},lp={name:"DCodeCard"},Go=t.defineComponent({...lp,props:{level:{default:1},title:{},subtitle:{},shadow:{type:Boolean,default:!1},border:{type:Boolean,default:!0},padding:{default:"p-6"}},setup(e){const o=e,n=t.computed(()=>{switch(o.level){case 2:return"bg-neutral-50 dark:bg-neutral-800";case 3:return"bg-neutral-100 dark:bg-neutral-700";case 1:default:return"bg-white dark:bg-neutral-900"}});return(r,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transition-shadow duration-300 dcode-card",[n.value,{"shadow-md":e.shadow},{"border-transparent":!e.border},{"border border-neutral-200 dark:border-neutral-800":e.border&&e.level===1},{"border border-neutral-300 dark:border-neutral-700":e.border&&e.level!==1},"overflow-hidden"]])},[e.title||r.$slots.header||r.$slots.actions?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["flex items-center justify-between backdrop-blur-sm transition-colors duration-300",[e.title||r.$slots.header||r.$slots.actions?"px-4 py-3":"",e.title||r.$slots.header?"bg-neutral-200/50 dark:bg-neutral-950/40 border-b border-neutral-200 dark:border-neutral-800/50":"bg-transparent border-b-transparent"]])},[t.createElementVNode("div",rp,[t.renderSlot(r.$slots,"header",{},()=>[e.title?(t.openBlock(),t.createElementBlock("h3",ap,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.subtitle?(t.openBlock(),t.createElementBlock("p",sp,t.toDisplayString(e.subtitle),1)):t.createCommentVNode("",!0)])]),r.$slots.actions?(t.openBlock(),t.createElementBlock("div",ip,[t.renderSlot(r.$slots,"actions")])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["relative z-10",e.padding])},[t.renderSlot(r.$slots,"default")],2),r.$slots.footer?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["mt-6 pt-6 border-t border-neutral-200/60 dark:border-neutral-700/50",e.padding])},[t.renderSlot(r.$slots,"footer")],2)):t.createCommentVNode("",!0)],2))}});(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #1F2328;--color-diff-blob-addition-fg: #1F2328;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #1f883d;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(31,35,40,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(31,35,40,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(31,35,40,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-scale-black: #1F2328;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#fff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{position:sticky;top:0;z-index:1;background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar{margin-left:auto;margin-right:1rem}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button{background-color:transparent;color:var(--color-fg-subtle);border:none}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button svg{fill:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button:hover{background-color:var(--color-btn-outline-hover-border)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .current-diff{border:1px solid var(--color-border-muted)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}.code-diff-view[data-v-0c5adc58] td:nth-child(1){display:none}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();function Kt(){}Kt.prototype={diff:function(e,o){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.callback;typeof r=="function"&&(a=r,r={}),this.options=r;var s=this;function i(E){return a?(setTimeout(function(){a(void 0,E)},0),!0):E}e=this.castInput(e),o=this.castInput(o),e=this.removeEmpty(this.tokenize(e)),o=this.removeEmpty(this.tokenize(o));var l=o.length,c=e.length,d=1,f=l+c;r.maxEditLength&&(f=Math.min(f,r.maxEditLength));var u=(n=r.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+u,m=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(m[0],o,e,0);if(m[0].oldPos+1>=c&&p+1>=l)return i([{value:this.join(o),count:o.length}]);var y=-1/0,b=1/0;function g(){for(var E=Math.max(y,-d);E<=Math.min(b,d);E+=2){var B=void 0,A=m[E-1],C=m[E+1];A&&(m[E-1]=void 0);var x=!1;if(C){var w=C.oldPos-E;x=C&&0<=w&&w<l}var D=A&&A.oldPos+1<c;if(!x&&!D){m[E]=void 0;continue}if(!D||x&&A.oldPos+1<C.oldPos?B=s.addToPath(C,!0,void 0,0):B=s.addToPath(A,void 0,!0,1),p=s.extractCommon(B,o,e,E),B.oldPos+1>=c&&p+1>=l)return i(cp(s,B.lastComponent,o,e,s.useLongestToken));m[E]=B,B.oldPos+1>=c&&(b=Math.min(b,E-1)),p+1>=l&&(y=Math.max(y,E+1))}d++}if(a)(function E(){setTimeout(function(){if(d>f||Date.now()>h)return a();g()||E()},0)})();else for(;d<=f&&Date.now()<=h;){var _=g();if(_)return _}},addToPath:function(e,o,n,r){var a=e.lastComponent;return a&&a.added===o&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:o,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:o,removed:n,previousComponent:a}}},extractCommon:function(e,o,n,r){for(var a=o.length,s=n.length,i=e.oldPos,l=i-r,c=0;l+1<a&&i+1<s&&this.equals(o[l+1],n[i+1]);)l++,i++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=i,l},equals:function(e,o){return this.options.comparator?this.options.comparator(e,o):e===o||this.options.ignoreCase&&e.toLowerCase()===o.toLowerCase()},removeEmpty:function(e){for(var o=[],n=0;n<e.length;n++)e[n]&&o.push(e[n]);return o},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function cp(e,o,n,r,a){for(var s=[],i;o;)s.push(o),i=o.previousComponent,delete o.previousComponent,o=i;s.reverse();for(var l=0,c=s.length,d=0,f=0;l<c;l++){var u=s[l];if(u.removed){if(u.value=e.join(r.slice(f,f+u.count)),f+=u.count,l&&s[l-1].added){var h=s[l-1];s[l-1]=s[l],s[l]=h}}else{if(!u.added&&a){var m=n.slice(d,d+u.count);m=m.map(function(y,b){var g=r[f+b];return g.length>y.length?g:y}),u.value=e.join(m)}else u.value=e.join(n.slice(d,d+u.count));d+=u.count,u.added||(f+=u.count)}}var p=s[c-1];return c>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(s[c-2].value+=p.value,s.pop()),s}var dp=new Kt;function fp(e,o,n){return dp.diff(e,o,n)}function up(e,o){if(typeof e=="function")o.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);return o}var Ml=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Tl=/\S/,Ka=new Kt;Ka.equals=function(e,o){return this.options.ignoreCase&&(e=e.toLowerCase(),o=o.toLowerCase()),e===o||this.options.ignoreWhitespace&&!Tl.test(e)&&!Tl.test(o)},Ka.tokenize=function(e){for(var o=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<o.length-1;n++)!o[n+1]&&o[n+2]&&Ml.test(o[n])&&Ml.test(o[n+2])&&(o[n]+=o[n+2],o.splice(n+1,2),n--);return o};function hp(e,o,n){return n=up(n,{ignoreWhitespace:!0}),Ka.diff(e,o,n)}var Pl=new Kt;Pl.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
2
|
-
`));var o=[],n=
|
|
1
|
+
(function(de,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lucide-vue-next"),require("reka-ui"),require("@vueuse/core"),require("vue-i18n"),require("@vuepic/vue-datepicker"),require("@uppy/core"),require("@uppy/dashboard"),require("@uppy/image-editor"),require("vue-router"),require("vue3-lottie")):typeof define=="function"&&define.amd?define(["exports","vue","lucide-vue-next","reka-ui","@vueuse/core","vue-i18n","@vuepic/vue-datepicker","@uppy/core","@uppy/dashboard","@uppy/image-editor","vue-router","vue3-lottie"],e):(de=typeof globalThis<"u"?globalThis:de||self,e(de.DynamicUI={},de.Vue,de.LucideIcons,de.rekaUi,de.core,de.VueI18n,de.VueDatePicker,de.Uppy,de.UppyDashboard,de.UppyImageEditor,de.VueRouter,de.Vue3Lottie))})(this,(function(de,e,ne,_e,Ke,_t,Nu,Vu,Ri,Mu,_o,Tu){"use strict";var EN=Object.defineProperty;var BN=(de,e,ne)=>e in de?EN(de,e,{enumerable:!0,configurable:!0,writable:!0,value:ne}):de[e]=ne;var pe=(de,e,ne)=>BN(de,typeof e!="symbol"?e+"":e,ne);var Ea;function Pu(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const Lt=Pu(ne);let Nt={};function Ii(t){Nt={...Nt,...t}}function Ou(){return Nt}function Lu(){return Nt.apiBaseUrl?Nt.apiBaseUrl:typeof window<"u"&&window.__MICRO_API_BASE_URL__?window.__MICRO_API_BASE_URL__:""}function Ru(){const t={"Content-Type":"application/json",Accept:"application/json"};let o=null;if(Nt.getAuthToken?o=Nt.getAuthToken():typeof window<"u"&&window.__MICRO_AUTH_TOKEN__?o=window.__MICRO_AUTH_TOKEN__:typeof localStorage<"u"&&(o=localStorage.getItem("token")||sessionStorage.getItem("token")),o&&(t.Authorization=`Bearer ${o}`),Nt.getHeaders){const n=Nt.getHeaders();return{...t,...n}}return t}function Iu(){Nt.onUnauthorized&&Nt.onUnauthorized()}async function Fu(t,o,n,r){const a=Ou();if(a.apiClient)return a.apiClient(t,o||"GET",n);if(!t||!t.trim())throw new Error("[DynamicUI][useApi] URL tidak boleh kosong. Pastikan prop `endpoint.apiUrl` sudah diisi dengan benar.");const s=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],i=(o||"").trim().toUpperCase(),l=s.includes(i)?i:"GET";s.includes(i)||console.warn(`[DynamicUI][useApi] HTTP method '${o}' tidak valid, fallback ke 'GET'.`);const c=Lu(),d=t.startsWith("http")?t:`${c}${t}`,f={method:l,headers:{...Ru(),...r||{}}};n&&!["GET","DELETE"].includes(l)&&(n instanceof FormData?(f.body=n,f.headers&&f.headers["Content-Type"]&&delete f.headers["Content-Type"],f.headers&&f.headers["content-type"]&&delete f.headers["content-type"]):f.body=JSON.stringify(n));let u=d;if(n&&l==="GET"){const p=new URLSearchParams;Object.entries(n).forEach(([b,g])=>{g!=null&&p.append(b,String(g))});const y=p.toString();y&&(u=`${d}${d.includes("?")?"&":"?"}${y}`)}const h=await fetch(u,f);if(h.status===401&&Iu(),!h.ok){const p=await h.text();throw new Error(`HTTP ${h.status}: ${p}`)}return(h.headers.get("content-type")||"").includes("application/json")?h.json():{status:!0,data:await h.text()}}function Ye(){const t=(o,n,r,a)=>{let s=o,i=n,l=r,c=a;return a&&typeof a=="object"?(a._url&&(s=a._url,i=a._method||i||"POST",a._data&&(l={...l||{},...a._data})),a.headers&&(c=a.headers)):o&&n&&(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].includes(n.toUpperCase())||(s=`${o.endsWith("/")?o.slice(0,-1):o}/${n}`,i="POST")),Fu(s,i,l,c)};return{apiUrl:t,DCodeApi:t}}const qo=Math.min,pt=Math.max,nr=Math.round,rr=Math.floor,Rt=t=>({x:t,y:t}),zu={left:"right",right:"left",bottom:"top",top:"bottom"};function Fi(t,o,n){return pt(t,qo(o,n))}function kn(t,o){return typeof t=="function"?t(o):t}function co(t){return t.split("-")[0]}function wn(t){return t.split("-")[1]}function zi(t){return t==="x"?"y":"x"}function $i(t){return t==="y"?"height":"width"}function qt(t){const o=t[0];return o==="t"||o==="b"?"y":"x"}function ji(t){return zi(qt(t))}function $u(t,o,n){n===void 0&&(n=!1);const r=wn(t),a=ji(t),s=$i(a);let i=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(i=ar(i)),[i,ar(i)]}function ju(t){const o=ar(t);return[Na(t),o,Na(o)]}function Na(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Ui=["left","right"],Wi=["right","left"],Uu=["top","bottom"],Wu=["bottom","top"];function Hu(t,o,n){switch(t){case"top":case"bottom":return n?o?Wi:Ui:o?Ui:Wi;case"left":case"right":return o?Uu:Wu;default:return[]}}function qu(t,o,n,r){const a=wn(t);let s=Hu(co(t),n==="start",r);return a&&(s=s.map(i=>i+"-"+a),o&&(s=s.concat(s.map(Na)))),s}function ar(t){const o=co(t);return zu[o]+t.slice(o.length)}function Gu(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ku(t){return typeof t!="number"?Gu(t):{top:t,right:t,bottom:t,left:t}}function sr(t){const{x:o,y:n,width:r,height:a}=t;return{width:r,height:a,top:n,left:o,right:o+r,bottom:n+a,x:o,y:n}}function Hi(t,o,n){let{reference:r,floating:a}=t;const s=qt(o),i=ji(o),l=$i(i),c=co(o),d=s==="y",f=r.x+r.width/2-a.width/2,u=r.y+r.height/2-a.height/2,h=r[l]/2-a[l]/2;let m;switch(c){case"top":m={x:f,y:r.y-a.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-a.width,y:u};break;default:m={x:r.x,y:r.y}}switch(wn(o)){case"start":m[i]-=h*(n&&d?-1:1);break;case"end":m[i]+=h*(n&&d?-1:1);break}return m}async function Xu(t,o){var n;o===void 0&&(o={});const{x:r,y:a,platform:s,rects:i,elements:l,strategy:c}=t,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:m=0}=kn(o,t),p=Ku(m),b=l[h?u==="floating"?"reference":"floating":u],g=sr(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),_=u==="floating"?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),B=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},A=sr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:E,strategy:c}):_);return{top:(g.top-A.top+p.top)/B.y,bottom:(A.bottom-g.bottom+p.bottom)/B.y,left:(g.left-A.left+p.left)/B.x,right:(A.right-g.right+p.right)/B.x}}const Yu=50,Ju=async(t,o,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:Xu},c=await(i.isRTL==null?void 0:i.isRTL(o));let d=await i.getElementRects({reference:t,floating:o,strategy:a}),{x:f,y:u}=Hi(d,r,c),h=r,m=0;const p={};for(let y=0;y<s.length;y++){const b=s[y];if(!b)continue;const{name:g,fn:_}=b,{x:E,y:B,data:A,reset:C}=await _({x:f,y:u,initialPlacement:r,placement:h,strategy:a,middlewareData:p,rects:d,platform:l,elements:{reference:t,floating:o}});f=E??f,u=B??u,p[g]={...p[g],...A},C&&m<Yu&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(d=C.rects===!0?await i.getElementRects({reference:t,floating:o,strategy:a}):C.rects),{x:f,y:u}=Hi(d,h,c)),y=-1)}return{x:f,y:u,placement:h,strategy:a,middlewareData:p}},Qu=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(o){var n,r;const{placement:a,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:d}=o,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:y=!0,...b}=kn(t,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=co(a),_=qt(l),E=co(l)===l,B=await(c.isRTL==null?void 0:c.isRTL(d.floating)),A=h||(E||!y?[ar(l)]:ju(l)),C=p!=="none";!h&&C&&A.push(...qu(l,y,p,B));const x=[l,...A],w=await c.detectOverflow(o,b),D=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&D.push(w[g]),u){const V=$u(a,i,B);D.push(w[V[0]],w[V[1]])}if(k=[...k,{placement:a,overflows:D}],!D.every(V=>V<=0)){var v,S;const V=(((v=s.flip)==null?void 0:v.index)||0)+1,L=x[V];if(L&&(!(u==="alignment"?_!==qt(L):!1)||k.every(R=>qt(R.placement)===_?R.overflows[0]>0:!0)))return{data:{index:V,overflows:k},reset:{placement:L}};let O=(S=k.filter(P=>P.overflows[0]<=0).sort((P,R)=>P.overflows[1]-R.overflows[1])[0])==null?void 0:S.placement;if(!O)switch(m){case"bestFit":{var N;const P=(N=k.filter(R=>{if(C){const j=qt(R.placement);return j===_||j==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(j=>j>0).reduce((j,T)=>j+T,0)]).sort((R,j)=>R[1]-j[1])[0])==null?void 0:N[0];P&&(O=P);break}case"initialPlacement":O=l;break}if(a!==O)return{reset:{placement:O}}}return{}}}},Zu=new Set(["left","top"]);async function eh(t,o){const{placement:n,platform:r,elements:a}=t,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),i=co(n),l=wn(n),c=qt(n)==="y",d=Zu.has(i)?-1:1,f=s&&c?-1:1,u=kn(o,t);let{mainAxis:h,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof p=="number"&&(m=l==="end"?p*-1:p),c?{x:m*f,y:h*d}:{x:h*d,y:m*f}}const th=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(o){var n,r;const{x:a,y:s,placement:i,middlewareData:l}=o,c=await eh(o,t);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:s+c.y,data:{...c,placement:i}}}}},oh=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(o){const{x:n,y:r,placement:a,platform:s}=o,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:g=>{let{x:_,y:E}=g;return{x:_,y:E}}},...d}=kn(t,o),f={x:n,y:r},u=await s.detectOverflow(o,d),h=qt(co(a)),m=zi(h);let p=f[m],y=f[h];if(i){const g=m==="y"?"top":"left",_=m==="y"?"bottom":"right",E=p+u[g],B=p-u[_];p=Fi(E,p,B)}if(l){const g=h==="y"?"top":"left",_=h==="y"?"bottom":"right",E=y+u[g],B=y-u[_];y=Fi(E,y,B)}const b=c.fn({...o,[m]:p,[h]:y});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:i,[h]:l}}}}}},nh=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(o){var n,r;const{placement:a,rects:s,platform:i,elements:l}=o,{apply:c=()=>{},...d}=kn(t,o),f=await i.detectOverflow(o,d),u=co(a),h=wn(a),m=qt(a)==="y",{width:p,height:y}=s.floating;let b,g;u==="top"||u==="bottom"?(b=u,g=h===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(g=u,b=h==="end"?"top":"bottom");const _=y-f.top-f.bottom,E=p-f.left-f.right,B=qo(y-f[b],_),A=qo(p-f[g],E),C=!o.middlewareData.shift;let x=B,w=A;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(w=E),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(x=_),C&&!h){const k=pt(f.left,0),v=pt(f.right,0),S=pt(f.top,0),N=pt(f.bottom,0);m?w=p-2*(k!==0||v!==0?k+v:pt(f.left,f.right)):x=y-2*(S!==0||N!==0?S+N:pt(f.top,f.bottom))}await c({...o,availableWidth:w,availableHeight:x});const D=await i.getDimensions(l.floating);return p!==D.width||y!==D.height?{reset:{rects:!0}}:{}}}};function ir(){return typeof window<"u"}function Eo(t){return Va(t)?(t.nodeName||"").toLowerCase():"#document"}function gt(t){var o;return(t==null||(o=t.ownerDocument)==null?void 0:o.defaultView)||window}function It(t){var o;return(o=(Va(t)?t.ownerDocument:t.document)||window.document)==null?void 0:o.documentElement}function Va(t){return ir()?t instanceof Node||t instanceof gt(t).Node:!1}function Vt(t){return ir()?t instanceof Element||t instanceof gt(t).Element:!1}function Gt(t){return ir()?t instanceof HTMLElement||t instanceof gt(t).HTMLElement:!1}function qi(t){return!ir()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof gt(t).ShadowRoot}function Cn(t){const{overflow:o,overflowX:n,overflowY:r,display:a}=Mt(t);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&a!=="inline"&&a!=="contents"}function rh(t){return/^(table|td|th)$/.test(Eo(t))}function lr(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const ah=/transform|translate|scale|rotate|perspective|filter/,sh=/paint|layout|strict|content/,Bo=t=>!!t&&t!=="none";let Ma;function Ta(t){const o=Vt(t)?Mt(t):t;return Bo(o.transform)||Bo(o.translate)||Bo(o.scale)||Bo(o.rotate)||Bo(o.perspective)||!Pa()&&(Bo(o.backdropFilter)||Bo(o.filter))||ah.test(o.willChange||"")||sh.test(o.contain||"")}function ih(t){let o=fo(t);for(;Gt(o)&&!Go(o);){if(Ta(o))return o;if(lr(o))return null;o=fo(o)}return null}function Pa(){return Ma==null&&(Ma=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ma}function Go(t){return/^(html|body|#document)$/.test(Eo(t))}function Mt(t){return gt(t).getComputedStyle(t)}function cr(t){return Vt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function fo(t){if(Eo(t)==="html")return t;const o=t.assignedSlot||t.parentNode||qi(t)&&t.host||It(t);return qi(o)?o.host:o}function Gi(t){const o=fo(t);return Go(o)?t.ownerDocument?t.ownerDocument.body:t.body:Gt(o)&&Cn(o)?o:Gi(o)}function _n(t,o,n){var r;o===void 0&&(o=[]),n===void 0&&(n=!0);const a=Gi(t),s=a===((r=t.ownerDocument)==null?void 0:r.body),i=gt(a);if(s){const l=Oa(i);return o.concat(i,i.visualViewport||[],Cn(a)?a:[],l&&n?_n(l):[])}else return o.concat(a,_n(a,[],n))}function Oa(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ki(t){const o=Mt(t);let n=parseFloat(o.width)||0,r=parseFloat(o.height)||0;const a=Gt(t),s=a?t.offsetWidth:n,i=a?t.offsetHeight:r,l=nr(n)!==s||nr(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function La(t){return Vt(t)?t:t.contextElement}function Ko(t){const o=La(t);if(!Gt(o))return Rt(1);const n=o.getBoundingClientRect(),{width:r,height:a,$:s}=Ki(o);let i=(s?nr(n.width):n.width)/r,l=(s?nr(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const lh=Rt(0);function Xi(t){const o=gt(t);return!Pa()||!o.visualViewport?lh:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function ch(t,o,n){return o===void 0&&(o=!1),!n||o&&n!==gt(t)?!1:o}function So(t,o,n,r){o===void 0&&(o=!1),n===void 0&&(n=!1);const a=t.getBoundingClientRect(),s=La(t);let i=Rt(1);o&&(r?Vt(r)&&(i=Ko(r)):i=Ko(t));const l=ch(s,n,r)?Xi(s):Rt(0);let c=(a.left+l.x)/i.x,d=(a.top+l.y)/i.y,f=a.width/i.x,u=a.height/i.y;if(s){const h=gt(s),m=r&&Vt(r)?gt(r):r;let p=h,y=Oa(p);for(;y&&r&&m!==p;){const b=Ko(y),g=y.getBoundingClientRect(),_=Mt(y),E=g.left+(y.clientLeft+parseFloat(_.paddingLeft))*b.x,B=g.top+(y.clientTop+parseFloat(_.paddingTop))*b.y;c*=b.x,d*=b.y,f*=b.x,u*=b.y,c+=E,d+=B,p=gt(y),y=Oa(p)}}return sr({width:f,height:u,x:c,y:d})}function dr(t,o){const n=cr(t).scrollLeft;return o?o.left+n:So(It(t)).left+n}function Yi(t,o){const n=t.getBoundingClientRect(),r=n.left+o.scrollLeft-dr(t,n),a=n.top+o.scrollTop;return{x:r,y:a}}function dh(t){let{elements:o,rect:n,offsetParent:r,strategy:a}=t;const s=a==="fixed",i=It(r),l=o?lr(o.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},d=Rt(1);const f=Rt(0),u=Gt(r);if((u||!u&&!s)&&((Eo(r)!=="body"||Cn(i))&&(c=cr(r)),u)){const m=So(r);d=Ko(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const h=i&&!u&&!s?Yi(i,c):Rt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-c.scrollTop*d.y+f.y+h.y}}function fh(t){return Array.from(t.getClientRects())}function uh(t){const o=It(t),n=cr(t),r=t.ownerDocument.body,a=pt(o.scrollWidth,o.clientWidth,r.scrollWidth,r.clientWidth),s=pt(o.scrollHeight,o.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+dr(t);const l=-n.scrollTop;return Mt(r).direction==="rtl"&&(i+=pt(o.clientWidth,r.clientWidth)-a),{width:a,height:s,x:i,y:l}}const Ji=25;function hh(t,o){const n=gt(t),r=It(t),a=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){s=a.width,i=a.height;const f=Pa();(!f||f&&o==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}const d=dr(r);if(d<=0){const f=r.ownerDocument,u=f.body,h=getComputedStyle(u),m=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(r.clientWidth-u.clientWidth-m);p<=Ji&&(s-=p)}else d<=Ji&&(s+=d);return{width:s,height:i,x:l,y:c}}function mh(t,o){const n=So(t,!0,o==="fixed"),r=n.top+t.clientTop,a=n.left+t.clientLeft,s=Gt(t)?Ko(t):Rt(1),i=t.clientWidth*s.x,l=t.clientHeight*s.y,c=a*s.x,d=r*s.y;return{width:i,height:l,x:c,y:d}}function Qi(t,o,n){let r;if(o==="viewport")r=hh(t,n);else if(o==="document")r=uh(It(t));else if(Vt(o))r=mh(o,n);else{const a=Xi(t);r={x:o.x-a.x,y:o.y-a.y,width:o.width,height:o.height}}return sr(r)}function Zi(t,o){const n=fo(t);return n===o||!Vt(n)||Go(n)?!1:Mt(n).position==="fixed"||Zi(n,o)}function ph(t,o){const n=o.get(t);if(n)return n;let r=_n(t,[],!1).filter(l=>Vt(l)&&Eo(l)!=="body"),a=null;const s=Mt(t).position==="fixed";let i=s?fo(t):t;for(;Vt(i)&&!Go(i);){const l=Mt(i),c=Ta(i);!c&&l.position==="fixed"&&(a=null),(s?!c&&!a:!c&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Cn(i)&&!c&&Zi(t,i))?r=r.filter(f=>f!==i):a=l,i=fo(i)}return o.set(t,r),r}function gh(t){let{element:o,boundary:n,rootBoundary:r,strategy:a}=t;const i=[...n==="clippingAncestors"?lr(o)?[]:ph(o,this._c):[].concat(n),r],l=Qi(o,i[0],a);let c=l.top,d=l.right,f=l.bottom,u=l.left;for(let h=1;h<i.length;h++){const m=Qi(o,i[h],a);c=pt(m.top,c),d=qo(m.right,d),f=qo(m.bottom,f),u=pt(m.left,u)}return{width:d-u,height:f-c,x:u,y:c}}function bh(t){const{width:o,height:n}=Ki(t);return{width:o,height:n}}function yh(t,o,n){const r=Gt(o),a=It(o),s=n==="fixed",i=So(t,!0,s,o);let l={scrollLeft:0,scrollTop:0};const c=Rt(0);function d(){c.x=dr(a)}if(r||!r&&!s)if((Eo(o)!=="body"||Cn(a))&&(l=cr(o)),r){const m=So(o,!0,s,o);c.x=m.x+o.clientLeft,c.y=m.y+o.clientTop}else a&&d();s&&!r&&a&&d();const f=a&&!r&&!s?Yi(a,l):Rt(0),u=i.left+l.scrollLeft-c.x-f.x,h=i.top+l.scrollTop-c.y-f.y;return{x:u,y:h,width:i.width,height:i.height}}function Ra(t){return Mt(t).position==="static"}function el(t,o){if(!Gt(t)||Mt(t).position==="fixed")return null;if(o)return o(t);let n=t.offsetParent;return It(t)===n&&(n=n.ownerDocument.body),n}function tl(t,o){const n=gt(t);if(lr(t))return n;if(!Gt(t)){let a=fo(t);for(;a&&!Go(a);){if(Vt(a)&&!Ra(a))return a;a=fo(a)}return n}let r=el(t,o);for(;r&&rh(r)&&Ra(r);)r=el(r,o);return r&&Go(r)&&Ra(r)&&!Ta(r)?n:r||ih(t)||n}const xh=async function(t){const o=this.getOffsetParent||tl,n=this.getDimensions,r=await n(t.floating);return{reference:yh(t.reference,await o(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kh(t){return Mt(t).direction==="rtl"}const wh={convertOffsetParentRelativeRectToViewportRelativeRect:dh,getDocumentElement:It,getClippingRect:gh,getOffsetParent:tl,getElementRects:xh,getClientRects:fh,getDimensions:bh,getScale:Ko,isElement:Vt,isRTL:kh};function ol(t,o){return t.x===o.x&&t.y===o.y&&t.width===o.width&&t.height===o.height}function Ch(t,o){let n=null,r;const a=It(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const d=t.getBoundingClientRect(),{left:f,top:u,width:h,height:m}=d;if(l||o(),!h||!m)return;const p=rr(u),y=rr(a.clientWidth-(f+h)),b=rr(a.clientHeight-(u+m)),g=rr(f),E={rootMargin:-p+"px "+-y+"px "+-b+"px "+-g+"px",threshold:pt(0,qo(1,c))||1};let B=!0;function A(C){const x=C[0].intersectionRatio;if(x!==c){if(!B)return i();x?i(!1,x):r=setTimeout(()=>{i(!1,1e-7)},1e3)}x===1&&!ol(d,t.getBoundingClientRect())&&i(),B=!1}try{n=new IntersectionObserver(A,{...E,root:a.ownerDocument})}catch{n=new IntersectionObserver(A,E)}n.observe(t)}return i(!0),s}function Ia(t,o,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=La(t),f=a||s?[...d?_n(d):[],...o?_n(o):[]]:[];f.forEach(g=>{a&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const u=d&&l?Ch(d,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(g=>{let[_]=g;_&&_.target===d&&m&&o&&(m.unobserve(o),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(o)})),n()}),d&&!c&&m.observe(d),o&&m.observe(o));let p,y=c?So(t):null;c&&b();function b(){const g=So(t);y&&!ol(y,g)&&n(),y=g,p=requestAnimationFrame(b)}return n(),()=>{var g;f.forEach(_=>{a&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),u==null||u(),(g=m)==null||g.disconnect(),m=null,c&&cancelAnimationFrame(p)}}const Fa=th,za=oh,$a=Qu,ja=nh,_h=(t,o,n)=>{const r=new Map,a={platform:wh,...n},s={...a.platform,_c:r};return Ju(t,o,{...a,platform:s})};function Eh(t){return t!=null&&typeof t=="object"&&"$el"in t}function nl(t){if(Eh(t)){const o=t.$el;return Va(o)&&Eo(o)==="#comment"?null:o}return t}function En(t){return typeof t=="function"?t():e.unref(t)}function rl(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function al(t,o){const n=rl(t);return Math.round(o*n)/n}function Ua(t,o,n){n===void 0&&(n={});const r=n.whileElementsMounted,a=e.computed(()=>{var x;return(x=En(n.open))!=null?x:!0}),s=e.computed(()=>En(n.middleware)),i=e.computed(()=>{var x;return(x=En(n.placement))!=null?x:"bottom"}),l=e.computed(()=>{var x;return(x=En(n.strategy))!=null?x:"absolute"}),c=e.computed(()=>{var x;return(x=En(n.transform))!=null?x:!0}),d=e.computed(()=>nl(t.value)),f=e.computed(()=>nl(o.value)),u=e.ref(0),h=e.ref(0),m=e.ref(l.value),p=e.ref(i.value),y=e.shallowRef({}),b=e.ref(!1),g=e.computed(()=>{const x={position:m.value,left:"0",top:"0"};if(!f.value)return x;const w=al(f.value,u.value),D=al(f.value,h.value);return c.value?{...x,transform:"translate("+w+"px, "+D+"px)",...rl(f.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:w+"px",top:D+"px"}});let _;function E(){if(d.value==null||f.value==null)return;const x=a.value;_h(d.value,f.value,{middleware:s.value,placement:i.value,strategy:l.value}).then(w=>{u.value=w.x,h.value=w.y,m.value=w.strategy,p.value=w.placement,y.value=w.middlewareData,b.value=x!==!1})}function B(){typeof _=="function"&&(_(),_=void 0)}function A(){if(B(),r===void 0){E();return}if(d.value!=null&&f.value!=null){_=r(d.value,f.value,E);return}}function C(){a.value||(b.value=!1)}return e.watch([s,i,l,a],E,{flush:"sync"}),e.watch([d,f],A,{flush:"sync"}),e.watch(a,C,{flush:"sync"}),e.getCurrentScope()&&e.onScopeDispose(B),{x:e.shallowReadonly(u),y:e.shallowReadonly(h),strategy:e.shallowReadonly(m),placement:e.shallowReadonly(p),middlewareData:e.shallowReadonly(y),isPositioned:e.shallowReadonly(b),floatingStyles:g,update:E}}const Bh=["aria-busy"],Sh={key:0,class:"mb-1 h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Ah=["for"],vh={key:0,class:"ml-1 text-destructive"},Dh={class:"relative"},Nh={key:0,class:"flex items-center text-gray-500 gap-2"},Vh=["id","placeholder","disabled","readonly","value"],Mh={key:1,class:"h-6 w-6 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},Th=["disabled"],Ph={class:"overflow-y-auto overflow-x-hidden",style:{"max-height":"350px"}},Oh=["onMouseenter","onClick"],Lh={key:0},Rh={class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},Ih={key:0},Fh={key:1},zh={key:2},$h={key:1,class:"mt-1 text-xs text-red-600"},fr=e.defineComponent({name:"DCodeAutoComplete",inheritAttrs:!1,__name:"DCodeAutoComplete",props:{modelValue:{},apiModule:{},apiAction:{},apiOptions:{},autoFetchOnOpen:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},skeleton:{type:Boolean,default:!1},error:{default:null},errorMessage:{default:null},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},returnObject:{type:Boolean,default:!1},endpoint:{},apiParams:{default:()=>({})},fetchItems:{},icon:{}},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,r=o,a=e.useAttrs(),s=e.computed(()=>a.label??void 0),i=q=>{const ie=a[q];return ie===""||ie===!0||ie==="true"||ie===1||ie==="1"},l=e.ref(!1),c=e.computed(()=>n.itemTitle||a["item-title"]||a.itemTitle||"name"),d=e.computed(()=>n.itemValue||a["item-value"]||a.itemValue||"id"),f=e.computed(()=>n.disabled),u=e.computed(()=>i("required")),h=e.computed(()=>n.readonly||i("readonly")),m=e.computed(()=>n.returnObject||i("return-object")||i("returnObject")),p=e.computed(()=>u.value||i("aria-required")),y=e.computed(()=>n.error||n.errorMessage||a["error-message"]),b=e.computed(()=>a.placeholder??""),g=e.computed(()=>{const q=a.minChars??a["min-chars"];if(q==null||q==="")return 0;const ie=typeof q=="number"?q:Number.parseInt(String(q),10);return Number.isFinite(ie)&&ie>0?ie:0}),_=e.computed(()=>{const q=a.rules;return Array.isArray(q)?q:[]}),E=e.computed(()=>{const q=a.id||a.label;return q?`app-autocomplete-${q}-${Math.random().toString(36).slice(2,7)}`:void 0}),B=e.ref(n.modelValue),A=e.ref([]),C=e.ref(!1),x=e.ref(!1),w=e.computed(()=>a.items),D=e.computed(()=>{const q=V.value;return q.apiModule&&q.apiAction||q.apiUrl||n.fetchItems?A.value:w.value??[]}),k=e.computed(()=>!!a.loading),v=e.computed(()=>k.value||C.value),S=e.computed(()=>{const{label:q,items:ie,loading:he,rules:te,"item-title":le,"item-value":G,itemTitle:ee,itemValue:re,minChars:Ce,"min-chars":qe,clearable:kt,required:nt,"aria-required":tr,disabled:Ho,readonly:ot,visible:du,"return-object":Ai,returnObject:fu,class:vi,"fetch-items":uu,fetchItems:Ba,error:Di,errorMessage:hu,"error-message":mu,...Ni}=a||{};return Ni}),N=()=>{if(n.apiOptions)return typeof n.apiOptions=="function"?n.apiOptions():n.apiOptions},V=e.computed(()=>{const q=n.endpoint||{};return{apiModule:n.apiModule||q.apiModule,apiAction:n.apiAction||q.apiAction,apiUrl:q.apiUrl,apiMethod:q.apiMethod||"GET"}}),L=e.ref(null),O=e.ref(null),P=e.ref(null),{floatingStyles:R}=Ua(O,P,{placement:"bottom-start",whileElementsMounted:Ia,middleware:[Fa(4),$a(),za(),ja({apply({rects:q,elements:ie,availableHeight:he}){Object.assign(ie.floating.style,{width:`${q.reference.width}px`,maxHeight:`${he}px`})}})]}),j=e.ref(!1),T=e.ref(""),I=e.ref(-1),X=e.ref(null),H=e.computed(()=>!g.value||(T.value||"").trim().length>=g.value?"":`Ketik minimal ${g.value} karakter`),W=q=>{if(q==null)return"";if(typeof q=="string"||typeof q=="number")return String(q);const ie=c.value;return typeof ie=="function"?ie(q):(q==null?void 0:q[ie])??(q==null?void 0:q.name)??(q==null?void 0:q.nama)??(q==null?void 0:q.label)??(q==null?void 0:q.title)??"-"},Z=q=>{if(q==null)return null;if(typeof q=="string"||typeof q=="number")return q;const ie=d.value;return typeof ie=="function"?ie(q):(q==null?void 0:q[ie])??(q==null?void 0:q.id)??(q==null?void 0:q.value)??(q==null?void 0:q.code)??null},oe=e.computed(()=>{const q=B.value;if(q==null||q==="")return"";if(Array.isArray(q))return q.length?q.map(te=>{if(m.value&&typeof te=="object"||typeof te=="object")return W(te);const le=D.value.find(G=>Z(G)==te);return le?W(le):String(te)}).join(", "):"";if(typeof q=="object")return W(q);const ie=D.value.find(he=>Z(he)==q);return ie?W(ie):String(q)}),ge=e.computed(()=>{const q=D.value||[],ie=(T.value||"").trim().toLowerCase(),he=(oe.value||"").toLowerCase(),te=!ie||ie===he;let le=q;if(te||(le=q.filter(G=>W(G).toLowerCase().includes(ie))),le.length>0){const G=ee=>{const re=Z(ee);return Array.isArray(B.value)?B.value.some(Ce=>Ce==re):B.value==re};le=[...le].sort((ee,re)=>{const Ce=G(ee),qe=G(re);return Ce&&!qe?-1:!Ce&&qe?1:0})}return le}),Ne=q=>Array.isArray(q)?q.length===0:q==null||q==="",we=q=>{if(X.value=null,u.value&&Ne(q)&&!_.value.length)return X.value="This field is required",!1;for(const ie of _.value){const he=ie(q);if(he===!1)return X.value="Invalid value",!1;if(typeof he=="string")return X.value=he,!1}return!0},Q=async()=>{if(f.value||h.value)return;j.value=!0,I.value=ge.value.length?0:-1,T.value=oe.value||"";const q=V.value,ie=q.apiModule&&q.apiAction||q.apiUrl||n.fetchItems;n.autoFetchOnOpen&&ie&&!x.value&&(await Ue(),I.value=ge.value.length?0:-1)},$=()=>{j.value=!1,I.value=-1,T.value=oe.value||""},Y=q=>{const ie=m.value?q:Z(q);let he=ie;Array.isArray(B.value)&&(he=[ie]),B.value=he,r("update:modelValue",he),X.value=null,we(he),T.value=W(q),$()},ae=()=>{A.value=[],x.value=!1,B.value=Array.isArray(B.value)?[]:null,r("update:modelValue",B.value),T.value="",X.value=null},ye=()=>{l.value=!0,ae(),$(),setTimeout(()=>{l.value=!1},0)},Pe=q=>{if(f.value||h.value)return;const ie=q.target.value;T.value=ie,X.value&&(X.value=null),j.value||(j.value=!0),I.value=ge.value.length?0:-1;const he=V.value.apiModule&&V.value.apiAction||V.value.apiUrl||n.fetchItems;n.autoFetchOnOpen&&he&&!v.value&&!x.value&&Ue()},Ee=q=>{var he;if(f.value||h.value)return;const ie={ArrowDown:()=>{if(q.preventDefault(),!j.value){Q();return}ge.value.length&&(I.value=Math.min(I.value+1,ge.value.length-1))},ArrowUp:()=>{!j.value||!ge.value.length||(q.preventDefault(),I.value=Math.max(I.value-1,0))},Enter:()=>{if(!j.value)return;q.preventDefault();const te=ge.value[I.value];te&&Y(te)},Escape:()=>{q.preventDefault(),$()},Tab:()=>{$()}};(he=ie[q.key])==null||he.call(ie)},Ue=async()=>{const q=V.value;if(q.apiModule&&q.apiAction||q.apiUrl||n.fetchItems){C.value=!0;try{let he;if(n.fetchItems){const te=N()||{},le={page:1,perPage:100,search:(T.value||"").trim(),...te,...n.apiParams},G=await n.fetchItems(le),ee=(G==null?void 0:G.data)??G;he=(ee==null?void 0:ee.data)??ee}else{const le=Ye().DCodeApi;if(typeof le!="function"){console.error("[DCodeAutoComplete] useApi() must expose DCodeApi()");return}const ee={page:1,perPage:100,...N()||{},...n.apiParams};let re;q.apiUrl?re=await le("","",ee,{_url:q.apiUrl,_method:q.apiMethod||"POST"}):re=await le(q.apiModule,q.apiAction,ee);const Ce=(re==null?void 0:re.data)??re;he=(Ce==null?void 0:Ce.data)??Ce}A.value=Array.isArray(he)?he:[],x.value=!0}catch(he){console.error("[DCodeAutoComplete][fetchOptions] ERROR:",he),X.value=`[DCodeAutoComplete][fetchOptions] ERROR: Error: ${(he==null?void 0:he.message)||(he==null?void 0:he.toString())||"Failed to load options"}`,A.value=[],x.value=!0}finally{C.value=!1}}},Ie=q=>{const ie=Z(q);return m.value?B.value?Array.isArray(B.value)?B.value.some(he=>Z(he)==ie):Z(B.value)==ie:!1:Array.isArray(B.value)?B.value.some(he=>he==ie):B.value==ie};e.watch(()=>[N(),V.value,n.apiParams],([q,ie,he],[te,le,G])=>{const ee=V.value;if(!(ee.apiModule&&ee.apiAction||ee.apiUrl||n.fetchItems)){ae();return}const Ce=JSON.stringify(q??null)===JSON.stringify(te??null),qe=JSON.stringify(he??null)===JSON.stringify(G??null);Ce&&qe||(ae(),qe||Ue())},{deep:!0}),e.watch(()=>n.modelValue,(q,ie)=>{B.value=q,!l.value&&(q==null||q==="")&&ie!=null&&n.apiModule&&n.apiAction&&(A.value=[],x.value=!1),T.value=oe.value||""},{immediate:!0});const se=V.value;(se.apiModule&&se.apiAction||se.apiUrl||n.fetchItems)&&(n.autoFetchOnMount||!Ne(n.modelValue))&&Ue();const Le=q=>{const ie=L.value,he=P.value,te=q.target;ie&&ie.contains(te)||he&&he.contains(te)||j.value&&$()},ve=e.computed(()=>{const q=n.modelValue;return q==null?!1:typeof q=="string"?q.trim().length>0:Array.isArray(q)?q.length>0:typeof q=="object"?Object.keys(q).length>0:!0}),lt=e.computed(()=>!!n.clearable&&ve.value&&!n.disabled);return e.onMounted(()=>{document.addEventListener("mousedown",Le)}),e.onBeforeUnmount(()=>{document.removeEventListener("mousedown",Le)}),(q,ie)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"rootEl",ref:L,class:e.normalizeClass(["w-full",[e.unref(a).class,f.value?"cursor-not-allowed":""]]),"aria-busy":t.skeleton},[t.skeleton?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value?(e.openBlock(),e.createElementBlock("div",Sh)):e.createCommentVNode("",!0),ie[6]||(ie[6]=e.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.value?(e.openBlock(),e.createElementBlock("label",{key:0,for:E.value,class:"mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"},[e.createTextVNode(e.toDisplayString(s.value)+" ",1),p.value?(e.openBlock(),e.createElementBlock("span",vh,"*")):e.createCommentVNode("",!0)],8,Ah)):e.createCommentVNode("",!0),e.createElementVNode("div",Dh,[e.createElementVNode("div",{ref_key:"reference",ref:O,class:e.normalizeClass(["flex items-center gap-2 rounded-lg border px-3 py-2 bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 h-10 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",[f.value||h.value?"opacity-60 cursor-not-allowed":"",X.value||y.value?"border-red-500 focus-within:ring-red-500":""]])},[n.icon||q.$slots["prepend-inner"]?(e.openBlock(),e.createElementBlock("div",Nh,[e.renderSlot(q.$slots,"prepend-inner",{},()=>[n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps(S.value,{id:E.value,type:"text",class:["w-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",f.value||h.value?"cursor-not-allowed":"cursor-text"],placeholder:b.value,disabled:f.value,readonly:h.value,value:j.value?T.value:oe.value||T.value,onFocus:ie[0]||(ie[0]=()=>{j.value||Q()}),onClick:ie[1]||(ie[1]=()=>{j.value||Q()}),onInput:Pe,onKeydown:Ee,onBlur:ie[2]||(ie[2]=()=>we(B.value))}),null,16,Vh),v.value?(e.openBlock(),e.createElementBlock("svg",Mh,[...ie[7]||(ie[7]=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):lt.value?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onMousedown:ie[3]||(ie[3]=e.withModifiers(()=>{},["prevent"])),onClick:e.withModifiers(ye,["stop"]),"aria-label":"Clear"}," ✕ ",32)):(e.openBlock(),e.createElementBlock("button",{key:3,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",disabled:f.value||h.value,onClick:ie[4]||(ie[4]=he=>j.value?$():Q()),"aria-label":"Toggle"},[e.createVNode(e.unref(ne.ChevronDown),{class:e.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":j.value}])},null,8,["class"])],8,Th))],2),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[j.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floating",ref:P,style:e.normalizeStyle(e.unref(R)),class:"z-[50] overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[e.createElementVNode("div",Ph,[ge.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(ge.value,(he,te)=>(e.openBlock(),e.createElementBlock("button",{key:Z(he)??te,type:"button",class:e.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",te===I.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:le=>I.value=te,onMousedown:ie[5]||(ie[5]=e.withModifiers(()=>{},["prevent"])),onClick:le=>Y(he)},[e.createTextVNode(e.toDisplayString(W(he))+" ",1),Ie(he)?(e.openBlock(),e.createElementBlock("span",Lh," ✓ ")):e.createCommentVNode("",!0)],42,Oh))),128)):e.renderSlot(q.$slots,"no-data",{key:1},()=>[e.createElementVNode("div",Rh,[v.value?(e.openBlock(),e.createElementBlock("span",Ih,"Loading data…")):H.value?(e.openBlock(),e.createElementBlock("span",Fh,e.toDisplayString(H.value),1)):(e.openBlock(),e.createElementBlock("span",zh,"No data available"))])])])],4)):e.createCommentVNode("",!0)]))]),X.value||y.value?(e.openBlock(),e.createElementBlock("p",$h,e.toDisplayString(X.value||y.value),1)):e.createCommentVNode("",!0)],64))],10,Bh)),[[e.vShow,t.visible]])}}),jh=["aria-busy"],Uh={key:0,class:"mb-1 h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Wh=["for"],Hh={key:0,class:"ml-1 text-destructive"},qh={class:"relative"},Gh={key:0,class:"flex items-center text-gray-500 gap-2"},Kh=["id","placeholder","disabled","value"],Xh={key:1,class:"h-6 w-6 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},Yh=["disabled"],Jh={key:0,class:"p-3 space-y-2"},Qh=["onMouseenter","onClick"],Zh={class:"flex items-center space-x-3"},em={class:"flex-1"},tm={class:"text-sm font-medium text-gray-900 dark:text-gray-100"},om={key:0,class:"text-xs text-gray-500 dark:text-gray-400"},nm={key:0},rm={key:2,class:"p-3 text-center"},am={class:"inline-flex items-center space-x-2"},sm={class:"text-sm text-gray-500"},im={key:3,class:"p-3 text-center"},lm={class:"text-xs text-gray-400"},cm={key:4,class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},dm={key:1,class:"mt-1 text-xs text-red-600"},fm={key:2,class:"mt-1 text-xs text-gray-500"},sl=e.defineComponent({name:"DCodeInfiniteAutoComplete",inheritAttrs:!1,__name:"DCodeInfiniteAutoComplete",props:{modelValue:{},apiModule:{},apiAction:{},apiOptions:{},autoFetchOnOpen:{type:Boolean,default:!0},refreshOnOpen:{type:Boolean,default:!1},autoFetchOnMount:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},skeleton:{type:Boolean,default:!1},error:{default:null},errorMessage:{default:null},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},itemSubtitle:{},returnObject:{type:Boolean,default:!1},endpoint:{},apiParams:{},fetchItems:{},icon:{},label:{},placeholder:{default:"Select an option"},required:{type:Boolean,default:!1},inputType:{default:"text"},helperText:{default:""},noResultsText:{default:"No results found"},loadingText:{default:"Loading more..."},endOfResultsText:{default:"End of results"},pageSize:{default:10},threshold:{default:100},debounceMs:{default:300}},emits:["update:modelValue","focus","blur","select","search","load-more","end-of-results","error"],setup(t,{emit:o}){const n=t,r=o,a=e.useAttrs(),s=e.ref(),i=e.ref(),l=e.ref(),c=e.ref(),d=e.ref(),f=e.computed(()=>{const I=n.label||n.placeholder;return I?`app-infinite-autocomplete-${I}-${Math.random().toString(36).slice(2,7)}`:void 0}),u=e.ref(""),h=e.ref([]),m=e.ref(!1),p=e.ref(!1),y=e.ref(-1),b=e.ref(1),g=e.ref(!0),_=e.ref(0),E=e.ref(),{floatingStyles:B}=Ua(c,d,{placement:"bottom-start",whileElementsMounted:Ia,middleware:[Fa(4),$a(),za(),ja({apply({rects:I,elements:X}){Object.assign(X.floating.style,{width:`${I.reference.width}px`})}})]});e.computed(()=>({"opacity-50 pointer-events-none":n.disabled,relative:!0}));const A=e.computed(()=>u.value?h.value.filter(I=>D(I).toLowerCase().includes(u.value.toLowerCase())):h.value),C=e.computed(()=>{if(p.value&&u.value)return u.value;if(n.modelValue){if(n.returnObject)return D(n.modelValue);{const I=h.value.find(X=>k(X)===n.modelValue);return I?D(I):String(n.modelValue)}}return""}),x=()=>{p.value=!0},w=()=>{p.value=!1},D=I=>typeof n.itemTitle=="function"?n.itemTitle(I):I[n.itemTitle]||"",k=I=>typeof n.itemValue=="function"?n.itemValue(I):I[n.itemValue]||I,v=I=>n.itemSubtitle?typeof n.itemSubtitle=="function"?n.itemSubtitle(I):I[n.itemSubtitle]||"":"",S=I=>n.modelValue?n.returnObject?k(I)===k(n.modelValue):k(I)===n.modelValue:!1,N=I=>{var H;const X=n.returnObject?I:k(I);r("update:modelValue",X),r("select",I),p.value=!1,u.value="",(H=s.value)==null||H.blur()},V=()=>{var I;r("update:modelValue",null),u.value="",(I=s.value)==null||I.focus()},L=I=>{p.value=!0,r("focus",I),n.autoFetchOnOpen&&!m.value&&(n.refreshOnOpen||h.value.length===0)&&T(!0)},O=I=>{setTimeout(()=>{p.value=!1,r("blur",I)},200)},P=I=>{const X=I.target;u.value=X.value,E.value&&clearTimeout(E.value),E.value=setTimeout(()=>{r("search",u.value),b.value=1,g.value=!0,T(!0)},n.debounceMs)},R=I=>{if(p.value)switch(I.key){case"ArrowDown":I.preventDefault(),y.value=Math.min(y.value+1,A.value.length-1);break;case"ArrowUp":I.preventDefault(),y.value=Math.max(y.value-1,0);break;case"Enter":I.preventDefault(),y.value>=0&&A.value[y.value]&&N(A.value[y.value]);break;case"Escape":p.value=!1;break}},j=I=>{if(!g.value||m.value)return;const X=I.target,{scrollTop:H,scrollHeight:W,clientHeight:Z}=X;H+Z>=W-n.threshold&&T()},T=async(I=!1)=>{var X,H;if(!m.value){m.value=!0;try{let W=[];if(n.fetchItems)W=await n.fetchItems();else{const Z=Ye(),oe=((X=n.endpoint)==null?void 0:X.apiModule)||n.apiModule,ge=((H=n.endpoint)==null?void 0:H.apiAction)||n.apiAction;if(!oe||!ge)throw new Error("API module and action are required");const Ne={page:I?1:b.value,pageSize:n.pageSize,search:u.value,...n.apiParams},we=await Z.apiUrl(`/${oe}/${ge}`,"GET",Ne);W=we.data||we.items||we||[],_.value=we.total||we.totalItems||W.length}I?(h.value=W,b.value=1):(h.value.push(...W),b.value++),g.value=W.length>=n.pageSize,g.value||r("end-of-results"),r("load-more",{items:W,page:b.value,hasMore:g.value,total:_.value})}catch(W){console.error("Error fetching items:",W),r("error",W)}finally{m.value=!1}}};return e.onMounted(()=>{n.autoFetchOnMount&&T()}),e.onUnmounted(()=>{E.value&&clearTimeout(E.value)}),e.watch(()=>n.modelValue,I=>{I||(u.value="")}),(I,X)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"rootEl",ref:l,class:e.normalizeClass(["w-full",e.unref(a).class]),"aria-busy":t.skeleton},[t.skeleton?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.label?(e.openBlock(),e.createElementBlock("div",Uh)):e.createCommentVNode("",!0),X[3]||(X[3]=e.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:f.value,class:"mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Hh,"*")):e.createCommentVNode("",!0)],8,Wh)):e.createCommentVNode("",!0),e.createElementVNode("div",qh,[e.createElementVNode("div",{ref_key:"reference",ref:c,class:e.normalizeClass(["flex items-center gap-2 rounded-lg border px-3 py-2 bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 h-10 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",[t.disabled?"opacity-60 cursor-not-allowed":"",t.error?"border-red-500 focus-within:ring-red-500":""]])},[n.icon?(e.openBlock(),e.createElementBlock("div",Gh,[n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({ref_key:"inputRef",ref:s},I.$attrs,{id:f.value,type:"text",class:["w-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",t.disabled?"cursor-not-allowed":"cursor-text"],placeholder:t.placeholder,disabled:t.disabled,value:C.value,onFocus:L,onBlur:O,onInput:P,onKeydown:R}),null,16,Kh),m.value?(e.openBlock(),e.createElementBlock("svg",Xh,[...X[4]||(X[4]=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):t.clearable&&t.modelValue?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onMousedown:X[0]||(X[0]=e.withModifiers(()=>{},["prevent"])),onClick:e.withModifiers(V,["stop"]),"aria-label":"Clear"}," ✕ ",32)):(e.openBlock(),e.createElementBlock("button",{key:3,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",disabled:t.disabled,onClick:X[1]||(X[1]=H=>p.value?w():x()),"aria-label":"Toggle"},[e.createVNode(e.unref(ne.ChevronDown),{class:e.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":p.value}])},null,8,["class"])],8,Yh))],2),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floating",ref:d,style:e.normalizeStyle(e.unref(B)),class:"z-[9999] overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[e.createElementVNode("div",{ref_key:"scrollContainer",ref:i,class:"max-h-64 overflow-auto",onScroll:j},[m.value&&h.value.length===0?(e.openBlock(),e.createElementBlock("div",Jh,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,H=>e.createElementVNode("div",{key:H,class:"flex items-center space-x-3"},[...X[5]||(X[5]=[e.createElementVNode("div",{class:"skeleton h-4 w-4 bg-gray-200 rounded"},null,-1),e.createElementVNode("div",{class:"skeleton h-4 flex-1 bg-gray-200 rounded"},null,-1)])])),64))])):A.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(A.value,(H,W)=>(e.openBlock(),e.createElementBlock("button",{key:k(H)??W,type:"button",class:e.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",W===y.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:Z=>y.value=W,onMousedown:X[2]||(X[2]=e.withModifiers(()=>{},["prevent"])),onClick:Z=>N(H)},[e.renderSlot(I.$slots,"item",{item:H,index:W},()=>[e.createElementVNode("div",Zh,[e.createElementVNode("div",em,[e.createElementVNode("div",tm,e.toDisplayString(D(H)),1),t.itemSubtitle?(e.openBlock(),e.createElementBlock("div",om,e.toDisplayString(v(H)),1)):e.createCommentVNode("",!0)])])]),S(H)?(e.openBlock(),e.createElementBlock("span",nm," ✓ ")):e.createCommentVNode("",!0)],42,Qh))),128)):e.createCommentVNode("",!0),m.value&&h.value.length>0?(e.openBlock(),e.createElementBlock("div",rm,[e.createElementVNode("div",am,[X[6]||(X[6]=e.createElementVNode("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"},null,-1)),e.createElementVNode("span",sm,e.toDisplayString(t.loadingText),1)])])):e.createCommentVNode("",!0),!g.value&&h.value.length>0?(e.openBlock(),e.createElementBlock("div",im,[e.createElementVNode("div",lm,e.toDisplayString(t.endOfResultsText),1)])):!m.value&&h.value.length===0?(e.openBlock(),e.createElementBlock("div",cm,e.toDisplayString(t.noResultsText),1)):e.createCommentVNode("",!0)],544)],4)):e.createCommentVNode("",!0)]))]),t.error?(e.openBlock(),e.createElementBlock("p",dm,e.toDisplayString(t.errorMessage||t.error),1)):t.helperText?(e.openBlock(),e.createElementBlock("p",fm,e.toDisplayString(t.helperText),1)):e.createCommentVNode("",!0)],64))],10,jh)),[[e.vShow,t.visible]])}});function il(t){var o,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(o=0;o<a;o++)t[o]&&(n=il(t[o]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function ll(){for(var t,o,n=0,r="",a=arguments.length;n<a;n++)(t=arguments[n])&&(o=il(t))&&(r&&(r+=" "),r+=o);return r}const um=(t,o)=>{const n=new Array(t.length+o.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<o.length;r++)n[t.length+r]=o[r];return n},hm=(t,o)=>({classGroupId:t,validator:o}),cl=(t=new Map,o=null,n)=>({nextPart:t,validators:o,classGroupId:n}),ur="-",dl=[],mm="arbitrary..",pm=t=>{const o=bm(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return gm(i);const l=i.split(ur),c=l[0]===""&&l.length>1?1:0;return fl(l,c,o)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],d=n[i];return c?d?um(d,c):c:d||dl}return n[i]||dl}}},fl=(t,o,n)=>{if(t.length-o===0)return n.classGroupId;const a=t[o],s=n.nextPart.get(a);if(s){const d=fl(t,o+1,s);if(d)return d}const i=n.validators;if(i===null)return;const l=o===0?t.join(ur):t.slice(o).join(ur),c=i.length;for(let d=0;d<c;d++){const f=i[d];if(f.validator(l))return f.classGroupId}},gm=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=t.slice(1,-1),n=o.indexOf(":"),r=o.slice(0,n);return r?mm+r:void 0})(),bm=t=>{const{theme:o,classGroups:n}=t;return ym(n,o)},ym=(t,o)=>{const n=cl();for(const r in t){const a=t[r];Wa(a,n,r,o)}return n},Wa=(t,o,n,r)=>{const a=t.length;for(let s=0;s<a;s++){const i=t[s];xm(i,o,n,r)}},xm=(t,o,n,r)=>{if(typeof t=="string"){km(t,o,n);return}if(typeof t=="function"){wm(t,o,n,r);return}Cm(t,o,n,r)},km=(t,o,n)=>{const r=t===""?o:ul(o,t);r.classGroupId=n},wm=(t,o,n,r)=>{if(_m(t)){Wa(t(r),o,n,r);return}o.validators===null&&(o.validators=[]),o.validators.push(hm(n,t))},Cm=(t,o,n,r)=>{const a=Object.entries(t),s=a.length;for(let i=0;i<s;i++){const[l,c]=a[i];Wa(c,ul(o,l),n,r)}},ul=(t,o)=>{let n=t;const r=o.split(ur),a=r.length;for(let s=0;s<a;s++){const i=r[s];let l=n.nextPart.get(i);l||(l=cl(),n.nextPart.set(i,l)),n=l}return n},_m=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Em=t=>{if(t<1)return{get:()=>{},set:()=>{}};let o=0,n=Object.create(null),r=Object.create(null);const a=(s,i)=>{n[s]=i,o++,o>t&&(o=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return a(s,i),i},set(s,i){s in n?n[s]=i:a(s,i)}}},Ha="!",hl=":",Bm=[],ml=(t,o,n,r,a)=>({modifiers:t,hasImportantModifier:o,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Sm=t=>{const{prefix:o,experimentalParseClassName:n}=t;let r=a=>{const s=[];let i=0,l=0,c=0,d;const f=a.length;for(let y=0;y<f;y++){const b=a[y];if(i===0&&l===0){if(b===hl){s.push(a.slice(c,y)),c=y+1;continue}if(b==="/"){d=y;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const u=s.length===0?a:a.slice(c);let h=u,m=!1;u.endsWith(Ha)?(h=u.slice(0,-1),m=!0):u.startsWith(Ha)&&(h=u.slice(1),m=!0);const p=d&&d>c?d-c:void 0;return ml(s,m,h,p)};if(o){const a=o+hl,s=r;r=i=>i.startsWith(a)?s(i.slice(a.length)):ml(Bm,!1,i,void 0,!0)}if(n){const a=r;r=s=>n({className:s,parseClassName:a})}return r},Am=t=>{const o=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{o.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let s=0;s<n.length;s++){const i=n[s],l=i[0]==="[",c=o.has(i);l||c?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(i)):a.push(i)}return a.length>0&&(a.sort(),r.push(...a)),r}},vm=t=>({cache:Em(t.cacheSize),parseClassName:Sm(t),sortModifiers:Am(t),...pm(t)}),Dm=/\s+/,Nm=(t,o)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:s}=o,i=[],l=t.trim().split(Dm);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:u,modifiers:h,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:y}=n(f);if(u){c=f+(c.length>0?" "+c:c);continue}let b=!!y,g=r(b?p.substring(0,y):p);if(!g){if(!b){c=f+(c.length>0?" "+c:c);continue}if(g=r(p),!g){c=f+(c.length>0?" "+c:c);continue}b=!1}const _=h.length===0?"":h.length===1?h[0]:s(h).join(":"),E=m?_+Ha:_,B=E+g;if(i.indexOf(B)>-1)continue;i.push(B);const A=a(g,b);for(let C=0;C<A.length;++C){const x=A[C];i.push(E+x)}c=f+(c.length>0?" "+c:c)}return c},Vm=(...t)=>{let o=0,n,r,a="";for(;o<t.length;)(n=t[o++])&&(r=pl(n))&&(a&&(a+=" "),a+=r);return a},pl=t=>{if(typeof t=="string")return t;let o,n="";for(let r=0;r<t.length;r++)t[r]&&(o=pl(t[r]))&&(n&&(n+=" "),n+=o);return n},Mm=(t,...o)=>{let n,r,a,s;const i=c=>{const d=o.reduce((f,u)=>u(f),t());return n=vm(d),r=n.cache.get,a=n.cache.set,s=l,l(c)},l=c=>{const d=r(c);if(d)return d;const f=Nm(c,n);return a(c,f),f};return s=i,(...c)=>s(Vm(...c))},Tm=[],Ze=t=>{const o=n=>n[t]||Tm;return o.isThemeGetter=!0,o},gl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Pm=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Om=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lm=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Rm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Im=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,uo=t=>Pm.test(t),De=t=>!!t&&!Number.isNaN(Number(t)),ho=t=>!!t&&Number.isInteger(Number(t)),qa=t=>t.endsWith("%")&&De(t.slice(0,-1)),Kt=t=>Om.test(t),yl=()=>!0,zm=t=>Lm.test(t)&&!Rm.test(t),Ga=()=>!1,$m=t=>Im.test(t),jm=t=>Fm.test(t),Um=t=>!ue(t)&&!me(t),Wm=t=>mo(t,El,Ga),ue=t=>gl.test(t),Ao=t=>mo(t,Bl,zm),xl=t=>mo(t,Qm,De),Hm=t=>mo(t,Al,yl),qm=t=>mo(t,Sl,Ga),kl=t=>mo(t,Cl,Ga),Gm=t=>mo(t,_l,jm),hr=t=>mo(t,vl,$m),me=t=>bl.test(t),Bn=t=>vo(t,Bl),Km=t=>vo(t,Sl),wl=t=>vo(t,Cl),Xm=t=>vo(t,El),Ym=t=>vo(t,_l),mr=t=>vo(t,vl,!0),Jm=t=>vo(t,Al,!0),mo=(t,o,n)=>{const r=gl.exec(t);return r?r[1]?o(r[1]):n(r[2]):!1},vo=(t,o,n=!1)=>{const r=bl.exec(t);return r?r[1]?o(r[1]):n:!1},Cl=t=>t==="position"||t==="percentage",_l=t=>t==="image"||t==="url",El=t=>t==="length"||t==="size"||t==="bg-size",Bl=t=>t==="length",Qm=t=>t==="number",Sl=t=>t==="family-name",Al=t=>t==="number"||t==="weight",vl=t=>t==="shadow",Zm=Mm(()=>{const t=Ze("color"),o=Ze("font"),n=Ze("text"),r=Ze("font-weight"),a=Ze("tracking"),s=Ze("leading"),i=Ze("breakpoint"),l=Ze("container"),c=Ze("spacing"),d=Ze("radius"),f=Ze("shadow"),u=Ze("inset-shadow"),h=Ze("text-shadow"),m=Ze("drop-shadow"),p=Ze("blur"),y=Ze("perspective"),b=Ze("aspect"),g=Ze("ease"),_=Ze("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...B(),me,ue],C=()=>["auto","hidden","clip","visible","scroll"],x=()=>["auto","contain","none"],w=()=>[me,ue,c],D=()=>[uo,"full","auto",...w()],k=()=>[ho,"none","subgrid",me,ue],v=()=>["auto",{span:["full",ho,me,ue]},ho,me,ue],S=()=>[ho,"auto",me,ue],N=()=>["auto","min","max","fr",me,ue],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...w()],P=()=>[uo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],R=()=>[uo,"screen","full","dvw","lvw","svw","min","max","fit",...w()],j=()=>[uo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],T=()=>[t,me,ue],I=()=>[...B(),wl,kl,{position:[me,ue]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",Xm,Wm,{size:[me,ue]}],W=()=>[qa,Bn,Ao],Z=()=>["","none","full",d,me,ue],oe=()=>["",De,Bn,Ao],ge=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[De,qa,wl,kl],Q=()=>["","none",p,me,ue],$=()=>["none",De,me,ue],Y=()=>["none",De,me,ue],ae=()=>[De,me,ue],ye=()=>[uo,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Kt],breakpoint:[Kt],color:[yl],container:[Kt],"drop-shadow":[Kt],ease:["in","out","in-out"],font:[Um],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Kt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Kt],shadow:[Kt],spacing:["px",De],text:[Kt],"text-shadow":[Kt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",uo,ue,me,b]}],container:["container"],columns:[{columns:[De,ue,me,l]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[ho,"auto",me,ue]}],basis:[{basis:[uo,"full","auto",l,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,uo,"auto","initial","none",ue]}],grow:[{grow:["",De,me,ue]}],shrink:[{shrink:["",De,me,ue]}],order:[{order:[ho,"first","last","none",me,ue]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:v()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:v()}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...R()]}],"min-inline-size":[{"min-inline":["auto",...R()]}],"max-inline-size":[{"max-inline":["none",...R()]}],"block-size":[{block:["auto",...j()]}],"min-block-size":[{"min-block":["auto",...j()]}],"max-block-size":[{"max-block":["none",...j()]}],w:[{w:[l,"screen",...P()]}],"min-w":[{"min-w":[l,"screen","none",...P()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,Bn,Ao]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Jm,Hm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qa,ue]}],"font-family":[{font:[Km,qm,o]}],"font-features":[{"font-features":[ue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,me,ue]}],"line-clamp":[{"line-clamp":[De,"none",me,xl]}],leading:[{leading:[s,...w()]}],"list-image":[{"list-image":["none",me,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",me,Ao]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[De,"auto",me,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ho,me,ue],radial:["",me,ue],conic:[ho,me,ue]},Ym,Gm]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,me,ue]}],"outline-w":[{outline:["",De,Bn,Ao]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",f,mr,hr]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",u,mr,hr]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[De,Ao]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",h,mr,hr]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[De,me,ue]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[me,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":B()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,ue]}],filter:[{filter:["","none",me,ue]}],blur:[{blur:Q()}],brightness:[{brightness:[De,me,ue]}],contrast:[{contrast:[De,me,ue]}],"drop-shadow":[{"drop-shadow":["","none",m,mr,hr]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",De,me,ue]}],"hue-rotate":[{"hue-rotate":[De,me,ue]}],invert:[{invert:["",De,me,ue]}],saturate:[{saturate:[De,me,ue]}],sepia:[{sepia:["",De,me,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",me,ue]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[De,me,ue]}],"backdrop-contrast":[{"backdrop-contrast":[De,me,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,me,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,me,ue]}],"backdrop-invert":[{"backdrop-invert":["",De,me,ue]}],"backdrop-opacity":[{"backdrop-opacity":[De,me,ue]}],"backdrop-saturate":[{"backdrop-saturate":[De,me,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",De,me,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",me,ue]}],ease:[{ease:["linear","initial",g,me,ue]}],delay:[{delay:[De,me,ue]}],animate:[{animate:["none",_,me,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,me,ue]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:Y()}],"scale-x":[{"scale-x":Y()}],"scale-y":[{"scale-y":Y()}],"scale-z":[{"scale-z":Y()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[me,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me,ue]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[De,Bn,Ao,xl]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Me(...t){return Zm(ll(t))}function Dl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ka={},Xa={},pr={exports:{}},Nl;function ep(){if(Nl)return pr.exports;Nl=1;var t=String,o=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return pr.exports=o(),pr.exports.createColors=o,pr.exports}var Vl;function tp(){return Vl||(Vl=1,(function(t){var o={};Object.defineProperty(t,"__esModule",{value:!0});function n(d,f){for(var u in f)Object.defineProperty(d,u,{enumerable:!0,get:f[u]})}n(t,{dim:function(){return l},default:function(){return c}});const r=a(ep());function a(d){return d&&d.__esModule?d:{default:d}}let s=new Set;function i(d,f,u){typeof process<"u"&&o.JEST_WORKER_ID||u&&s.has(u)||(u&&s.add(u),console.warn(""),f.forEach(h=>console.warn(d,"-",h)))}function l(d){return r.default.dim(d)}const c={info(d,f){i(r.default.bold(r.default.cyan("info")),...Array.isArray(d)?[d]:[f,d])},warn(d,f){i(r.default.bold(r.default.yellow("warn")),...Array.isArray(d)?[d]:[f,d])},risk(d,f){i(r.default.bold(r.default.magenta("risk")),...Array.isArray(d)?[d]:[f,d])}}})(Xa)),Xa}var Ml;function op(){return Ml||(Ml=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});const o=n(tp());function n(s){return s&&s.__esModule?s:{default:s}}function r({version:s,from:i,to:l}){o.default.warn(`${i}-color-renamed`,[`As of Tailwind CSS ${s}, \`${i}\` has been renamed to \`${l}\`.`,"Update your configuration file to silence this warning."])}const a={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return r({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return r({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return r({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return r({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return r({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}})(Ka)),Ka}var Ya,Tl;function np(){if(Tl)return Ya;Tl=1;let t=op();return Ya=(t.__esModule?t:{default:t}).default,Ya}var rp=np();const ap=Dl(rp),sp=(t,o="short",n="id-ID")=>{const r=typeof t=="string"?new Date(t):t,a=c=>String(c).padStart(2,"0"),s=c=>`${a(c.getHours())}:${a(c.getMinutes())}:${a(c.getSeconds())}`,l={id:"id-ID",en:"en-GB"}[n]||n;return o==="time"?s(r):o==="datetime"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r):o==="long"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(r):new Intl.DateTimeFormat(l,{day:"2-digit",month:"short",year:"numeric"}).format(r)},ip=t=>new Promise((o,n)=>{const r=document.createElement("textarea");r.value=t,r.style.top="0",r.style.left="0",r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?o():n(new Error("Copy command was unsuccessful"))}catch(a){n(a)}finally{document.body.removeChild(r)}}),lp=async t=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(t):ip(t),Do=(t,o)=>{if(!t)return null;if(o[t])return o[t];const n=t.split(/[-_]/).map(r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join("");return o[n]||null},Pl=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Ol=ll,gr=(t,o)=>n=>{var r;if((o==null?void 0:o.variants)==null)return Ol(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:s}=o,i=Object.keys(a).map(d=>{const f=n==null?void 0:n[d],u=s==null?void 0:s[d];if(f===null)return null;const h=Pl(f)||Pl(u);return a[d][h]}),l=n&&Object.entries(n).reduce((d,f)=>{let[u,h]=f;return h===void 0||(d[u]=h),d},{}),c=o==null||(r=o.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:u,className:h,...m}=f;return Object.entries(m).every(p=>{let[y,b]=p;return Array.isArray(b)?b.includes({...s,...l}[y]):{...s,...l}[y]===b})?[...d,u,h]:d},[]);return Ol(t,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Tt=e.defineComponent({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(_e.Primitive),{as:t.as,"as-child":t.asChild,class:e.normalizeClass(e.unref(Me)(e.unref(Xo)({variant:t.variant,size:t.size}),o.class))},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),Xo=gr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-8 w-8","icon-sm":"size-7","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),Ll=e.defineComponent({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(t,{emit:o}){const n=t,r=o,a=_e.useForwardPropsEmits(n,r);return(s,i)=>(e.openBlock(),e.createBlock(e.unref(_e.TooltipRoot),e.normalizeProps(e.guardReactiveProps(e.unref(a))),{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},16))}}),Rl=e.defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:o}){const n=t,r=o,a=Ke.reactiveOmit(n,"class"),s=_e.useForwardPropsEmits(a,r);return(i,l)=>(e.openBlock(),e.createBlock(e.unref(_e.TooltipPortal),null,{default:e.withCtx(()=>[e.createVNode(e.unref(_e.TooltipContent),e.mergeProps({...e.unref(s),...i.$attrs},{class:e.unref(Me)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),Il=e.defineComponent({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(_e.TooltipProvider),e.normalizeProps(e.guardReactiveProps(o)),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16))}}),Fl=e.defineComponent({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(_e.TooltipTrigger),e.normalizeProps(e.guardReactiveProps(o)),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16))}}),cp={class:"relative z-10"},dp="font-medium transition-all duration-300 ease-in-out hover:-translate-y-0.5 hover:scale-[1.02] active:translate-y-0 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-60 disabled:cursor-not-allowed disabled:shadow-none disabled:translate-y-0 disabled:scale-100 relative overflow-hidden before:absolute before:inset-0 before:bg-white/20 before:translate-y-full before:transition-transform before:duration-300 hover:before:translate-y-0",fp=e.defineComponent({name:"DCodeButton",inheritAttrs:!1,__name:"DCodeButton",props:{icon:{},text:{default:""},variant:{default:"default"},size:{default:"default"},tooltip:{default:""},bgColor:{default:""},textColor:{default:""},borderColor:{default:""},rounded:{default:"lg"},borderStyle:{default:"solid"},disabled:{type:Boolean,default:!1},type:{default:"button"},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},setup(t){const o=e.useAttrs(),n=t,r=e.computed(()=>Do(n.icon,Lt)),a=e.computed(()=>!!n.tooltip),s=e.computed(()=>n.visible??!0),i=e.computed(()=>{const H=String(n.variant||"default").toLowerCase();return H==="tonal"?"secondary":H==="elevated"?"default":H}),l=e.computed(()=>String(n.bgColor||"").toLowerCase()),c=e.computed(()=>String(n.type||"button").toLowerCase()),d=e.computed(()=>{const{class:H,...W}=o;return W}),f=e.computed(()=>Me(o.class)),u=e.computed(()=>((f.value??"").match(/\b(?:w|h|min-w|min-h|max-w|max-h)-[^\s]+\b/g)??[]).join(" ")),h=e.computed(()=>n.size==="sm"?"h-9":n.size==="lg"?"h-11":n.size==="icon"?"h-10 w-10":"h-10"),m=e.computed(()=>n.size==="icon"?"":!n.text&&n.icon?"w-10":"w-28"),p=e.computed(()=>n.rounded?n.rounded.startsWith("rounded")?n.rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"}[n.rounded]||`rounded-${n.rounded}`:""),y=e.computed(()=>!n.borderStyle||n.borderStyle==="none"?"border-0":n.borderStyle==="solid"?"border-2":{dashed:"border-[3px] border-dashed",dotted:"border-[3px] border-dotted",double:"border-[6px] border-double"}[n.borderStyle]||"border-2"),b=e.computed(()=>Me("inline-flex items-center justify-center bg-gray-200 dark:bg-gray-700 animate-pulse",p.value,h.value,m.value,u.value)),g=e.computed(()=>{const W=(f.value??"").match(/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return W?W[0]:null}),_=e.computed(()=>{const W=(f.value??"").match(/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return W?W[0]:null}),E=e.computed(()=>!!g.value),B=e.computed(()=>/\bborder-/.test(f.value??"")),A=e.computed(()=>/\bhover:/.test(f.value??"")),C=e.computed(()=>{const H=f.value??"";return i.value!=="outline"?H:H.replaceAll(/\bbg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\bhover:bg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\s+/gu," ").trim()}),x=e.ref(null),w=H=>{const W=H.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/u);return W?{r:Number(W[1]),g:Number(W[2]),b:Number(W[3]),a:W[4]?Number(W[4]):1}:null},D=(H,W)=>{const Z=w(H);if(!Z)return H;const oe=ge=>Math.max(0,Math.min(255,Math.round(ge)));return`rgba(${oe(Z.r*(1-W))}, ${oe(Z.g*(1-W))}, ${oe(Z.b*(1-W))}, ${Z.a})`},k=H=>{if(globalThis.window===void 0)return null;const W=document.createElement("div");W.className=H,W.style.position="absolute",W.style.visibility="hidden",W.style.pointerEvents="none",W.style.width="1px",W.style.height="1px",document.body.appendChild(W);const Z=globalThis.getComputedStyle(W).backgroundColor;return W.remove(),!Z||Z==="transparent"||Z==="rgba(0, 0, 0, 0)"?null:Z},v=[50,100,200,300,400,500,600,700,800,900,950],S=H=>{const W=v.indexOf(H);return W===-1?H:v[Math.min(v.length-1,W+2)]},N=(H,W)=>{const Z=ap[H];if(!Z)return null;if(typeof Z=="string")return Z;if(!W)return null;const oe=Z[W];return typeof oe=="string"?oe:null},V=(H,W=!1)=>{if(!H)return null;const Z=W?/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u:/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u,oe=H.match(Z);return oe?{colorName:oe[1],shade:oe[2]?Number.parseInt(oe[2],10):null}:null},L=()=>{const H=g.value;if(!H){x.value=null;return}const W=V(H),Z=W==null?void 0:W.colorName,oe=(W==null?void 0:W.shade)??null,ge=(Z?N(Z,oe):null)??k(H);if(!ge){x.value=null;return}let Ne;const we=V(_.value,!0),Q=we?N(we.colorName,we.shade??null):null;if(Q)Ne=Q;else if(Z&&oe){const $=S(oe);Ne=N(Z,$)??D(ge,.2)}else Ne=D(ge,.2);x.value={"--btn-color":ge,"--btn-color-hover":Ne}};e.onMounted(()=>{L()}),e.watch([g,_],async()=>{await e.nextTick(),L()});const O=e.computed(()=>{const H=/\bdark:bg-/.test(f.value??"");return!E.value||i.value==="outline"||H?"":x.value?"dcode-btn--fill dcode-btn--fill-hover":A.value?"":"hover:brightness-90"}),P=e.computed(()=>{if(!E.value||i.value!=="outline")return"";const H=["dcode-btn--outline","dcode-btn--outline-hover"];return B.value||H.push("border"),!x.value&&!A.value&&H.push("hover:brightness-90"),H.join(" ")}),R=e.computed(()=>x.value??void 0),j={primary:{bg:"bg-blue-600 dark:bg-blue-500",border:"border-blue-700 dark:border-blue-400",text:"text-white",hoverBg:"hover:bg-blue-700 dark:hover:bg-blue-600",hoverBorder:"hover:border-blue-800 dark:hover:border-blue-500",hoverText:"hover:text-white"},success:{bg:"bg-green-600 dark:bg-green-500",border:"border-green-700 dark:border-green-400",text:"text-white",hoverBg:"hover:bg-green-700 dark:hover:bg-green-600",hoverBorder:"hover:border-green-800 dark:hover:border-green-500",hoverText:"hover:text-white"},warning:{bg:"bg-yellow-500 dark:bg-yellow-400",border:"border-yellow-600 dark:border-yellow-300",text:"text-white",hoverBg:"hover:bg-yellow-600 dark:hover:bg-yellow-500",hoverBorder:"hover:border-yellow-700 dark:hover:border-yellow-400",hoverText:"hover:text-white"},danger:{bg:"bg-red-600 dark:bg-red-500",border:"border-red-700 dark:border-red-400",text:"text-white",hoverBg:"hover:bg-red-700 dark:hover:bg-red-600",hoverBorder:"hover:border-red-800 dark:hover:border-red-500",hoverText:"hover:text-white"},info:{bg:"bg-cyan-600 dark:bg-cyan-500",border:"border-cyan-700 dark:border-cyan-400",text:"text-white",hoverBg:"hover:bg-cyan-700 dark:hover:bg-cyan-600",hoverBorder:"hover:border-cyan-800 dark:hover:border-cyan-500",hoverText:"hover:text-white"},secondary:{bg:"bg-gray-600 dark:bg-gray-500",border:"border-gray-700 dark:border-gray-400",text:"text-white",hoverBg:"hover:bg-gray-700 dark:hover:bg-gray-600",hoverBorder:"hover:border-gray-800 dark:hover:border-gray-500",hoverText:"hover:text-white"},purple:{bg:"bg-purple-600 dark:bg-purple-500",border:"border-purple-700 dark:border-purple-400",text:"text-white",hoverBg:"hover:bg-purple-700 dark:hover:bg-purple-600",hoverBorder:"hover:border-purple-800 dark:hover:border-purple-500",hoverText:"hover:text-white"},pink:{bg:"bg-pink-600 dark:bg-pink-500",border:"border-pink-700 dark:border-pink-400",text:"text-white",hoverBg:"hover:bg-pink-700 dark:hover:bg-pink-600",hoverBorder:"hover:border-pink-800 dark:hover:border-pink-500",hoverText:"hover:text-white"},dark:{bg:"bg-gray-900 dark:bg-gray-800",border:"border-black dark:border-gray-700",text:"text-white",hoverBg:"hover:bg-black dark:hover:bg-gray-950",hoverBorder:"hover:border-black dark:hover:border-gray-600",hoverText:"hover:text-white"},light:{bg:"bg-gray-100 dark:bg-gray-800",border:"border-gray-300 dark:border-gray-600",text:"text-gray-900 dark:text-gray-100",hoverBg:"hover:bg-gray-200 dark:hover:bg-gray-700",hoverBorder:"hover:border-gray-400 dark:hover:border-gray-500",hoverText:"hover:text-gray-900 dark:hover:text-gray-100"}},T={"gradient-blue":{bg:"bg-gradient-to-r from-blue-500 to-cyan-500",text:"text-white",hover:"hover:from-blue-600 hover:to-cyan-600"},"gradient-purple":{bg:"bg-gradient-to-r from-purple-500 to-pink-500",text:"text-white",hover:"hover:from-purple-600 hover:to-pink-600"},"gradient-sunset":{bg:"bg-gradient-to-r from-orange-500 to-red-500",text:"text-white",hover:"hover:from-orange-600 hover:to-red-600"},"gradient-emerald":{bg:"bg-gradient-to-r from-emerald-500 to-teal-500",text:"text-white",hover:"hover:from-emerald-600 hover:to-teal-600"}},I=e.computed(()=>{const H=[],W=l.value,Z=String(n.borderColor||"").toLowerCase(),oe=W?j[W]:null,ge=W?T[W]:null,Ne=Z?j[Z]:null;return W&&(oe?Ne&&Z!==W?(H.push(oe.bg,Ne.hoverBg),n.textColor||H.push(oe.text,Ne.hoverText)):(H.push(oe.bg,oe.hoverBg),n.textColor||H.push(oe.text,oe.hoverText)):ge?(H.push(ge.bg,ge.hover),n.textColor||H.push(ge.text)):W==="transparent"?Ne?(H.push("bg-transparent",Ne.hoverBg),n.textColor||H.push("text-inherit",Ne.hoverText)):H.push("bg-transparent hover:bg-black/5 dark:hover:bg-white/5"):H.push(W)),Z?Ne?H.push(Ne.border,Ne.hoverBorder):H.push(Z):oe&&i.value!=="ghost"&&i.value!=="link"&&H.push(oe.border,oe.hoverBorder),n.textColor&&H.push(n.textColor),H.join(" ")}),X=e.computed(()=>Me(dp,p.value,y.value,C.value,O.value,P.value,I.value));return(H,W)=>s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(b.value),"aria-hidden":"true"},null,2)):(e.openBlock(),e.createBlock(e.unref(Il),{key:1,"delay-duration":0},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createBlock(e.unref(Ll),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(Fl),{"as-child":""},{default:e.withCtx(()=>[e.createVNode(e.unref(Tt),e.mergeProps({variant:i.value,size:n.size,disabled:n.disabled,type:c.value,class:X.value,style:R.value},d.value),{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{key:0,class:"h-[18px] w-[18px]"})):e.createCommentVNode("",!0),n.text?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(r.value?"ml-1":"")},e.toDisplayString(n.text),3)):e.createCommentVNode("",!0)]),_:1},16,["variant","size","disabled","type","class","style"])]),_:1}),e.createVNode(e.unref(Rl),{side:"top","side-offset":8,class:"animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0"},{default:e.withCtx(()=>[e.createElementVNode("span",cp,e.toDisplayString(n.tooltip),1)]),_:1})]),_:1})):(e.openBlock(),e.createBlock(e.unref(Tt),e.mergeProps({key:1,variant:i.value,size:n.size,disabled:n.disabled,type:c.value,class:X.value,style:R.value},d.value),{default:e.withCtx(()=>[e.renderSlot(H.$slots,"default",{},()=>[r.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{key:0,class:"h-[18px] w-[18px]"})):e.createCommentVNode("",!0),n.text?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(r.value?"ml-1":"")},e.toDisplayString(n.text),3)):e.createCommentVNode("",!0)],!0)]),_:3},16,["variant","size","disabled","type","class","style"]))]),_:3}))],64)):e.createCommentVNode("",!0)}}),dt=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},We=dt(fp,[["__scopeId","data-v-c123cb99"]]),up={class:"flex flex-col gap-1"},hp={key:0,class:"text-sm font-semibold text-neutral-900 dark:text-neutral-100 leading-tight"},mp={key:1,class:"text-xs text-neutral-500 dark:text-neutral-400"},pp={key:0,class:"flex items-center gap-2"},gp={name:"DCodeCard"},Yo=e.defineComponent({...gp,props:{level:{default:1},title:{},subtitle:{},shadow:{type:Boolean,default:!1},border:{type:Boolean,default:!0},padding:{default:"p-6"}},setup(t){const o=t,n=e.computed(()=>{switch(o.level){case 2:return"bg-neutral-50 dark:bg-neutral-800";case 3:return"bg-neutral-100 dark:bg-neutral-700";case 1:default:return"bg-white dark:bg-neutral-900"}});return(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["transition-shadow duration-300 dcode-card",[n.value,{"shadow-md":t.shadow},{"border-transparent":!t.border},{"border border-neutral-200 dark:border-neutral-800":t.border&&t.level===1},{"border border-neutral-300 dark:border-neutral-700":t.border&&t.level!==1},"overflow-hidden"]])},[t.title||r.$slots.header||r.$slots.actions?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex items-center justify-between backdrop-blur-sm transition-colors duration-300",[t.title||r.$slots.header||r.$slots.actions?"px-4 py-3":"",t.title||r.$slots.header?"bg-neutral-200/50 dark:bg-neutral-950/40 border-b border-neutral-200 dark:border-neutral-800/50":"bg-transparent border-b-transparent"]])},[e.createElementVNode("div",up,[e.renderSlot(r.$slots,"header",{},()=>[t.title?(e.openBlock(),e.createElementBlock("h3",hp,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.subtitle?(e.openBlock(),e.createElementBlock("p",mp,e.toDisplayString(t.subtitle),1)):e.createCommentVNode("",!0)])]),r.$slots.actions?(e.openBlock(),e.createElementBlock("div",pp,[e.renderSlot(r.$slots,"actions")])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["relative z-10",t.padding])},[e.renderSlot(r.$slots,"default")],2),r.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mt-6 pt-6 border-t border-neutral-200/60 dark:border-neutral-700/50",t.padding])},[e.renderSlot(r.$slots,"footer")],2)):e.createCommentVNode("",!0)],2))}});(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #1F2328;--color-diff-blob-addition-fg: #1F2328;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #1f883d;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(31,35,40,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(31,35,40,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(31,35,40,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-scale-black: #1F2328;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#fff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{position:sticky;top:0;z-index:1;background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar{margin-left:auto;margin-right:1rem}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button{background-color:transparent;color:var(--color-fg-subtle);border:none}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button svg{fill:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button:hover{background-color:var(--color-btn-outline-hover-border)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .current-diff{border:1px solid var(--color-border-muted)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}.code-diff-view[data-v-0c5adc58] td:nth-child(1){display:none}")),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();function Xt(){}Xt.prototype={diff:function(t,o){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.callback;typeof r=="function"&&(a=r,r={}),this.options=r;var s=this;function i(E){return a?(setTimeout(function(){a(void 0,E)},0),!0):E}t=this.castInput(t),o=this.castInput(o),t=this.removeEmpty(this.tokenize(t)),o=this.removeEmpty(this.tokenize(o));var l=o.length,c=t.length,d=1,f=l+c;r.maxEditLength&&(f=Math.min(f,r.maxEditLength));var u=(n=r.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+u,m=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(m[0],o,t,0);if(m[0].oldPos+1>=c&&p+1>=l)return i([{value:this.join(o),count:o.length}]);var y=-1/0,b=1/0;function g(){for(var E=Math.max(y,-d);E<=Math.min(b,d);E+=2){var B=void 0,A=m[E-1],C=m[E+1];A&&(m[E-1]=void 0);var x=!1;if(C){var w=C.oldPos-E;x=C&&0<=w&&w<l}var D=A&&A.oldPos+1<c;if(!x&&!D){m[E]=void 0;continue}if(!D||x&&A.oldPos+1<C.oldPos?B=s.addToPath(C,!0,void 0,0):B=s.addToPath(A,void 0,!0,1),p=s.extractCommon(B,o,t,E),B.oldPos+1>=c&&p+1>=l)return i(bp(s,B.lastComponent,o,t,s.useLongestToken));m[E]=B,B.oldPos+1>=c&&(b=Math.min(b,E-1)),p+1>=l&&(y=Math.max(y,E+1))}d++}if(a)(function E(){setTimeout(function(){if(d>f||Date.now()>h)return a();g()||E()},0)})();else for(;d<=f&&Date.now()<=h;){var _=g();if(_)return _}},addToPath:function(t,o,n,r){var a=t.lastComponent;return a&&a.added===o&&a.removed===n?{oldPos:t.oldPos+r,lastComponent:{count:a.count+1,added:o,removed:n,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+r,lastComponent:{count:1,added:o,removed:n,previousComponent:a}}},extractCommon:function(t,o,n,r){for(var a=o.length,s=n.length,i=t.oldPos,l=i-r,c=0;l+1<a&&i+1<s&&this.equals(o[l+1],n[i+1]);)l++,i++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=i,l},equals:function(t,o){return this.options.comparator?this.options.comparator(t,o):t===o||this.options.ignoreCase&&t.toLowerCase()===o.toLowerCase()},removeEmpty:function(t){for(var o=[],n=0;n<t.length;n++)t[n]&&o.push(t[n]);return o},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function bp(t,o,n,r,a){for(var s=[],i;o;)s.push(o),i=o.previousComponent,delete o.previousComponent,o=i;s.reverse();for(var l=0,c=s.length,d=0,f=0;l<c;l++){var u=s[l];if(u.removed){if(u.value=t.join(r.slice(f,f+u.count)),f+=u.count,l&&s[l-1].added){var h=s[l-1];s[l-1]=s[l],s[l]=h}}else{if(!u.added&&a){var m=n.slice(d,d+u.count);m=m.map(function(y,b){var g=r[f+b];return g.length>y.length?g:y}),u.value=t.join(m)}else u.value=t.join(n.slice(d,d+u.count));d+=u.count,u.added||(f+=u.count)}}var p=s[c-1];return c>1&&typeof p.value=="string"&&(p.added||p.removed)&&t.equals("",p.value)&&(s[c-2].value+=p.value,s.pop()),s}var yp=new Xt;function xp(t,o,n){return yp.diff(t,o,n)}function kp(t,o){if(typeof t=="function")o.callback=t;else if(t)for(var n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);return o}var zl=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,$l=/\S/,Ja=new Xt;Ja.equals=function(t,o){return this.options.ignoreCase&&(t=t.toLowerCase(),o=o.toLowerCase()),t===o||this.options.ignoreWhitespace&&!$l.test(t)&&!$l.test(o)},Ja.tokenize=function(t){for(var o=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<o.length-1;n++)!o[n+1]&&o[n+2]&&zl.test(o[n])&&zl.test(o[n+2])&&(o[n]+=o[n+2],o.splice(n+1,2),n--);return o};function wp(t,o,n){return n=kp(n,{ignoreWhitespace:!0}),Ja.diff(t,o,n)}var jl=new Xt;jl.tokenize=function(t){this.options.stripTrailingCr&&(t=t.replace(/\r\n/g,`
|
|
2
|
+
`));var o=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var a=n[r];r%2&&!this.options.newlineIsToken?o[o.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),o.push(a))}return o};var Cp=new Xt;Cp.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var _p=new Xt;_p.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function br(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?br=function(o){return typeof o}:br=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},br(t)}var Ep=Object.prototype.toString,Sn=new Xt;Sn.useLongestToken=!0,Sn.tokenize=jl.tokenize,Sn.castInput=function(t){var o=this.options,n=o.undefinedReplacement,r=o.stringifyReplacer,a=r===void 0?function(s,i){return typeof i>"u"?n:i}:r;return typeof t=="string"?t:JSON.stringify(Qa(t,null,null,a),a," ")},Sn.equals=function(t,o){return Xt.prototype.equals.call(Sn,t.replace(/,([\r\n])/g,"$1"),o.replace(/,([\r\n])/g,"$1"))};function Qa(t,o,n,r,a){o=o||[],n=n||[],r&&(t=r(a,t));var s;for(s=0;s<o.length;s+=1)if(o[s]===t)return n[s];var i;if(Ep.call(t)==="[object Array]"){for(o.push(t),i=new Array(t.length),n.push(i),s=0;s<t.length;s+=1)i[s]=Qa(t[s],o,n,r,a);return o.pop(),n.pop(),i}if(t&&t.toJSON&&(t=t.toJSON()),br(t)==="object"&&t!==null){o.push(t),i={},n.push(i);var l=[],c;for(c in t)t.hasOwnProperty(c)&&l.push(c);for(l.sort(),s=0;s<l.length;s+=1)c=l[s],i[c]=Qa(t[c],o,n,r,c);o.pop(),n.pop()}else i=t;return i}var Za=new Xt;Za.tokenize=function(t){return t.slice()},Za.join=Za.removeEmpty=function(t){return t};function Bp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ul={exports:{}};(function(t){var o=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,a=0;o.Diff=function(s,i){return[s,i]},o.prototype.diff_main=function(s,i,l,c){typeof c>"u"&&(this.Diff_Timeout<=0?c=Number.MAX_VALUE:c=new Date().getTime()+this.Diff_Timeout*1e3);var d=c;if(s==null||i==null)throw new Error("Null input. (diff_main)");if(s==i)return s?[new o.Diff(a,s)]:[];typeof l>"u"&&(l=!0);var f=l,u=this.diff_commonPrefix(s,i),h=s.substring(0,u);s=s.substring(u),i=i.substring(u),u=this.diff_commonSuffix(s,i);var m=s.substring(s.length-u);s=s.substring(0,s.length-u),i=i.substring(0,i.length-u);var p=this.diff_compute_(s,i,f,d);return h&&p.unshift(new o.Diff(a,h)),m&&p.push(new o.Diff(a,m)),this.diff_cleanupMerge(p),p},o.prototype.diff_compute_=function(s,i,l,c){var d;if(!s)return[new o.Diff(r,i)];if(!i)return[new o.Diff(n,s)];var f=s.length>i.length?s:i,u=s.length>i.length?i:s,h=f.indexOf(u);if(h!=-1)return d=[new o.Diff(r,f.substring(0,h)),new o.Diff(a,u),new o.Diff(r,f.substring(h+u.length))],s.length>i.length&&(d[0][0]=d[2][0]=n),d;if(u.length==1)return[new o.Diff(n,s),new o.Diff(r,i)];var m=this.diff_halfMatch_(s,i);if(m){var p=m[0],y=m[1],b=m[2],g=m[3],_=m[4],E=this.diff_main(p,b,l,c),B=this.diff_main(y,g,l,c);return E.concat([new o.Diff(a,_)],B)}return l&&s.length>100&&i.length>100?this.diff_lineMode_(s,i,c):this.diff_bisect_(s,i,c)},o.prototype.diff_lineMode_=function(s,i,l){var c=this.diff_linesToChars_(s,i);s=c.chars1,i=c.chars2;var d=c.lineArray,f=this.diff_main(s,i,!1,l);this.diff_charsToLines_(f,d),this.diff_cleanupSemantic(f),f.push(new o.Diff(a,""));for(var u=0,h=0,m=0,p="",y="";u<f.length;){switch(f[u][0]){case r:m++,y+=f[u][1];break;case n:h++,p+=f[u][1];break;case a:if(h>=1&&m>=1){f.splice(u-h-m,h+m),u=u-h-m;for(var b=this.diff_main(p,y,!1,l),g=b.length-1;g>=0;g--)f.splice(u,0,b[g]);u=u+b.length}m=0,h=0,p="",y="";break}u++}return f.pop(),f},o.prototype.diff_bisect_=function(s,i,l){for(var c=s.length,d=i.length,f=Math.ceil((c+d)/2),u=f,h=2*f,m=new Array(h),p=new Array(h),y=0;y<h;y++)m[y]=-1,p[y]=-1;m[u+1]=0,p[u+1]=0;for(var b=c-d,g=b%2!=0,_=0,E=0,B=0,A=0,C=0;C<f&&!(new Date().getTime()>l);C++){for(var x=-C+_;x<=C-E;x+=2){var w=u+x,D;x==-C||x!=C&&m[w-1]<m[w+1]?D=m[w+1]:D=m[w-1]+1;for(var k=D-x;D<c&&k<d&&s.charAt(D)==i.charAt(k);)D++,k++;if(m[w]=D,D>c)E+=2;else if(k>d)_+=2;else if(g){var v=u+b-x;if(v>=0&&v<h&&p[v]!=-1){var S=c-p[v];if(D>=S)return this.diff_bisectSplit_(s,i,D,k,l)}}}for(var N=-C+B;N<=C-A;N+=2){var v=u+N,S;N==-C||N!=C&&p[v-1]<p[v+1]?S=p[v+1]:S=p[v-1]+1;for(var V=S-N;S<c&&V<d&&s.charAt(c-S-1)==i.charAt(d-V-1);)S++,V++;if(p[v]=S,S>c)A+=2;else if(V>d)B+=2;else if(!g){var w=u+b-N;if(w>=0&&w<h&&m[w]!=-1){var D=m[w],k=u+D-w;if(S=c-S,D>=S)return this.diff_bisectSplit_(s,i,D,k,l)}}}}return[new o.Diff(n,s),new o.Diff(r,i)]},o.prototype.diff_bisectSplit_=function(s,i,l,c,d){var f=s.substring(0,l),u=i.substring(0,c),h=s.substring(l),m=i.substring(c),p=this.diff_main(f,u,!1,d),y=this.diff_main(h,m,!1,d);return p.concat(y)},o.prototype.diff_linesToChars_=function(s,i){var l=[],c={};l[0]="";function d(m){for(var p="",y=0,b=-1,g=l.length;b<m.length-1;){b=m.indexOf(`
|
|
3
3
|
`,y),b==-1&&(b=m.length-1);var _=m.substring(y,b+1);(c.hasOwnProperty?c.hasOwnProperty(_):c[_]!==void 0)?p+=String.fromCharCode(c[_]):(g==f&&(_=m.substring(y),b=m.length),p+=String.fromCharCode(g),c[_]=g,l[g++]=_),y=b+1}return p}var f=4e4,u=d(s);f=65535;var h=d(i);return{chars1:u,chars2:h,lineArray:l}},o.prototype.diff_charsToLines_=function(s,i){for(var l=0;l<s.length;l++){for(var c=s[l][1],d=[],f=0;f<c.length;f++)d[f]=i[c.charCodeAt(f)];s[l][1]=d.join("")}},o.prototype.diff_commonPrefix=function(s,i){if(!s||!i||s.charAt(0)!=i.charAt(0))return 0;for(var l=0,c=Math.min(s.length,i.length),d=c,f=0;l<d;)s.substring(f,d)==i.substring(f,d)?(l=d,f=l):c=d,d=Math.floor((c-l)/2+l);return d},o.prototype.diff_commonSuffix=function(s,i){if(!s||!i||s.charAt(s.length-1)!=i.charAt(i.length-1))return 0;for(var l=0,c=Math.min(s.length,i.length),d=c,f=0;l<d;)s.substring(s.length-d,s.length-f)==i.substring(i.length-d,i.length-f)?(l=d,f=l):c=d,d=Math.floor((c-l)/2+l);return d},o.prototype.diff_commonOverlap_=function(s,i){var l=s.length,c=i.length;if(l==0||c==0)return 0;l>c?s=s.substring(l-c):l<c&&(i=i.substring(0,l));var d=Math.min(l,c);if(s==i)return d;for(var f=0,u=1;;){var h=s.substring(d-u),m=i.indexOf(h);if(m==-1)return f;u+=m,(m==0||s.substring(d-u)==i.substring(0,u))&&(f=u,u++)}},o.prototype.diff_halfMatch_=function(s,i){if(this.Diff_Timeout<=0)return null;var l=s.length>i.length?s:i,c=s.length>i.length?i:s;if(l.length<4||c.length*2<l.length)return null;var d=this;function f(E,B,A){for(var C=E.substring(A,A+Math.floor(E.length/4)),x=-1,w="",D,k,v,S;(x=B.indexOf(C,x+1))!=-1;){var N=d.diff_commonPrefix(E.substring(A),B.substring(x)),V=d.diff_commonSuffix(E.substring(0,A),B.substring(0,x));w.length<V+N&&(w=B.substring(x-V,x)+B.substring(x,x+N),D=E.substring(0,A-V),k=E.substring(A+N),v=B.substring(0,x-V),S=B.substring(x+N))}return w.length*2>=E.length?[D,k,v,S,w]:null}var u=f(l,c,Math.ceil(l.length/4)),h=f(l,c,Math.ceil(l.length/2)),m;if(!u&&!h)return null;h?u?m=u[4].length>h[4].length?u:h:m=h:m=u;var p,y,b,g;s.length>i.length?(p=m[0],y=m[1],b=m[2],g=m[3]):(b=m[0],g=m[1],p=m[2],y=m[3]);var _=m[4];return[p,y,b,g,_]},o.prototype.diff_cleanupSemantic=function(s){for(var i=!1,l=[],c=0,d=null,f=0,u=0,h=0,m=0,p=0;f<s.length;)s[f][0]==a?(l[c++]=f,u=m,h=p,m=0,p=0,d=s[f][1]):(s[f][0]==r?m+=s[f][1].length:p+=s[f][1].length,d&&d.length<=Math.max(u,h)&&d.length<=Math.max(m,p)&&(s.splice(l[c-1],0,new o.Diff(n,d)),s[l[c-1]+1][0]=r,c--,c--,f=c>0?l[c-1]:-1,u=0,h=0,m=0,p=0,d=null,i=!0)),f++;for(i&&this.diff_cleanupMerge(s),this.diff_cleanupSemanticLossless(s),f=1;f<s.length;){if(s[f-1][0]==n&&s[f][0]==r){var y=s[f-1][1],b=s[f][1],g=this.diff_commonOverlap_(y,b),_=this.diff_commonOverlap_(b,y);g>=_?(g>=y.length/2||g>=b.length/2)&&(s.splice(f,0,new o.Diff(a,b.substring(0,g))),s[f-1][1]=y.substring(0,y.length-g),s[f+1][1]=b.substring(g),f++):(_>=y.length/2||_>=b.length/2)&&(s.splice(f,0,new o.Diff(a,y.substring(0,_))),s[f-1][0]=r,s[f-1][1]=b.substring(0,b.length-_),s[f+1][0]=n,s[f+1][1]=y.substring(_),f++),f++}f++}},o.prototype.diff_cleanupSemanticLossless=function(s){function i(_,E){if(!_||!E)return 6;var B=_.charAt(_.length-1),A=E.charAt(0),C=B.match(o.nonAlphaNumericRegex_),x=A.match(o.nonAlphaNumericRegex_),w=C&&B.match(o.whitespaceRegex_),D=x&&A.match(o.whitespaceRegex_),k=w&&B.match(o.linebreakRegex_),v=D&&A.match(o.linebreakRegex_),S=k&&_.match(o.blanklineEndRegex_),N=v&&E.match(o.blanklineStartRegex_);return S||N?5:k||v?4:C&&!w&&D?3:w||D?2:C||x?1:0}for(var l=1;l<s.length-1;){if(s[l-1][0]==a&&s[l+1][0]==a){var c=s[l-1][1],d=s[l][1],f=s[l+1][1],u=this.diff_commonSuffix(c,d);if(u){var h=d.substring(d.length-u);c=c.substring(0,c.length-u),d=h+d.substring(0,d.length-u),f=h+f}for(var m=c,p=d,y=f,b=i(c,d)+i(d,f);d.charAt(0)===f.charAt(0);){c+=d.charAt(0),d=d.substring(1)+f.charAt(0),f=f.substring(1);var g=i(c,d)+i(d,f);g>=b&&(b=g,m=c,p=d,y=f)}s[l-1][1]!=m&&(m?s[l-1][1]=m:(s.splice(l-1,1),l--),s[l][1]=p,y?s[l+1][1]=y:(s.splice(l+1,1),l--))}l++}},o.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,o.whitespaceRegex_=/\s/,o.linebreakRegex_=/[\r\n]/,o.blanklineEndRegex_=/\n\r?\n$/,o.blanklineStartRegex_=/^\r?\n\r?\n/,o.prototype.diff_cleanupEfficiency=function(s){for(var i=!1,l=[],c=0,d=null,f=0,u=!1,h=!1,m=!1,p=!1;f<s.length;)s[f][0]==a?(s[f][1].length<this.Diff_EditCost&&(m||p)?(l[c++]=f,u=m,h=p,d=s[f][1]):(c=0,d=null),m=p=!1):(s[f][0]==n?p=!0:m=!0,d&&(u&&h&&m&&p||d.length<this.Diff_EditCost/2&&u+h+m+p==3)&&(s.splice(l[c-1],0,new o.Diff(n,d)),s[l[c-1]+1][0]=r,c--,d=null,u&&h?(m=p=!0,c=0):(c--,f=c>0?l[c-1]:-1,m=p=!1),i=!0)),f++;i&&this.diff_cleanupMerge(s)},o.prototype.diff_cleanupMerge=function(s){s.push(new o.Diff(a,""));for(var i=0,l=0,c=0,d="",f="",u;i<s.length;)switch(s[i][0]){case r:c++,f+=s[i][1],i++;break;case n:l++,d+=s[i][1],i++;break;case a:l+c>1?(l!==0&&c!==0&&(u=this.diff_commonPrefix(f,d),u!==0&&(i-l-c>0&&s[i-l-c-1][0]==a?s[i-l-c-1][1]+=f.substring(0,u):(s.splice(0,0,new o.Diff(a,f.substring(0,u))),i++),f=f.substring(u),d=d.substring(u)),u=this.diff_commonSuffix(f,d),u!==0&&(s[i][1]=f.substring(f.length-u)+s[i][1],f=f.substring(0,f.length-u),d=d.substring(0,d.length-u))),i-=l+c,s.splice(i,l+c),d.length&&(s.splice(i,0,new o.Diff(n,d)),i++),f.length&&(s.splice(i,0,new o.Diff(r,f)),i++),i++):i!==0&&s[i-1][0]==a?(s[i-1][1]+=s[i][1],s.splice(i,1)):i++,c=0,l=0,d="",f="";break}s[s.length-1][1]===""&&s.pop();var h=!1;for(i=1;i<s.length-1;)s[i-1][0]==a&&s[i+1][0]==a&&(s[i][1].substring(s[i][1].length-s[i-1][1].length)==s[i-1][1]?(s[i][1]=s[i-1][1]+s[i][1].substring(0,s[i][1].length-s[i-1][1].length),s[i+1][1]=s[i-1][1]+s[i+1][1],s.splice(i-1,1),h=!0):s[i][1].substring(0,s[i+1][1].length)==s[i+1][1]&&(s[i-1][1]+=s[i+1][1],s[i][1]=s[i][1].substring(s[i+1][1].length)+s[i+1][1],s.splice(i+1,1),h=!0)),i++;h&&this.diff_cleanupMerge(s)},o.prototype.diff_xIndex=function(s,i){var l=0,c=0,d=0,f=0,u;for(u=0;u<s.length&&(s[u][0]!==r&&(l+=s[u][1].length),s[u][0]!==n&&(c+=s[u][1].length),!(l>i));u++)d=l,f=c;return s.length!=u&&s[u][0]===n?f:f+(i-d)},o.prototype.diff_prettyHtml=function(s){for(var i=[],l=/&/g,c=/</g,d=/>/g,f=/\n/g,u=0;u<s.length;u++){var h=s[u][0],m=s[u][1],p=m.replace(l,"&").replace(c,"<").replace(d,">").replace(f,"¶<br>");switch(h){case r:i[u]='<ins style="background:#e6ffe6;">'+p+"</ins>";break;case n:i[u]='<del style="background:#ffe6e6;">'+p+"</del>";break;case a:i[u]="<span>"+p+"</span>";break}}return i.join("")},o.prototype.diff_text1=function(s){for(var i=[],l=0;l<s.length;l++)s[l][0]!==r&&(i[l]=s[l][1]);return i.join("")},o.prototype.diff_text2=function(s){for(var i=[],l=0;l<s.length;l++)s[l][0]!==n&&(i[l]=s[l][1]);return i.join("")},o.prototype.diff_levenshtein=function(s){for(var i=0,l=0,c=0,d=0;d<s.length;d++){var f=s[d][0],u=s[d][1];switch(f){case r:l+=u.length;break;case n:c+=u.length;break;case a:i+=Math.max(l,c),l=0,c=0;break}}return i+=Math.max(l,c),i},o.prototype.diff_toDelta=function(s){for(var i=[],l=0;l<s.length;l++)switch(s[l][0]){case r:i[l]="+"+encodeURI(s[l][1]);break;case n:i[l]="-"+s[l][1].length;break;case a:i[l]="="+s[l][1].length;break}return i.join(" ").replace(/%20/g," ")},o.prototype.diff_fromDelta=function(s,i){for(var l=[],c=0,d=0,f=i.split(/\t/g),u=0;u<f.length;u++){var h=f[u].substring(1);switch(f[u].charAt(0)){case"+":try{l[c++]=new o.Diff(r,decodeURI(h))}catch{throw new Error("Illegal escape in diff_fromDelta: "+h)}break;case"-":case"=":var m=parseInt(h,10);if(isNaN(m)||m<0)throw new Error("Invalid number in diff_fromDelta: "+h);var p=s.substring(d,d+=m);f[u].charAt(0)=="="?l[c++]=new o.Diff(a,p):l[c++]=new o.Diff(n,p);break;default:if(f[u])throw new Error("Invalid diff operation in diff_fromDelta: "+f[u])}}if(d!=s.length)throw new Error("Delta length ("+d+") does not equal source text length ("+s.length+").");return l},o.prototype.match_main=function(s,i,l){if(s==null||i==null||l==null)throw new Error("Null input. (match_main)");return l=Math.max(0,Math.min(l,s.length)),s==i?0:s.length?s.substring(l,l+i.length)==i?l:this.match_bitap_(s,i,l):-1},o.prototype.match_bitap_=function(s,i,l){if(i.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var c=this.match_alphabet_(i),d=this;function f(D,k){var v=D/i.length,S=Math.abs(l-k);return d.Match_Distance?v+S/d.Match_Distance:S?1:v}var u=this.Match_Threshold,h=s.indexOf(i,l);h!=-1&&(u=Math.min(f(0,h),u),h=s.lastIndexOf(i,l+i.length),h!=-1&&(u=Math.min(f(0,h),u)));var m=1<<i.length-1;h=-1;for(var p,y,b=i.length+s.length,g,_=0;_<i.length;_++){for(p=0,y=b;p<y;)f(_,l+y)<=u?p=y:b=y,y=Math.floor((b-p)/2+p);b=y;var E=Math.max(1,l-y+1),B=Math.min(l+y,s.length)+i.length,A=Array(B+2);A[B+1]=(1<<_)-1;for(var C=B;C>=E;C--){var x=c[s.charAt(C-1)];if(_===0?A[C]=(A[C+1]<<1|1)&x:A[C]=(A[C+1]<<1|1)&x|((g[C+1]|g[C])<<1|1)|g[C+1],A[C]&m){var w=f(_,C-1);if(w<=u)if(u=w,h=C-1,h>l)E=Math.max(1,2*l-h);else break}}if(f(_+1,l)>u)break;g=A}return h},o.prototype.match_alphabet_=function(s){for(var i={},l=0;l<s.length;l++)i[s.charAt(l)]=0;for(var l=0;l<s.length;l++)i[s.charAt(l)]|=1<<s.length-l-1;return i},o.prototype.patch_addContext_=function(s,i){if(i.length!=0){if(s.start2===null)throw Error("patch not initialized");for(var l=i.substring(s.start2,s.start2+s.length1),c=0;i.indexOf(l)!=i.lastIndexOf(l)&&l.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)c+=this.Patch_Margin,l=i.substring(s.start2-c,s.start2+s.length1+c);c+=this.Patch_Margin;var d=i.substring(s.start2-c,s.start2);d&&s.diffs.unshift(new o.Diff(a,d));var f=i.substring(s.start2+s.length1,s.start2+s.length1+c);f&&s.diffs.push(new o.Diff(a,f)),s.start1-=d.length,s.start2-=d.length,s.length1+=d.length+f.length,s.length2+=d.length+f.length}},o.prototype.patch_make=function(s,i,l){var c,d;if(typeof s=="string"&&typeof i=="string"&&typeof l>"u")c=s,d=this.diff_main(c,i,!0),d.length>2&&(this.diff_cleanupSemantic(d),this.diff_cleanupEfficiency(d));else if(s&&typeof s=="object"&&typeof i>"u"&&typeof l>"u")d=s,c=this.diff_text1(d);else if(typeof s=="string"&&i&&typeof i=="object"&&typeof l>"u")c=s,d=i;else if(typeof s=="string"&&typeof i=="string"&&l&&typeof l=="object")c=s,d=l;else throw new Error("Unknown call format to patch_make.");if(d.length===0)return[];for(var f=[],u=new o.patch_obj,h=0,m=0,p=0,y=c,b=c,g=0;g<d.length;g++){var _=d[g][0],E=d[g][1];switch(!h&&_!==a&&(u.start1=m,u.start2=p),_){case r:u.diffs[h++]=d[g],u.length2+=E.length,b=b.substring(0,p)+E+b.substring(p);break;case n:u.length1+=E.length,u.diffs[h++]=d[g],b=b.substring(0,p)+b.substring(p+E.length);break;case a:E.length<=2*this.Patch_Margin&&h&&d.length!=g+1?(u.diffs[h++]=d[g],u.length1+=E.length,u.length2+=E.length):E.length>=2*this.Patch_Margin&&h&&(this.patch_addContext_(u,y),f.push(u),u=new o.patch_obj,h=0,y=b,m=p);break}_!==r&&(m+=E.length),_!==n&&(p+=E.length)}return h&&(this.patch_addContext_(u,y),f.push(u)),f},o.prototype.patch_deepCopy=function(s){for(var i=[],l=0;l<s.length;l++){var c=s[l],d=new o.patch_obj;d.diffs=[];for(var f=0;f<c.diffs.length;f++)d.diffs[f]=new o.Diff(c.diffs[f][0],c.diffs[f][1]);d.start1=c.start1,d.start2=c.start2,d.length1=c.length1,d.length2=c.length2,i[l]=d}return i},o.prototype.patch_apply=function(s,i){if(s.length==0)return[i,[]];s=this.patch_deepCopy(s);var l=this.patch_addPadding(s);i=l+i+l,this.patch_splitMax(s);for(var c=0,d=[],f=0;f<s.length;f++){var u=s[f].start2+c,h=this.diff_text1(s[f].diffs),m,p=-1;if(h.length>this.Match_MaxBits?(m=this.match_main(i,h.substring(0,this.Match_MaxBits),u),m!=-1&&(p=this.match_main(i,h.substring(h.length-this.Match_MaxBits),u+h.length-this.Match_MaxBits),(p==-1||m>=p)&&(m=-1))):m=this.match_main(i,h,u),m==-1)d[f]=!1,c-=s[f].length2-s[f].length1;else{d[f]=!0,c=m-u;var y;if(p==-1?y=i.substring(m,m+h.length):y=i.substring(m,p+this.Match_MaxBits),h==y)i=i.substring(0,m)+this.diff_text2(s[f].diffs)+i.substring(m+h.length);else{var b=this.diff_main(h,y,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(b)/h.length>this.Patch_DeleteThreshold)d[f]=!1;else{this.diff_cleanupSemanticLossless(b);for(var g=0,_,E=0;E<s[f].diffs.length;E++){var B=s[f].diffs[E];B[0]!==a&&(_=this.diff_xIndex(b,g)),B[0]===r?i=i.substring(0,m+_)+B[1]+i.substring(m+_):B[0]===n&&(i=i.substring(0,m+_)+i.substring(m+this.diff_xIndex(b,g+B[1].length))),B[0]!==n&&(g+=B[1].length)}}}}}return i=i.substring(l.length,i.length-l.length),[i,d]},o.prototype.patch_addPadding=function(s){for(var i=this.Patch_Margin,l="",c=1;c<=i;c++)l+=String.fromCharCode(c);for(var c=0;c<s.length;c++)s[c].start1+=i,s[c].start2+=i;var d=s[0],f=d.diffs;if(f.length==0||f[0][0]!=a)f.unshift(new o.Diff(a,l)),d.start1-=i,d.start2-=i,d.length1+=i,d.length2+=i;else if(i>f[0][1].length){var u=i-f[0][1].length;f[0][1]=l.substring(f[0][1].length)+f[0][1],d.start1-=u,d.start2-=u,d.length1+=u,d.length2+=u}if(d=s[s.length-1],f=d.diffs,f.length==0||f[f.length-1][0]!=a)f.push(new o.Diff(a,l)),d.length1+=i,d.length2+=i;else if(i>f[f.length-1][1].length){var u=i-f[f.length-1][1].length;f[f.length-1][1]+=l.substring(0,u),d.length1+=u,d.length2+=u}return l},o.prototype.patch_splitMax=function(s){for(var i=this.Match_MaxBits,l=0;l<s.length;l++)if(!(s[l].length1<=i)){var c=s[l];s.splice(l--,1);for(var d=c.start1,f=c.start2,u="";c.diffs.length!==0;){var h=new o.patch_obj,m=!0;for(h.start1=d-u.length,h.start2=f-u.length,u!==""&&(h.length1=h.length2=u.length,h.diffs.push(new o.Diff(a,u)));c.diffs.length!==0&&h.length1<i-this.Patch_Margin;){var p=c.diffs[0][0],y=c.diffs[0][1];p===r?(h.length2+=y.length,f+=y.length,h.diffs.push(c.diffs.shift()),m=!1):p===n&&h.diffs.length==1&&h.diffs[0][0]==a&&y.length>2*i?(h.length1+=y.length,d+=y.length,m=!1,h.diffs.push(new o.Diff(p,y)),c.diffs.shift()):(y=y.substring(0,i-h.length1-this.Patch_Margin),h.length1+=y.length,d+=y.length,p===a?(h.length2+=y.length,f+=y.length):m=!1,h.diffs.push(new o.Diff(p,y)),y==c.diffs[0][1]?c.diffs.shift():c.diffs[0][1]=c.diffs[0][1].substring(y.length))}u=this.diff_text2(h.diffs),u=u.substring(u.length-this.Patch_Margin);var b=this.diff_text1(c.diffs).substring(0,this.Patch_Margin);b!==""&&(h.length1+=b.length,h.length2+=b.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===a?h.diffs[h.diffs.length-1][1]+=b:h.diffs.push(new o.Diff(a,b))),m||s.splice(++l,0,h)}}},o.prototype.patch_toText=function(s){for(var i=[],l=0;l<s.length;l++)i[l]=s[l];return i.join("")},o.prototype.patch_fromText=function(s){var i=[];if(!s)return i;for(var l=s.split(`
|
|
4
4
|
`),c=0,d=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;c<l.length;){var f=l[c].match(d);if(!f)throw new Error("Invalid patch string: "+l[c]);var u=new o.patch_obj;for(i.push(u),u.start1=parseInt(f[1],10),f[2]===""?(u.start1--,u.length1=1):f[2]=="0"?u.length1=0:(u.start1--,u.length1=parseInt(f[2],10)),u.start2=parseInt(f[3],10),f[4]===""?(u.start2--,u.length2=1):f[4]=="0"?u.length2=0:(u.start2--,u.length2=parseInt(f[4],10)),c++;c<l.length;){var h=l[c].charAt(0);try{var m=decodeURI(l[c].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+m)}if(h=="-")u.diffs.push(new o.Diff(n,m));else if(h=="+")u.diffs.push(new o.Diff(r,m));else if(h==" ")u.diffs.push(new o.Diff(a,m));else{if(h=="@")break;if(h!=="")throw new Error('Invalid patch mode "'+h+'" in: '+m)}c++}}return i},o.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},o.patch_obj.prototype.toString=function(){var s,i;this.length1===0?s=this.start1+",0":this.length1==1?s=this.start1+1:s=this.start1+1+","+this.length1,this.length2===0?i=this.start2+",0":this.length2==1?i=this.start2+1:i=this.start2+1+","+this.length2;for(var l=["@@ -"+s+" +"+i+` @@
|
|
5
5
|
`],c,d=0;d<this.diffs.length;d++){switch(this.diffs[d][0]){case r:c="+";break;case n:c="-";break;case a:c=" ";break}l[d+1]=c+encodeURI(this.diffs[d][1])+`
|
|
6
|
-
`}return l.join("").replace(/%20/g," ")},e.exports=o,e.exports.diff_match_patch=o,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=r,e.exports.DIFF_EQUAL=a})(Ol);var Ja=Ol.exports;function Ll(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(o=>{const n=e[o],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&Ll(n)}),e}class Rl{constructor(o){o.data===void 0&&(o.data={}),this.data=o.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Il(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ho(e,...o){const n=Object.create(null);for(const r in e)n[r]=e[r];return o.forEach(function(r){for(const a in r)n[a]=r[a]}),n}const yp="</span>",Fl=e=>!!e.scope,xp=(e,{prefix:o})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${o}${n.shift()}`,...n.map((r,a)=>`${r}${"_".repeat(a+1)}`)].join(" ")}return`${o}${e}`};let kp=class{constructor(o,n){this.buffer="",this.classPrefix=n.classPrefix,o.walk(this)}addText(o){this.buffer+=Il(o)}openNode(o){if(!Fl(o))return;const n=xp(o.scope,{prefix:this.classPrefix});this.span(n)}closeNode(o){Fl(o)&&(this.buffer+=yp)}value(){return this.buffer}span(o){this.buffer+=`<span class="${o}">`}};const zl=(e={})=>{const o={children:[]};return Object.assign(o,e),o};let wp=class wu{constructor(){this.rootNode=zl(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(o){this.top.children.push(o)}openNode(o){const n=zl({scope:o});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(o){return this.constructor._walk(o,this.rootNode)}static _walk(o,n){return typeof n=="string"?o.addText(n):n.children&&(o.openNode(n),n.children.forEach(r=>this._walk(o,r)),o.closeNode(n)),o}static _collapse(o){typeof o!="string"&&o.children&&(o.children.every(n=>typeof n=="string")?o.children=[o.children.join("")]:o.children.forEach(n=>{wu._collapse(n)}))}},Cp=class extends wp{constructor(o){super(),this.options=o}addText(o){o!==""&&this.add(o)}startScope(o){this.openNode(o)}endScope(){this.closeNode()}__addSublanguage(o,n){const r=o.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new kp(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Bn(e){return e?typeof e=="string"?e:e.source:null}function $l(e){return vo("(?=",e,")")}function _p(e){return vo("(?:",e,")*")}function Ep(e){return vo("(?:",e,")?")}function vo(...e){return e.map(o=>Bn(o)).join("")}function Bp(e){const o=e[e.length-1];return typeof o=="object"&&o.constructor===Object?(e.splice(e.length-1,1),o):{}}function Qa(...e){return"("+(Bp(e).capture?"":"?:")+e.map(o=>Bn(o)).join("|")+")"}function jl(e){return new RegExp(e.toString()+"|").exec("").length-1}function Sp(e,o){const n=e&&e.exec(o);return n&&n.index===0}const Ap=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Za(e,{joinWith:o}){let n=0;return e.map(r=>{n+=1;const a=n;let s=Bn(r),i="";for(;s.length>0;){const l=Ap.exec(s);if(!l){i+=s;break}i+=s.substring(0,l.index),s=s.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?i+="\\"+String(Number(l[1])+a):(i+=l[0],l[0]==="("&&n++)}return i}).map(r=>`(${r})`).join(o)}const vp=/\b\B/,Ul="[a-zA-Z]\\w*",es="[a-zA-Z_]\\w*",Wl="\\b\\d+(\\.\\d+)?",Hl="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ql="\\b(0b[01]+)",Dp="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Np=(e={})=>{const o=/^#![ ]*\//;return e.binary&&(e.begin=vo(o,/.*\b/,e.binary,/\b.*/)),ho({scope:"meta",begin:o,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Sn={begin:"\\\\[\\s\\S]",relevance:0},Vp={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Sn]},Mp={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Sn]},Tp={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},pr=function(e,o,n={}){const r=ho({scope:"comment",begin:e,end:o,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=Qa("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:vo(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Pp=pr("//","$"),Op=pr("/\\*","\\*/"),Lp=pr("#","$"),Rp={scope:"number",begin:Wl,relevance:0},Ip={scope:"number",begin:Hl,relevance:0},Fp={scope:"number",begin:ql,relevance:0},zp={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Sn,{begin:/\[/,end:/\]/,relevance:0,contains:[Sn]}]},$p={scope:"title",begin:Ul,relevance:0},jp={scope:"title",begin:es,relevance:0},Up={begin:"\\.\\s*"+es,relevance:0};var gr=Object.freeze({__proto__:null,APOS_STRING_MODE:Vp,BACKSLASH_ESCAPE:Sn,BINARY_NUMBER_MODE:Fp,BINARY_NUMBER_RE:ql,COMMENT:pr,C_BLOCK_COMMENT_MODE:Op,C_LINE_COMMENT_MODE:Pp,C_NUMBER_MODE:Ip,C_NUMBER_RE:Hl,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(o,n)=>{n.data._beginMatch=o[1]},"on:end":(o,n)=>{n.data._beginMatch!==o[1]&&n.ignoreMatch()}})},HASH_COMMENT_MODE:Lp,IDENT_RE:Ul,MATCH_NOTHING_RE:vp,METHOD_GUARD:Up,NUMBER_MODE:Rp,NUMBER_RE:Wl,PHRASAL_WORDS_MODE:Tp,QUOTE_STRING_MODE:Mp,REGEXP_MODE:zp,RE_STARTERS_RE:Dp,SHEBANG:Np,TITLE_MODE:$p,UNDERSCORE_IDENT_RE:es,UNDERSCORE_TITLE_MODE:jp});function Wp(e,o){e.input[e.index-1]==="."&&o.ignoreMatch()}function Hp(e,o){e.className!==void 0&&(e.scope=e.className,delete e.className)}function qp(e,o){o&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Wp,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Gp(e,o){Array.isArray(e.illegal)&&(e.illegal=Qa(...e.illegal))}function Kp(e,o){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Xp(e,o){e.relevance===void 0&&(e.relevance=1)}const Yp=(e,o)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=vo(n.beforeMatch,$l(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Jp=["of","and","for","in","not","or","if","then","parent","list","value"],Qp="keyword";function Gl(e,o,n=Qp){const r=Object.create(null);return typeof e=="string"?a(n,e.split(" ")):Array.isArray(e)?a(n,e):Object.keys(e).forEach(function(s){Object.assign(r,Gl(e[s],o,s))}),r;function a(s,i){o&&(i=i.map(l=>l.toLowerCase())),i.forEach(function(l){const c=l.split("|");r[c[0]]=[s,Zp(c[0],c[1])]})}}function Zp(e,o){return o?Number(o):eg(e)?0:1}function eg(e){return Jp.includes(e.toLowerCase())}const Kl={},Do=e=>{console.error(e)},Xl=(e,...o)=>{console.log(`WARN: ${e}`,...o)},Ko=(e,o)=>{Kl[`${e}/${o}`]||(console.log(`Deprecated as of ${e}. ${o}`),Kl[`${e}/${o}`]=!0)},br=new Error;function Yl(e,o,{key:n}){let r=0;const a=e[n],s={},i={};for(let l=1;l<=o.length;l++)i[l+r]=a[l],s[l+r]=!0,r+=jl(o[l-1]);e[n]=i,e[n]._emit=s,e[n]._multi=!0}function tg(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Do("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),br;if(typeof e.beginScope!="object"||e.beginScope===null)throw Do("beginScope must be object"),br;Yl(e,e.begin,{key:"beginScope"}),e.begin=Za(e.begin,{joinWith:""})}}function og(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Do("skip, excludeEnd, returnEnd not compatible with endScope: {}"),br;if(typeof e.endScope!="object"||e.endScope===null)throw Do("endScope must be object"),br;Yl(e,e.end,{key:"endScope"}),e.end=Za(e.end,{joinWith:""})}}function ng(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function rg(e){ng(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),tg(e),og(e)}function ag(e){function o(i,l){return new RegExp(Bn(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,l]),this.matchAt+=jl(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(c=>c[1]);this.matcherRe=o(Za(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(l);if(!c)return null;const d=c.findIndex((u,h)=>h>0&&u!==void 0),f=this.matchIndexes[d];return c.splice(0,d),Object.assign(c,f)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const c=new n;return this.rules.slice(l).forEach(([d,f])=>c.addRule(d,f)),c.compile(),this.multiRegexes[l]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,c){this.rules.push([l,c]),c.type==="begin"&&this.count++}exec(l){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let d=c.exec(l);if(this.resumingScanAtSamePosition()&&!(d&&d.index===this.lastIndex)){const f=this.getMatcher(0);f.lastIndex=this.lastIndex+1,d=f.exec(l)}return d&&(this.regexIndex+=d.position+1,this.regexIndex===this.count&&this.considerAll()),d}}function a(i){const l=new r;return i.contains.forEach(c=>l.addRule(c.begin,{rule:c,type:"begin"})),i.terminatorEnd&&l.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&l.addRule(i.illegal,{type:"illegal"}),l}function s(i,l){const c=i;if(i.isCompiled)return c;[Hp,Kp,rg,Yp].forEach(f=>f(i,l)),e.compilerExtensions.forEach(f=>f(i,l)),i.__beforeBegin=null,[qp,Gp,Xp].forEach(f=>f(i,l)),i.isCompiled=!0;let d=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),d=i.keywords.$pattern,delete i.keywords.$pattern),d=d||/\w+/,i.keywords&&(i.keywords=Gl(i.keywords,e.case_insensitive)),c.keywordPatternRe=o(d,!0),l&&(i.begin||(i.begin=/\B|\b/),c.beginRe=o(c.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(c.endRe=o(c.end)),c.terminatorEnd=Bn(c.end)||"",i.endsWithParent&&l.terminatorEnd&&(c.terminatorEnd+=(i.end?"|":"")+l.terminatorEnd)),i.illegal&&(c.illegalRe=o(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(f){return sg(f==="self"?i:f)})),i.contains.forEach(function(f){s(f,c)}),i.starts&&s(i.starts,l),c.matcher=a(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ho(e.classNameAliases||{}),s(e)}function Jl(e){return e?e.endsWithParent||Jl(e.starts):!1}function sg(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(o){return ho(e,{variants:null},o)})),e.cachedVariants?e.cachedVariants:Jl(e)?ho(e,{starts:e.starts?ho(e.starts):null}):Object.isFrozen(e)?ho(e):e}var ig="11.10.0";class lg extends Error{constructor(o,n){super(o),this.name="HTMLInjectionError",this.html=n}}const ts=Il,Ql=ho,Zl=Symbol("nomatch"),cg=7,ec=function(e){const o=Object.create(null),n=Object.create(null),r=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Cp};function c(P){return l.noHighlightRe.test(P)}function d(P){let R=P.className+" ";R+=P.parentNode?P.parentNode.className:"";const j=l.languageDetectRe.exec(R);if(j){const M=D(j[1]);return M||(Xl(s.replace("{}",j[1])),Xl("Falling back to no-highlight mode for this block.",P)),M?j[1]:"no-highlight"}return R.split(/\s+/).find(M=>c(M)||D(M))}function f(P,R,j){let M="",I="";typeof R=="object"?(M=P,j=R.ignoreIllegals,I=R.language):(Ko("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ko("10.7.0",`Please use highlight(code, options) instead.
|
|
7
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),I=P,M=R),j===void 0&&(j=!0);const K={code:M,language:I};L("before:highlight",K);const H=K.result?K.result:u(K.language,K.code,j);return H.code=K.code,L("after:highlight",H),H}function u(P,R,j,M){const I=Object.create(null);function K(oe,le){return oe.keywords[le]}function H(){if(!he.keywords){Pe.addText(Be);return}let oe=0;he.keywordPatternRe.lastIndex=0;let le=he.keywordPatternRe.exec(Be),G="";for(;le;){G+=Be.substring(oe,le.index);const ee=Ee.case_insensitive?le[0].toLowerCase():le[0],ae=K(he,ee);if(ae){const[ye,Ge]=ae;if(Pe.addText(G),G="",I[ee]=(I[ee]||0)+1,I[ee]<=cg&&(Fe+=Ge),ye.startsWith("_"))G+=le[0];else{const Tt=Ee.classNameAliases[ye]||ye;te(le[0],Tt)}}else G+=le[0];oe=he.keywordPatternRe.lastIndex,le=he.keywordPatternRe.exec(Be)}G+=Be.substring(oe),Pe.addText(G)}function W(){if(Be==="")return;let oe=null;if(typeof he.subLanguage=="string"){if(!o[he.subLanguage]){Pe.addText(Be);return}oe=u(he.subLanguage,Be,!0,Oe[he.subLanguage]),Oe[he.subLanguage]=oe._top}else oe=m(Be,he.subLanguage.length?he.subLanguage:null);he.relevance>0&&(Fe+=oe.relevance),Pe.__addSublanguage(oe._emitter,oe.language)}function Z(){he.subLanguage!=null?W():H(),Be=""}function te(oe,le){oe!==""&&(Pe.startScope(le),Pe.addText(oe),Pe.endScope())}function ie(oe,le){let G=1;const ee=le.length-1;for(;G<=ee;){if(!oe._emit[G]){G++;continue}const ae=Ee.classNameAliases[oe[G]]||oe[G],ye=le[G];ae?te(ye,ae):(Be=ye,H(),Be=""),G++}}function Ae(oe,le){return oe.scope&&typeof oe.scope=="string"&&Pe.openNode(Ee.classNameAliases[oe.scope]||oe.scope),oe.beginScope&&(oe.beginScope._wrap?(te(Be,Ee.classNameAliases[oe.beginScope._wrap]||oe.beginScope._wrap),Be=""):oe.beginScope._multi&&(ie(oe.beginScope,le),Be="")),he=Object.create(oe,{parent:{value:he}}),he}function ke(oe,le,G){let ee=Sp(oe.endRe,G);if(ee){if(oe["on:end"]){const ae=new Rl(oe);oe["on:end"](le,ae),ae.isMatchIgnored&&(ee=!1)}if(ee){for(;oe.endsParent&&oe.parent;)oe=oe.parent;return oe}}if(oe.endsWithParent)return ke(oe.parent,le,G)}function J(oe){return he.matcher.regexIndex===0?(Be+=oe[0],1):(de=!0,0)}function $(oe){const le=oe[0],G=oe.rule,ee=new Rl(G),ae=[G.__beforeBegin,G["on:begin"]];for(const ye of ae)if(ye&&(ye(oe,ee),ee.isMatchIgnored))return J(le);return G.skip?Be+=le:(G.excludeBegin&&(Be+=le),Z(),!G.returnBegin&&!G.excludeBegin&&(Be=le)),Ae(G,oe),G.returnBegin?0:le.length}function X(oe){const le=oe[0],G=R.substring(oe.index),ee=ke(he,oe,G);if(!ee)return Zl;const ae=he;he.endScope&&he.endScope._wrap?(Z(),te(le,he.endScope._wrap)):he.endScope&&he.endScope._multi?(Z(),ie(he.endScope,oe)):ae.skip?Be+=le:(ae.returnEnd||ae.excludeEnd||(Be+=le),Z(),ae.excludeEnd&&(Be=le));do he.scope&&Pe.closeNode(),!he.skip&&!he.subLanguage&&(Fe+=he.relevance),he=he.parent;while(he!==ee.parent);return ee.starts&&Ae(ee.starts,oe),ae.returnEnd?0:le.length}function re(){const oe=[];for(let le=he;le!==Ee;le=le.parent)le.scope&&oe.unshift(le.scope);oe.forEach(le=>Pe.openNode(le))}let me={};function De(oe,le){const G=le&&le[0];if(Be+=oe,G==null)return Z(),0;if(me.type==="begin"&&le.type==="end"&&me.index===le.index&&G===""){if(Be+=R.slice(le.index,le.index+1),!a){const ee=new Error(`0 width match regex (${P})`);throw ee.languageName=P,ee.badRule=me.rule,ee}return 1}if(me=le,le.type==="begin")return $(le);if(le.type==="illegal"&&!j){const ee=new Error('Illegal lexeme "'+G+'" for mode "'+(he.scope||"<unnamed>")+'"');throw ee.mode=he,ee}else if(le.type==="end"){const ee=X(le);if(ee!==Zl)return ee}if(le.type==="illegal"&&G==="")return 1;if(se>1e5&&se>le.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Be+=G,G.length}const Ee=D(P);if(!Ee)throw Do(s.replace("{}",P)),new Error('Unknown language: "'+P+'"');const We=ag(Ee);let Te="",he=M||We;const Oe={},Pe=new l.__emitter(l);re();let Be="",Fe=0,q=0,se=0,de=!1;try{if(Ee.__emitTokens)Ee.__emitTokens(R,Pe);else{for(he.matcher.considerAll();;){se++,de?de=!1:he.matcher.considerAll(),he.matcher.lastIndex=q;const oe=he.matcher.exec(R);if(!oe)break;const le=R.substring(q,oe.index),G=De(le,oe);q=oe.index+G}De(R.substring(q))}return Pe.finalize(),Te=Pe.toHTML(),{language:P,value:Te,relevance:Fe,illegal:!1,_emitter:Pe,_top:he}}catch(oe){if(oe.message&&oe.message.includes("Illegal"))return{language:P,value:ts(R),illegal:!0,relevance:0,_illegalBy:{message:oe.message,index:q,context:R.slice(q-100,q+100),mode:oe.mode,resultSoFar:Te},_emitter:Pe};if(a)return{language:P,value:ts(R),illegal:!1,relevance:0,errorRaised:oe,_emitter:Pe,_top:he};throw oe}}function h(P){const R={value:ts(P),illegal:!1,relevance:0,_top:i,_emitter:new l.__emitter(l)};return R._emitter.addText(P),R}function m(P,R){R=R||l.languages||Object.keys(o);const j=h(P),M=R.filter(D).filter(v).map(Z=>u(Z,P,!1));M.unshift(j);const I=M.sort((Z,te)=>{if(Z.relevance!==te.relevance)return te.relevance-Z.relevance;if(Z.language&&te.language){if(D(Z.language).supersetOf===te.language)return 1;if(D(te.language).supersetOf===Z.language)return-1}return 0}),[K,H]=I,W=K;return W.secondBest=H,W}function p(P,R,j){const M=R&&n[R]||j;P.classList.add("hljs"),P.classList.add(`language-${M}`)}function y(P){let R=null;const j=d(P);if(c(j))return;if(L("before:highlightElement",{el:P,language:j}),P.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",P);return}if(P.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(P)),l.throwUnescapedHTML))throw new lg("One of your code blocks includes unescaped HTML.",P.innerHTML);R=P;const M=R.textContent,I=j?f(M,{language:j,ignoreIllegals:!0}):m(M);P.innerHTML=I.value,P.dataset.highlighted="yes",p(P,j,I.language),P.result={language:I.language,re:I.relevance,relevance:I.relevance},I.secondBest&&(P.secondBest={language:I.secondBest.language,relevance:I.secondBest.relevance}),L("after:highlightElement",{el:P,result:I,text:M})}function b(P){l=Ql(l,P)}const g=()=>{B(),Ko("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _(){B(),Ko("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let E=!1;function B(){if(document.readyState==="loading"){E=!0;return}document.querySelectorAll(l.cssSelector).forEach(y)}function A(){E&&B()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function C(P,R){let j=null;try{j=R(e)}catch(M){if(Do("Language definition for '{}' could not be registered.".replace("{}",P)),a)Do(M);else throw M;j=i}j.name||(j.name=P),o[P]=j,j.rawDefinition=R.bind(null,e),j.aliases&&k(j.aliases,{languageName:P})}function x(P){delete o[P];for(const R of Object.keys(n))n[R]===P&&delete n[R]}function w(){return Object.keys(o)}function D(P){return P=(P||"").toLowerCase(),o[P]||o[n[P]]}function k(P,{languageName:R}){typeof P=="string"&&(P=[P]),P.forEach(j=>{n[j.toLowerCase()]=R})}function v(P){const R=D(P);return R&&!R.disableAutodetect}function S(P){P["before:highlightBlock"]&&!P["before:highlightElement"]&&(P["before:highlightElement"]=R=>{P["before:highlightBlock"](Object.assign({block:R.el},R))}),P["after:highlightBlock"]&&!P["after:highlightElement"]&&(P["after:highlightElement"]=R=>{P["after:highlightBlock"](Object.assign({block:R.el},R))})}function N(P){S(P),r.push(P)}function V(P){const R=r.indexOf(P);R!==-1&&r.splice(R,1)}function L(P,R){const j=P;r.forEach(function(M){M[j]&&M[j](R)})}function O(P){return Ko("10.7.0","highlightBlock will be removed entirely in v12.0"),Ko("10.7.0","Please use highlightElement now."),y(P)}Object.assign(e,{highlight:f,highlightAuto:m,highlightAll:B,highlightElement:y,highlightBlock:O,configure:b,initHighlighting:g,initHighlightingOnLoad:_,registerLanguage:C,unregisterLanguage:x,listLanguages:w,getLanguage:D,registerAliases:k,autoDetection:v,inherit:Ql,addPlugin:N,removePlugin:V}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString=ig,e.regex={concat:vo,lookahead:$l,either:Qa,optional:Ep,anyNumberOfTimes:_p};for(const P in gr)typeof gr[P]=="object"&&Ll(gr[P]);return Object.assign(e,gr),e},Xo=ec({});Xo.newInstance=()=>ec({});var dg=Xo;Xo.HighlightJS=Xo,Xo.default=Xo;const Vt=bp(dg);function fg(e){const o=e.regex,n=o.concat(/[\p{L}_]/u,o.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(s,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),c=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),d={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,c,l,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,i,c,l]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:o.concat(/</,o.lookahead(o.concat(n,o.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:d}]},{className:"tag",begin:o.concat(/<\//,o.lookahead(o.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const tc="[A-Za-z$_][0-9A-Za-z$_]*",ug=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],hg=["true","false","null","undefined","NaN","Infinity"],oc=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],nc=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],rc=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],mg=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],pg=[].concat(rc,oc,nc);function gg(e){const o=e.regex,n=(P,{after:R})=>{const j="</"+P[0].slice(1);return P.input.indexOf(j,R)!==-1},r=tc,a={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,R)=>{const j=P[0].length+P.index,M=P.input[j];if(M==="<"||M===","){R.ignoreMatch();return}M===">"&&(n(P,{after:j})||R.ignoreMatch());let I;const K=P.input.substring(j);if(I=K.match(/^\s*=/)){R.ignoreMatch();return}if((I=K.match(/^\s+extends\s+/))&&I.index===0){R.ignoreMatch();return}}},l={$pattern:tc,keyword:ug,literal:hg,built_in:pg,"variable.language":mg},c="[0-9](_?[0-9])*",d=`\\.(${c})`,f="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${f})((${d})|\\.)?|(${d}))[eE][+-]?(${c})\\b`},{begin:`\\b(${f})\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},y={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,p,y,b,{match:/\$\d+/},u];h.contains=_.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(_)});const E=[].concat(g,h.contains),B=E.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(E)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:B},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,o.concat(r,"(",o.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},x={relevance:0,match:o.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...oc,...nc]}},w={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},k={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function v(P){return o.concat("(?!",P.join("|"),")")}const S={match:o.concat(/\b/,v([...rc,"super","import"].map(P=>`${P}\\s*\\(`)),r,o.lookahead(/\s*\(/)),className:"title.function",relevance:0},N={begin:o.concat(/\./,o.lookahead(o.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},V={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,o.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,p,y,b,g,{match:/\$\d+/},u,x,{className:"attr",begin:r+o.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:L,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:B}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:s},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},N,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},S,k,C,V,{match:/\$[(.]/}]}}function bg(e){const o={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],a={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[o,n,e.QUOTE_STRING_MODE,a,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function yg(e){const o="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/\w[\w :()\./-]*:(?=[ \t]|$)/},{begin:/"\w[\w :()\./-]*":(?=[ \t]|$)/},{begin:/'\w[\w :()\./-]*':(?=[ \t]|$)/}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,a]},i=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},c={end:",",endsWithParent:!0,excludeEnd:!0,keywords:o,relevance:0},d={begin:/\{/,end:/\}/,contains:[c],illegal:"\\n",relevance:0},f={begin:"\\[",end:"\\]",contains:[c],illegal:"\\n",relevance:0},u=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:o,keywords:{literal:o}},l,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},d,f,s],h=[...u];return h.pop(),h.push(i),c.contains=h,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:u}}function xg(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function kg(e){const o=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},s={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},l={begin:/\{\{/,relevance:0},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s,l,i]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,l,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",f=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,u=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${f}))[eE][+-]?(${d})[jJ]?(?=${u})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${d})[jJ](?=${u})`}]},m={className:"comment",begin:o.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},p={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",s,h,c,e.HASH_COMMENT_MODE]}]};return i.contains=[c,h,s],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[s,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},c,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,p,c]}]}}var Yo="[0-9](_*[0-9])*",yr=`\\.(${Yo})`,xr="[0-9a-fA-F](_*[0-9a-fA-F])*",ac={className:"number",variants:[{begin:`(\\b(${Yo})((${yr})|\\.)?|(${yr}))[eE][+-]?(${Yo})[fFdD]?\\b`},{begin:`\\b(${Yo})((${yr})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${yr})[fFdD]?\\b`},{begin:`\\b(${Yo})[fFdD]\\b`},{begin:`\\b0[xX]((${xr})\\.?|(${xr})?\\.(${xr}))[pP][+-]?(${Yo})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${xr})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function sc(e,o,n){return n===-1?"":e.replace(o,r=>sc(e,o,n-1))}function wg(e){const o=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+sc("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},s={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},i={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[o.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,ac,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},ac,s]}}function Cg(e){const o=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:o.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,a]};a.contains.push(l);const c={match:/\\"/},d={className:"string",begin:/'/,end:/'/},f={match:/\\'/},u={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],m=e.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},y=["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],B=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],A=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:y,literal:b,built_in:[..._,...E,"set","shopt",...B,...A]},contains:[m,e.SHEBANG(),p,u,s,i,g,l,c,d,f,n]}}function _g(e){const o=e.regex,n=e.COMMENT("--","$"),r={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},a={begin:/"/,end:/"/,contains:[{begin:/""/}]},s=["true","false","unknown"],i=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],d=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],f=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],u=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],m=f,p=[...d,...c].filter(E=>!f.includes(E)),y={className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},b={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={begin:o.concat(/\b/,o.either(...m),/\s*\(/),relevance:0,keywords:{built_in:m}};function _(E,{exceptions:B,when:A}={}){const C=A;return B=B||[],E.map(x=>x.match(/\|\d+$/)||B.includes(x)?x:C(x)?`${x}|0`:x)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(p,{when:E=>E.length<3}),literal:s,type:l,built_in:u},contains:[{begin:o.either(...h),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:p.concat(h),literal:s,type:l}},{className:"type",begin:o.either(...i)},g,y,r,a,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}Vt.registerLanguage("xml",fg),Vt.registerLanguage("javascript",gg),Vt.registerLanguage("json",bg),Vt.registerLanguage("yaml",yg),Vt.registerLanguage("plaintext",xg),Vt.registerLanguage("python",kg),Vt.registerLanguage("java",wg),Vt.registerLanguage("bash",Cg),Vt.registerLanguage("sql",_g);var ue=(e=>(e.EQUAL="equal",e.DELETE="removed",e.ADD="added",e.EMPTY="empty",e))(ue||{});const Xt="<code-diff-modified>",Yt="</code-diff-modified>",Eg=Xt.replace("<","<").replace(">",">"),Bg=Yt.replace("<","<").replace(">",">");function Jo(e){return e===void 0?ue.EQUAL:e.added?ue.ADD:e.removed?ue.DELETE:ue.EQUAL}function kr(e,o,n="word"){return typeof e>"u"?o:typeof o>"u"?e:(n==="char"?fp:hp)(e,o).filter(r=>Jo(r)!==ue.DELETE).map(r=>Jo(r)===ue.ADD?`${Xt}${r.value}${Yt}`:r.value).join("")}function ic(e,o){const n=new Ja.diff_match_patch,r=n.diff_linesToChars_(e,o),a=r.chars1,s=r.chars2,i=r.lineArray,l=n.diff_main(a,s,!1);return n.diff_charsToLines_(l,i),l.map(c=>{const[d,f]=c;return{count:f.replace(/\n$/,"").split(`
|
|
8
|
-
`).length,value:f,removed:d===
|
|
6
|
+
`}return l.join("").replace(/%20/g," ")},t.exports=o,t.exports.diff_match_patch=o,t.exports.DIFF_DELETE=n,t.exports.DIFF_INSERT=r,t.exports.DIFF_EQUAL=a})(Ul);var es=Ul.exports;function Wl(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(o=>{const n=t[o],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&Wl(n)}),t}class Hl{constructor(o){o.data===void 0&&(o.data={}),this.data=o.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function ql(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function po(t,...o){const n=Object.create(null);for(const r in t)n[r]=t[r];return o.forEach(function(r){for(const a in r)n[a]=r[a]}),n}const Sp="</span>",Gl=t=>!!t.scope,Ap=(t,{prefix:o})=>{if(t.startsWith("language:"))return t.replace("language:","language-");if(t.includes(".")){const n=t.split(".");return[`${o}${n.shift()}`,...n.map((r,a)=>`${r}${"_".repeat(a+1)}`)].join(" ")}return`${o}${t}`};let vp=class{constructor(o,n){this.buffer="",this.classPrefix=n.classPrefix,o.walk(this)}addText(o){this.buffer+=ql(o)}openNode(o){if(!Gl(o))return;const n=Ap(o.scope,{prefix:this.classPrefix});this.span(n)}closeNode(o){Gl(o)&&(this.buffer+=Sp)}value(){return this.buffer}span(o){this.buffer+=`<span class="${o}">`}};const Kl=(t={})=>{const o={children:[]};return Object.assign(o,t),o};let Dp=class Du{constructor(){this.rootNode=Kl(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(o){this.top.children.push(o)}openNode(o){const n=Kl({scope:o});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(o){return this.constructor._walk(o,this.rootNode)}static _walk(o,n){return typeof n=="string"?o.addText(n):n.children&&(o.openNode(n),n.children.forEach(r=>this._walk(o,r)),o.closeNode(n)),o}static _collapse(o){typeof o!="string"&&o.children&&(o.children.every(n=>typeof n=="string")?o.children=[o.children.join("")]:o.children.forEach(n=>{Du._collapse(n)}))}},Np=class extends Dp{constructor(o){super(),this.options=o}addText(o){o!==""&&this.add(o)}startScope(o){this.openNode(o)}endScope(){this.closeNode()}__addSublanguage(o,n){const r=o.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new vp(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function An(t){return t?typeof t=="string"?t:t.source:null}function Xl(t){return No("(?=",t,")")}function Vp(t){return No("(?:",t,")*")}function Mp(t){return No("(?:",t,")?")}function No(...t){return t.map(o=>An(o)).join("")}function Tp(t){const o=t[t.length-1];return typeof o=="object"&&o.constructor===Object?(t.splice(t.length-1,1),o):{}}function ts(...t){return"("+(Tp(t).capture?"":"?:")+t.map(o=>An(o)).join("|")+")"}function Yl(t){return new RegExp(t.toString()+"|").exec("").length-1}function Pp(t,o){const n=t&&t.exec(o);return n&&n.index===0}const Op=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function os(t,{joinWith:o}){let n=0;return t.map(r=>{n+=1;const a=n;let s=An(r),i="";for(;s.length>0;){const l=Op.exec(s);if(!l){i+=s;break}i+=s.substring(0,l.index),s=s.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?i+="\\"+String(Number(l[1])+a):(i+=l[0],l[0]==="("&&n++)}return i}).map(r=>`(${r})`).join(o)}const Lp=/\b\B/,Jl="[a-zA-Z]\\w*",ns="[a-zA-Z_]\\w*",Ql="\\b\\d+(\\.\\d+)?",Zl="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ec="\\b(0b[01]+)",Rp="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Ip=(t={})=>{const o=/^#![ ]*\//;return t.binary&&(t.begin=No(o,/.*\b/,t.binary,/\b.*/)),po({scope:"meta",begin:o,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},t)},vn={begin:"\\\\[\\s\\S]",relevance:0},Fp={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[vn]},zp={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[vn]},$p={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},yr=function(t,o,n={}){const r=po({scope:"comment",begin:t,end:o,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=ts("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:No(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},jp=yr("//","$"),Up=yr("/\\*","\\*/"),Wp=yr("#","$"),Hp={scope:"number",begin:Ql,relevance:0},qp={scope:"number",begin:Zl,relevance:0},Gp={scope:"number",begin:ec,relevance:0},Kp={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[vn,{begin:/\[/,end:/\]/,relevance:0,contains:[vn]}]},Xp={scope:"title",begin:Jl,relevance:0},Yp={scope:"title",begin:ns,relevance:0},Jp={begin:"\\.\\s*"+ns,relevance:0};var xr=Object.freeze({__proto__:null,APOS_STRING_MODE:Fp,BACKSLASH_ESCAPE:vn,BINARY_NUMBER_MODE:Gp,BINARY_NUMBER_RE:ec,COMMENT:yr,C_BLOCK_COMMENT_MODE:Up,C_LINE_COMMENT_MODE:jp,C_NUMBER_MODE:qp,C_NUMBER_RE:Zl,END_SAME_AS_BEGIN:function(t){return Object.assign(t,{"on:begin":(o,n)=>{n.data._beginMatch=o[1]},"on:end":(o,n)=>{n.data._beginMatch!==o[1]&&n.ignoreMatch()}})},HASH_COMMENT_MODE:Wp,IDENT_RE:Jl,MATCH_NOTHING_RE:Lp,METHOD_GUARD:Jp,NUMBER_MODE:Hp,NUMBER_RE:Ql,PHRASAL_WORDS_MODE:$p,QUOTE_STRING_MODE:zp,REGEXP_MODE:Kp,RE_STARTERS_RE:Rp,SHEBANG:Ip,TITLE_MODE:Xp,UNDERSCORE_IDENT_RE:ns,UNDERSCORE_TITLE_MODE:Yp});function Qp(t,o){t.input[t.index-1]==="."&&o.ignoreMatch()}function Zp(t,o){t.className!==void 0&&(t.scope=t.className,delete t.className)}function eg(t,o){o&&t.beginKeywords&&(t.begin="\\b("+t.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",t.__beforeBegin=Qp,t.keywords=t.keywords||t.beginKeywords,delete t.beginKeywords,t.relevance===void 0&&(t.relevance=0))}function tg(t,o){Array.isArray(t.illegal)&&(t.illegal=ts(...t.illegal))}function og(t,o){if(t.match){if(t.begin||t.end)throw new Error("begin & end are not supported with match");t.begin=t.match,delete t.match}}function ng(t,o){t.relevance===void 0&&(t.relevance=1)}const rg=(t,o)=>{if(!t.beforeMatch)return;if(t.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},t);Object.keys(t).forEach(r=>{delete t[r]}),t.keywords=n.keywords,t.begin=No(n.beforeMatch,Xl(n.begin)),t.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},t.relevance=0,delete n.beforeMatch},ag=["of","and","for","in","not","or","if","then","parent","list","value"],sg="keyword";function tc(t,o,n=sg){const r=Object.create(null);return typeof t=="string"?a(n,t.split(" ")):Array.isArray(t)?a(n,t):Object.keys(t).forEach(function(s){Object.assign(r,tc(t[s],o,s))}),r;function a(s,i){o&&(i=i.map(l=>l.toLowerCase())),i.forEach(function(l){const c=l.split("|");r[c[0]]=[s,ig(c[0],c[1])]})}}function ig(t,o){return o?Number(o):lg(t)?0:1}function lg(t){return ag.includes(t.toLowerCase())}const oc={},Vo=t=>{console.error(t)},nc=(t,...o)=>{console.log(`WARN: ${t}`,...o)},Jo=(t,o)=>{oc[`${t}/${o}`]||(console.log(`Deprecated as of ${t}. ${o}`),oc[`${t}/${o}`]=!0)},kr=new Error;function rc(t,o,{key:n}){let r=0;const a=t[n],s={},i={};for(let l=1;l<=o.length;l++)i[l+r]=a[l],s[l+r]=!0,r+=Yl(o[l-1]);t[n]=i,t[n]._emit=s,t[n]._multi=!0}function cg(t){if(Array.isArray(t.begin)){if(t.skip||t.excludeBegin||t.returnBegin)throw Vo("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),kr;if(typeof t.beginScope!="object"||t.beginScope===null)throw Vo("beginScope must be object"),kr;rc(t,t.begin,{key:"beginScope"}),t.begin=os(t.begin,{joinWith:""})}}function dg(t){if(Array.isArray(t.end)){if(t.skip||t.excludeEnd||t.returnEnd)throw Vo("skip, excludeEnd, returnEnd not compatible with endScope: {}"),kr;if(typeof t.endScope!="object"||t.endScope===null)throw Vo("endScope must be object"),kr;rc(t,t.end,{key:"endScope"}),t.end=os(t.end,{joinWith:""})}}function fg(t){t.scope&&typeof t.scope=="object"&&t.scope!==null&&(t.beginScope=t.scope,delete t.scope)}function ug(t){fg(t),typeof t.beginScope=="string"&&(t.beginScope={_wrap:t.beginScope}),typeof t.endScope=="string"&&(t.endScope={_wrap:t.endScope}),cg(t),dg(t)}function hg(t){function o(i,l){return new RegExp(An(i),"m"+(t.case_insensitive?"i":"")+(t.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,l]),this.matchAt+=Yl(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(c=>c[1]);this.matcherRe=o(os(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(l);if(!c)return null;const d=c.findIndex((u,h)=>h>0&&u!==void 0),f=this.matchIndexes[d];return c.splice(0,d),Object.assign(c,f)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const c=new n;return this.rules.slice(l).forEach(([d,f])=>c.addRule(d,f)),c.compile(),this.multiRegexes[l]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,c){this.rules.push([l,c]),c.type==="begin"&&this.count++}exec(l){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let d=c.exec(l);if(this.resumingScanAtSamePosition()&&!(d&&d.index===this.lastIndex)){const f=this.getMatcher(0);f.lastIndex=this.lastIndex+1,d=f.exec(l)}return d&&(this.regexIndex+=d.position+1,this.regexIndex===this.count&&this.considerAll()),d}}function a(i){const l=new r;return i.contains.forEach(c=>l.addRule(c.begin,{rule:c,type:"begin"})),i.terminatorEnd&&l.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&l.addRule(i.illegal,{type:"illegal"}),l}function s(i,l){const c=i;if(i.isCompiled)return c;[Zp,og,ug,rg].forEach(f=>f(i,l)),t.compilerExtensions.forEach(f=>f(i,l)),i.__beforeBegin=null,[eg,tg,ng].forEach(f=>f(i,l)),i.isCompiled=!0;let d=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),d=i.keywords.$pattern,delete i.keywords.$pattern),d=d||/\w+/,i.keywords&&(i.keywords=tc(i.keywords,t.case_insensitive)),c.keywordPatternRe=o(d,!0),l&&(i.begin||(i.begin=/\B|\b/),c.beginRe=o(c.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(c.endRe=o(c.end)),c.terminatorEnd=An(c.end)||"",i.endsWithParent&&l.terminatorEnd&&(c.terminatorEnd+=(i.end?"|":"")+l.terminatorEnd)),i.illegal&&(c.illegalRe=o(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(f){return mg(f==="self"?i:f)})),i.contains.forEach(function(f){s(f,c)}),i.starts&&s(i.starts,l),c.matcher=a(c),c}if(t.compilerExtensions||(t.compilerExtensions=[]),t.contains&&t.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return t.classNameAliases=po(t.classNameAliases||{}),s(t)}function ac(t){return t?t.endsWithParent||ac(t.starts):!1}function mg(t){return t.variants&&!t.cachedVariants&&(t.cachedVariants=t.variants.map(function(o){return po(t,{variants:null},o)})),t.cachedVariants?t.cachedVariants:ac(t)?po(t,{starts:t.starts?po(t.starts):null}):Object.isFrozen(t)?po(t):t}var pg="11.10.0";class gg extends Error{constructor(o,n){super(o),this.name="HTMLInjectionError",this.html=n}}const rs=ql,sc=po,ic=Symbol("nomatch"),bg=7,lc=function(t){const o=Object.create(null),n=Object.create(null),r=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Np};function c(P){return l.noHighlightRe.test(P)}function d(P){let R=P.className+" ";R+=P.parentNode?P.parentNode.className:"";const j=l.languageDetectRe.exec(R);if(j){const T=D(j[1]);return T||(nc(s.replace("{}",j[1])),nc("Falling back to no-highlight mode for this block.",P)),T?j[1]:"no-highlight"}return R.split(/\s+/).find(T=>c(T)||D(T))}function f(P,R,j){let T="",I="";typeof R=="object"?(T=P,j=R.ignoreIllegals,I=R.language):(Jo("10.7.0","highlight(lang, code, ...args) has been deprecated."),Jo("10.7.0",`Please use highlight(code, options) instead.
|
|
7
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),I=P,T=R),j===void 0&&(j=!0);const X={code:T,language:I};L("before:highlight",X);const H=X.result?X.result:u(X.language,X.code,j);return H.code=X.code,L("after:highlight",H),H}function u(P,R,j,T){const I=Object.create(null);function X(te,le){return te.keywords[le]}function H(){if(!se.keywords){Le.addText(ve);return}let te=0;se.keywordPatternRe.lastIndex=0;let le=se.keywordPatternRe.exec(ve),G="";for(;le;){G+=ve.substring(te,le.index);const ee=Ee.case_insensitive?le[0].toLowerCase():le[0],re=X(se,ee);if(re){const[Ce,qe]=re;if(Le.addText(G),G="",I[ee]=(I[ee]||0)+1,I[ee]<=bg&&(lt+=qe),Ce.startsWith("_"))G+=le[0];else{const kt=Ee.classNameAliases[Ce]||Ce;oe(le[0],kt)}}else G+=le[0];te=se.keywordPatternRe.lastIndex,le=se.keywordPatternRe.exec(ve)}G+=ve.substring(te),Le.addText(G)}function W(){if(ve==="")return;let te=null;if(typeof se.subLanguage=="string"){if(!o[se.subLanguage]){Le.addText(ve);return}te=u(se.subLanguage,ve,!0,Oe[se.subLanguage]),Oe[se.subLanguage]=te._top}else te=m(ve,se.subLanguage.length?se.subLanguage:null);se.relevance>0&&(lt+=te.relevance),Le.__addSublanguage(te._emitter,te.language)}function Z(){se.subLanguage!=null?W():H(),ve=""}function oe(te,le){te!==""&&(Le.startScope(le),Le.addText(te),Le.endScope())}function ge(te,le){let G=1;const ee=le.length-1;for(;G<=ee;){if(!te._emit[G]){G++;continue}const re=Ee.classNameAliases[te[G]]||te[G],Ce=le[G];re?oe(Ce,re):(ve=Ce,H(),ve=""),G++}}function Ne(te,le){return te.scope&&typeof te.scope=="string"&&Le.openNode(Ee.classNameAliases[te.scope]||te.scope),te.beginScope&&(te.beginScope._wrap?(oe(ve,Ee.classNameAliases[te.beginScope._wrap]||te.beginScope._wrap),ve=""):te.beginScope._multi&&(ge(te.beginScope,le),ve="")),se=Object.create(te,{parent:{value:se}}),se}function we(te,le,G){let ee=Pp(te.endRe,G);if(ee){if(te["on:end"]){const re=new Hl(te);te["on:end"](le,re),re.isMatchIgnored&&(ee=!1)}if(ee){for(;te.endsParent&&te.parent;)te=te.parent;return te}}if(te.endsWithParent)return we(te.parent,le,G)}function Q(te){return se.matcher.regexIndex===0?(ve+=te[0],1):(he=!0,0)}function $(te){const le=te[0],G=te.rule,ee=new Hl(G),re=[G.__beforeBegin,G["on:begin"]];for(const Ce of re)if(Ce&&(Ce(te,ee),ee.isMatchIgnored))return Q(le);return G.skip?ve+=le:(G.excludeBegin&&(ve+=le),Z(),!G.returnBegin&&!G.excludeBegin&&(ve=le)),Ne(G,te),G.returnBegin?0:le.length}function Y(te){const le=te[0],G=R.substring(te.index),ee=we(se,te,G);if(!ee)return ic;const re=se;se.endScope&&se.endScope._wrap?(Z(),oe(le,se.endScope._wrap)):se.endScope&&se.endScope._multi?(Z(),ge(se.endScope,te)):re.skip?ve+=le:(re.returnEnd||re.excludeEnd||(ve+=le),Z(),re.excludeEnd&&(ve=le));do se.scope&&Le.closeNode(),!se.skip&&!se.subLanguage&&(lt+=se.relevance),se=se.parent;while(se!==ee.parent);return ee.starts&&Ne(ee.starts,te),re.returnEnd?0:le.length}function ae(){const te=[];for(let le=se;le!==Ee;le=le.parent)le.scope&&te.unshift(le.scope);te.forEach(le=>Le.openNode(le))}let ye={};function Pe(te,le){const G=le&&le[0];if(ve+=te,G==null)return Z(),0;if(ye.type==="begin"&&le.type==="end"&&ye.index===le.index&&G===""){if(ve+=R.slice(le.index,le.index+1),!a){const ee=new Error(`0 width match regex (${P})`);throw ee.languageName=P,ee.badRule=ye.rule,ee}return 1}if(ye=le,le.type==="begin")return $(le);if(le.type==="illegal"&&!j){const ee=new Error('Illegal lexeme "'+G+'" for mode "'+(se.scope||"<unnamed>")+'"');throw ee.mode=se,ee}else if(le.type==="end"){const ee=Y(le);if(ee!==ic)return ee}if(le.type==="illegal"&&G==="")return 1;if(ie>1e5&&ie>le.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ve+=G,G.length}const Ee=D(P);if(!Ee)throw Vo(s.replace("{}",P)),new Error('Unknown language: "'+P+'"');const Ue=hg(Ee);let Ie="",se=T||Ue;const Oe={},Le=new l.__emitter(l);ae();let ve="",lt=0,q=0,ie=0,he=!1;try{if(Ee.__emitTokens)Ee.__emitTokens(R,Le);else{for(se.matcher.considerAll();;){ie++,he?he=!1:se.matcher.considerAll(),se.matcher.lastIndex=q;const te=se.matcher.exec(R);if(!te)break;const le=R.substring(q,te.index),G=Pe(le,te);q=te.index+G}Pe(R.substring(q))}return Le.finalize(),Ie=Le.toHTML(),{language:P,value:Ie,relevance:lt,illegal:!1,_emitter:Le,_top:se}}catch(te){if(te.message&&te.message.includes("Illegal"))return{language:P,value:rs(R),illegal:!0,relevance:0,_illegalBy:{message:te.message,index:q,context:R.slice(q-100,q+100),mode:te.mode,resultSoFar:Ie},_emitter:Le};if(a)return{language:P,value:rs(R),illegal:!1,relevance:0,errorRaised:te,_emitter:Le,_top:se};throw te}}function h(P){const R={value:rs(P),illegal:!1,relevance:0,_top:i,_emitter:new l.__emitter(l)};return R._emitter.addText(P),R}function m(P,R){R=R||l.languages||Object.keys(o);const j=h(P),T=R.filter(D).filter(v).map(Z=>u(Z,P,!1));T.unshift(j);const I=T.sort((Z,oe)=>{if(Z.relevance!==oe.relevance)return oe.relevance-Z.relevance;if(Z.language&&oe.language){if(D(Z.language).supersetOf===oe.language)return 1;if(D(oe.language).supersetOf===Z.language)return-1}return 0}),[X,H]=I,W=X;return W.secondBest=H,W}function p(P,R,j){const T=R&&n[R]||j;P.classList.add("hljs"),P.classList.add(`language-${T}`)}function y(P){let R=null;const j=d(P);if(c(j))return;if(L("before:highlightElement",{el:P,language:j}),P.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",P);return}if(P.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(P)),l.throwUnescapedHTML))throw new gg("One of your code blocks includes unescaped HTML.",P.innerHTML);R=P;const T=R.textContent,I=j?f(T,{language:j,ignoreIllegals:!0}):m(T);P.innerHTML=I.value,P.dataset.highlighted="yes",p(P,j,I.language),P.result={language:I.language,re:I.relevance,relevance:I.relevance},I.secondBest&&(P.secondBest={language:I.secondBest.language,relevance:I.secondBest.relevance}),L("after:highlightElement",{el:P,result:I,text:T})}function b(P){l=sc(l,P)}const g=()=>{B(),Jo("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _(){B(),Jo("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let E=!1;function B(){if(document.readyState==="loading"){E=!0;return}document.querySelectorAll(l.cssSelector).forEach(y)}function A(){E&&B()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function C(P,R){let j=null;try{j=R(t)}catch(T){if(Vo("Language definition for '{}' could not be registered.".replace("{}",P)),a)Vo(T);else throw T;j=i}j.name||(j.name=P),o[P]=j,j.rawDefinition=R.bind(null,t),j.aliases&&k(j.aliases,{languageName:P})}function x(P){delete o[P];for(const R of Object.keys(n))n[R]===P&&delete n[R]}function w(){return Object.keys(o)}function D(P){return P=(P||"").toLowerCase(),o[P]||o[n[P]]}function k(P,{languageName:R}){typeof P=="string"&&(P=[P]),P.forEach(j=>{n[j.toLowerCase()]=R})}function v(P){const R=D(P);return R&&!R.disableAutodetect}function S(P){P["before:highlightBlock"]&&!P["before:highlightElement"]&&(P["before:highlightElement"]=R=>{P["before:highlightBlock"](Object.assign({block:R.el},R))}),P["after:highlightBlock"]&&!P["after:highlightElement"]&&(P["after:highlightElement"]=R=>{P["after:highlightBlock"](Object.assign({block:R.el},R))})}function N(P){S(P),r.push(P)}function V(P){const R=r.indexOf(P);R!==-1&&r.splice(R,1)}function L(P,R){const j=P;r.forEach(function(T){T[j]&&T[j](R)})}function O(P){return Jo("10.7.0","highlightBlock will be removed entirely in v12.0"),Jo("10.7.0","Please use highlightElement now."),y(P)}Object.assign(t,{highlight:f,highlightAuto:m,highlightAll:B,highlightElement:y,highlightBlock:O,configure:b,initHighlighting:g,initHighlightingOnLoad:_,registerLanguage:C,unregisterLanguage:x,listLanguages:w,getLanguage:D,registerAliases:k,autoDetection:v,inherit:sc,addPlugin:N,removePlugin:V}),t.debugMode=function(){a=!1},t.safeMode=function(){a=!0},t.versionString=pg,t.regex={concat:No,lookahead:Xl,either:ts,optional:Mp,anyNumberOfTimes:Vp};for(const P in xr)typeof xr[P]=="object"&&Wl(xr[P]);return Object.assign(t,xr),t},Qo=lc({});Qo.newInstance=()=>lc({});var yg=Qo;Qo.HighlightJS=Qo,Qo.default=Qo;const Pt=Bp(yg);function xg(t){const o=t.regex,n=o.concat(/[\p{L}_]/u,o.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=t.inherit(s,{begin:/\(/,end:/\)/}),l=t.inherit(t.APOS_STRING_MODE,{className:"string"}),c=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),d={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,c,l,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,i,c,l]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:o.concat(/</,o.lookahead(o.concat(n,o.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:d}]},{className:"tag",begin:o.concat(/<\//,o.lookahead(o.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const cc="[A-Za-z$_][0-9A-Za-z$_]*",kg=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],wg=["true","false","null","undefined","NaN","Infinity"],dc=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],fc=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],uc=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Cg=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],_g=[].concat(uc,dc,fc);function Eg(t){const o=t.regex,n=(P,{after:R})=>{const j="</"+P[0].slice(1);return P.input.indexOf(j,R)!==-1},r=cc,a={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,R)=>{const j=P[0].length+P.index,T=P.input[j];if(T==="<"||T===","){R.ignoreMatch();return}T===">"&&(n(P,{after:j})||R.ignoreMatch());let I;const X=P.input.substring(j);if(I=X.match(/^\s*=/)){R.ignoreMatch();return}if((I=X.match(/^\s+extends\s+/))&&I.index===0){R.ignoreMatch();return}}},l={$pattern:cc,keyword:kg,literal:wg,built_in:_g,"variable.language":Cg},c="[0-9](_?[0-9])*",d=`\\.(${c})`,f="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${f})((${d})|\\.)?|(${d}))[eE][+-]?(${c})\\b`},{begin:`\\b(${f})\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,h],subLanguage:"css"}},y={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,h]},g={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},_=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,m,p,y,b,{match:/\$\d+/},u];h.contains=_.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(_)});const E=[].concat(g,h.contains),B=E.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(E)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:B},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,o.concat(r,"(",o.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},x={relevance:0,match:o.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...dc,...fc]}},w={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},k={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function v(P){return o.concat("(?!",P.join("|"),")")}const S={match:o.concat(/\b/,v([...uc,"super","import"].map(P=>`${P}\\s*\\(`)),r,o.lookahead(/\s*\(/)),className:"title.function",relevance:0},N={begin:o.concat(/\./,o.lookahead(o.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},V={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,o.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),w,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,m,p,y,b,g,{match:/\$\d+/},u,x,{className:"attr",begin:r+o.lookahead(":"),relevance:0},O,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,t.REGEXP_MODE,{className:"function",begin:L,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:B}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:s},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,t.inherit(t.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},N,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},S,k,C,V,{match:/\$[(.]/}]}}function Bg(t){const o={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],a={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[o,n,t.QUOTE_STRING_MODE,a,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function Sg(t){const o="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/\w[\w :()\./-]*:(?=[ \t]|$)/},{begin:/"\w[\w :()\./-]*":(?=[ \t]|$)/},{begin:/'\w[\w :()\./-]*':(?=[ \t]|$)/}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,a]},i=t.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},c={end:",",endsWithParent:!0,excludeEnd:!0,keywords:o,relevance:0},d={begin:/\{/,end:/\}/,contains:[c],illegal:"\\n",relevance:0},f={begin:"\\[",end:"\\]",contains:[c],illegal:"\\n",relevance:0},u=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:o,keywords:{literal:o}},l,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},d,f,s],h=[...u];return h.pop(),h.push(i),c.contains=h,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:u}}function Ag(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function vg(t){const o=t.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},s={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},l={begin:/\{\{/,relevance:0},c={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,s,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,s,l,i]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,l,i]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",f=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,u=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${f}))[eE][+-]?(${d})[jJ]?(?=${u})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${d})[jJ](?=${u})`}]},m={className:"comment",begin:o.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},p={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",s,h,c,t.HASH_COMMENT_MODE]}]};return i.contains=[c,h,s],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[s,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},c,m,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,p,c]}]}}var Zo="[0-9](_*[0-9])*",wr=`\\.(${Zo})`,Cr="[0-9a-fA-F](_*[0-9a-fA-F])*",hc={className:"number",variants:[{begin:`(\\b(${Zo})((${wr})|\\.)?|(${wr}))[eE][+-]?(${Zo})[fFdD]?\\b`},{begin:`\\b(${Zo})((${wr})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${wr})[fFdD]?\\b`},{begin:`\\b(${Zo})[fFdD]\\b`},{begin:`\\b0[xX]((${Cr})\\.?|(${Cr})?\\.(${Cr}))[pP][+-]?(${Zo})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Cr})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function mc(t,o,n){return n===-1?"":t.replace(o,r=>mc(t,o,n-1))}function Dg(t){const o=t.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+mc("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},s={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},i={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[t.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[t.BACKSLASH_ESCAPE]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[o.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[i,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",t.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[s,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,hc,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},hc,s]}}function Ng(t){const o=t.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:o.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n,a]};a.contains.push(l);const c={match:/\\"/},d={className:"string",begin:/'/,end:/'/},f={match:/\\'/},u={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],m=t.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},y=["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],B=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],A=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:y,literal:b,built_in:[..._,...E,"set","shopt",...B,...A]},contains:[m,t.SHEBANG(),p,u,s,i,g,l,c,d,f,n]}}function Vg(t){const o=t.regex,n=t.COMMENT("--","$"),r={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},a={begin:/"/,end:/"/,contains:[{begin:/""/}]},s=["true","false","unknown"],i=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],d=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],f=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],u=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],m=f,p=[...d,...c].filter(E=>!f.includes(E)),y={className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},b={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={begin:o.concat(/\b/,o.either(...m),/\s*\(/),relevance:0,keywords:{built_in:m}};function _(E,{exceptions:B,when:A}={}){const C=A;return B=B||[],E.map(x=>x.match(/\|\d+$/)||B.includes(x)?x:C(x)?`${x}|0`:x)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(p,{when:E=>E.length<3}),literal:s,type:l,built_in:u},contains:[{begin:o.either(...h),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:p.concat(h),literal:s,type:l}},{className:"type",begin:o.either(...i)},g,y,r,a,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,n,b]}}Pt.registerLanguage("xml",xg),Pt.registerLanguage("javascript",Eg),Pt.registerLanguage("json",Bg),Pt.registerLanguage("yaml",Sg),Pt.registerLanguage("plaintext",Ag),Pt.registerLanguage("python",vg),Pt.registerLanguage("java",Dg),Pt.registerLanguage("bash",Ng),Pt.registerLanguage("sql",Vg);var fe=(t=>(t.EQUAL="equal",t.DELETE="removed",t.ADD="added",t.EMPTY="empty",t))(fe||{});const Yt="<code-diff-modified>",Jt="</code-diff-modified>",Mg=Yt.replace("<","<").replace(">",">"),Tg=Jt.replace("<","<").replace(">",">");function en(t){return t===void 0?fe.EQUAL:t.added?fe.ADD:t.removed?fe.DELETE:fe.EQUAL}function _r(t,o,n="word"){return typeof t>"u"?o:typeof o>"u"?t:(n==="char"?xp:wp)(t,o).filter(r=>en(r)!==fe.DELETE).map(r=>en(r)===fe.ADD?`${Yt}${r.value}${Jt}`:r.value).join("")}function pc(t,o){const n=new es.diff_match_patch,r=n.diff_linesToChars_(t,o),a=r.chars1,s=r.chars2,i=r.lineArray,l=n.diff_main(a,s,!1);return n.diff_charsToLines_(l,i),l.map(c=>{const[d,f]=c;return{count:f.replace(/\n$/,"").split(`
|
|
8
|
+
`).length,value:f,removed:d===es.DIFF_DELETE,added:d===es.DIFF_INSERT}})}function Et(t,o){if(!o.match(new RegExp(`(${Yt}|${Jt})`,"g")))return Pt.highlight(o,{language:t}).value;let n=o;const r=o.replace(new RegExp(`(${Yt}|${Jt})`,"g"),""),a=document.createElement("div");a.innerHTML=Pt.highlight(r,{language:t}).value;let s=!1;const i=l=>{l.childNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE&&i(c),c.nodeType===Node.TEXT_NODE){if(!c.textContent)return;let d=c.textContent,f="";for(s&&(f=f+Yt);d.length;){if(n.startsWith(Yt)){n=n.slice(Yt.length),f=f+Yt,s=!0;continue}if(n.startsWith(Jt)){n=n.slice(Jt.length),f=f+Jt,s=!1;continue}const u=n.match(new RegExp(`(${Yt}|${Jt})`)),h=u&&u.index?u.index:n.length,m=Math.min(h,d.length);f=f+n.substring(0,m),n=n.slice(m),d=d.slice(m)}s&&(f=f+Jt),c.textContent=f}})};return i(a),a.innerHTML.replace(new RegExp(Mg,"g"),'<span class="x">').replace(new RegExp(Tg,"g"),"</span>")}function gc(t,o){const n=(c,d)=>(c.match(new RegExp(d,"g"))||[]).length,r=c=>c.filter(d=>o==null?void 0:o.test(d)).length;let a=0,s=0,i=0,l=0;for(const c of t){if(c.added){const d=r(c.value.trim().split(`
|
|
9
9
|
`));a+=n(c.value.trim(),`
|
|
10
10
|
`)+1-d,i+=d;continue}if(c.removed){const d=r(c.value.trim().split(`
|
|
11
11
|
`));s+=n(c.value.trim(),`
|
|
12
|
-
`)+1-d,l+=d;continue}}return{additionsNum:a,deletionsNum:s,ignoreAdditionsNum:i,ignoreDeletionsNum:l}}function
|
|
13
|
-
`);if(B===void 0){for(const D of x){let k=l(),v=l();const S=
|
|
14
|
-
`);if(A===
|
|
15
|
-
`);if(_===void 0){for(const x of A){E===
|
|
16
|
-
`);if(E===
|
|
17
|
-
`):p,p}),i=
|
|
18
|
-
`):p,p}),l=t.computed(()=>a.value?Ag(s.value,i.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines):Sg(s.value,i.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines)),c=t.ref(l.value),d=t.computed(()=>c.value.stat.additionsNum===0&&c.value.stat.deletionsNum===0),f=t.ref(-1);function u(){const p=document.querySelectorAll(".blob-code-addition");f.value<p.length-1&&(f.value++,m(p))}function h(){const p=document.querySelectorAll(".blob-code-addition");f.value>0&&(f.value--,m(p))}function m(p){p.forEach(b=>b.classList.remove("current-diff"));const y=p[f.value];y&&(y.classList.add("current-diff"),y.scrollIntoView({behavior:"smooth",block:"center"}))}return t.watch(()=>n,()=>{c.value=l.value,r("diff",{stat:{isChanged:!d.value,addNum:c.value.stat.additionsNum,delNum:c.value.stat.deletionsNum}})},{deep:!0,immediate:!0}),(p,y)=>(t.openBlock(),t.createElementBlock("div",{class:"code-diff-view",theme:p.theme,style:t.normalizeStyle({maxHeight:p.maxHeight})},[p.hideHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",nb,[t.unref(a)?(t.openBlock(),t.createElementBlock("div",rb,[t.createElementVNode("span",null,[t.createElementVNode("div",ab,t.toDisplayString(p.filename),1),t.createElementVNode("div",sb,t.toDisplayString(p.newFilename),1)]),t.createElementVNode("span",ib,[t.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:u},[t.createVNode(dc)]),t.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:h},[t.createVNode(fc)])]),p.hideStat?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",lb,[t.renderSlot(p.$slots,"stat",{stat:t.unref(c).stat},()=>[t.createElementVNode("span",cb,"+"+t.toDisplayString(t.unref(c).stat.additionsNum)+" additions",1),t.createElementVNode("span",db,"-"+t.toDisplayString(t.unref(c).stat.deletionsNum)+" deletions",1)])]))])):(t.openBlock(),t.createElementBlock("div",fb,[t.createElementVNode("span",ub,t.toDisplayString(p.filename),1),t.createElementVNode("span",hb,[t.createElementVNode("span",mb,t.toDisplayString(p.newFilename),1),t.createElementVNode("span",pb,[t.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:u},[t.createVNode(dc)]),t.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:h},[t.createVNode(fc)])]),p.hideStat?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",gb,[t.renderSlot(p.$slots,"stat",{stat:t.unref(c).stat},()=>[t.createElementVNode("span",bb,"+"+t.toDisplayString(t.unref(c).stat.additionsNum)+" additions",1),t.createElementVNode("span",yb,"-"+t.toDisplayString(t.unref(c).stat.deletionsNum)+" deletions",1)])]))])]))])),t.unref(a)?(t.openBlock(),t.createBlock(Pg,{key:1,"diff-change":t.unref(c)},null,8,["diff-change"])):(t.openBlock(),t.createBlock(Hg,{key:2,"diff-change":t.unref(c)},null,8,["diff-change"]))],12,ob))}}),Mt=t.ref("auto");t.ref(!1),t.ref(!1);const os=t.computed(()=>Mt.value==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:Mt.value==="dark"),uc=t.computed(()=>Mt.value==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":Mt.value),kb=e=>{Mt.value=e,wr(),Cb()},wr=()=>{const e=document.documentElement,o=os.value;e.classList.remove("light","dark"),e.classList.add(o?"dark":"light"),e.setAttribute("data-theme",o?"dark":"light"),wb(o)},wb=e=>{let o=document.querySelector('meta[name="theme-color"]');o||(o=document.createElement("meta"),o.name="theme-color",document.head.appendChild(o)),o.setAttribute("content",e?"#1f2937":"#ffffff")},Cb=()=>{localStorage.setItem("ui-theme",Mt.value)},_b=()=>{const e=localStorage.getItem("ui-theme");e&&["light","dark","auto"].includes(e)&&(Mt.value=e),wr()},Eb=()=>{_b();const e=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>{Mt.value==="auto"&&wr()};return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}};t.watch(Mt,wr);const Bb=()=>({theme:Mt.value,isDark:os.value,currentTheme:uc.value,setTheme:kb,initTheme:Eb,themeRef:Mt,isDarkRef:os,currentThemeRef:uc}),Sb={class:"flex gap-2"},Ab={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-red-50 dark:bg-red-900/10 text-red-600 dark:text-red-400 border border-red-100 dark:border-red-800/50"},vb={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-emerald-50 dark:bg-emerald-900/10 text-emerald-600 dark:text-emerald-400 border border-emerald-100 dark:border-emerald-800/50"},Db={class:"vue-code-diff-wrapper"},ns=t.defineComponent({__name:"DCodeBeforeAfter",props:{dataBefore:{type:[Object,Array,String,Number,Boolean,null],required:!0},dataAfter:{type:[Object,Array,String,Number,Boolean,null],required:!0}},setup(e){const{t:o}=kt.useI18n(),{isDarkRef:n}=Bb(),r=e,a=t.computed(()=>n.value?"dark":"light"),s=d=>{if(d===null||typeof d!="object")return d;if(Array.isArray(d))return d.map(s);const f=Object.keys(d).sort(),u={};return f.forEach(h=>{u[h]=s(d[h])}),u},i=d=>{try{if(d==null)return"";let f=d;if(typeof d=="string")try{const h=d.trim();(h.startsWith("{")||h.startsWith("["))&&(f=JSON.parse(h))}catch{}const u=s(f);return JSON.stringify(u,null,2)}catch{return String(d)}},l=t.computed(()=>i(r.dataBefore)),c=t.computed(()=>i(r.dataAfter));return(d,f)=>(t.openBlock(),t.createBlock(Go,{title:t.unref(o)("beforeAfter.dataComparison")||"Data Comparison",padding:"p-0",class:"overflow-hidden"},{actions:t.withCtx(()=>[t.createElementVNode("div",Sb,[t.createElementVNode("span",Ab,t.toDisplayString(t.unref(o)("beforeAfter.original")||"Original"),1),t.createElementVNode("span",vb,t.toDisplayString(t.unref(o)("beforeAfter.modified")||"Modified"),1)])]),default:t.withCtx(()=>[t.createElementVNode("div",Db,[t.createVNode(t.unref(xb),{"old-string":l.value,"new-string":c.value,"output-format":"side-by-side",language:"json",context:10,"max-height":600,theme:a.value,"hide-header":!0,"hide-stat":!0},null,8,["old-string","new-string","theme"])])]),_:1},8,["title"]))}}),Nb=["aria-busy"],Vb={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Mb={key:1,class:"flex justify-end"},Tb=["for"],Pb={key:0,class:"ml-1 text-destructive"},Ob={class:"relative w-full group"},Lb={key:0,class:"absolute inset-y-0 left-4 flex items-center text-muted-foreground"},Rb={key:1},Ib=["id","value","placeholder"],Fb={key:1,class:"absolute inset-y-0 right-4 flex items-center"},zb={key:2,class:"absolute inset-y-0 right-4 flex items-center"},$b={key:3,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},jb={key:1,class:"text-xs text-destructive"},Qo=t.defineComponent({name:"DCodeTextField",inheritAttrs:!1,__name:"DCodeTextField",props:{modelValue:{},prependInner:{},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},error:{default:null},placeholder:{default:""},icon:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},maxLength:{},minLength:{},maxValue:{},minValue:{}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=t.computed(()=>{var $;return(($=l.valueType)==null?void 0:$.toLowerCase())==="password"||n.type==="password"}),a=t.ref(!1),s=()=>{a.value=!a.value},i=o,l=e,c=t.computed(()=>n.label);t.computed(()=>l.visible??!0);const d=Math.random().toString(36).slice(2,7),f=t.computed(()=>`app-text-field-${n.id||c.value||"field"}-${d}`),u=t.computed(()=>{const $=n.required,X=n["aria-required"];return $===""||$===!0||$==="true"||(X==="true"||X===!0)}),h=t.computed(()=>{const{label:$,class:X,id:re,required:me,"aria-required":De,...Ee}=n;return Ee}),m=t.computed(()=>{var X,re;const $={...h.value};return((X=l.valueType)==null?void 0:X.toLowerCase())==="number"&&($.type="text",$.inputmode="numeric",$.pattern="[0-9]*"),((re=l.valueType)==null?void 0:re.toLowerCase())==="email"&&($.type="email",$.inputmode="email"),r.value&&($.type=a.value?"text":"password"),l.disabled&&($.disabled=!0),l.readonly&&($.readonly=!0),l.maxLength&&($.maxlength=l.maxLength),l.minLength&&($.minlength=l.minLength),l.maxValue&&($.max=l.maxValue),l.minValue&&($.min=l.minValue),$}),p=t.computed(()=>{const $=l.modelValue;return $==null||String($).length===0}),y=t.computed(()=>l.clearable?l.hideClearWhenEmpty?!p.value:!0:!1),b=t.computed(()=>{switch(l.textCase){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}}),g=t.ref(String(l.modelValue??""));t.watch(()=>l.modelValue,$=>{const X=String($??"");X!==g.value&&(g.value=X)});const _=t.ref(!1),E=t.ref(!1),B=$=>$.split(/(\s+)/).map(X=>{if(X.trim()==="")return X;const re=X.toLowerCase();return re.charAt(0).toUpperCase()+re.slice(1)}).join(""),A=$=>{const X=$.toLowerCase(),re=X.search(new RegExp("\\p{L}","u"));return re<0?X:X.slice(0,re)+X.charAt(re).toUpperCase()+X.slice(re+1)},C=$=>{switch(l.textCase){case"uppercase":return $.toUpperCase();case"lowercase":return $.toLowerCase();case"titlecase":return B($);case"sentencecase":return A($);case"none":default:return $}},x=$=>{if(!$)return null;const X=Array.isArray($)?$.join(""):$;return X?new Set(X):null},w=t.computed(()=>x(l.allowChars)),D=($,X)=>($.lastIndex=0,$.test(X)),k=$=>{var Te;const X=(Te=l.valueType)==null?void 0:Te.toLowerCase();if(X==="free"||X==="email"||X==="password")return!0;const re=$===" ",me=/\d/.test($),De=new RegExp("\\p{L}","u").test($),Ee=new RegExp("\\p{N}","u").test($),We=/[\/\-_.,]/.test($);return X==="number"?me:X==="letter"?De||We||l.allowSpaces&&re:X==="letternumber"?De||Ee||We||l.allowSpaces&&re:!0},v=$=>{let X="";for(const re of $){const me=!!w.value&&w.value.has(re);l.pattern&&!me&&!D(l.pattern,re)||!me&&!k(re)||(X+=re)}return X},S=t.computed(()=>{const $=l.maxLength??n.maxlength??n.maxLength;let X=Number.NaN;return typeof $=="number"?X=$:typeof $=="string"&&(X=Number.parseInt($,10)),Number.isFinite(X)&&X>0?X:-1}),N=t.computed(()=>g.value.length),V=t.computed(()=>l.showCharCount?S.value>0:!1),L=$=>S.value>0?$.slice(0,S.value):$,O=$=>{const X=v($),re=l.applyTextCaseToValue?C(X):X;return L(re)};let P=null;const R=$=>{var X;if($==="")return null;if(((X=l.valueType)==null?void 0:X.toLowerCase())==="number"&&l.returnNumber){const re=Number($);return Number.isFinite(re)?re:null}return $},j=$=>{g.value=$,i("update:modelValue",R($))},M=($,X)=>{const re=L(X);E.value=!0,$.value=re,j(re),queueMicrotask(()=>E.value=!1)},I=($,X)=>{const re=$.selectionStart??$.value.length,me=$.selectionEnd??$.value.length;if(S.value>0){const De=$.value.length-(me-re),Ee=S.value-De;if(Ee<=0)return;X=X.slice(0,Ee)}$.setRangeText(X,re,me,"end"),M($,O($.value))},K=$=>{var me;if(!P||_.value||E.value||!((me=$.inputType)!=null&&me.startsWith("insert")))return;const X=$.data;if(X==null)return;const re=O(X);re!==X&&($.preventDefault(),re.length>0&&I(P,re))},H=$=>{var me;if(!P||_.value||E.value)return;const X=((me=$.clipboardData)==null?void 0:me.getData("text"))??"",re=O(X);re!==X&&($.preventDefault(),re.length>0&&I(P,re))},W=$=>{if(!P||_.value||E.value)return;const X=$.target,re=X.value??"",me=O(re);me===re?j(me):M(X,me)},Z=()=>_.value=!0,te=()=>{if(_.value=!1,!P)return;const $=P.value??"",X=O($);X===$?j(X):M(P,X)};t.onMounted(()=>{if(P=document.getElementById(f.value),!P)return;P.addEventListener("beforeinput",K),P.addEventListener("paste",H),P.addEventListener("input",W),P.addEventListener("compositionstart",Z),P.addEventListener("compositionend",te);const $=P.value??"",X=O($);X===$?j(X):M(P,X)}),t.onBeforeUnmount(()=>{P&&(P.removeEventListener("beforeinput",K),P.removeEventListener("paste",H),P.removeEventListener("input",W),P.removeEventListener("compositionstart",Z),P.removeEventListener("compositionend",te),P=null)});const ie=()=>{g.value="",P&&(P.value=""),i("update:modelValue",null),i("clear")},Ae=t.computed(()=>V.value&&N.value>0),ke=t.computed(()=>`${N.value} / ${S.value}`),J=t.computed(()=>!!l.error);return($,X)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,l.disabled?"cursor-not-allowed":""]]),"aria-busy":l.skeleton},[l.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[c.value?(t.openBlock(),t.createElementBlock("div",Vb)):t.createCommentVNode("",!0),X[1]||(X[1]=t.createElementVNode("div",{class:"relative w-full"},[t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1)),V.value?(t.openBlock(),t.createElementBlock("div",Mb,[...X[0]||(X[0]=[t.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[c.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:f.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(c.value)+" ",1),u.value?(t.openBlock(),t.createElementBlock("span",Pb,"*")):t.createCommentVNode("",!0)],8,Tb)):t.createCommentVNode("",!0),t.createElementVNode("div",Ob,[l.icon||l.prependInner||$.$slots["prepend-inner"]?(t.openBlock(),t.createElementBlock("div",Lb,[t.renderSlot($.$slots,"prepend-inner",{},()=>[l.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{key:0,class:"h-4 w-4"})):l.prependInner?(t.openBlock(),t.createElementBlock("span",Rb,t.toDisplayString(l.prependInner),1)):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps({id:f.value,value:g.value},m.value,{placeholder:l.placeholder,style:`text-transform: ${b.value}; padding-left: ${l.icon||l.prependInner||$.$slots["prepend-inner"]?"2.5rem":"0.75rem"} !important; padding-right: ${y.value||r.value?"2.5rem":"0.75rem"} !important;`,class:["w-full h-10 flex items-center gap-2 rounded-lg border py-2 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600","text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 readonly:bg-neutral-50/50 dark:readonly:bg-neutral-900/30",J.value?"border-destructive focus:ring-destructive focus-visible:ring-destructive focus-visible:ring-[0.5px]":""]}),null,16,Ib),r.value?(t.openBlock(),t.createElementBlock("div",Fb,[t.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground",tabindex:"-1",onClick:s},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value?t.unref(ne.Eye):t.unref(ne.EyeOff)),{class:"w-4 h-4"}))])])):t.createCommentVNode("",!0),y.value&&!r.value?(t.openBlock(),t.createElementBlock("div",zb,[t.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground text-lg leading-none","aria-label":"Clear input",onClick:ie}," ✕ ")])):t.createCommentVNode("",!0),Ae.value&&!J.value?(t.openBlock(),t.createElementBlock("p",$b,t.toDisplayString(ke.value),1)):t.createCommentVNode("",!0)]),J.value?(t.openBlock(),t.createElementBlock("p",jb,t.toDisplayString(l.error),1)):t.createCommentVNode("",!0)],64))],10,Nb)),[[t.vShow,e.visible]])}}),Ub={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Wb={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},Hb={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},qb={class:"flex items-center justify-between"},Gb={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},Kb={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-neutral-600 dark:text-neutral-400 border border-neutral-200/60 dark:border-neutral-700/50 shadow-sm"},Xb={class:"p-6 flex-1"},Yb={class:"flex flex-col gap-4"},Jb={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},Qb={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},Zb={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},e0={class:"flex items-center justify-between"},t0={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},o0={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-primary-600 dark:text-primary-400 border border-primary-100 dark:border-primary-900/30 shadow-sm"},n0={class:"p-6 flex-1"},r0={class:"flex flex-col gap-4"},a0={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},rs=t.defineComponent({name:"DCodeListLabels",__name:"DCodeListLabels",props:{dataBefore:{},dataAfter:{}},setup(e){const{t:o}=kt.useI18n(),n=e,r=c=>{if(!c)return{};if(typeof c=="string")try{if(c.trim().startsWith("{")||c.trim().startsWith("["))return JSON.parse(c)}catch(d){return console.error("Failed to parse data string:",d),{raw:c}}return typeof c=="object"&&c!==null?c:{value:c}},a=t.computed(()=>r(n.dataBefore)),s=t.computed(()=>r(n.dataAfter)),i=c=>c.replaceAll(/([A-Z])/g," $1").replace(/^./,d=>d.toUpperCase()).trim(),l=c=>c==null?"-":typeof c=="boolean"?o(c?"common.yes":"common.no"):typeof c=="object"?JSON.stringify(c):String(c);return(c,d)=>(t.openBlock(),t.createElementBlock("div",Ub,[t.createElementVNode("div",Wb,[t.createElementVNode("div",Hb,[t.createElementVNode("div",qb,[t.createElementVNode("h3",Gb,[d[0]||(d[0]=t.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-danger-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]"},null,-1)),t.createTextVNode(" "+t.toDisplayString(t.unref(o)("beforeAfter.dataBefore")),1)]),t.createElementVNode("span",Kb,t.toDisplayString(t.unref(o)("beforeAfter.original")),1)])]),t.createElementVNode("div",Xb,[t.createElementVNode("div",Yb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(f,u)=>(t.openBlock(),t.createBlock(Qo,{key:u,"model-value":l(f),label:i(String(u)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(a.value).length===0?(t.openBlock(),t.createElementBlock("div",Jb)):t.createCommentVNode("",!0)])])]),t.createElementVNode("div",Qb,[t.createElementVNode("div",Zb,[t.createElementVNode("div",e0,[t.createElementVNode("h3",t0,[d[1]||(d[1]=t.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-success-500 shadow-[0_0_8px_rgba(34,197,94,0.5)]"},null,-1)),t.createTextVNode(" "+t.toDisplayString(t.unref(o)("beforeAfter.dataAfter")),1)]),t.createElementVNode("span",o0,t.toDisplayString(t.unref(o)("beforeAfter.modified")),1)])]),t.createElementVNode("div",n0,[t.createElementVNode("div",r0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(f,u)=>(t.openBlock(),t.createBlock(Qo,{key:u,"model-value":l(f),label:i(String(u)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(s.value).length===0?(t.openBlock(),t.createElementBlock("div",a0,t.toDisplayString(t.unref(o)("beforeAfter.noModifiedData")),1)):t.createCommentVNode("",!0)])])])]))}});/*!
|
|
12
|
+
`)+1-d,l+=d;continue}}return{additionsNum:a,deletionsNum:s,ignoreAdditionsNum:i,ignoreDeletionsNum:l}}function Pg(t,o,n="plaintext",r="word",a=!1,s=10,i){const l=()=>({type:fe.EMPTY}),c=(_,E,B)=>({type:_,num:E,code:B}),d=pc(t,o),f=i?new RegExp(i):void 0;let u=0,h=0,m=!1;const p=[],y={changes:p,collector:[],stat:gc(d,f)};for(let _=0;_<d.length;_++){if(m){m=!1;continue}const[E,B]=[d[_],d[_+1]],[A,C]=[en(E),en(B)],x=E.value.replace(/\n$/,"").split(`
|
|
13
|
+
`);if(B===void 0){for(const D of x){let k=l(),v=l();const S=Et(n,D);A===fe.EQUAL&&(u++,h++,k=c(fe.EQUAL,u,S),v=c(fe.EQUAL,h,S)),A===fe.DELETE&&(u++,k=c(fe.DELETE,u,S),v=l()),A===fe.ADD&&(h++,k=l(),v=c(fe.ADD,h,S)),p.push({left:k,right:v})}break}if(A===fe.EQUAL)for(const D of x){u++,h++;const k=Et(n,D);p.push({left:c(fe.EQUAL,u,k),right:c(fe.EQUAL,h,k)})}const w=B.value.replace(/\n$/,"").split(`
|
|
14
|
+
`);if(A===fe.DELETE){if(C===fe.EQUAL)for(const D of x)u++,p.push({left:c(fe.DELETE,u,Et(n,D)),right:l()});if(C===fe.ADD){m=!0;const D=Math.max(E.count,B.count);for(let k=0;k<D;k++){k<E.count&&u++,k<B.count&&h++;const[v,S]=[x[k],w[k]],N=a||x.length===w.length,V=N?_r(S,v,r):v,L=N?_r(v,S,r):S,O=f!=null&&f.test(v)?fe.EQUAL:fe.DELETE,P=f!=null&&f.test(S)?fe.EQUAL:fe.ADD,R=k<E.count?c(O,u,Et(n,V)):l(),j=k<B.count?c(P,h,Et(n,L)):l();p.push({left:R,right:j})}}}if(A===fe.ADD)for(const D of x)h++,p.push({left:l(),right:c(fe.ADD,h,Et(n,D))})}if(t===o){for(let _=0;_<p.length;_++)p[_].fold=!1;return y}for(let _=0;_<p.length;_++){const E=p[_];if(E.left.type===fe.DELETE||E.right.type===fe.ADD){const[B,A]=[Math.max(_-s,0),Math.min(_+s+1,p.length)];for(let C=B;C<A;C++)p[C].fold=!1}E.fold===void 0&&(E.fold=!0)}const b=[];let g=[];for(let _=0;_<p.length;_++){const E=p[_];if(E.fold===!1){g.length&&(g[0].hideIndex=y.collector.length,y.collector.push({lines:g,fold:!0}),g=[]),b.push(E);continue}E.hide=!0,g.push(E),b.push(E)}return g.length&&(g[0].hideIndex=y.collector.length,y.collector.push({lines:g,fold:!0}),g=[]),y.changes=b,y}function Og(t,o,n="plaintext",r="word",a=!1,s=10,i){const l=pc(t,o),c=i?new RegExp(i):void 0;let d=0,f=0,u=!1;const h=[],m={changes:h,collector:[],stat:gc(l,c)};for(let b=0;b<l.length;b++){if(u){u=!1;continue}const[g,_]=[l[b],l[b+1]],[E,B]=[en(g),en(_)],A=g.value.replace(/\n$/,"").split(`
|
|
15
|
+
`);if(_===void 0){for(const x of A){E===fe.EQUAL&&(d++,f++),E===fe.DELETE&&d++,E===fe.ADD&&f++;const w=Et(n,x);h.push({type:E,code:w,addNum:E===fe.DELETE?void 0:f,delNum:E===fe.ADD?void 0:d})}break}if(E===fe.EQUAL)for(const x of A){d++,f++;const w=Et(n,x);h.push({type:fe.EQUAL,code:w,delNum:d,addNum:f})}const C=_.value.replace(/\n$/,"").split(`
|
|
16
|
+
`);if(E===fe.DELETE)if(B===fe.ADD&&(A.length===C.length||a)){for(let x=0;x<A.length;x++){const w=A[x],D=C[x];d++;const k=Et(n,_r(D,w,r));h.push({type:c!=null&&c.test(w)?fe.EQUAL:fe.DELETE,code:k,delNum:d})}for(let x=0;x<C.length;x++){const w=A[x],D=C[x];f++;const k=Et(n,_r(w,D,r));h.push({type:c!=null&&c.test(D)?fe.EQUAL:fe.ADD,code:k,addNum:f})}u=!0}else for(const x of A){d++;const w=Et(n,x);h.push({type:fe.DELETE,code:w,delNum:d})}if(E===fe.ADD)for(const x of A){f++;const w=Et(n,x);h.push({type:fe.ADD,code:w,addNum:f})}}for(let b=0;b<h.length;b++){const g=h[b];if(g.type===fe.DELETE||g.type===fe.ADD){const[_,E]=[Math.max(b-s,0),Math.min(b+s+1,h.length)];for(let B=_;B<E;B++)h[B].fold=!1}g.fold===void 0&&(g.fold=!0)}if(t===o){for(let b=0;b<h.length;b++)h[b].fold=!1;return m}const p=[];let y=[];for(let b=0;b<h.length;b++){const g=h[b];if(g.fold===!1){y.length&&(y[0].hideIndex=m.collector.length,m.collector.push({lines:y,fold:!0}),y=[]),p.push(g);continue}g.type==="equal"&&(g.hide=!0,y.push(g)),p.push(g)}return y.length&&(y[0].hideIndex=m.collector.length,m.collector.push({lines:y,fold:!0}),y=[]),m.changes=p,m}const Lg={key:0},Rg=e.createElementVNode("td",{class:"blob-code blob-code-hunk",align:"left"}," ⋯ ",-1),Ig={key:1},Fg=["data-code-marker","innerHTML"],zg=e.defineComponent({__name:"UnifiedLine",props:{line:{}},emits:["expand"],setup(t,{emit:o}){const n=o;function r(a){return a===fe.DELETE?"-":a===fe.ADD?"+":""}return(a,s)=>a.line.hideIndex!==void 0&&a.line.hide?(e.openBlock(),e.createElementBlock("tr",Lg,[e.createElementVNode("td",{class:"blob-num blob-num-hunk text-center",colspan:"2",onClick:s[0]||(s[0]=i=>n("expand",a.line))}," > "),Rg])):a.line.hide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",Ig,[e.createElementVNode("td",{class:e.normalizeClass(["blob-num",{"blob-num-deletion":a.line.type===e.unref(fe).DELETE,"blob-num-addition":a.line.type===e.unref(fe).ADD,"blob-num-context":a.line.type===e.unref(fe).EQUAL,"blob-num-hunk":a.line.hide!==void 0}])},e.toDisplayString(a.line.delNum),3),e.createElementVNode("td",{class:e.normalizeClass(["blob-num",{"blob-num-deletion":a.line.type===e.unref(fe).DELETE,"blob-num-addition":a.line.type===e.unref(fe).ADD,"blob-num-context":a.line.type===e.unref(fe).EQUAL,"blob-num-hunk":a.line.hide!==void 0}])},e.toDisplayString(a.line.addNum),3),e.createElementVNode("td",{class:e.normalizeClass(["blob-code",{"blob-code-deletion":a.line.type===e.unref(fe).DELETE,"blob-code-addition":a.line.type===e.unref(fe).ADD,"blob-code-context":a.line.type===e.unref(fe).EQUAL,"blob-code-hunk":a.line.hide!==void 0}])},[e.createElementVNode("span",{class:"blob-code-inner blob-code-marker","data-code-marker":r(a.line.type),innerHTML:a.line.code},null,8,Fg)],2)]))}}),$g={class:"diff-table"},jg=e.defineComponent({__name:"UnifiedViewer",props:{diffChange:{}},setup(t){const o=t;function n({hideIndex:r}){r!==void 0&&o.diffChange.collector[r].lines.forEach(a=>{a.hide=!1,a.fold=!1})}return(r,a)=>{var s;return e.openBlock(),e.createElementBlock("table",$g,[e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((s=r.diffChange)==null?void 0:s.changes,(i,l)=>(e.openBlock(),e.createBlock(zg,{key:l,line:i,onExpand:n},null,8,["line"]))),128))])])}}}),Ug={key:0},Wg=e.createElementVNode("td",{class:"blob-code blob-code-inner blob-code-hunk",colspan:"3",align:"left"}," ⋯ ",-1),Hg={key:1},qg=e.createElementVNode("td",{class:"blob-num blob-num-empty empty-cell"},null,-1),Gg=e.createElementVNode("td",{class:"blob-code blob-code-empty empty-cell"},null,-1),Kg=["onMousedown"],Xg=["data-code-marker","innerHTML"],Yg=e.defineComponent({__name:"SplitLine",props:{splitLine:{}},emits:["expand"],setup(t,{emit:o}){const n=o;function r(s){return s===fe.DELETE?"-":s===fe.ADD?"+":""}function a(s){const i=document.querySelectorAll(".file-diff-split .split-side-left"),l=document.querySelectorAll(".file-diff-split .split-side-right");for(const c of l)c.classList.toggle("no-select",s==="left");for(const c of i)c.classList.toggle("no-select",s==="right")}return(s,i)=>s.splitLine.hideIndex!==void 0&&s.splitLine.hide?(e.openBlock(),e.createElementBlock("tr",Ug,[e.createElementVNode("td",{class:"blob-num blob-num-hunk",colspan:"1",onClick:i[0]||(i[0]=l=>n("expand",s.splitLine))}," > "),Wg])):s.splitLine.hide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",Hg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList([s.splitLine.left,s.splitLine.right],(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.type===e.unref(fe).EMPTY?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[qg,Gg],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("td",{class:e.normalizeClass(["blob-num",{"blob-num-deletion":l.type===e.unref(fe).DELETE,"blob-num-addition":l.type===e.unref(fe).ADD,"blob-num-context":l.type===e.unref(fe).EQUAL,"blob-num-hunk":s.splitLine.hide!==void 0}])},e.toDisplayString(l.num),3),e.createElementVNode("td",{class:e.normalizeClass(["blob-code",{"blob-code-deletion":l.type===e.unref(fe).DELETE,"blob-code-addition":l.type===e.unref(fe).ADD,"blob-code-context":l.type===e.unref(fe).EQUAL,"blob-code-hunk":s.splitLine.hide!==void 0,"split-side-left":c===0,"split-side-right":c===1}]),onMousedown:d=>a(c===0?"left":"right")},[e.createElementVNode("span",{class:"blob-code-inner blob-code-marker","data-code-marker":r(l.type),innerHTML:l.code},null,8,Xg)],42,Kg)],64))],64))),256))]))}}),Jg={class:"file-diff-split diff-table"},Qg=e.createElementVNode("colgroup",null,[e.createElementVNode("col",{width:"44"}),e.createElementVNode("col"),e.createElementVNode("col",{width:"44"}),e.createElementVNode("col")],-1),Zg=e.defineComponent({__name:"SplitViewer",props:{diffChange:{}},setup(t){const o=t;function n({hideIndex:r}){r!==void 0&&o.diffChange.collector[r].lines.forEach(a=>{a.hide=!1,a.fold=!1})}return(r,a)=>{var s;return e.openBlock(),e.createElementBlock("table",Jg,[Qg,e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((s=r.diffChange)==null?void 0:s.changes,(i,l)=>(e.openBlock(),e.createBlock(Yg,{key:l,"split-line":i,onExpand:n},null,8,["split-line"]))),128))])])}}}),bc=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},eb={name:"DownArrowIcon"},tb={width:"1rem",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"},ob=e.createElementVNode("path",{d:"M383.6,322.7L278.6,423c-5.8,6-13.7,9-22.4,9c-8.7,0-16.5-3-22.4-9L128.4,322.7c-12.5-11.9-12.5-31.3,0-43.2 c12.5-11.9,32.7-11.9,45.2,0l50.4,48.2v-217c0-16.9,14.3-30.6,32-30.6c17.7,0,32,13.7,32,30.6v217l50.4-48.2 c12.5-11.9,32.7-11.9,45.2,0C396.1,291.4,396.1,310.7,383.6,322.7z"},null,-1),nb=[ob];function rb(t,o,n,r,a,s){return e.openBlock(),e.createElementBlock("svg",tb,nb)}const yc=bc(eb,[["render",rb]]),ab={name:"UpArrowIcon"},sb={width:"1rem",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"},ib=e.createElementVNode("path",{d:"M128.4,189.3L233.4,89c5.8-6,13.7-9,22.4-9c8.7,0,16.5,3,22.4,9l105.4,100.3c12.5,11.9,12.5,31.3,0,43.2 c-12.5,11.9-32.7,11.9-45.2,0L288,184.4v217c0,16.9-14.3,30.6-32,30.6c-17.7,0-32-13.7-32-30.6v-217l-50.4,48.2 c-12.5,11.9-32.7,11.9-45.2,0C115.9,220.6,115.9,201.3,128.4,189.3z"},null,-1),lb=[ib];function cb(t,o,n,r,a,s){return e.openBlock(),e.createElementBlock("svg",sb,lb)}const xc=bc(ab,[["render",cb]]),db=["theme"],fb={key:0,class:"file-header"},ub={key:0,class:"file-info"},hb={class:"info-left"},mb={class:"info-left"},pb={class:"diff-commandbar"},gb={key:0,class:"diff-stat"},bb={class:"diff-stat-added"},yb={class:"diff-stat-deleted"},xb={key:1,class:"file-info"},kb={class:"info-left"},wb={class:"info-right"},Cb={style:{"margin-left":"20px"}},_b={class:"diff-commandbar"},Eb={key:0,class:"diff-stat"},Bb={class:"diff-stat-added"},Sb={class:"diff-stat-deleted"},Ab=e.defineComponent({__name:"CodeDiff",props:{newString:{},oldString:{},language:{default:"plaintext"},context:{default:10},diffStyle:{default:"word"},forceInlineComparison:{type:Boolean,default:!1},outputFormat:{default:"line-by-line"},trim:{type:Boolean,default:!1},noDiffLineFeed:{type:Boolean,default:!1},maxHeight:{default:void 0},filename:{default:void 0},newFilename:{default:void 0},hideHeader:{type:Boolean,default:!1},hideStat:{type:Boolean,default:!1},theme:{default:"light"},ignoreMatchingLines:{default:void 0}},emits:["diff"],setup(t,{emit:o}){const n=t,r=o,a=e.computed(()=>n.outputFormat==="line-by-line"),s=e.computed(()=>{let p=n.oldString||"";return p=n.trim?p.trim():p,p=n.noDiffLineFeed?p.replace(/(\r\n)/g,`
|
|
17
|
+
`):p,p}),i=e.computed(()=>{let p=n.newString||"";return p=n.trim?p.trim():p,p=n.noDiffLineFeed?p.replace(/(\r\n)/g,`
|
|
18
|
+
`):p,p}),l=e.computed(()=>a.value?Og(s.value,i.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines):Pg(s.value,i.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines)),c=e.ref(l.value),d=e.computed(()=>c.value.stat.additionsNum===0&&c.value.stat.deletionsNum===0),f=e.ref(-1);function u(){const p=document.querySelectorAll(".blob-code-addition");f.value<p.length-1&&(f.value++,m(p))}function h(){const p=document.querySelectorAll(".blob-code-addition");f.value>0&&(f.value--,m(p))}function m(p){p.forEach(b=>b.classList.remove("current-diff"));const y=p[f.value];y&&(y.classList.add("current-diff"),y.scrollIntoView({behavior:"smooth",block:"center"}))}return e.watch(()=>n,()=>{c.value=l.value,r("diff",{stat:{isChanged:!d.value,addNum:c.value.stat.additionsNum,delNum:c.value.stat.deletionsNum}})},{deep:!0,immediate:!0}),(p,y)=>(e.openBlock(),e.createElementBlock("div",{class:"code-diff-view",theme:p.theme,style:e.normalizeStyle({maxHeight:p.maxHeight})},[p.hideHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",fb,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",ub,[e.createElementVNode("span",null,[e.createElementVNode("div",hb,e.toDisplayString(p.filename),1),e.createElementVNode("div",mb,e.toDisplayString(p.newFilename),1)]),e.createElementVNode("span",pb,[e.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:u},[e.createVNode(yc)]),e.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:h},[e.createVNode(xc)])]),p.hideStat?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",gb,[e.renderSlot(p.$slots,"stat",{stat:e.unref(c).stat},()=>[e.createElementVNode("span",bb,"+"+e.toDisplayString(e.unref(c).stat.additionsNum)+" additions",1),e.createElementVNode("span",yb,"-"+e.toDisplayString(e.unref(c).stat.deletionsNum)+" deletions",1)])]))])):(e.openBlock(),e.createElementBlock("div",xb,[e.createElementVNode("span",kb,e.toDisplayString(p.filename),1),e.createElementVNode("span",wb,[e.createElementVNode("span",Cb,e.toDisplayString(p.newFilename),1),e.createElementVNode("span",_b,[e.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:u},[e.createVNode(yc)]),e.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:h},[e.createVNode(xc)])]),p.hideStat?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Eb,[e.renderSlot(p.$slots,"stat",{stat:e.unref(c).stat},()=>[e.createElementVNode("span",Bb,"+"+e.toDisplayString(e.unref(c).stat.additionsNum)+" additions",1),e.createElementVNode("span",Sb,"-"+e.toDisplayString(e.unref(c).stat.deletionsNum)+" deletions",1)])]))])]))])),e.unref(a)?(e.openBlock(),e.createBlock(jg,{key:1,"diff-change":e.unref(c)},null,8,["diff-change"])):(e.openBlock(),e.createBlock(Zg,{key:2,"diff-change":e.unref(c)},null,8,["diff-change"]))],12,db))}}),Ot=e.ref("auto");e.ref(!1),e.ref(!1);const as=e.computed(()=>Ot.value==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:Ot.value==="dark"),kc=e.computed(()=>Ot.value==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":Ot.value),vb=t=>{Ot.value=t,Er(),Nb()},Er=()=>{const t=document.documentElement,o=as.value;t.classList.remove("light","dark"),t.classList.add(o?"dark":"light"),t.setAttribute("data-theme",o?"dark":"light"),Db(o)},Db=t=>{let o=document.querySelector('meta[name="theme-color"]');o||(o=document.createElement("meta"),o.name="theme-color",document.head.appendChild(o)),o.setAttribute("content",t?"#1f2937":"#ffffff")},Nb=()=>{localStorage.setItem("ui-theme",Ot.value)},Vb=()=>{const t=localStorage.getItem("ui-theme");t&&["light","dark","auto"].includes(t)&&(Ot.value=t),Er()},Mb=()=>{Vb();const t=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>{Ot.value==="auto"&&Er()};return t.addEventListener("change",o),()=>{t.removeEventListener("change",o)}};e.watch(Ot,Er);const Tb=()=>({theme:Ot.value,isDark:as.value,currentTheme:kc.value,setTheme:vb,initTheme:Mb,themeRef:Ot,isDarkRef:as,currentThemeRef:kc}),Pb={class:"flex gap-2"},Ob={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-red-50 dark:bg-red-900/10 text-red-600 dark:text-red-400 border border-red-100 dark:border-red-800/50"},Lb={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-emerald-50 dark:bg-emerald-900/10 text-emerald-600 dark:text-emerald-400 border border-emerald-100 dark:border-emerald-800/50"},Rb={class:"vue-code-diff-wrapper"},ss=e.defineComponent({__name:"DCodeBeforeAfter",props:{dataBefore:{type:[Object,Array,String,Number,Boolean,null],required:!0},dataAfter:{type:[Object,Array,String,Number,Boolean,null],required:!0}},setup(t){const{t:o}=_t.useI18n(),{isDarkRef:n}=Tb(),r=t,a=e.computed(()=>n.value?"dark":"light"),s=d=>{if(d===null||typeof d!="object")return d;if(Array.isArray(d))return d.map(s);const f=Object.keys(d).sort(),u={};return f.forEach(h=>{u[h]=s(d[h])}),u},i=d=>{try{if(d==null)return"";let f=d;if(typeof d=="string")try{const h=d.trim();(h.startsWith("{")||h.startsWith("["))&&(f=JSON.parse(h))}catch{}const u=s(f);return JSON.stringify(u,null,2)}catch{return String(d)}},l=e.computed(()=>i(r.dataBefore)),c=e.computed(()=>i(r.dataAfter));return(d,f)=>(e.openBlock(),e.createBlock(Yo,{title:e.unref(o)("beforeAfter.dataComparison")||"Data Comparison",padding:"p-0",class:"overflow-hidden"},{actions:e.withCtx(()=>[e.createElementVNode("div",Pb,[e.createElementVNode("span",Ob,e.toDisplayString(e.unref(o)("beforeAfter.original")||"Original"),1),e.createElementVNode("span",Lb,e.toDisplayString(e.unref(o)("beforeAfter.modified")||"Modified"),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Rb,[e.createVNode(e.unref(Ab),{"old-string":l.value,"new-string":c.value,"output-format":"side-by-side",language:"json",context:10,"max-height":600,theme:a.value,"hide-header":!0,"hide-stat":!0},null,8,["old-string","new-string","theme"])])]),_:1},8,["title"]))}}),Ib=["aria-busy"],Fb={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},zb={key:1,class:"flex justify-end"},$b=["for"],jb={key:0,class:"ml-1 text-destructive"},Ub={class:"relative w-full group"},Wb={key:0,class:"absolute inset-y-0 left-4 flex items-center text-muted-foreground"},Hb={key:1},qb=["id","value","placeholder"],Gb={key:1,class:"absolute inset-y-0 right-4 flex items-center"},Kb={key:2,class:"absolute inset-y-0 right-4 flex items-center"},Xb={key:3,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},Yb={key:1,class:"text-xs text-destructive"},tn=e.defineComponent({name:"DCodeTextField",inheritAttrs:!1,__name:"DCodeTextField",props:{modelValue:{},prependInner:{},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},error:{default:null},placeholder:{default:""},icon:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},maxLength:{},minLength:{},maxValue:{},minValue:{}},emits:["update:modelValue","clear"],setup(t,{emit:o}){const n=e.useAttrs(),r=e.computed(()=>{var $;return(($=l.valueType)==null?void 0:$.toLowerCase())==="password"||n.type==="password"}),a=e.ref(!1),s=()=>{a.value=!a.value},i=o,l=t,c=e.computed(()=>n.label);e.computed(()=>l.visible??!0);const d=Math.random().toString(36).slice(2,7),f=e.computed(()=>`app-text-field-${n.id||c.value||"field"}-${d}`),u=e.computed(()=>{const $=n.required,Y=n["aria-required"];return $===""||$===!0||$==="true"||(Y==="true"||Y===!0)}),h=e.computed(()=>{const{label:$,class:Y,id:ae,required:ye,"aria-required":Pe,...Ee}=n;return Ee}),m=e.computed(()=>{var Y,ae;const $={...h.value};return((Y=l.valueType)==null?void 0:Y.toLowerCase())==="number"&&($.type="text",$.inputmode="numeric",$.pattern="[0-9]*"),((ae=l.valueType)==null?void 0:ae.toLowerCase())==="email"&&($.type="email",$.inputmode="email"),r.value&&($.type=a.value?"text":"password"),l.disabled&&($.disabled=!0),l.readonly&&($.readonly=!0),l.maxLength&&($.maxlength=l.maxLength),l.minLength&&($.minlength=l.minLength),l.maxValue&&($.max=l.maxValue),l.minValue&&($.min=l.minValue),$}),p=e.computed(()=>{const $=l.modelValue;return $==null||String($).length===0}),y=e.computed(()=>l.clearable?l.hideClearWhenEmpty?!p.value:!0:!1),b=e.computed(()=>{switch(l.textCase){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}}),g=e.ref(String(l.modelValue??""));e.watch(()=>l.modelValue,$=>{const Y=String($??"");Y!==g.value&&(g.value=Y)});const _=e.ref(!1),E=e.ref(!1),B=$=>$.split(/(\s+)/).map(Y=>{if(Y.trim()==="")return Y;const ae=Y.toLowerCase();return ae.charAt(0).toUpperCase()+ae.slice(1)}).join(""),A=$=>{const Y=$.toLowerCase(),ae=Y.search(new RegExp("\\p{L}","u"));return ae<0?Y:Y.slice(0,ae)+Y.charAt(ae).toUpperCase()+Y.slice(ae+1)},C=$=>{switch(l.textCase){case"uppercase":return $.toUpperCase();case"lowercase":return $.toLowerCase();case"titlecase":return B($);case"sentencecase":return A($);case"none":default:return $}},x=$=>{if(!$)return null;const Y=Array.isArray($)?$.join(""):$;return Y?new Set(Y):null},w=e.computed(()=>x(l.allowChars)),D=($,Y)=>($.lastIndex=0,$.test(Y)),k=$=>{var Ie;const Y=(Ie=l.valueType)==null?void 0:Ie.toLowerCase();if(Y==="free"||Y==="email"||Y==="password")return!0;const ae=$===" ",ye=/\d/.test($),Pe=new RegExp("\\p{L}","u").test($),Ee=new RegExp("\\p{N}","u").test($),Ue=/[\/\-_.,]/.test($);return Y==="number"?ye:Y==="letter"?Pe||Ue||l.allowSpaces&&ae:Y==="letternumber"?Pe||Ee||Ue||l.allowSpaces&&ae:!0},v=$=>{let Y="";for(const ae of $){const ye=!!w.value&&w.value.has(ae);l.pattern&&!ye&&!D(l.pattern,ae)||!ye&&!k(ae)||(Y+=ae)}return Y},S=e.computed(()=>{const $=l.maxLength??n.maxlength??n.maxLength;let Y=Number.NaN;return typeof $=="number"?Y=$:typeof $=="string"&&(Y=Number.parseInt($,10)),Number.isFinite(Y)&&Y>0?Y:-1}),N=e.computed(()=>g.value.length),V=e.computed(()=>l.showCharCount?S.value>0:!1),L=$=>S.value>0?$.slice(0,S.value):$,O=$=>{const Y=v($),ae=l.applyTextCaseToValue?C(Y):Y;return L(ae)};let P=null;const R=$=>{var Y;if($==="")return null;if(((Y=l.valueType)==null?void 0:Y.toLowerCase())==="number"&&l.returnNumber){const ae=Number($);return Number.isFinite(ae)?ae:null}return $},j=$=>{g.value=$,i("update:modelValue",R($))},T=($,Y)=>{const ae=L(Y);E.value=!0,$.value=ae,j(ae),queueMicrotask(()=>E.value=!1)},I=($,Y)=>{const ae=$.selectionStart??$.value.length,ye=$.selectionEnd??$.value.length;if(S.value>0){const Pe=$.value.length-(ye-ae),Ee=S.value-Pe;if(Ee<=0)return;Y=Y.slice(0,Ee)}$.setRangeText(Y,ae,ye,"end"),T($,O($.value))},X=$=>{var ye;if(!P||_.value||E.value||!((ye=$.inputType)!=null&&ye.startsWith("insert")))return;const Y=$.data;if(Y==null)return;const ae=O(Y);ae!==Y&&($.preventDefault(),ae.length>0&&I(P,ae))},H=$=>{var ye;if(!P||_.value||E.value)return;const Y=((ye=$.clipboardData)==null?void 0:ye.getData("text"))??"",ae=O(Y);ae!==Y&&($.preventDefault(),ae.length>0&&I(P,ae))},W=$=>{if(!P||_.value||E.value)return;const Y=$.target,ae=Y.value??"",ye=O(ae);ye===ae?j(ye):T(Y,ye)},Z=()=>_.value=!0,oe=()=>{if(_.value=!1,!P)return;const $=P.value??"",Y=O($);Y===$?j(Y):T(P,Y)};e.onMounted(()=>{if(P=document.getElementById(f.value),!P)return;P.addEventListener("beforeinput",X),P.addEventListener("paste",H),P.addEventListener("input",W),P.addEventListener("compositionstart",Z),P.addEventListener("compositionend",oe);const $=P.value??"",Y=O($);Y===$?j(Y):T(P,Y)}),e.onBeforeUnmount(()=>{P&&(P.removeEventListener("beforeinput",X),P.removeEventListener("paste",H),P.removeEventListener("input",W),P.removeEventListener("compositionstart",Z),P.removeEventListener("compositionend",oe),P=null)});const ge=()=>{g.value="",P&&(P.value=""),i("update:modelValue",null),i("clear")},Ne=e.computed(()=>V.value&&N.value>0),we=e.computed(()=>`${N.value} / ${S.value}`),Q=e.computed(()=>!!l.error);return($,Y)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-1 w-full",[e.unref(n).class,l.disabled?"cursor-not-allowed":""]]),"aria-busy":l.skeleton},[l.skeleton?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c.value?(e.openBlock(),e.createElementBlock("div",Fb)):e.createCommentVNode("",!0),Y[1]||(Y[1]=e.createElementVNode("div",{class:"relative w-full"},[e.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1)),V.value?(e.openBlock(),e.createElementBlock("div",zb,[...Y[0]||(Y[0]=[e.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value?(e.openBlock(),e.createElementBlock("label",{key:0,for:f.value,class:"text-sm font-medium"},[e.createTextVNode(e.toDisplayString(c.value)+" ",1),u.value?(e.openBlock(),e.createElementBlock("span",jb,"*")):e.createCommentVNode("",!0)],8,$b)):e.createCommentVNode("",!0),e.createElementVNode("div",Ub,[l.icon||l.prependInner||$.$slots["prepend-inner"]?(e.openBlock(),e.createElementBlock("div",Wb,[e.renderSlot($.$slots,"prepend-inner",{},()=>[l.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.icon),{key:0,class:"h-4 w-4"})):l.prependInner?(e.openBlock(),e.createElementBlock("span",Hb,e.toDisplayString(l.prependInner),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:f.value,value:g.value},m.value,{placeholder:l.placeholder,style:`text-transform: ${b.value}; padding-left: ${l.icon||l.prependInner||$.$slots["prepend-inner"]?"2.5rem":"0.75rem"} !important; padding-right: ${y.value||r.value?"2.5rem":"0.75rem"} !important;`,class:["w-full h-10 flex items-center gap-2 rounded-lg border py-2 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600","text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 readonly:bg-neutral-50/50 dark:readonly:bg-neutral-900/30",Q.value?"border-destructive focus:ring-destructive focus-visible:ring-destructive focus-visible:ring-[0.5px]":""]}),null,16,qb),r.value?(e.openBlock(),e.createElementBlock("div",Gb,[e.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground",tabindex:"-1",onClick:s},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value?e.unref(ne.Eye):e.unref(ne.EyeOff)),{class:"w-4 h-4"}))])])):e.createCommentVNode("",!0),y.value&&!r.value?(e.openBlock(),e.createElementBlock("div",Kb,[e.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground text-lg leading-none","aria-label":"Clear input",onClick:ge}," ✕ ")])):e.createCommentVNode("",!0),Ne.value&&!Q.value?(e.openBlock(),e.createElementBlock("p",Xb,e.toDisplayString(we.value),1)):e.createCommentVNode("",!0)]),Q.value?(e.openBlock(),e.createElementBlock("p",Yb,e.toDisplayString(l.error),1)):e.createCommentVNode("",!0)],64))],10,Ib)),[[e.vShow,t.visible]])}}),Jb={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Qb={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},Zb={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},e0={class:"flex items-center justify-between"},t0={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},o0={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-neutral-600 dark:text-neutral-400 border border-neutral-200/60 dark:border-neutral-700/50 shadow-sm"},n0={class:"p-6 flex-1"},r0={class:"flex flex-col gap-4"},a0={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},s0={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},i0={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},l0={class:"flex items-center justify-between"},c0={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},d0={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-primary-600 dark:text-primary-400 border border-primary-100 dark:border-primary-900/30 shadow-sm"},f0={class:"p-6 flex-1"},u0={class:"flex flex-col gap-4"},h0={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},is=e.defineComponent({name:"DCodeListLabels",__name:"DCodeListLabels",props:{dataBefore:{},dataAfter:{}},setup(t){const{t:o}=_t.useI18n(),n=t,r=c=>{if(!c)return{};if(typeof c=="string")try{if(c.trim().startsWith("{")||c.trim().startsWith("["))return JSON.parse(c)}catch(d){return console.error("Failed to parse data string:",d),{raw:c}}return typeof c=="object"&&c!==null?c:{value:c}},a=e.computed(()=>r(n.dataBefore)),s=e.computed(()=>r(n.dataAfter)),i=c=>c.replaceAll(/([A-Z])/g," $1").replace(/^./,d=>d.toUpperCase()).trim(),l=c=>c==null?"-":typeof c=="boolean"?o(c?"common.yes":"common.no"):typeof c=="object"?JSON.stringify(c):String(c);return(c,d)=>(e.openBlock(),e.createElementBlock("div",Jb,[e.createElementVNode("div",Qb,[e.createElementVNode("div",Zb,[e.createElementVNode("div",e0,[e.createElementVNode("h3",t0,[d[0]||(d[0]=e.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-danger-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]"},null,-1)),e.createTextVNode(" "+e.toDisplayString(e.unref(o)("beforeAfter.dataBefore")),1)]),e.createElementVNode("span",o0,e.toDisplayString(e.unref(o)("beforeAfter.original")),1)])]),e.createElementVNode("div",n0,[e.createElementVNode("div",r0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(f,u)=>(e.openBlock(),e.createBlock(tn,{key:u,"model-value":l(f),label:i(String(u)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(a.value).length===0?(e.openBlock(),e.createElementBlock("div",a0)):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",s0,[e.createElementVNode("div",i0,[e.createElementVNode("div",l0,[e.createElementVNode("h3",c0,[d[1]||(d[1]=e.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-success-500 shadow-[0_0_8px_rgba(34,197,94,0.5)]"},null,-1)),e.createTextVNode(" "+e.toDisplayString(e.unref(o)("beforeAfter.dataAfter")),1)]),e.createElementVNode("span",d0,e.toDisplayString(e.unref(o)("beforeAfter.modified")),1)])]),e.createElementVNode("div",f0,[e.createElementVNode("div",u0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(f,u)=>(e.openBlock(),e.createBlock(tn,{key:u,"model-value":l(f),label:i(String(u)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(s.value).length===0?(e.openBlock(),e.createElementBlock("div",h0,e.toDisplayString(e.unref(o)("beforeAfter.noModifiedData")),1)):e.createCommentVNode("",!0)])])])]))}});/*!
|
|
19
19
|
* @kurkle/color v0.3.4
|
|
20
20
|
* https://github.com/kurkle/color#readme
|
|
21
21
|
* (c) 2024 Jukka Kurkela
|
|
22
22
|
* Released under the MIT License
|
|
23
|
-
*/function
|
|
23
|
+
*/function Dn(t){return t+.5|0}const go=(t,o,n)=>Math.max(Math.min(t,n),o);function Nn(t){return go(Dn(t*2.55),0,255)}function bo(t){return go(Dn(t*255),0,255)}function Qt(t){return go(Dn(t/2.55)/100,0,1)}function wc(t){return go(Dn(t*100),0,100)}const Bt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ls=[..."0123456789ABCDEF"],m0=t=>ls[t&15],p0=t=>ls[(t&240)>>4]+ls[t&15],Br=t=>(t&240)>>4===(t&15),g0=t=>Br(t.r)&&Br(t.g)&&Br(t.b)&&Br(t.a);function b0(t){var o=t.length,n;return t[0]==="#"&&(o===4||o===5?n={r:255&Bt[t[1]]*17,g:255&Bt[t[2]]*17,b:255&Bt[t[3]]*17,a:o===5?Bt[t[4]]*17:255}:(o===7||o===9)&&(n={r:Bt[t[1]]<<4|Bt[t[2]],g:Bt[t[3]]<<4|Bt[t[4]],b:Bt[t[5]]<<4|Bt[t[6]],a:o===9?Bt[t[7]]<<4|Bt[t[8]]:255})),n}const y0=(t,o)=>t<255?o(t):"";function x0(t){var o=g0(t)?m0:p0;return t?"#"+o(t.r)+o(t.g)+o(t.b)+y0(t.a,o):void 0}const k0=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Cc(t,o,n){const r=o*Math.min(n,1-n),a=(s,i=(s+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[a(0),a(8),a(4)]}function w0(t,o,n){const r=(a,s=(a+t/60)%6)=>n-n*o*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function C0(t,o,n){const r=Cc(t,1,.5);let a;for(o+n>1&&(a=1/(o+n),o*=a,n*=a),a=0;a<3;a++)r[a]*=1-o-n,r[a]+=o;return r}function _0(t,o,n,r,a){return t===a?(o-n)/r+(o<n?6:0):o===a?(n-t)/r+2:(t-o)/r+4}function cs(t){const n=t.r/255,r=t.g/255,a=t.b/255,s=Math.max(n,r,a),i=Math.min(n,r,a),l=(s+i)/2;let c,d,f;return s!==i&&(f=s-i,d=l>.5?f/(2-s-i):f/(s+i),c=_0(n,r,a,f,s),c=c*60+.5),[c|0,d||0,l]}function ds(t,o,n,r){return(Array.isArray(o)?t(o[0],o[1],o[2]):t(o,n,r)).map(bo)}function fs(t,o,n){return ds(Cc,t,o,n)}function E0(t,o,n){return ds(C0,t,o,n)}function B0(t,o,n){return ds(w0,t,o,n)}function _c(t){return(t%360+360)%360}function S0(t){const o=k0.exec(t);let n=255,r;if(!o)return;o[5]!==r&&(n=o[6]?Nn(+o[5]):bo(+o[5]));const a=_c(+o[2]),s=+o[3]/100,i=+o[4]/100;return o[1]==="hwb"?r=E0(a,s,i):o[1]==="hsv"?r=B0(a,s,i):r=fs(a,s,i),{r:r[0],g:r[1],b:r[2],a:n}}function A0(t,o){var n=cs(t);n[0]=_c(n[0]+o),n=fs(n),t.r=n[0],t.g=n[1],t.b=n[2]}function v0(t){if(!t)return;const o=cs(t),n=o[0],r=wc(o[1]),a=wc(o[2]);return t.a<255?`hsla(${n}, ${r}%, ${a}%, ${Qt(t.a)})`:`hsl(${n}, ${r}%, ${a}%)`}const Ec={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Bc={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function D0(){const t={},o=Object.keys(Bc),n=Object.keys(Ec);let r,a,s,i,l;for(r=0;r<o.length;r++){for(i=l=o[r],a=0;a<n.length;a++)s=n[a],l=l.replace(s,Ec[s]);s=parseInt(Bc[i],16),t[l]=[s>>16&255,s>>8&255,s&255]}return t}let Sr;function N0(t){Sr||(Sr=D0(),Sr.transparent=[0,0,0,0]);const o=Sr[t.toLowerCase()];return o&&{r:o[0],g:o[1],b:o[2],a:o.length===4?o[3]:255}}const V0=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function M0(t){const o=V0.exec(t);let n=255,r,a,s;if(o){if(o[7]!==r){const i=+o[7];n=o[8]?Nn(i):go(i*255,0,255)}return r=+o[1],a=+o[3],s=+o[5],r=255&(o[2]?Nn(r):go(r,0,255)),a=255&(o[4]?Nn(a):go(a,0,255)),s=255&(o[6]?Nn(s):go(s,0,255)),{r,g:a,b:s,a:n}}}function T0(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Qt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const us=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,on=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function P0(t,o,n){const r=on(Qt(t.r)),a=on(Qt(t.g)),s=on(Qt(t.b));return{r:bo(us(r+n*(on(Qt(o.r))-r))),g:bo(us(a+n*(on(Qt(o.g))-a))),b:bo(us(s+n*(on(Qt(o.b))-s))),a:t.a+n*(o.a-t.a)}}function Ar(t,o,n){if(t){let r=cs(t);r[o]=Math.max(0,Math.min(r[o]+r[o]*n,o===0?360:1)),r=fs(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function Sc(t,o){return t&&Object.assign(o||{},t)}function Ac(t){var o={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(o={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(o.a=bo(t[3]))):(o=Sc(t,{r:0,g:0,b:0,a:1}),o.a=bo(o.a)),o}function O0(t){return t.charAt(0)==="r"?M0(t):S0(t)}class Vn{constructor(o){if(o instanceof Vn)return o;const n=typeof o;let r;n==="object"?r=Ac(o):n==="string"&&(r=b0(o)||N0(o)||O0(o)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var o=Sc(this._rgb);return o&&(o.a=Qt(o.a)),o}set rgb(o){this._rgb=Ac(o)}rgbString(){return this._valid?T0(this._rgb):void 0}hexString(){return this._valid?x0(this._rgb):void 0}hslString(){return this._valid?v0(this._rgb):void 0}mix(o,n){if(o){const r=this.rgb,a=o.rgb;let s;const i=n===s?.5:n,l=2*i-1,c=r.a-a.a,d=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;s=1-d,r.r=255&d*r.r+s*a.r+.5,r.g=255&d*r.g+s*a.g+.5,r.b=255&d*r.b+s*a.b+.5,r.a=i*r.a+(1-i)*a.a,this.rgb=r}return this}interpolate(o,n){return o&&(this._rgb=P0(this._rgb,o._rgb,n)),this}clone(){return new Vn(this.rgb)}alpha(o){return this._rgb.a=bo(o),this}clearer(o){const n=this._rgb;return n.a*=1-o,this}greyscale(){const o=this._rgb,n=Dn(o.r*.3+o.g*.59+o.b*.11);return o.r=o.g=o.b=n,this}opaquer(o){const n=this._rgb;return n.a*=1+o,this}negate(){const o=this._rgb;return o.r=255-o.r,o.g=255-o.g,o.b=255-o.b,this}lighten(o){return Ar(this._rgb,2,o),this}darken(o){return Ar(this._rgb,2,-o),this}saturate(o){return Ar(this._rgb,1,o),this}desaturate(o){return Ar(this._rgb,1,-o),this}rotate(o){return A0(this._rgb,o),this}}/*!
|
|
24
24
|
* Chart.js v4.5.1
|
|
25
25
|
* https://www.chartjs.org
|
|
26
26
|
* (c) 2025 Chart.js Contributors
|
|
27
27
|
* Released under the MIT License
|
|
28
|
-
*/function Qt(){}const v0=(()=>{let e=0;return()=>e++})();function $e(e){return e==null}function Ze(e){if(Array.isArray&&Array.isArray(e))return!0;const o=Object.prototype.toString.call(e);return o.slice(0,7)==="[object"&&o.slice(-6)==="Array]"}function Me(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function rt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Rt(e,o){return rt(e)?e:o}function Se(e,o){return typeof e>"u"?o:e}const D0=(e,o)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/o,kc=(e,o)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*o:+e;function qe(e,o,n){if(e&&typeof e.call=="function")return e.apply(n,o)}function je(e,o,n,r){let a,s,i;if(Ze(e))for(s=e.length,a=0;a<s;a++)o.call(n,e[a],a);else if(Me(e))for(i=Object.keys(e),s=i.length,a=0;a<s;a++)o.call(n,e[i[a]],i[a])}function Br(e,o){let n,r,a,s;if(!e||!o||e.length!==o.length)return!1;for(n=0,r=e.length;n<r;++n)if(a=e[n],s=o[n],a.datasetIndex!==s.datasetIndex||a.index!==s.index)return!1;return!0}function Sr(e){if(Ze(e))return e.map(Sr);if(Me(e)){const o=Object.create(null),n=Object.keys(e),r=n.length;let a=0;for(;a<r;++a)o[n[a]]=Sr(e[n[a]]);return o}return e}function wc(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function N0(e,o,n,r){if(!wc(e))return;const a=o[e],s=n[e];Me(a)&&Me(s)?Nn(a,s,r):o[e]=Sr(s)}function Nn(e,o,n){const r=Ze(o)?o:[o],a=r.length;if(!Me(e))return e;n=n||{};const s=n.merger||N0;let i;for(let l=0;l<a;++l){if(i=r[l],!Me(i))continue;const c=Object.keys(i);for(let d=0,f=c.length;d<f;++d)s(c[d],e,i,n)}return e}function Vn(e,o){return Nn(e,o,{merger:V0})}function V0(e,o,n){if(!wc(e))return;const r=o[e],a=n[e];Me(r)&&Me(a)?Vn(r,a):Object.prototype.hasOwnProperty.call(o,e)||(o[e]=Sr(a))}const Cc={"":e=>e,x:e=>e.x,y:e=>e.y};function M0(e){const o=e.split("."),n=[];let r="";for(const a of o)r+=a,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function T0(e){const o=M0(e);return n=>{for(const r of o){if(r==="")break;n=n&&n[r]}return n}}function No(e,o){return(Cc[o]||(Cc[o]=T0(o)))(e)}function ds(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Mn=e=>typeof e<"u",go=e=>typeof e=="function",_c=(e,o)=>{if(e.size!==o.size)return!1;for(const n of e)if(!o.has(n))return!1;return!0};function P0(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ue=Math.PI,Ke=2*Ue,O0=Ke+Ue,Ar=Number.POSITIVE_INFINITY,L0=Ue/180,tt=Ue/2,Vo=Ue/4,Ec=Ue*2/3,Bc=Math.log10,It=Math.sign;function Tn(e,o,n){return Math.abs(e-o)<n}function Sc(e){const o=Math.round(e);e=Tn(e,o,e/1e3)?o:e;const n=Math.pow(10,Math.floor(Bc(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function R0(e){const o=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(o.push(r),o.push(e/r));return n===(n|0)&&o.push(n),o.sort((a,s)=>a-s).pop(),o}function I0(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Pn(e){return!I0(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function F0(e,o){const n=Math.round(e);return n-o<=e&&n+o>=e}function z0(e,o,n){let r,a,s;for(r=0,a=e.length;r<a;r++)s=e[r][n],isNaN(s)||(o.min=Math.min(o.min,s),o.max=Math.max(o.max,s))}function Zt(e){return e*(Ue/180)}function $0(e){return e*(180/Ue)}function Ac(e){if(!rt(e))return;let o=1,n=0;for(;Math.round(e*o)/o!==e;)o*=10,n++;return n}function vc(e,o){const n=o.x-e.x,r=o.y-e.y,a=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*Ue&&(s+=Ke),{angle:s,distance:a}}function fs(e,o){return Math.sqrt(Math.pow(o.x-e.x,2)+Math.pow(o.y-e.y,2))}function j0(e,o){return(e-o+O0)%Ke-Ue}function pt(e){return(e%Ke+Ke)%Ke}function On(e,o,n,r){const a=pt(e),s=pt(o),i=pt(n),l=pt(s-a),c=pt(i-a),d=pt(a-s),f=pt(a-i);return a===s||a===i||r&&s===i||l>c&&d<f}function at(e,o,n){return Math.max(o,Math.min(n,e))}function U0(e){return at(e,-32768,32767)}function eo(e,o,n,r=1e-6){return e>=Math.min(o,n)-r&&e<=Math.max(o,n)+r}function us(e,o,n){n=n||(i=>e[i]<o);let r=e.length-1,a=0,s;for(;r-a>1;)s=a+r>>1,n(s)?a=s:r=s;return{lo:a,hi:r}}const Mo=(e,o,n,r)=>us(e,n,r?a=>{const s=e[a][o];return s<n||s===n&&e[a+1][o]===n}:a=>e[a][o]<n),W0=(e,o,n)=>us(e,n,r=>e[r][o]>=n);function H0(e,o,n){let r=0,a=e.length;for(;r<a&&e[r]<o;)r++;for(;a>r&&e[a-1]>n;)a--;return r>0||a<e.length?e.slice(r,a):e}const Dc=["push","pop","shift","splice","unshift"];function q0(e,o){if(e._chartjs){e._chartjs.listeners.push(o);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[o]}}),Dc.forEach(n=>{const r="_onData"+ds(n),a=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const i=a.apply(this,s);return e._chartjs.listeners.forEach(l=>{typeof l[r]=="function"&&l[r](...s)}),i}})})}function Nc(e,o){const n=e._chartjs;if(!n)return;const r=n.listeners,a=r.indexOf(o);a!==-1&&r.splice(a,1),!(r.length>0)&&(Dc.forEach(s=>{delete e[s]}),delete e._chartjs)}function Vc(e){const o=new Set(e);return o.size===e.length?e:Array.from(o)}const Mc=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function Tc(e,o){let n=[],r=!1;return function(...a){n=a,r||(r=!0,Mc.call(window,()=>{r=!1,e.apply(o,n)}))}}function G0(e,o){let n;return function(...r){return o?(clearTimeout(n),n=setTimeout(e,o,r)):e.apply(this,r),o}}const hs=e=>e==="start"?"left":e==="end"?"right":"center",st=(e,o,n)=>e==="start"?o:e==="end"?n:(o+n)/2,K0=(e,o,n,r)=>e===(r?"left":"right")?n:e==="center"?(o+n)/2:o;function X0(e,o,n){const r=o.length;let a=0,s=r;if(e._sorted){const{iScale:i,vScale:l,_parsed:c}=e,d=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,f=i.axis,{min:u,max:h,minDefined:m,maxDefined:p}=i.getUserBounds();if(m){if(a=Math.min(Mo(c,f,u).lo,n?r:Mo(o,f,i.getPixelForValue(u)).lo),d){const y=c.slice(0,a+1).reverse().findIndex(b=>!$e(b[l.axis]));a-=Math.max(0,y)}a=at(a,0,r-1)}if(p){let y=Math.max(Mo(c,i.axis,h,!0).hi+1,n?0:Mo(o,f,i.getPixelForValue(h),!0).hi+1);if(d){const b=c.slice(y-1).findIndex(g=>!$e(g[l.axis]));y+=Math.max(0,b)}s=at(y,a,r)-a}else s=r-a}return{start:a,count:s}}function Y0(e){const{xScale:o,yScale:n,_scaleRanges:r}=e,a={xmin:o.min,xmax:o.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=a,!0;const s=r.xmin!==o.min||r.xmax!==o.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,a),s}const vr=e=>e===0||e===1,Pc=(e,o,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-o)*Ke/n)),Oc=(e,o,n)=>Math.pow(2,-10*e)*Math.sin((e-o)*Ke/n)+1,Ln={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*tt)+1,easeOutSine:e=>Math.sin(e*tt),easeInOutSine:e=>-.5*(Math.cos(Ue*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>vr(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>vr(e)?e:Pc(e,.075,.3),easeOutElastic:e=>vr(e)?e:Oc(e,.075,.3),easeInOutElastic(e){return vr(e)?e:e<.5?.5*Pc(e*2,.1125,.45):.5+.5*Oc(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let o=1.70158;return(e/=.5)<1?.5*(e*e*(((o*=1.525)+1)*e-o)):.5*((e-=2)*e*(((o*=1.525)+1)*e+o)+2)},easeInBounce:e=>1-Ln.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Ln.easeInBounce(e*2)*.5:Ln.easeOutBounce(e*2-1)*.5+.5};function ms(e){if(e&&typeof e=="object"){const o=e.toString();return o==="[object CanvasPattern]"||o==="[object CanvasGradient]"}return!1}function Lc(e){return ms(e)?e:new Dn(e)}function ps(e){return ms(e)?e:new Dn(e).saturate(.5).darken(.1).hexString()}const J0=["x","y","borderWidth","radius","tension"],Q0=["color","borderColor","backgroundColor"];function Z0(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:o=>o!=="onProgress"&&o!=="onComplete"&&o!=="fn"}),e.set("animations",{colors:{type:"color",properties:Q0},numbers:{type:"number",properties:J0}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:o=>o|0}}}})}function ey(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Rc=new Map;function ty(e,o){o=o||{};const n=e+JSON.stringify(o);let r=Rc.get(n);return r||(r=new Intl.NumberFormat(e,o),Rc.set(n,r)),r}function gs(e,o,n){return ty(o,n).format(e)}const oy={values(e){return Ze(e)?e:""+e},numeric(e,o,n){if(e===0)return"0";const r=this.chart.options.locale;let a,s=e;if(n.length>1){const d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(a="scientific"),s=ny(e,n)}const i=Bc(Math.abs(s)),l=isNaN(i)?1:Math.max(Math.min(-1*Math.floor(i),20),0),c={notation:a,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),gs(e,r,c)}};function ny(e,o){let n=o.length>3?o[2].value-o[1].value:o[1].value-o[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Ic={formatters:oy};function ry(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(o,n)=>n.lineWidth,tickColor:(o,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ic.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:o=>!o.startsWith("before")&&!o.startsWith("after")&&o!=="callback"&&o!=="parser",_indexable:o=>o!=="borderDash"&&o!=="tickBorderDash"&&o!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:o=>o!=="backdropPadding"&&o!=="callback",_indexable:o=>o!=="backdropPadding"})}const To=Object.create(null),bs=Object.create(null);function Rn(e,o){if(!o)return e;const n=o.split(".");for(let r=0,a=n.length;r<a;++r){const s=n[r];e=e[s]||(e[s]=Object.create(null))}return e}function ys(e,o,n){return typeof o=="string"?Nn(Rn(e,o),n):Nn(Rn(e,""),o)}class ay{constructor(o,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,a)=>ps(a.backgroundColor),this.hoverBorderColor=(r,a)=>ps(a.borderColor),this.hoverColor=(r,a)=>ps(a.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(o),this.apply(n)}set(o,n){return ys(this,o,n)}get(o){return Rn(this,o)}describe(o,n){return ys(bs,o,n)}override(o,n){return ys(To,o,n)}route(o,n,r,a){const s=Rn(this,o),i=Rn(this,r),l="_"+n;Object.defineProperties(s,{[l]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[l],d=i[a];return Me(c)?Object.assign({},d,c):Se(c,d)},set(c){this[l]=c}}})}apply(o){o.forEach(n=>n(this))}}var Je=new ay({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Z0,ey,ry]);function sy(e){return!e||$e(e.size)||$e(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Fc(e,o,n,r,a){let s=o[a];return s||(s=o[a]=e.measureText(a).width,n.push(a)),s>r&&(r=s),r}function Po(e,o,n){const r=e.currentDevicePixelRatio,a=n!==0?Math.max(n/2,.5):0;return Math.round((o-a)*r)/r+a}function zc(e,o){!o&&!e||(o=o||e.getContext("2d"),o.save(),o.resetTransform(),o.clearRect(0,0,e.width,e.height),o.restore())}function xs(e,o,n,r){$c(e,o,n,r,null)}function $c(e,o,n,r,a){let s,i,l,c,d,f,u,h;const m=o.pointStyle,p=o.rotation,y=o.radius;let b=(p||0)*L0;if(m&&typeof m=="object"&&(s=m.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(b),e.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),e.restore();return}if(!(isNaN(y)||y<=0)){switch(e.beginPath(),m){default:a?e.ellipse(n,r,a/2,y,0,0,Ke):e.arc(n,r,y,0,Ke),e.closePath();break;case"triangle":f=a?a/2:y,e.moveTo(n+Math.sin(b)*f,r-Math.cos(b)*y),b+=Ec,e.lineTo(n+Math.sin(b)*f,r-Math.cos(b)*y),b+=Ec,e.lineTo(n+Math.sin(b)*f,r-Math.cos(b)*y),e.closePath();break;case"rectRounded":d=y*.516,c=y-d,i=Math.cos(b+Vo)*c,u=Math.cos(b+Vo)*(a?a/2-d:c),l=Math.sin(b+Vo)*c,h=Math.sin(b+Vo)*(a?a/2-d:c),e.arc(n-u,r-l,d,b-Ue,b-tt),e.arc(n+h,r-i,d,b-tt,b),e.arc(n+u,r+l,d,b,b+tt),e.arc(n-h,r+i,d,b+tt,b+Ue),e.closePath();break;case"rect":if(!p){c=Math.SQRT1_2*y,f=a?a/2:c,e.rect(n-f,r-c,2*f,2*c);break}b+=Vo;case"rectRot":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+h,r-i),e.lineTo(n+u,r+l),e.lineTo(n-h,r+i),e.closePath();break;case"crossRot":b+=Vo;case"cross":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+u,r+l),e.moveTo(n+h,r-i),e.lineTo(n-h,r+i);break;case"star":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+u,r+l),e.moveTo(n+h,r-i),e.lineTo(n-h,r+i),b+=Vo,u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+u,r+l),e.moveTo(n+h,r-i),e.lineTo(n-h,r+i);break;case"line":i=a?a/2:Math.cos(b)*y,l=Math.sin(b)*y,e.moveTo(n-i,r-l),e.lineTo(n+i,r+l);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(b)*(a?a/2:y),r+Math.sin(b)*y);break;case!1:e.closePath();break}e.fill(),o.borderWidth>0&&e.stroke()}}function In(e,o,n){return n=n||.5,!o||e&&e.x>o.left-n&&e.x<o.right+n&&e.y>o.top-n&&e.y<o.bottom+n}function Dr(e,o){e.save(),e.beginPath(),e.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),e.clip()}function Nr(e){e.restore()}function iy(e,o,n,r,a){if(!o)return e.lineTo(n.x,n.y);if(a==="middle"){const s=(o.x+n.x)/2;e.lineTo(s,o.y),e.lineTo(s,n.y)}else a==="after"!=!!r?e.lineTo(o.x,n.y):e.lineTo(n.x,o.y);e.lineTo(n.x,n.y)}function ly(e,o,n,r){if(!o)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?o.cp1x:o.cp2x,r?o.cp1y:o.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function cy(e,o){o.translation&&e.translate(o.translation[0],o.translation[1]),$e(o.rotation)||e.rotate(o.rotation),o.color&&(e.fillStyle=o.color),o.textAlign&&(e.textAlign=o.textAlign),o.textBaseline&&(e.textBaseline=o.textBaseline)}function dy(e,o,n,r,a){if(a.strikethrough||a.underline){const s=e.measureText(r),i=o-s.actualBoundingBoxLeft,l=o+s.actualBoundingBoxRight,c=n-s.actualBoundingBoxAscent,d=n+s.actualBoundingBoxDescent,f=a.strikethrough?(c+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=a.decorationWidth||2,e.moveTo(i,f),e.lineTo(l,f),e.stroke()}}function fy(e,o){const n=e.fillStyle;e.fillStyle=o.color,e.fillRect(o.left,o.top,o.width,o.height),e.fillStyle=n}function Fn(e,o,n,r,a,s={}){const i=Ze(o)?o:[o],l=s.strokeWidth>0&&s.strokeColor!=="";let c,d;for(e.save(),e.font=a.string,cy(e,s),c=0;c<i.length;++c)d=i[c],s.backdrop&&fy(e,s.backdrop),l&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),$e(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(d,n,r,s.maxWidth)),e.fillText(d,n,r,s.maxWidth),dy(e,n,r,d,s),r+=Number(a.lineHeight);e.restore()}function Vr(e,o){const{x:n,y:r,w:a,h:s,radius:i}=o;e.arc(n+i.topLeft,r+i.topLeft,i.topLeft,1.5*Ue,Ue,!0),e.lineTo(n,r+s-i.bottomLeft),e.arc(n+i.bottomLeft,r+s-i.bottomLeft,i.bottomLeft,Ue,tt,!0),e.lineTo(n+a-i.bottomRight,r+s),e.arc(n+a-i.bottomRight,r+s-i.bottomRight,i.bottomRight,tt,0,!0),e.lineTo(n+a,r+i.topRight),e.arc(n+a-i.topRight,r+i.topRight,i.topRight,0,-tt,!0),e.lineTo(n+i.topLeft,r)}const uy=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,hy=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function my(e,o){const n=(""+e).match(uy);if(!n||n[1]==="normal")return o*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return o*e}const py=e=>+e||0;function ks(e,o){const n={},r=Me(o),a=r?Object.keys(o):o,s=Me(e)?r?i=>Se(e[i],e[o[i]]):i=>e[i]:()=>e;for(const i of a)n[i]=py(s(i));return n}function jc(e){return ks(e,{top:"y",right:"x",bottom:"y",left:"x"})}function en(e){return ks(e,["topLeft","topRight","bottomLeft","bottomRight"])}function _t(e){const o=jc(e);return o.width=o.left+o.right,o.height=o.top+o.bottom,o}function it(e,o){e=e||{},o=o||Je.font;let n=Se(e.size,o.size);typeof n=="string"&&(n=parseInt(n,10));let r=Se(e.style,o.style);r&&!(""+r).match(hy)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const a={family:Se(e.family,o.family),lineHeight:my(Se(e.lineHeight,o.lineHeight),n),size:n,style:r,weight:Se(e.weight,o.weight),string:""};return a.string=sy(a),a}function Mr(e,o,n,r){let a,s,i;for(a=0,s=e.length;a<s;++a)if(i=e[a],i!==void 0&&i!==void 0)return i}function gy(e,o,n){const{min:r,max:a}=e,s=kc(o,(a-r)/2),i=(l,c)=>n&&l===0?0:l+c;return{min:i(r,-Math.abs(s)),max:i(a,s)}}function Oo(e,o){return Object.assign(Object.create(e),o)}function ws(e,o=[""],n,r,a=()=>e[0]){const s=n||e;typeof r>"u"&&(r=Gc("_fallback",e));const i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:a,override:l=>ws([l,...e],o,s,r)};return new Proxy(i,{deleteProperty(l,c){return delete l[c],delete l._keys,delete e[0][c],!0},get(l,c){return Wc(l,c,()=>Ey(c,o,e,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(l,c){return Kc(l).includes(c)},ownKeys(l){return Kc(l)},set(l,c,d){const f=l._storage||(l._storage=a());return l[c]=f[c]=d,delete l._keys,!0}})}function tn(e,o,n,r){const a={_cacheable:!1,_proxy:e,_context:o,_subProxy:n,_stack:new Set,_descriptors:Uc(e,r),setContext:s=>tn(e,s,n,r),override:s=>tn(e.override(s),o,n,r)};return new Proxy(a,{deleteProperty(s,i){return delete s[i],delete e[i],!0},get(s,i,l){return Wc(s,i,()=>yy(s,i,l))},getOwnPropertyDescriptor(s,i){return s._descriptors.allKeys?Reflect.has(e,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,i)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,i){return Reflect.has(e,i)},ownKeys(){return Reflect.ownKeys(e)},set(s,i,l){return e[i]=l,delete s[i],!0}})}function Uc(e,o={scriptable:!0,indexable:!0}){const{_scriptable:n=o.scriptable,_indexable:r=o.indexable,_allKeys:a=o.allKeys}=e;return{allKeys:a,scriptable:n,indexable:r,isScriptable:go(n)?n:()=>n,isIndexable:go(r)?r:()=>r}}const by=(e,o)=>e?e+ds(o):o,Cs=(e,o)=>Me(o)&&e!=="adapters"&&(Object.getPrototypeOf(o)===null||o.constructor===Object);function Wc(e,o,n){if(Object.prototype.hasOwnProperty.call(e,o)||o==="constructor")return e[o];const r=n();return e[o]=r,r}function yy(e,o,n){const{_proxy:r,_context:a,_subProxy:s,_descriptors:i}=e;let l=r[o];return go(l)&&i.isScriptable(o)&&(l=xy(o,l,e,n)),Ze(l)&&l.length&&(l=ky(o,l,e,i.isIndexable)),Cs(o,l)&&(l=tn(l,a,s&&s[o],i)),l}function xy(e,o,n,r){const{_proxy:a,_context:s,_subProxy:i,_stack:l}=n;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let c=o(s,i||r);return l.delete(e),Cs(e,c)&&(c=_s(a._scopes,a,e,c)),c}function ky(e,o,n,r){const{_proxy:a,_context:s,_subProxy:i,_descriptors:l}=n;if(typeof s.index<"u"&&r(e))return o[s.index%o.length];if(Me(o[0])){const c=o,d=a._scopes.filter(f=>f!==c);o=[];for(const f of c){const u=_s(d,a,e,f);o.push(tn(u,s,i&&i[e],l))}}return o}function Hc(e,o,n){return go(e)?e(o,n):e}const wy=(e,o)=>e===!0?o:typeof e=="string"?No(o,e):void 0;function Cy(e,o,n,r,a){for(const s of o){const i=wy(n,s);if(i){e.add(i);const l=Hc(i._fallback,n,a);if(typeof l<"u"&&l!==n&&l!==r)return l}else if(i===!1&&typeof r<"u"&&n!==r)return null}return!1}function _s(e,o,n,r){const a=o._rootScopes,s=Hc(o._fallback,n,r),i=[...e,...a],l=new Set;l.add(r);let c=qc(l,i,n,s||n,r);return c===null||typeof s<"u"&&s!==n&&(c=qc(l,i,s,c,r),c===null)?!1:ws(Array.from(l),[""],a,s,()=>_y(o,n,r))}function qc(e,o,n,r,a){for(;n;)n=Cy(e,o,n,r,a);return n}function _y(e,o,n){const r=e._getTarget();o in r||(r[o]={});const a=r[o];return Ze(a)&&Me(n)?n:a||{}}function Ey(e,o,n,r){let a;for(const s of o)if(a=Gc(by(s,e),n),typeof a<"u")return Cs(e,a)?_s(n,r,e,a):a}function Gc(e,o){for(const n of o){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function Kc(e){let o=e._keys;return o||(o=e._keys=By(e._scopes)),o}function By(e){const o=new Set;for(const n of e)for(const r of Object.keys(n).filter(a=>!a.startsWith("_")))o.add(r);return Array.from(o)}const Sy=Number.EPSILON||1e-14,on=(e,o)=>o<e.length&&!e[o].skip&&e[o],Xc=e=>e==="x"?"y":"x";function Ay(e,o,n,r){const a=e.skip?o:e,s=o,i=n.skip?o:n,l=fs(s,a),c=fs(i,s);let d=l/(l+c),f=c/(l+c);d=isNaN(d)?0:d,f=isNaN(f)?0:f;const u=r*d,h=r*f;return{previous:{x:s.x-u*(i.x-a.x),y:s.y-u*(i.y-a.y)},next:{x:s.x+h*(i.x-a.x),y:s.y+h*(i.y-a.y)}}}function vy(e,o,n){const r=e.length;let a,s,i,l,c,d=on(e,0);for(let f=0;f<r-1;++f)if(c=d,d=on(e,f+1),!(!c||!d)){if(Tn(o[f],0,Sy)){n[f]=n[f+1]=0;continue}a=n[f]/o[f],s=n[f+1]/o[f],l=Math.pow(a,2)+Math.pow(s,2),!(l<=9)&&(i=3/Math.sqrt(l),n[f]=a*i*o[f],n[f+1]=s*i*o[f])}}function Dy(e,o,n="x"){const r=Xc(n),a=e.length;let s,i,l,c=on(e,0);for(let d=0;d<a;++d){if(i=l,l=c,c=on(e,d+1),!l)continue;const f=l[n],u=l[r];i&&(s=(f-i[n])/3,l[`cp1${n}`]=f-s,l[`cp1${r}`]=u-s*o[d]),c&&(s=(c[n]-f)/3,l[`cp2${n}`]=f+s,l[`cp2${r}`]=u+s*o[d])}}function Ny(e,o="x"){const n=Xc(o),r=e.length,a=Array(r).fill(0),s=Array(r);let i,l,c,d=on(e,0);for(i=0;i<r;++i)if(l=c,c=d,d=on(e,i+1),!!c){if(d){const f=d[o]-c[o];a[i]=f!==0?(d[n]-c[n])/f:0}s[i]=l?d?It(a[i-1])!==It(a[i])?0:(a[i-1]+a[i])/2:a[i-1]:a[i]}vy(e,a,s),Dy(e,s,o)}function Tr(e,o,n){return Math.max(Math.min(e,n),o)}function Vy(e,o){let n,r,a,s,i,l=In(e[0],o);for(n=0,r=e.length;n<r;++n)i=s,s=l,l=n<r-1&&In(e[n+1],o),s&&(a=e[n],i&&(a.cp1x=Tr(a.cp1x,o.left,o.right),a.cp1y=Tr(a.cp1y,o.top,o.bottom)),l&&(a.cp2x=Tr(a.cp2x,o.left,o.right),a.cp2y=Tr(a.cp2y,o.top,o.bottom)))}function My(e,o,n,r,a){let s,i,l,c;if(o.spanGaps&&(e=e.filter(d=>!d.skip)),o.cubicInterpolationMode==="monotone")Ny(e,a);else{let d=r?e[e.length-1]:e[0];for(s=0,i=e.length;s<i;++s)l=e[s],c=Ay(d,l,e[Math.min(s+1,i-(r?0:1))%i],o.tension),l.cp1x=c.previous.x,l.cp1y=c.previous.y,l.cp2x=c.next.x,l.cp2y=c.next.y,d=l}o.capBezierPoints&&Vy(e,n)}function Es(){return typeof window<"u"&&typeof document<"u"}function Bs(e){let o=e.parentNode;return o&&o.toString()==="[object ShadowRoot]"&&(o=o.host),o}function Pr(e,o,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*o.parentNode[n])):r=e,r}const Or=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Ty(e,o){return Or(e).getPropertyValue(o)}const Py=["top","right","bottom","left"];function Lo(e,o,n){const r={};n=n?"-"+n:"";for(let a=0;a<4;a++){const s=Py[a];r[s]=parseFloat(e[o+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Oy=(e,o,n)=>(e>0||o>0)&&(!n||!n.shadowRoot);function Ly(e,o){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:a,offsetY:s}=r;let i=!1,l,c;if(Oy(a,s,e.target))l=a,c=s;else{const d=o.getBoundingClientRect();l=r.clientX-d.left,c=r.clientY-d.top,i=!0}return{x:l,y:c,box:i}}function Ro(e,o){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=o,a=Or(n),s=a.boxSizing==="border-box",i=Lo(a,"padding"),l=Lo(a,"border","width"),{x:c,y:d,box:f}=Ly(e,n),u=i.left+(f&&l.left),h=i.top+(f&&l.top);let{width:m,height:p}=o;return s&&(m-=i.width+l.width,p-=i.height+l.height),{x:Math.round((c-u)/m*n.width/r),y:Math.round((d-h)/p*n.height/r)}}function Ry(e,o,n){let r,a;if(o===void 0||n===void 0){const s=e&&Bs(e);if(!s)o=e.clientWidth,n=e.clientHeight;else{const i=s.getBoundingClientRect(),l=Or(s),c=Lo(l,"border","width"),d=Lo(l,"padding");o=i.width-d.width-c.width,n=i.height-d.height-c.height,r=Pr(l.maxWidth,s,"clientWidth"),a=Pr(l.maxHeight,s,"clientHeight")}}return{width:o,height:n,maxWidth:r||Ar,maxHeight:a||Ar}}const bo=e=>Math.round(e*10)/10;function Iy(e,o,n,r){const a=Or(e),s=Lo(a,"margin"),i=Pr(a.maxWidth,e,"clientWidth")||Ar,l=Pr(a.maxHeight,e,"clientHeight")||Ar,c=Ry(e,o,n);let{width:d,height:f}=c;if(a.boxSizing==="content-box"){const h=Lo(a,"border","width"),m=Lo(a,"padding");d-=m.width+h.width,f-=m.height+h.height}return d=Math.max(0,d-s.width),f=Math.max(0,r?d/r:f-s.height),d=bo(Math.min(d,i,c.maxWidth)),f=bo(Math.min(f,l,c.maxHeight)),d&&!f&&(f=bo(d/2)),(o!==void 0||n!==void 0)&&r&&c.height&&f>c.height&&(f=c.height,d=bo(Math.floor(f*r))),{width:d,height:f}}function Yc(e,o,n){const r=o||1,a=bo(e.height*r),s=bo(e.width*r);e.height=bo(e.height),e.width=bo(e.width);const i=e.canvas;return i.style&&(n||!i.style.height&&!i.style.width)&&(i.style.height=`${e.height}px`,i.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||i.height!==a||i.width!==s?(e.currentDevicePixelRatio=r,i.height=a,i.width=s,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const Fy=(function(){let e=!1;try{const o={get passive(){return e=!0,!1}};Es()&&(window.addEventListener("test",null,o),window.removeEventListener("test",null,o))}catch{}return e})();function Jc(e,o){const n=Ty(e,o),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Io(e,o,n,r){return{x:e.x+n*(o.x-e.x),y:e.y+n*(o.y-e.y)}}function zy(e,o,n,r){return{x:e.x+n*(o.x-e.x),y:r==="middle"?n<.5?e.y:o.y:r==="after"?n<1?e.y:o.y:n>0?o.y:e.y}}function $y(e,o,n,r){const a={x:e.cp2x,y:e.cp2y},s={x:o.cp1x,y:o.cp1y},i=Io(e,a,n),l=Io(a,s,n),c=Io(s,o,n),d=Io(i,l,n),f=Io(l,c,n);return Io(d,f,n)}const jy=function(e,o){return{x(n){return e+e+o-n},setWidth(n){o=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},Uy=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,o){return e+o},leftForLtr(e,o){return e}}};function nn(e,o,n){return e?jy(o,n):Uy()}function Qc(e,o){let n,r;(o==="ltr"||o==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",o,"important"),e.prevTextDirection=r)}function Zc(e,o){o!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",o[0],o[1]))}function ed(e){return e==="angle"?{between:On,compare:j0,normalize:pt}:{between:eo,compare:(o,n)=>o-n,normalize:o=>o}}function td({start:e,end:o,count:n,loop:r,style:a}){return{start:e%n,end:o%n,loop:r&&(o-e+1)%n===0,style:a}}function Wy(e,o,n){const{property:r,start:a,end:s}=n,{between:i,normalize:l}=ed(r),c=o.length;let{start:d,end:f,loop:u}=e,h,m;if(u){for(d+=c,f+=c,h=0,m=c;h<m&&i(l(o[d%c][r]),a,s);++h)d--,f--;d%=c,f%=c}return f<d&&(f+=c),{start:d,end:f,loop:u,style:e.style}}function od(e,o,n){if(!n)return[e];const{property:r,start:a,end:s}=n,i=o.length,{compare:l,between:c,normalize:d}=ed(r),{start:f,end:u,loop:h,style:m}=Wy(e,o,n),p=[];let y=!1,b=null,g,_,E;const B=()=>c(a,E,g)&&l(a,E)!==0,A=()=>l(s,g)===0||c(s,E,g),C=()=>y||B(),x=()=>!y||A();for(let w=f,D=f;w<=u;++w)_=o[w%i],!_.skip&&(g=d(_[r]),g!==E&&(y=c(g,a,s),b===null&&C()&&(b=l(g,a)===0?w:D),b!==null&&x()&&(p.push(td({start:b,end:w,loop:h,count:i,style:m})),b=null),D=w,E=g));return b!==null&&p.push(td({start:b,end:u,loop:h,count:i,style:m})),p}function nd(e,o){const n=[],r=e.segments;for(let a=0;a<r.length;a++){const s=od(r[a],e.points,o);s.length&&n.push(...s)}return n}function Hy(e,o,n,r){let a=0,s=o-1;if(n&&!r)for(;a<o&&!e[a].skip;)a++;for(;a<o&&e[a].skip;)a++;for(a%=o,n&&(s+=a);s>a&&e[s%o].skip;)s--;return s%=o,{start:a,end:s}}function qy(e,o,n,r){const a=e.length,s=[];let i=o,l=e[o],c;for(c=o+1;c<=n;++c){const d=e[c%a];d.skip||d.stop?l.skip||(r=!1,s.push({start:o%a,end:(c-1)%a,loop:r}),o=i=d.stop?c:null):(i=c,l.skip&&(o=c)),l=d}return i!==null&&s.push({start:o%a,end:i%a,loop:r}),s}function Gy(e,o){const n=e.points,r=e.options.spanGaps,a=n.length;if(!a)return[];const s=!!e._loop,{start:i,end:l}=Hy(n,a,s,r);if(r===!0)return rd(e,[{start:i,end:l,loop:s}],n,o);const c=l<i?l+a:l,d=!!e._fullLoop&&i===0&&l===a-1;return rd(e,qy(n,i,c,d),n,o)}function rd(e,o,n,r){return!r||!r.setContext||!n?o:Ky(e,o,n,r)}function Ky(e,o,n,r){const a=e._chart.getContext(),s=ad(e.options),{_datasetIndex:i,options:{spanGaps:l}}=e,c=n.length,d=[];let f=s,u=o[0].start,h=u;function m(p,y,b,g){const _=l?-1:1;if(p!==y){for(p+=c;n[p%c].skip;)p-=_;for(;n[y%c].skip;)y+=_;p%c!==y%c&&(d.push({start:p%c,end:y%c,loop:b,style:g}),f=g,u=y%c)}}for(const p of o){u=l?u:p.start;let y=n[u%c],b;for(h=u+1;h<=p.end;h++){const g=n[h%c];b=ad(r.setContext(Oo(a,{type:"segment",p0:y,p1:g,p0DataIndex:(h-1)%c,p1DataIndex:h%c,datasetIndex:i}))),Xy(b,f)&&m(u,h-1,p.loop,f),y=g,f=b}u<h-1&&m(u,h-1,p.loop,f)}return d}function ad(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Xy(e,o){if(!o)return!1;const n=[],r=function(a,s){return ms(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(o,r)}function Lr(e,o,n){return e.options.clip?e[n]:o[n]}function Yy(e,o){const{xScale:n,yScale:r}=e;return n&&r?{left:Lr(n,o,"left"),right:Lr(n,o,"right"),top:Lr(r,o,"top"),bottom:Lr(r,o,"bottom")}:o}function sd(e,o){const n=o._clip;if(n.disabled)return!1;const r=Yy(o,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
28
|
+
*/function Zt(){}const L0=(()=>{let t=0;return()=>t++})();function ze(t){return t==null}function Qe(t){if(Array.isArray&&Array.isArray(t))return!0;const o=Object.prototype.toString.call(t);return o.slice(0,7)==="[object"&&o.slice(-6)==="Array]"}function Te(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function rt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ft(t,o){return rt(t)?t:o}function Ae(t,o){return typeof t>"u"?o:t}const R0=(t,o)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/o,vc=(t,o)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*o:+t;function He(t,o,n){if(t&&typeof t.call=="function")return t.apply(n,o)}function $e(t,o,n,r){let a,s,i;if(Qe(t))for(s=t.length,a=0;a<s;a++)o.call(n,t[a],a);else if(Te(t))for(i=Object.keys(t),s=i.length,a=0;a<s;a++)o.call(n,t[i[a]],i[a])}function vr(t,o){let n,r,a,s;if(!t||!o||t.length!==o.length)return!1;for(n=0,r=t.length;n<r;++n)if(a=t[n],s=o[n],a.datasetIndex!==s.datasetIndex||a.index!==s.index)return!1;return!0}function Dr(t){if(Qe(t))return t.map(Dr);if(Te(t)){const o=Object.create(null),n=Object.keys(t),r=n.length;let a=0;for(;a<r;++a)o[n[a]]=Dr(t[n[a]]);return o}return t}function Dc(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function I0(t,o,n,r){if(!Dc(t))return;const a=o[t],s=n[t];Te(a)&&Te(s)?Mn(a,s,r):o[t]=Dr(s)}function Mn(t,o,n){const r=Qe(o)?o:[o],a=r.length;if(!Te(t))return t;n=n||{};const s=n.merger||I0;let i;for(let l=0;l<a;++l){if(i=r[l],!Te(i))continue;const c=Object.keys(i);for(let d=0,f=c.length;d<f;++d)s(c[d],t,i,n)}return t}function Tn(t,o){return Mn(t,o,{merger:F0})}function F0(t,o,n){if(!Dc(t))return;const r=o[t],a=n[t];Te(r)&&Te(a)?Tn(r,a):Object.prototype.hasOwnProperty.call(o,t)||(o[t]=Dr(a))}const Nc={"":t=>t,x:t=>t.x,y:t=>t.y};function z0(t){const o=t.split("."),n=[];let r="";for(const a of o)r+=a,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function $0(t){const o=z0(t);return n=>{for(const r of o){if(r==="")break;n=n&&n[r]}return n}}function Mo(t,o){return(Nc[o]||(Nc[o]=$0(o)))(t)}function hs(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Pn=t=>typeof t<"u",yo=t=>typeof t=="function",Vc=(t,o)=>{if(t.size!==o.size)return!1;for(const n of t)if(!o.has(n))return!1;return!0};function j0(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const je=Math.PI,Ge=2*je,U0=Ge+je,Nr=Number.POSITIVE_INFINITY,W0=je/180,et=je/2,To=je/4,Mc=je*2/3,Tc=Math.log10,zt=Math.sign;function On(t,o,n){return Math.abs(t-o)<n}function Pc(t){const o=Math.round(t);t=On(t,o,t/1e3)?o:t;const n=Math.pow(10,Math.floor(Tc(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function H0(t){const o=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(o.push(r),o.push(t/r));return n===(n|0)&&o.push(n),o.sort((a,s)=>a-s).pop(),o}function q0(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Ln(t){return!q0(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function G0(t,o){const n=Math.round(t);return n-o<=t&&n+o>=t}function K0(t,o,n){let r,a,s;for(r=0,a=t.length;r<a;r++)s=t[r][n],isNaN(s)||(o.min=Math.min(o.min,s),o.max=Math.max(o.max,s))}function eo(t){return t*(je/180)}function X0(t){return t*(180/je)}function Oc(t){if(!rt(t))return;let o=1,n=0;for(;Math.round(t*o)/o!==t;)o*=10,n++;return n}function Lc(t,o){const n=o.x-t.x,r=o.y-t.y,a=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*je&&(s+=Ge),{angle:s,distance:a}}function ms(t,o){return Math.sqrt(Math.pow(o.x-t.x,2)+Math.pow(o.y-t.y,2))}function Y0(t,o){return(t-o+U0)%Ge-je}function bt(t){return(t%Ge+Ge)%Ge}function Rn(t,o,n,r){const a=bt(t),s=bt(o),i=bt(n),l=bt(s-a),c=bt(i-a),d=bt(a-s),f=bt(a-i);return a===s||a===i||r&&s===i||l>c&&d<f}function at(t,o,n){return Math.max(o,Math.min(n,t))}function J0(t){return at(t,-32768,32767)}function to(t,o,n,r=1e-6){return t>=Math.min(o,n)-r&&t<=Math.max(o,n)+r}function ps(t,o,n){n=n||(i=>t[i]<o);let r=t.length-1,a=0,s;for(;r-a>1;)s=a+r>>1,n(s)?a=s:r=s;return{lo:a,hi:r}}const Po=(t,o,n,r)=>ps(t,n,r?a=>{const s=t[a][o];return s<n||s===n&&t[a+1][o]===n}:a=>t[a][o]<n),Q0=(t,o,n)=>ps(t,n,r=>t[r][o]>=n);function Z0(t,o,n){let r=0,a=t.length;for(;r<a&&t[r]<o;)r++;for(;a>r&&t[a-1]>n;)a--;return r>0||a<t.length?t.slice(r,a):t}const Rc=["push","pop","shift","splice","unshift"];function ey(t,o){if(t._chartjs){t._chartjs.listeners.push(o);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[o]}}),Rc.forEach(n=>{const r="_onData"+hs(n),a=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const i=a.apply(this,s);return t._chartjs.listeners.forEach(l=>{typeof l[r]=="function"&&l[r](...s)}),i}})})}function Ic(t,o){const n=t._chartjs;if(!n)return;const r=n.listeners,a=r.indexOf(o);a!==-1&&r.splice(a,1),!(r.length>0)&&(Rc.forEach(s=>{delete t[s]}),delete t._chartjs)}function Fc(t){const o=new Set(t);return o.size===t.length?t:Array.from(o)}const zc=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function $c(t,o){let n=[],r=!1;return function(...a){n=a,r||(r=!0,zc.call(window,()=>{r=!1,t.apply(o,n)}))}}function ty(t,o){let n;return function(...r){return o?(clearTimeout(n),n=setTimeout(t,o,r)):t.apply(this,r),o}}const gs=t=>t==="start"?"left":t==="end"?"right":"center",st=(t,o,n)=>t==="start"?o:t==="end"?n:(o+n)/2,oy=(t,o,n,r)=>t===(r?"left":"right")?n:t==="center"?(o+n)/2:o;function ny(t,o,n){const r=o.length;let a=0,s=r;if(t._sorted){const{iScale:i,vScale:l,_parsed:c}=t,d=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,f=i.axis,{min:u,max:h,minDefined:m,maxDefined:p}=i.getUserBounds();if(m){if(a=Math.min(Po(c,f,u).lo,n?r:Po(o,f,i.getPixelForValue(u)).lo),d){const y=c.slice(0,a+1).reverse().findIndex(b=>!ze(b[l.axis]));a-=Math.max(0,y)}a=at(a,0,r-1)}if(p){let y=Math.max(Po(c,i.axis,h,!0).hi+1,n?0:Po(o,f,i.getPixelForValue(h),!0).hi+1);if(d){const b=c.slice(y-1).findIndex(g=>!ze(g[l.axis]));y+=Math.max(0,b)}s=at(y,a,r)-a}else s=r-a}return{start:a,count:s}}function ry(t){const{xScale:o,yScale:n,_scaleRanges:r}=t,a={xmin:o.min,xmax:o.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=a,!0;const s=r.xmin!==o.min||r.xmax!==o.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,a),s}const Vr=t=>t===0||t===1,jc=(t,o,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-o)*Ge/n)),Uc=(t,o,n)=>Math.pow(2,-10*t)*Math.sin((t-o)*Ge/n)+1,In={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*et)+1,easeOutSine:t=>Math.sin(t*et),easeInOutSine:t=>-.5*(Math.cos(je*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Vr(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Vr(t)?t:jc(t,.075,.3),easeOutElastic:t=>Vr(t)?t:Uc(t,.075,.3),easeInOutElastic(t){return Vr(t)?t:t<.5?.5*jc(t*2,.1125,.45):.5+.5*Uc(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let o=1.70158;return(t/=.5)<1?.5*(t*t*(((o*=1.525)+1)*t-o)):.5*((t-=2)*t*(((o*=1.525)+1)*t+o)+2)},easeInBounce:t=>1-In.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?In.easeInBounce(t*2)*.5:In.easeOutBounce(t*2-1)*.5+.5};function bs(t){if(t&&typeof t=="object"){const o=t.toString();return o==="[object CanvasPattern]"||o==="[object CanvasGradient]"}return!1}function Wc(t){return bs(t)?t:new Vn(t)}function ys(t){return bs(t)?t:new Vn(t).saturate(.5).darken(.1).hexString()}const ay=["x","y","borderWidth","radius","tension"],sy=["color","borderColor","backgroundColor"];function iy(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:o=>o!=="onProgress"&&o!=="onComplete"&&o!=="fn"}),t.set("animations",{colors:{type:"color",properties:sy},numbers:{type:"number",properties:ay}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:o=>o|0}}}})}function ly(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Hc=new Map;function cy(t,o){o=o||{};const n=t+JSON.stringify(o);let r=Hc.get(n);return r||(r=new Intl.NumberFormat(t,o),Hc.set(n,r)),r}function xs(t,o,n){return cy(o,n).format(t)}const dy={values(t){return Qe(t)?t:""+t},numeric(t,o,n){if(t===0)return"0";const r=this.chart.options.locale;let a,s=t;if(n.length>1){const d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(a="scientific"),s=fy(t,n)}const i=Tc(Math.abs(s)),l=isNaN(i)?1:Math.max(Math.min(-1*Math.floor(i),20),0),c={notation:a,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),xs(t,r,c)}};function fy(t,o){let n=o.length>3?o[2].value-o[1].value:o[1].value-o[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var qc={formatters:dy};function uy(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(o,n)=>n.lineWidth,tickColor:(o,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:qc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:o=>!o.startsWith("before")&&!o.startsWith("after")&&o!=="callback"&&o!=="parser",_indexable:o=>o!=="borderDash"&&o!=="tickBorderDash"&&o!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:o=>o!=="backdropPadding"&&o!=="callback",_indexable:o=>o!=="backdropPadding"})}const Oo=Object.create(null),ks=Object.create(null);function Fn(t,o){if(!o)return t;const n=o.split(".");for(let r=0,a=n.length;r<a;++r){const s=n[r];t=t[s]||(t[s]=Object.create(null))}return t}function ws(t,o,n){return typeof o=="string"?Mn(Fn(t,o),n):Mn(Fn(t,""),o)}class hy{constructor(o,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,a)=>ys(a.backgroundColor),this.hoverBorderColor=(r,a)=>ys(a.borderColor),this.hoverColor=(r,a)=>ys(a.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(o),this.apply(n)}set(o,n){return ws(this,o,n)}get(o){return Fn(this,o)}describe(o,n){return ws(ks,o,n)}override(o,n){return ws(Oo,o,n)}route(o,n,r,a){const s=Fn(this,o),i=Fn(this,r),l="_"+n;Object.defineProperties(s,{[l]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[l],d=i[a];return Te(c)?Object.assign({},d,c):Ae(c,d)},set(c){this[l]=c}}})}apply(o){o.forEach(n=>n(this))}}var Je=new hy({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[iy,ly,uy]);function my(t){return!t||ze(t.size)||ze(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Gc(t,o,n,r,a){let s=o[a];return s||(s=o[a]=t.measureText(a).width,n.push(a)),s>r&&(r=s),r}function Lo(t,o,n){const r=t.currentDevicePixelRatio,a=n!==0?Math.max(n/2,.5):0;return Math.round((o-a)*r)/r+a}function Kc(t,o){!o&&!t||(o=o||t.getContext("2d"),o.save(),o.resetTransform(),o.clearRect(0,0,t.width,t.height),o.restore())}function Cs(t,o,n,r){Xc(t,o,n,r,null)}function Xc(t,o,n,r,a){let s,i,l,c,d,f,u,h;const m=o.pointStyle,p=o.rotation,y=o.radius;let b=(p||0)*W0;if(m&&typeof m=="object"&&(s=m.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(b),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(y)||y<=0)){switch(t.beginPath(),m){default:a?t.ellipse(n,r,a/2,y,0,0,Ge):t.arc(n,r,y,0,Ge),t.closePath();break;case"triangle":f=a?a/2:y,t.moveTo(n+Math.sin(b)*f,r-Math.cos(b)*y),b+=Mc,t.lineTo(n+Math.sin(b)*f,r-Math.cos(b)*y),b+=Mc,t.lineTo(n+Math.sin(b)*f,r-Math.cos(b)*y),t.closePath();break;case"rectRounded":d=y*.516,c=y-d,i=Math.cos(b+To)*c,u=Math.cos(b+To)*(a?a/2-d:c),l=Math.sin(b+To)*c,h=Math.sin(b+To)*(a?a/2-d:c),t.arc(n-u,r-l,d,b-je,b-et),t.arc(n+h,r-i,d,b-et,b),t.arc(n+u,r+l,d,b,b+et),t.arc(n-h,r+i,d,b+et,b+je),t.closePath();break;case"rect":if(!p){c=Math.SQRT1_2*y,f=a?a/2:c,t.rect(n-f,r-c,2*f,2*c);break}b+=To;case"rectRot":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),t.moveTo(n-u,r-l),t.lineTo(n+h,r-i),t.lineTo(n+u,r+l),t.lineTo(n-h,r+i),t.closePath();break;case"crossRot":b+=To;case"cross":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),t.moveTo(n-u,r-l),t.lineTo(n+u,r+l),t.moveTo(n+h,r-i),t.lineTo(n-h,r+i);break;case"star":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),t.moveTo(n-u,r-l),t.lineTo(n+u,r+l),t.moveTo(n+h,r-i),t.lineTo(n-h,r+i),b+=To,u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),t.moveTo(n-u,r-l),t.lineTo(n+u,r+l),t.moveTo(n+h,r-i),t.lineTo(n-h,r+i);break;case"line":i=a?a/2:Math.cos(b)*y,l=Math.sin(b)*y,t.moveTo(n-i,r-l),t.lineTo(n+i,r+l);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(b)*(a?a/2:y),r+Math.sin(b)*y);break;case!1:t.closePath();break}t.fill(),o.borderWidth>0&&t.stroke()}}function zn(t,o,n){return n=n||.5,!o||t&&t.x>o.left-n&&t.x<o.right+n&&t.y>o.top-n&&t.y<o.bottom+n}function Mr(t,o){t.save(),t.beginPath(),t.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),t.clip()}function Tr(t){t.restore()}function py(t,o,n,r,a){if(!o)return t.lineTo(n.x,n.y);if(a==="middle"){const s=(o.x+n.x)/2;t.lineTo(s,o.y),t.lineTo(s,n.y)}else a==="after"!=!!r?t.lineTo(o.x,n.y):t.lineTo(n.x,o.y);t.lineTo(n.x,n.y)}function gy(t,o,n,r){if(!o)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?o.cp1x:o.cp2x,r?o.cp1y:o.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function by(t,o){o.translation&&t.translate(o.translation[0],o.translation[1]),ze(o.rotation)||t.rotate(o.rotation),o.color&&(t.fillStyle=o.color),o.textAlign&&(t.textAlign=o.textAlign),o.textBaseline&&(t.textBaseline=o.textBaseline)}function yy(t,o,n,r,a){if(a.strikethrough||a.underline){const s=t.measureText(r),i=o-s.actualBoundingBoxLeft,l=o+s.actualBoundingBoxRight,c=n-s.actualBoundingBoxAscent,d=n+s.actualBoundingBoxDescent,f=a.strikethrough?(c+d)/2:d;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=a.decorationWidth||2,t.moveTo(i,f),t.lineTo(l,f),t.stroke()}}function xy(t,o){const n=t.fillStyle;t.fillStyle=o.color,t.fillRect(o.left,o.top,o.width,o.height),t.fillStyle=n}function $n(t,o,n,r,a,s={}){const i=Qe(o)?o:[o],l=s.strokeWidth>0&&s.strokeColor!=="";let c,d;for(t.save(),t.font=a.string,by(t,s),c=0;c<i.length;++c)d=i[c],s.backdrop&&xy(t,s.backdrop),l&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),ze(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(d,n,r,s.maxWidth)),t.fillText(d,n,r,s.maxWidth),yy(t,n,r,d,s),r+=Number(a.lineHeight);t.restore()}function Pr(t,o){const{x:n,y:r,w:a,h:s,radius:i}=o;t.arc(n+i.topLeft,r+i.topLeft,i.topLeft,1.5*je,je,!0),t.lineTo(n,r+s-i.bottomLeft),t.arc(n+i.bottomLeft,r+s-i.bottomLeft,i.bottomLeft,je,et,!0),t.lineTo(n+a-i.bottomRight,r+s),t.arc(n+a-i.bottomRight,r+s-i.bottomRight,i.bottomRight,et,0,!0),t.lineTo(n+a,r+i.topRight),t.arc(n+a-i.topRight,r+i.topRight,i.topRight,0,-et,!0),t.lineTo(n+i.topLeft,r)}const ky=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,wy=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Cy(t,o){const n=(""+t).match(ky);if(!n||n[1]==="normal")return o*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return o*t}const _y=t=>+t||0;function _s(t,o){const n={},r=Te(o),a=r?Object.keys(o):o,s=Te(t)?r?i=>Ae(t[i],t[o[i]]):i=>t[i]:()=>t;for(const i of a)n[i]=_y(s(i));return n}function Yc(t){return _s(t,{top:"y",right:"x",bottom:"y",left:"x"})}function nn(t){return _s(t,["topLeft","topRight","bottomLeft","bottomRight"])}function St(t){const o=Yc(t);return o.width=o.left+o.right,o.height=o.top+o.bottom,o}function it(t,o){t=t||{},o=o||Je.font;let n=Ae(t.size,o.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ae(t.style,o.style);r&&!(""+r).match(wy)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const a={family:Ae(t.family,o.family),lineHeight:Cy(Ae(t.lineHeight,o.lineHeight),n),size:n,style:r,weight:Ae(t.weight,o.weight),string:""};return a.string=my(a),a}function Or(t,o,n,r){let a,s,i;for(a=0,s=t.length;a<s;++a)if(i=t[a],i!==void 0&&i!==void 0)return i}function Ey(t,o,n){const{min:r,max:a}=t,s=vc(o,(a-r)/2),i=(l,c)=>n&&l===0?0:l+c;return{min:i(r,-Math.abs(s)),max:i(a,s)}}function Ro(t,o){return Object.assign(Object.create(t),o)}function Es(t,o=[""],n,r,a=()=>t[0]){const s=n||t;typeof r>"u"&&(r=td("_fallback",t));const i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:r,_getTarget:a,override:l=>Es([l,...t],o,s,r)};return new Proxy(i,{deleteProperty(l,c){return delete l[c],delete l._keys,delete t[0][c],!0},get(l,c){return Qc(l,c,()=>My(c,o,t,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(l,c){return od(l).includes(c)},ownKeys(l){return od(l)},set(l,c,d){const f=l._storage||(l._storage=a());return l[c]=f[c]=d,delete l._keys,!0}})}function rn(t,o,n,r){const a={_cacheable:!1,_proxy:t,_context:o,_subProxy:n,_stack:new Set,_descriptors:Jc(t,r),setContext:s=>rn(t,s,n,r),override:s=>rn(t.override(s),o,n,r)};return new Proxy(a,{deleteProperty(s,i){return delete s[i],delete t[i],!0},get(s,i,l){return Qc(s,i,()=>Sy(s,i,l))},getOwnPropertyDescriptor(s,i){return s._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,i){return Reflect.has(t,i)},ownKeys(){return Reflect.ownKeys(t)},set(s,i,l){return t[i]=l,delete s[i],!0}})}function Jc(t,o={scriptable:!0,indexable:!0}){const{_scriptable:n=o.scriptable,_indexable:r=o.indexable,_allKeys:a=o.allKeys}=t;return{allKeys:a,scriptable:n,indexable:r,isScriptable:yo(n)?n:()=>n,isIndexable:yo(r)?r:()=>r}}const By=(t,o)=>t?t+hs(o):o,Bs=(t,o)=>Te(o)&&t!=="adapters"&&(Object.getPrototypeOf(o)===null||o.constructor===Object);function Qc(t,o,n){if(Object.prototype.hasOwnProperty.call(t,o)||o==="constructor")return t[o];const r=n();return t[o]=r,r}function Sy(t,o,n){const{_proxy:r,_context:a,_subProxy:s,_descriptors:i}=t;let l=r[o];return yo(l)&&i.isScriptable(o)&&(l=Ay(o,l,t,n)),Qe(l)&&l.length&&(l=vy(o,l,t,i.isIndexable)),Bs(o,l)&&(l=rn(l,a,s&&s[o],i)),l}function Ay(t,o,n,r){const{_proxy:a,_context:s,_subProxy:i,_stack:l}=n;if(l.has(t))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+t);l.add(t);let c=o(s,i||r);return l.delete(t),Bs(t,c)&&(c=Ss(a._scopes,a,t,c)),c}function vy(t,o,n,r){const{_proxy:a,_context:s,_subProxy:i,_descriptors:l}=n;if(typeof s.index<"u"&&r(t))return o[s.index%o.length];if(Te(o[0])){const c=o,d=a._scopes.filter(f=>f!==c);o=[];for(const f of c){const u=Ss(d,a,t,f);o.push(rn(u,s,i&&i[t],l))}}return o}function Zc(t,o,n){return yo(t)?t(o,n):t}const Dy=(t,o)=>t===!0?o:typeof t=="string"?Mo(o,t):void 0;function Ny(t,o,n,r,a){for(const s of o){const i=Dy(n,s);if(i){t.add(i);const l=Zc(i._fallback,n,a);if(typeof l<"u"&&l!==n&&l!==r)return l}else if(i===!1&&typeof r<"u"&&n!==r)return null}return!1}function Ss(t,o,n,r){const a=o._rootScopes,s=Zc(o._fallback,n,r),i=[...t,...a],l=new Set;l.add(r);let c=ed(l,i,n,s||n,r);return c===null||typeof s<"u"&&s!==n&&(c=ed(l,i,s,c,r),c===null)?!1:Es(Array.from(l),[""],a,s,()=>Vy(o,n,r))}function ed(t,o,n,r,a){for(;n;)n=Ny(t,o,n,r,a);return n}function Vy(t,o,n){const r=t._getTarget();o in r||(r[o]={});const a=r[o];return Qe(a)&&Te(n)?n:a||{}}function My(t,o,n,r){let a;for(const s of o)if(a=td(By(s,t),n),typeof a<"u")return Bs(t,a)?Ss(n,r,t,a):a}function td(t,o){for(const n of o){if(!n)continue;const r=n[t];if(typeof r<"u")return r}}function od(t){let o=t._keys;return o||(o=t._keys=Ty(t._scopes)),o}function Ty(t){const o=new Set;for(const n of t)for(const r of Object.keys(n).filter(a=>!a.startsWith("_")))o.add(r);return Array.from(o)}const Py=Number.EPSILON||1e-14,an=(t,o)=>o<t.length&&!t[o].skip&&t[o],nd=t=>t==="x"?"y":"x";function Oy(t,o,n,r){const a=t.skip?o:t,s=o,i=n.skip?o:n,l=ms(s,a),c=ms(i,s);let d=l/(l+c),f=c/(l+c);d=isNaN(d)?0:d,f=isNaN(f)?0:f;const u=r*d,h=r*f;return{previous:{x:s.x-u*(i.x-a.x),y:s.y-u*(i.y-a.y)},next:{x:s.x+h*(i.x-a.x),y:s.y+h*(i.y-a.y)}}}function Ly(t,o,n){const r=t.length;let a,s,i,l,c,d=an(t,0);for(let f=0;f<r-1;++f)if(c=d,d=an(t,f+1),!(!c||!d)){if(On(o[f],0,Py)){n[f]=n[f+1]=0;continue}a=n[f]/o[f],s=n[f+1]/o[f],l=Math.pow(a,2)+Math.pow(s,2),!(l<=9)&&(i=3/Math.sqrt(l),n[f]=a*i*o[f],n[f+1]=s*i*o[f])}}function Ry(t,o,n="x"){const r=nd(n),a=t.length;let s,i,l,c=an(t,0);for(let d=0;d<a;++d){if(i=l,l=c,c=an(t,d+1),!l)continue;const f=l[n],u=l[r];i&&(s=(f-i[n])/3,l[`cp1${n}`]=f-s,l[`cp1${r}`]=u-s*o[d]),c&&(s=(c[n]-f)/3,l[`cp2${n}`]=f+s,l[`cp2${r}`]=u+s*o[d])}}function Iy(t,o="x"){const n=nd(o),r=t.length,a=Array(r).fill(0),s=Array(r);let i,l,c,d=an(t,0);for(i=0;i<r;++i)if(l=c,c=d,d=an(t,i+1),!!c){if(d){const f=d[o]-c[o];a[i]=f!==0?(d[n]-c[n])/f:0}s[i]=l?d?zt(a[i-1])!==zt(a[i])?0:(a[i-1]+a[i])/2:a[i-1]:a[i]}Ly(t,a,s),Ry(t,s,o)}function Lr(t,o,n){return Math.max(Math.min(t,n),o)}function Fy(t,o){let n,r,a,s,i,l=zn(t[0],o);for(n=0,r=t.length;n<r;++n)i=s,s=l,l=n<r-1&&zn(t[n+1],o),s&&(a=t[n],i&&(a.cp1x=Lr(a.cp1x,o.left,o.right),a.cp1y=Lr(a.cp1y,o.top,o.bottom)),l&&(a.cp2x=Lr(a.cp2x,o.left,o.right),a.cp2y=Lr(a.cp2y,o.top,o.bottom)))}function zy(t,o,n,r,a){let s,i,l,c;if(o.spanGaps&&(t=t.filter(d=>!d.skip)),o.cubicInterpolationMode==="monotone")Iy(t,a);else{let d=r?t[t.length-1]:t[0];for(s=0,i=t.length;s<i;++s)l=t[s],c=Oy(d,l,t[Math.min(s+1,i-(r?0:1))%i],o.tension),l.cp1x=c.previous.x,l.cp1y=c.previous.y,l.cp2x=c.next.x,l.cp2y=c.next.y,d=l}o.capBezierPoints&&Fy(t,n)}function As(){return typeof window<"u"&&typeof document<"u"}function vs(t){let o=t.parentNode;return o&&o.toString()==="[object ShadowRoot]"&&(o=o.host),o}function Rr(t,o,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*o.parentNode[n])):r=t,r}const Ir=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function $y(t,o){return Ir(t).getPropertyValue(o)}const jy=["top","right","bottom","left"];function Io(t,o,n){const r={};n=n?"-"+n:"";for(let a=0;a<4;a++){const s=jy[a];r[s]=parseFloat(t[o+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Uy=(t,o,n)=>(t>0||o>0)&&(!n||!n.shadowRoot);function Wy(t,o){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:a,offsetY:s}=r;let i=!1,l,c;if(Uy(a,s,t.target))l=a,c=s;else{const d=o.getBoundingClientRect();l=r.clientX-d.left,c=r.clientY-d.top,i=!0}return{x:l,y:c,box:i}}function Fo(t,o){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=o,a=Ir(n),s=a.boxSizing==="border-box",i=Io(a,"padding"),l=Io(a,"border","width"),{x:c,y:d,box:f}=Wy(t,n),u=i.left+(f&&l.left),h=i.top+(f&&l.top);let{width:m,height:p}=o;return s&&(m-=i.width+l.width,p-=i.height+l.height),{x:Math.round((c-u)/m*n.width/r),y:Math.round((d-h)/p*n.height/r)}}function Hy(t,o,n){let r,a;if(o===void 0||n===void 0){const s=t&&vs(t);if(!s)o=t.clientWidth,n=t.clientHeight;else{const i=s.getBoundingClientRect(),l=Ir(s),c=Io(l,"border","width"),d=Io(l,"padding");o=i.width-d.width-c.width,n=i.height-d.height-c.height,r=Rr(l.maxWidth,s,"clientWidth"),a=Rr(l.maxHeight,s,"clientHeight")}}return{width:o,height:n,maxWidth:r||Nr,maxHeight:a||Nr}}const xo=t=>Math.round(t*10)/10;function qy(t,o,n,r){const a=Ir(t),s=Io(a,"margin"),i=Rr(a.maxWidth,t,"clientWidth")||Nr,l=Rr(a.maxHeight,t,"clientHeight")||Nr,c=Hy(t,o,n);let{width:d,height:f}=c;if(a.boxSizing==="content-box"){const h=Io(a,"border","width"),m=Io(a,"padding");d-=m.width+h.width,f-=m.height+h.height}return d=Math.max(0,d-s.width),f=Math.max(0,r?d/r:f-s.height),d=xo(Math.min(d,i,c.maxWidth)),f=xo(Math.min(f,l,c.maxHeight)),d&&!f&&(f=xo(d/2)),(o!==void 0||n!==void 0)&&r&&c.height&&f>c.height&&(f=c.height,d=xo(Math.floor(f*r))),{width:d,height:f}}function rd(t,o,n){const r=o||1,a=xo(t.height*r),s=xo(t.width*r);t.height=xo(t.height),t.width=xo(t.width);const i=t.canvas;return i.style&&(n||!i.style.height&&!i.style.width)&&(i.style.height=`${t.height}px`,i.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||i.height!==a||i.width!==s?(t.currentDevicePixelRatio=r,i.height=a,i.width=s,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const Gy=(function(){let t=!1;try{const o={get passive(){return t=!0,!1}};As()&&(window.addEventListener("test",null,o),window.removeEventListener("test",null,o))}catch{}return t})();function ad(t,o){const n=$y(t,o),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function zo(t,o,n,r){return{x:t.x+n*(o.x-t.x),y:t.y+n*(o.y-t.y)}}function Ky(t,o,n,r){return{x:t.x+n*(o.x-t.x),y:r==="middle"?n<.5?t.y:o.y:r==="after"?n<1?t.y:o.y:n>0?o.y:t.y}}function Xy(t,o,n,r){const a={x:t.cp2x,y:t.cp2y},s={x:o.cp1x,y:o.cp1y},i=zo(t,a,n),l=zo(a,s,n),c=zo(s,o,n),d=zo(i,l,n),f=zo(l,c,n);return zo(d,f,n)}const Yy=function(t,o){return{x(n){return t+t+o-n},setWidth(n){o=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},Jy=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,o){return t+o},leftForLtr(t,o){return t}}};function sn(t,o,n){return t?Yy(o,n):Jy()}function sd(t,o){let n,r;(o==="ltr"||o==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",o,"important"),t.prevTextDirection=r)}function id(t,o){o!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",o[0],o[1]))}function ld(t){return t==="angle"?{between:Rn,compare:Y0,normalize:bt}:{between:to,compare:(o,n)=>o-n,normalize:o=>o}}function cd({start:t,end:o,count:n,loop:r,style:a}){return{start:t%n,end:o%n,loop:r&&(o-t+1)%n===0,style:a}}function Qy(t,o,n){const{property:r,start:a,end:s}=n,{between:i,normalize:l}=ld(r),c=o.length;let{start:d,end:f,loop:u}=t,h,m;if(u){for(d+=c,f+=c,h=0,m=c;h<m&&i(l(o[d%c][r]),a,s);++h)d--,f--;d%=c,f%=c}return f<d&&(f+=c),{start:d,end:f,loop:u,style:t.style}}function dd(t,o,n){if(!n)return[t];const{property:r,start:a,end:s}=n,i=o.length,{compare:l,between:c,normalize:d}=ld(r),{start:f,end:u,loop:h,style:m}=Qy(t,o,n),p=[];let y=!1,b=null,g,_,E;const B=()=>c(a,E,g)&&l(a,E)!==0,A=()=>l(s,g)===0||c(s,E,g),C=()=>y||B(),x=()=>!y||A();for(let w=f,D=f;w<=u;++w)_=o[w%i],!_.skip&&(g=d(_[r]),g!==E&&(y=c(g,a,s),b===null&&C()&&(b=l(g,a)===0?w:D),b!==null&&x()&&(p.push(cd({start:b,end:w,loop:h,count:i,style:m})),b=null),D=w,E=g));return b!==null&&p.push(cd({start:b,end:u,loop:h,count:i,style:m})),p}function fd(t,o){const n=[],r=t.segments;for(let a=0;a<r.length;a++){const s=dd(r[a],t.points,o);s.length&&n.push(...s)}return n}function Zy(t,o,n,r){let a=0,s=o-1;if(n&&!r)for(;a<o&&!t[a].skip;)a++;for(;a<o&&t[a].skip;)a++;for(a%=o,n&&(s+=a);s>a&&t[s%o].skip;)s--;return s%=o,{start:a,end:s}}function ex(t,o,n,r){const a=t.length,s=[];let i=o,l=t[o],c;for(c=o+1;c<=n;++c){const d=t[c%a];d.skip||d.stop?l.skip||(r=!1,s.push({start:o%a,end:(c-1)%a,loop:r}),o=i=d.stop?c:null):(i=c,l.skip&&(o=c)),l=d}return i!==null&&s.push({start:o%a,end:i%a,loop:r}),s}function tx(t,o){const n=t.points,r=t.options.spanGaps,a=n.length;if(!a)return[];const s=!!t._loop,{start:i,end:l}=Zy(n,a,s,r);if(r===!0)return ud(t,[{start:i,end:l,loop:s}],n,o);const c=l<i?l+a:l,d=!!t._fullLoop&&i===0&&l===a-1;return ud(t,ex(n,i,c,d),n,o)}function ud(t,o,n,r){return!r||!r.setContext||!n?o:ox(t,o,n,r)}function ox(t,o,n,r){const a=t._chart.getContext(),s=hd(t.options),{_datasetIndex:i,options:{spanGaps:l}}=t,c=n.length,d=[];let f=s,u=o[0].start,h=u;function m(p,y,b,g){const _=l?-1:1;if(p!==y){for(p+=c;n[p%c].skip;)p-=_;for(;n[y%c].skip;)y+=_;p%c!==y%c&&(d.push({start:p%c,end:y%c,loop:b,style:g}),f=g,u=y%c)}}for(const p of o){u=l?u:p.start;let y=n[u%c],b;for(h=u+1;h<=p.end;h++){const g=n[h%c];b=hd(r.setContext(Ro(a,{type:"segment",p0:y,p1:g,p0DataIndex:(h-1)%c,p1DataIndex:h%c,datasetIndex:i}))),nx(b,f)&&m(u,h-1,p.loop,f),y=g,f=b}u<h-1&&m(u,h-1,p.loop,f)}return d}function hd(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function nx(t,o){if(!o)return!1;const n=[],r=function(a,s){return bs(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,r)!==JSON.stringify(o,r)}function Fr(t,o,n){return t.options.clip?t[n]:o[n]}function rx(t,o){const{xScale:n,yScale:r}=t;return n&&r?{left:Fr(n,o,"left"),right:Fr(n,o,"right"),top:Fr(r,o,"top"),bottom:Fr(r,o,"bottom")}:o}function md(t,o){const n=o._clip;if(n.disabled)return!1;const r=rx(o,t.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
29
29
|
* Chart.js v4.5.1
|
|
30
30
|
* https://www.chartjs.org
|
|
31
31
|
* (c) 2025 Chart.js Contributors
|
|
32
32
|
* Released under the MIT License
|
|
33
|
-
*/class Jy{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(o,n,r,a){const s=n.listeners[a],i=n.duration;s.forEach(l=>l({chart:o,initial:n.initial,numSteps:i,currentStep:Math.min(r-n.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=Mc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(o=Date.now()){let n=0;this._charts.forEach((r,a)=>{if(!r.running||!r.items.length)return;const s=r.items;let i=s.length-1,l=!1,c;for(;i>=0;--i)c=s[i],c._active?(c._total>r.duration&&(r.duration=c._total),c.tick(o),l=!0):(s[i]=s[s.length-1],s.pop());l&&(a.draw(),this._notify(a,r,o,"progress")),s.length||(r.running=!1,this._notify(a,r,o,"complete"),r.initial=!1),n+=s.length}),this._lastDate=o,n===0&&(this._running=!1)}_getAnims(o){const n=this._charts;let r=n.get(o);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(o,r)),r}listen(o,n,r){this._getAnims(o).listeners[n].push(r)}add(o,n){!n||!n.length||this._getAnims(o).items.push(...n)}has(o){return this._getAnims(o).items.length>0}start(o){const n=this._charts.get(o);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,a)=>Math.max(r,a._duration),0),this._refresh())}running(o){if(!this._running)return!1;const n=this._charts.get(o);return!(!n||!n.running||!n.items.length)}stop(o){const n=this._charts.get(o);if(!n||!n.items.length)return;const r=n.items;let a=r.length-1;for(;a>=0;--a)r[a].cancel();n.items=[],this._notify(o,n,Date.now(),"complete")}remove(o){return this._charts.delete(o)}}var to=new Jy;const id="transparent",Qy={boolean(e,o,n){return n>.5?o:e},color(e,o,n){const r=Lc(e||id),a=r.valid&&Lc(o||id);return a&&a.valid?a.mix(r,n).hexString():o},number(e,o,n){return e+(o-e)*n}};class Zy{constructor(o,n,r,a){const s=n[r];a=Mr([o.to,a,s,o.from]);const i=Mr([o.from,s,a]);this._active=!0,this._fn=o.fn||Qy[o.type||typeof i],this._easing=Ln[o.easing]||Ln.linear,this._start=Math.floor(Date.now()+(o.delay||0)),this._duration=this._total=Math.floor(o.duration),this._loop=!!o.loop,this._target=n,this._prop=r,this._from=i,this._to=a,this._promises=void 0}active(){return this._active}update(o,n,r){if(this._active){this._notify(!1);const a=this._target[this._prop],s=r-this._start,i=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(i,o.duration)),this._total+=s,this._loop=!!o.loop,this._to=Mr([o.to,n,a,o.from]),this._from=Mr([o.from,a,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(o){const n=o-this._start,r=this._duration,a=this._prop,s=this._from,i=this._loop,l=this._to;let c;if(this._active=s!==l&&(i||n<r),!this._active){this._target[a]=l,this._notify(!0);return}if(n<0){this._target[a]=s;return}c=n/r%2,c=i&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[a]=this._fn(s,l,c)}wait(){const o=this._promises||(this._promises=[]);return new Promise((n,r)=>{o.push({res:n,rej:r})})}_notify(o){const n=o?"res":"rej",r=this._promises||[];for(let a=0;a<r.length;a++)r[a][n]()}}class ld{constructor(o,n){this._chart=o,this._properties=new Map,this.configure(n)}configure(o){if(!Me(o))return;const n=Object.keys(Je.animation),r=this._properties;Object.getOwnPropertyNames(o).forEach(a=>{const s=o[a];if(!Me(s))return;const i={};for(const l of n)i[l]=s[l];(Ze(s.properties)&&s.properties||[a]).forEach(l=>{(l===a||!r.has(l))&&r.set(l,i)})})}_animateOptions(o,n){const r=n.options,a=tx(o,r);if(!a)return[];const s=this._createAnimations(a,r);return r.$shared&&ex(o.options.$animations,r).then(()=>{o.options=r},()=>{}),s}_createAnimations(o,n){const r=this._properties,a=[],s=o.$animations||(o.$animations={}),i=Object.keys(n),l=Date.now();let c;for(c=i.length-1;c>=0;--c){const d=i[c];if(d.charAt(0)==="$")continue;if(d==="options"){a.push(...this._animateOptions(o,n));continue}const f=n[d];let u=s[d];const h=r.get(d);if(u)if(h&&u.active()){u.update(h,f,l);continue}else u.cancel();if(!h||!h.duration){o[d]=f;continue}s[d]=u=new Zy(h,o,d,f),a.push(u)}return a}update(o,n){if(this._properties.size===0){Object.assign(o,n);return}const r=this._createAnimations(o,n);if(r.length)return to.add(this._chart,r),!0}}function ex(e,o){const n=[],r=Object.keys(o);for(let a=0;a<r.length;a++){const s=e[r[a]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function tx(e,o){if(!o)return;let n=e.options;if(!n){e.options=o;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function cd(e,o){const n=e&&e.options||{},r=n.reverse,a=n.min===void 0?o:0,s=n.max===void 0?o:0;return{start:r?s:a,end:r?a:s}}function ox(e,o,n){if(n===!1)return!1;const r=cd(e,n),a=cd(o,n);return{top:a.end,right:r.end,bottom:a.start,left:r.start}}function nx(e){let o,n,r,a;return Me(e)?(o=e.top,n=e.right,r=e.bottom,a=e.left):o=n=r=a=e,{top:o,right:n,bottom:r,left:a,disabled:e===!1}}function dd(e,o){const n=[],r=e._getSortedDatasetMetas(o);let a,s;for(a=0,s=r.length;a<s;++a)n.push(r[a].index);return n}function fd(e,o,n,r={}){const a=e.keys,s=r.mode==="single";let i,l,c,d;if(o===null)return;let f=!1;for(i=0,l=a.length;i<l;++i){if(c=+a[i],c===n){if(f=!0,r.all)continue;break}d=e.values[c],rt(d)&&(s||o===0||It(o)===It(d))&&(o+=d)}return!f&&!r.all?0:o}function rx(e,o){const{iScale:n,vScale:r}=o,a=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",i=Object.keys(e),l=new Array(i.length);let c,d,f;for(c=0,d=i.length;c<d;++c)f=i[c],l[c]={[a]:f,[s]:e[f]};return l}function Ss(e,o){const n=e&&e.options.stacked;return n||n===void 0&&o.stack!==void 0}function ax(e,o,n){return`${e.id}.${o.id}.${n.stack||n.type}`}function sx(e){const{min:o,max:n,minDefined:r,maxDefined:a}=e.getUserBounds();return{min:r?o:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}function ix(e,o,n){const r=e[o]||(e[o]={});return r[n]||(r[n]={})}function ud(e,o,n,r){for(const a of o.getMatchingVisibleMetas(r).reverse()){const s=e[a.index];if(n&&s>0||!n&&s<0)return a.index}return null}function hd(e,o){const{chart:n,_cachedMeta:r}=e,a=n._stacks||(n._stacks={}),{iScale:s,vScale:i,index:l}=r,c=s.axis,d=i.axis,f=ax(s,i,r),u=o.length;let h;for(let m=0;m<u;++m){const p=o[m],{[c]:y,[d]:b}=p,g=p._stacks||(p._stacks={});h=g[d]=ix(a,f,y),h[l]=b,h._top=ud(h,i,!0,r.type),h._bottom=ud(h,i,!1,r.type);const _=h._visualValues||(h._visualValues={});_[l]=b}}function As(e,o){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===o).shift()}function lx(e,o){return Oo(e,{active:!1,dataset:void 0,datasetIndex:o,index:o,mode:"default",type:"dataset"})}function cx(e,o,n){return Oo(e,{active:!1,dataIndex:o,parsed:void 0,raw:void 0,element:n,index:o,mode:"default",type:"data"})}function zn(e,o){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){o=o||e._parsed;for(const a of o){const s=a._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const vs=e=>e==="reset"||e==="none",md=(e,o)=>o?e:Object.assign({},e),dx=(e,o,n)=>e&&!o.hidden&&o._stacked&&{keys:dd(n,!0),values:null};class Fo{constructor(o,n){this.chart=o,this._ctx=o.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const o=this._cachedMeta;this.configure(),this.linkScales(),o._stacked=Ss(o.vScale,o),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(o){this.index!==o&&zn(this._cachedMeta),this.index=o}linkScales(){const o=this.chart,n=this._cachedMeta,r=this.getDataset(),a=(u,h,m,p)=>u==="x"?h:u==="r"?p:m,s=n.xAxisID=Se(r.xAxisID,As(o,"x")),i=n.yAxisID=Se(r.yAxisID,As(o,"y")),l=n.rAxisID=Se(r.rAxisID,As(o,"r")),c=n.indexAxis,d=n.iAxisID=a(c,s,i,l),f=n.vAxisID=a(c,i,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(i),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(o){return this.chart.scales[o]}_getOtherScale(o){const n=this._cachedMeta;return o===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const o=this._cachedMeta;this._data&&Nc(this._data,this),o._stacked&&zn(o)}_dataCheck(){const o=this.getDataset(),n=o.data||(o.data=[]),r=this._data;if(Me(n)){const a=this._cachedMeta;this._data=rx(n,a)}else if(r!==n){if(r){Nc(r,this);const a=this._cachedMeta;zn(a),a._parsed=[]}n&&Object.isExtensible(n)&&q0(n,this),this._syncList=[],this._data=n}}addElements(){const o=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(o.dataset=new this.datasetElementType)}buildOrUpdateElements(o){const n=this._cachedMeta,r=this.getDataset();let a=!1;this._dataCheck();const s=n._stacked;n._stacked=Ss(n.vScale,n),n.stack!==r.stack&&(a=!0,zn(n),n.stack=r.stack),this._resyncElements(o),(a||s!==n._stacked)&&(hd(this,n._parsed),n._stacked=Ss(n.vScale,n))}configure(){const o=this.chart.config,n=o.datasetScopeKeys(this._type),r=o.getOptionScopes(this.getDataset(),n,!0);this.options=o.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(o,n){const{_cachedMeta:r,_data:a}=this,{iScale:s,_stacked:i}=r,l=s.axis;let c=o===0&&n===a.length?!0:r._sorted,d=o>0&&r._parsed[o-1],f,u,h;if(this._parsing===!1)r._parsed=a,r._sorted=!0,h=a;else{Ze(a[o])?h=this.parseArrayData(r,a,o,n):Me(a[o])?h=this.parseObjectData(r,a,o,n):h=this.parsePrimitiveData(r,a,o,n);const m=()=>u[l]===null||d&&u[l]<d[l];for(f=0;f<n;++f)r._parsed[f+o]=u=h[f],c&&(m()&&(c=!1),d=u);r._sorted=c}i&&hd(this,h)}parsePrimitiveData(o,n,r,a){const{iScale:s,vScale:i}=o,l=s.axis,c=i.axis,d=s.getLabels(),f=s===i,u=new Array(a);let h,m,p;for(h=0,m=a;h<m;++h)p=h+r,u[h]={[l]:f||s.parse(d[p],p),[c]:i.parse(n[p],p)};return u}parseArrayData(o,n,r,a){const{xScale:s,yScale:i}=o,l=new Array(a);let c,d,f,u;for(c=0,d=a;c<d;++c)f=c+r,u=n[f],l[c]={x:s.parse(u[0],f),y:i.parse(u[1],f)};return l}parseObjectData(o,n,r,a){const{xScale:s,yScale:i}=o,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(a);let f,u,h,m;for(f=0,u=a;f<u;++f)h=f+r,m=n[h],d[f]={x:s.parse(No(m,l),h),y:i.parse(No(m,c),h)};return d}getParsed(o){return this._cachedMeta._parsed[o]}getDataElement(o){return this._cachedMeta.data[o]}applyStack(o,n,r){const a=this.chart,s=this._cachedMeta,i=n[o.axis],l={keys:dd(a,!0),values:n._stacks[o.axis]._visualValues};return fd(l,i,s.index,{mode:r})}updateRangeFromParsed(o,n,r,a){const s=r[n.axis];let i=s===null?NaN:s;const l=a&&r._stacks[n.axis];a&&l&&(a.values=l,i=fd(a,s,this._cachedMeta.index)),o.min=Math.min(o.min,i),o.max=Math.max(o.max,i)}getMinMax(o,n){const r=this._cachedMeta,a=r._parsed,s=r._sorted&&o===r.iScale,i=a.length,l=this._getOtherScale(o),c=dx(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:u}=sx(l);let h,m;function p(){m=a[h];const y=m[l.axis];return!rt(m[o.axis])||f>y||u<y}for(h=0;h<i&&!(!p()&&(this.updateRangeFromParsed(d,o,m,c),s));++h);if(s){for(h=i-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(d,o,m,c);break}}return d}getAllParsedValues(o){const n=this._cachedMeta._parsed,r=[];let a,s,i;for(a=0,s=n.length;a<s;++a)i=n[a][o.axis],rt(i)&&r.push(i);return r}getMaxOverflow(){return!1}getLabelAndValue(o){const n=this._cachedMeta,r=n.iScale,a=n.vScale,s=this.getParsed(o);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:a?""+a.getLabelForValue(s[a.axis]):""}}_update(o){const n=this._cachedMeta;this.update(o||"default"),n._clip=nx(Se(this.options.clip,ox(n.xScale,n.yScale,this.getMaxOverflow())))}update(o){}draw(){const o=this._ctx,n=this.chart,r=this._cachedMeta,a=r.data||[],s=n.chartArea,i=[],l=this._drawStart||0,c=this._drawCount||a.length-l,d=this.options.drawActiveElementsOnTop;let f;for(r.dataset&&r.dataset.draw(o,s,l,c),f=l;f<l+c;++f){const u=a[f];u.hidden||(u.active&&d?i.push(u):u.draw(o,s))}for(f=0;f<i.length;++f)i[f].draw(o,s)}getStyle(o,n){const r=n?"active":"default";return o===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(o||0,r)}getContext(o,n,r){const a=this.getDataset();let s;if(o>=0&&o<this._cachedMeta.data.length){const i=this._cachedMeta.data[o];s=i.$context||(i.$context=cx(this.getContext(),o,i)),s.parsed=this.getParsed(o),s.raw=a.data[o],s.index=s.dataIndex=o}else s=this.$context||(this.$context=lx(this.chart.getContext(),this.index)),s.dataset=a,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(o){return this._resolveElementOptions(this.datasetElementType.id,o)}resolveDataElementOptions(o,n){return this._resolveElementOptions(this.dataElementType.id,n,o)}_resolveElementOptions(o,n="default",r){const a=n==="active",s=this._cachedDataOpts,i=o+"-"+n,l=s[i],c=this.enableOptionSharing&&Mn(r);if(l)return md(l,c);const d=this.chart.config,f=d.datasetElementScopeKeys(this._type,o),u=a?[`${o}Hover`,"hover",o,""]:[o,""],h=d.getOptionScopes(this.getDataset(),f),m=Object.keys(Je.elements[o]),p=()=>this.getContext(r,a,n),y=d.resolveNamedOptions(h,m,p,u);return y.$shared&&(y.$shared=c,s[i]=Object.freeze(md(y,c))),y}_resolveAnimations(o,n,r){const a=this.chart,s=this._cachedDataOpts,i=`animation-${n}`,l=s[i];if(l)return l;let c;if(a.options.animation!==!1){const f=this.chart.config,u=f.datasetAnimationScopeKeys(this._type,n),h=f.getOptionScopes(this.getDataset(),u);c=f.createResolver(h,this.getContext(o,r,n))}const d=new ld(a,c&&c.animations);return c&&c._cacheable&&(s[i]=Object.freeze(d)),d}getSharedOptions(o){if(o.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},o))}includeOptions(o,n){return!n||vs(o)||this.chart._animationsDisabled}_getSharedOptions(o,n){const r=this.resolveDataElementOptions(o,n),a=this._sharedOptions,s=this.getSharedOptions(r),i=this.includeOptions(n,s)||s!==a;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:i}}updateElement(o,n,r,a){vs(a)?Object.assign(o,r):this._resolveAnimations(n,a).update(o,r)}updateSharedOptions(o,n,r){o&&!vs(n)&&this._resolveAnimations(void 0,n).update(o,r)}_setStyle(o,n,r,a){o.active=a;const s=this.getStyle(n,a);this._resolveAnimations(n,r,a).update(o,{options:!a&&this.getSharedOptions(s)||s})}removeHoverStyle(o,n,r){this._setStyle(o,r,"active",!1)}setHoverStyle(o,n,r){this._setStyle(o,r,"active",!0)}_removeDatasetHoverStyle(){const o=this._cachedMeta.dataset;o&&this._setStyle(o,void 0,"active",!1)}_setDatasetHoverStyle(){const o=this._cachedMeta.dataset;o&&this._setStyle(o,void 0,"active",!0)}_resyncElements(o){const n=this._data,r=this._cachedMeta.data;for(const[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];const a=r.length,s=n.length,i=Math.min(s,a);i&&this.parse(0,i),s>a?this._insertElements(a,s-a,o):s<a&&this._removeElements(s,a-s)}_insertElements(o,n,r=!0){const a=this._cachedMeta,s=a.data,i=o+n;let l;const c=d=>{for(d.length+=n,l=d.length-1;l>=i;l--)d[l]=d[l-n]};for(c(s),l=o;l<i;++l)s[l]=new this.dataElementType;this._parsing&&c(a._parsed),this.parse(o,n),r&&this.updateElements(s,o,n,"reset")}updateElements(o,n,r,a){}_removeElements(o,n){const r=this._cachedMeta;if(this._parsing){const a=r._parsed.splice(o,n);r._stacked&&zn(r,a)}r.data.splice(o,n)}_sync(o){if(this._parsing)this._syncList.push(o);else{const[n,r,a]=o;this[n](r,a)}this.chart._dataChanges.push([this.index,...o])}_onDataPush(){const o=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-o,o])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(o,n){n&&this._sync(["_removeElements",o,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",o,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}be(Fo,"defaults",{}),be(Fo,"datasetElementType",null),be(Fo,"dataElementType",null);function fx(e,o){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(o);let r=[];for(let a=0,s=n.length;a<s;a++)r=r.concat(n[a].controller.getAllParsedValues(e));e._cache.$bar=Vc(r.sort((a,s)=>a-s))}return e._cache.$bar}function ux(e){const o=e.iScale,n=fx(o,e.type);let r=o._length,a,s,i,l;const c=()=>{i===32767||i===-32768||(Mn(l)&&(r=Math.min(r,Math.abs(i-l)||r)),l=i)};for(a=0,s=n.length;a<s;++a)i=o.getPixelForValue(n[a]),c();for(l=void 0,a=0,s=o.ticks.length;a<s;++a)i=o.getPixelForTick(a),c();return r}function hx(e,o,n,r){const a=n.barThickness;let s,i;return $e(a)?(s=o.min*n.categoryPercentage,i=n.barPercentage):(s=a*r,i=1),{chunk:s/r,ratio:i,start:o.pixels[e]-s/2}}function mx(e,o,n,r){const a=o.pixels,s=a[e];let i=e>0?a[e-1]:null,l=e<a.length-1?a[e+1]:null;const c=n.categoryPercentage;i===null&&(i=s-(l===null?o.end-o.start:l-s)),l===null&&(l=s+s-i);const d=s-(s-Math.min(i,l))/2*c;return{chunk:Math.abs(l-i)/2*c/r,ratio:n.barPercentage,start:d}}function px(e,o,n,r){const a=n.parse(e[0],r),s=n.parse(e[1],r),i=Math.min(a,s),l=Math.max(a,s);let c=i,d=l;Math.abs(i)>Math.abs(l)&&(c=l,d=i),o[n.axis]=d,o._custom={barStart:c,barEnd:d,start:a,end:s,min:i,max:l}}function pd(e,o,n,r){return Ze(e)?px(e,o,n,r):o[n.axis]=n.parse(e,r),o}function gd(e,o,n,r){const a=e.iScale,s=e.vScale,i=a.getLabels(),l=a===s,c=[];let d,f,u,h;for(d=n,f=n+r;d<f;++d)h=o[d],u={},u[a.axis]=l||a.parse(i[d],d),c.push(pd(h,u,s,d));return c}function Ds(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function gx(e,o,n){return e!==0?It(e):(o.isHorizontal()?1:-1)*(o.min>=n?1:-1)}function bx(e){let o,n,r,a,s;return e.horizontal?(o=e.base>e.x,n="left",r="right"):(o=e.base<e.y,n="bottom",r="top"),o?(a="end",s="start"):(a="start",s="end"),{start:n,end:r,reverse:o,top:a,bottom:s}}function yx(e,o,n,r){let a=o.borderSkipped;const s={};if(!a){e.borderSkipped=s;return}if(a===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:i,end:l,reverse:c,top:d,bottom:f}=bx(e);a==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?a=d:(n._bottom||0)===r?a=f:(s[bd(f,i,l,c)]=!0,a=d)),s[bd(a,i,l,c)]=!0,e.borderSkipped=s}function bd(e,o,n,r){return r?(e=xx(e,o,n),e=yd(e,n,o)):e=yd(e,o,n),e}function xx(e,o,n){return e===o?n:e===n?o:e}function yd(e,o,n){return e==="start"?o:e==="end"?n:e}function kx(e,{inflateAmount:o},n){e.inflateAmount=o==="auto"?n===1?.33:0:o}class Rr extends Fo{parsePrimitiveData(o,n,r,a){return gd(o,n,r,a)}parseArrayData(o,n,r,a){return gd(o,n,r,a)}parseObjectData(o,n,r,a){const{iScale:s,vScale:i}=o,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=s.axis==="x"?l:c,f=i.axis==="x"?l:c,u=[];let h,m,p,y;for(h=r,m=r+a;h<m;++h)y=n[h],p={},p[s.axis]=s.parse(No(y,d),h),u.push(pd(No(y,f),p,i,h));return u}updateRangeFromParsed(o,n,r,a){super.updateRangeFromParsed(o,n,r,a);const s=r._custom;s&&n===this._cachedMeta.vScale&&(o.min=Math.min(o.min,s.min),o.max=Math.max(o.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(o){const n=this._cachedMeta,{iScale:r,vScale:a}=n,s=this.getParsed(o),i=s._custom,l=Ds(i)?"["+i.start+", "+i.end+"]":""+a.getLabelForValue(s[a.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const o=this._cachedMeta;o.stack=this.getDataset().stack}update(o){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,o)}updateElements(o,n,r,a){const s=a==="reset",{index:i,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),f=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(n,a);for(let m=n;m<n+r;m++){const p=this.getParsed(m),y=s||$e(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,f),g=(p._stacks||{})[l.axis],_={horizontal:d,base:y.base,enableBorderRadius:!g||Ds(p._custom)||i===g._top||i===g._bottom,x:d?y.head:b.center,y:d?b.center:y.head,height:d?b.size:Math.abs(y.size),width:d?Math.abs(y.size):b.size};h&&(_.options=u||this.resolveDataElementOptions(m,o[m].active?"active":a));const E=_.options||o[m].options;yx(_,E,g,i),kx(_,E,f.ratio),this.updateElement(o[m],m,_,a)}}_getStacks(o,n){const{iScale:r}=this._cachedMeta,a=r.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),s=r.options.stacked,i=[],l=this._cachedMeta.controller.getParsed(n),c=l&&l[r.axis],d=f=>{const u=f._parsed.find(m=>m[r.axis]===c),h=u&&u[f.vScale.axis];if($e(h)||isNaN(h))return!0};for(const f of a)if(!(n!==void 0&&d(f))&&((s===!1||i.indexOf(f.stack)===-1||s===void 0&&f.stack===void 0)&&i.push(f.stack),f.index===o))break;return i.length||i.push(void 0),i}_getStackCount(o){return this._getStacks(void 0,o).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const o=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(o).filter(r=>o[r].axis===n).shift()}_getAxis(){const o={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)o[Se(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(o)}_getStackIndex(o,n,r){const a=this._getStacks(o,r),s=n!==void 0?a.indexOf(n):-1;return s===-1?a.length-1:s}_getRuler(){const o=this.options,n=this._cachedMeta,r=n.iScale,a=[];let s,i;for(s=0,i=n.data.length;s<i;++s)a.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const l=o.barThickness;return{min:l||ux(n),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:o.grouped,ratio:l?1:o.categoryPercentage*o.barPercentage}}_calculateBarValuePixels(o){const{_cachedMeta:{vScale:n,_stacked:r,index:a},options:{base:s,minBarLength:i}}=this,l=s||0,c=this.getParsed(o),d=c._custom,f=Ds(d);let u=c[n.axis],h=0,m=r?this.applyStack(n,c,r):u,p,y;m!==u&&(h=m-u,m=u),f&&(u=d.barStart,m=d.barEnd-d.barStart,u!==0&&It(u)!==It(d.barEnd)&&(h=0),h+=u);const b=!$e(s)&&!f?s:h;let g=n.getPixelForValue(b);if(this.chart.getDataVisibility(o)?p=n.getPixelForValue(h+m):p=g,y=p-g,Math.abs(y)<i){y=gx(y,n,l)*i,u===l&&(g-=y/2);const _=n.getPixelForDecimal(0),E=n.getPixelForDecimal(1),B=Math.min(_,E),A=Math.max(_,E);g=Math.max(Math.min(g,A),B),p=g+y,r&&!f&&(c._stacks[n.axis]._visualValues[a]=n.getValueForPixel(p)-n.getValueForPixel(g))}if(g===n.getPixelForValue(l)){const _=It(y)*n.getLineWidthForValue(l)/2;g+=_,y-=_}return{size:y,base:g,head:p,center:p+y/2}}_calculateBarIndexPixels(o,n){const r=n.scale,a=this.options,s=a.skipNull,i=Se(a.maxBarThickness,1/0);let l,c;const d=this._getAxisCount();if(n.grouped){const f=s?this._getStackCount(o):n.stackCount,u=a.barThickness==="flex"?mx(o,n,a,f*d):hx(o,n,a,f*d),h=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(Se(h,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,s?o:void 0)+m;l=u.start+u.chunk*p+u.chunk/2,c=Math.min(i,u.chunk*u.ratio)}else l=r.getPixelForValue(this.getParsed(o)[r.axis],o),c=Math.min(i,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const o=this._cachedMeta,n=o.vScale,r=o.data,a=r.length;let s=0;for(;s<a;++s)this.getParsed(s)[n.axis]!==null&&!r[s].hidden&&r[s].draw(this._ctx)}}be(Rr,"id","bar"),be(Rr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),be(Rr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function wx(e,o,n){let r=1,a=1,s=0,i=0;if(o<Ke){const l=e,c=l+o,d=Math.cos(l),f=Math.sin(l),u=Math.cos(c),h=Math.sin(c),m=(E,B,A)=>On(E,l,c,!0)?1:Math.max(B,B*n,A,A*n),p=(E,B,A)=>On(E,l,c,!0)?-1:Math.min(B,B*n,A,A*n),y=m(0,d,u),b=m(tt,f,h),g=p(Ue,d,u),_=p(Ue+tt,f,h);r=(y-g)/2,a=(b-_)/2,s=-(y+g)/2,i=-(b+_)/2}return{ratioX:r,ratioY:a,offsetX:s,offsetY:i}}class rn extends Fo{constructor(o,n){super(o,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(o,n){const r=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=r;else{let s=c=>+r[c];if(Me(r[o])){const{key:c="value"}=this._parsing;s=d=>+No(r[d],c)}let i,l;for(i=o,l=o+n;i<l;++i)a._parsed[i]=s(i)}}_getRotation(){return Zt(this.options.rotation-90)}_getCircumference(){return Zt(this.options.circumference)}_getRotationExtents(){let o=Ke,n=-Ke;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const a=this.chart.getDatasetMeta(r).controller,s=a._getRotation(),i=a._getCircumference();o=Math.min(o,s),n=Math.max(n,s+i)}return{rotation:o,circumference:n-o}}update(o){const n=this.chart,{chartArea:r}=n,a=this._cachedMeta,s=a.data,i=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-i)/2,0),c=Math.min(D0(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:f,rotation:u}=this._getRotationExtents(),{ratioX:h,ratioY:m,offsetX:p,offsetY:y}=wx(u,f,c),b=(r.width-i)/h,g=(r.height-i)/m,_=Math.max(Math.min(b,g)/2,0),E=kc(this.options.radius,_),B=Math.max(E*c,0),A=(E-B)/this._getVisibleDatasetWeightTotal();this.offsetX=p*E,this.offsetY=y*E,a.total=this.calculateTotal(),this.outerRadius=E-A*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-A*d,0),this.updateElements(s,0,s.length,o)}_circumference(o,n){const r=this.options,a=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(o)||a._parsed[o]===null||a.data[o].hidden?0:this.calculateCircumference(a._parsed[o]*s/Ke)}updateElements(o,n,r,a){const s=a==="reset",i=this.chart,l=i.chartArea,d=i.options.animation,f=(l.left+l.right)/2,u=(l.top+l.bottom)/2,h=s&&d.animateScale,m=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:y,includeOptions:b}=this._getSharedOptions(n,a);let g=this._getRotation(),_;for(_=0;_<n;++_)g+=this._circumference(_,s);for(_=n;_<n+r;++_){const E=this._circumference(_,s),B=o[_],A={x:f+this.offsetX,y:u+this.offsetY,startAngle:g,endAngle:g+E,circumference:E,outerRadius:p,innerRadius:m};b&&(A.options=y||this.resolveDataElementOptions(_,B.active?"active":a)),g+=E,this.updateElement(B,_,A,a)}}calculateTotal(){const o=this._cachedMeta,n=o.data;let r=0,a;for(a=0;a<n.length;a++){const s=o._parsed[a];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(a)&&!n[a].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(o){const n=this._cachedMeta.total;return n>0&&!isNaN(o)?Ke*(Math.abs(o)/n):0}getLabelAndValue(o){const n=this._cachedMeta,r=this.chart,a=r.data.labels||[],s=gs(n._parsed[o],r.options.locale);return{label:a[o]||"",value:s}}getMaxBorderWidth(o){let n=0;const r=this.chart;let a,s,i,l,c;if(!o){for(a=0,s=r.data.datasets.length;a<s;++a)if(r.isDatasetVisible(a)){i=r.getDatasetMeta(a),o=i.data,l=i.controller;break}}if(!o)return 0;for(a=0,s=o.length;a<s;++a)c=l.resolveDataElementOptions(a),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(o){let n=0;for(let r=0,a=o.length;r<a;++r){const s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(o){let n=0;for(let r=0;r<o;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(o){return Math.max(Se(this.chart.data.datasets[o].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}be(rn,"id","doughnut"),be(rn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),be(rn,"descriptors",{_scriptable:o=>o!=="spacing",_indexable:o=>o!=="spacing"&&!o.startsWith("borderDash")&&!o.startsWith("hoverBorderDash")}),be(rn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(o){const n=o.data,{labels:{pointStyle:r,textAlign:a,color:s,useBorderRadius:i,borderRadius:l}}=o.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((c,d)=>{const u=o.getDatasetMeta(0).controller.getStyle(d);return{text:c,fillStyle:u.backgroundColor,fontColor:s,hidden:!o.getDataVisibility(d),lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:u.borderWidth,strokeStyle:u.borderColor,textAlign:a,pointStyle:r,borderRadius:i&&(l||u.borderRadius),index:d}}):[]}},onClick(o,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Ir extends Fo{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(o){const n=this._cachedMeta,{dataset:r,data:a=[],_dataset:s}=n,i=this.chart._animationsDisabled;let{start:l,count:c}=X0(n,a,i);this._drawStart=l,this._drawCount=c,Y0(n)&&(l=0,c=a.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=a;const d=this.resolveDatasetElementOptions(o);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(r,void 0,{animated:!i,options:d},o),this.updateElements(a,l,c,o)}updateElements(o,n,r,a){const s=a==="reset",{iScale:i,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:f,includeOptions:u}=this._getSharedOptions(n,a),h=i.axis,m=l.axis,{spanGaps:p,segment:y}=this.options,b=Pn(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||s||a==="none",_=n+r,E=o.length;let B=n>0&&this.getParsed(n-1);for(let A=0;A<E;++A){const C=o[A],x=g?C:{};if(A<n||A>=_){x.skip=!0;continue}const w=this.getParsed(A),D=$e(w[m]),k=x[h]=i.getPixelForValue(w[h],A),v=x[m]=s||D?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,w,c):w[m],A);x.skip=isNaN(k)||isNaN(v)||D,x.stop=A>0&&Math.abs(w[h]-B[h])>b,y&&(x.parsed=w,x.raw=d.data[A]),u&&(x.options=f||this.resolveDataElementOptions(A,C.active?"active":a)),g||this.updateElement(C,A,x,a),B=w}}getMaxOverflow(){const o=this._cachedMeta,n=o.dataset,r=n.options&&n.options.borderWidth||0,a=o.data||[];if(!a.length)return r;const s=a[0].size(this.resolveDataElementOptions(0)),i=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(r,s,i)/2}draw(){const o=this._cachedMeta;o.dataset.updateControlPoints(this.chart.chartArea,o.iScale.axis),super.draw()}}be(Ir,"id","line"),be(Ir,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),be(Ir,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ns extends rn{}be(Ns,"id","pie"),be(Ns,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});function zo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Vs{constructor(o){be(this,"options");this.options=o||{}}static override(o){Object.assign(Vs.prototype,o)}init(){}formats(){return zo()}parse(){return zo()}format(){return zo()}add(){return zo()}diff(){return zo()}startOf(){return zo()}endOf(){return zo()}}var Cx={_date:Vs};function _x(e,o,n,r){const{controller:a,data:s,_sorted:i}=e,l=a._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(l&&o===l.axis&&o!=="r"&&i&&s.length){const d=l._reversePixels?W0:Mo;if(r){if(a._sharedOptions){const f=s[0],u=typeof f.getRange=="function"&&f.getRange(o);if(u){const h=d(s,o,n-u),m=d(s,o,n+u);return{lo:h.lo,hi:m.hi}}}}else{const f=d(s,o,n);if(c){const{vScale:u}=a._cachedMeta,{_parsed:h}=e,m=h.slice(0,f.lo+1).reverse().findIndex(y=>!$e(y[u.axis]));f.lo-=Math.max(0,m);const p=h.slice(f.hi).findIndex(y=>!$e(y[u.axis]));f.hi+=Math.max(0,p)}return f}}return{lo:0,hi:s.length-1}}function Fr(e,o,n,r,a){const s=e.getSortedVisibleDatasetMetas(),i=n[o];for(let l=0,c=s.length;l<c;++l){const{index:d,data:f}=s[l],{lo:u,hi:h}=_x(s[l],o,i,a);for(let m=u;m<=h;++m){const p=f[m];p.skip||r(p,d,m)}}}function Ex(e){const o=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,a){const s=o?Math.abs(r.x-a.x):0,i=n?Math.abs(r.y-a.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(i,2))}}function Ms(e,o,n,r,a){const s=[];return!a&&!e.isPointInArea(o)||Fr(e,n,o,function(l,c,d){!a&&!In(l,e.chartArea,0)||l.inRange(o.x,o.y,r)&&s.push({element:l,datasetIndex:c,index:d})},!0),s}function Bx(e,o,n,r){let a=[];function s(i,l,c){const{startAngle:d,endAngle:f}=i.getProps(["startAngle","endAngle"],r),{angle:u}=vc(i,{x:o.x,y:o.y});On(u,d,f)&&a.push({element:i,datasetIndex:l,index:c})}return Fr(e,n,o,s),a}function Sx(e,o,n,r,a,s){let i=[];const l=Ex(n);let c=Number.POSITIVE_INFINITY;function d(f,u,h){const m=f.inRange(o.x,o.y,a);if(r&&!m)return;const p=f.getCenterPoint(a);if(!(!!s||e.isPointInArea(p))&&!m)return;const b=l(o,p);b<c?(i=[{element:f,datasetIndex:u,index:h}],c=b):b===c&&i.push({element:f,datasetIndex:u,index:h})}return Fr(e,n,o,d),i}function Ts(e,o,n,r,a,s){return!s&&!e.isPointInArea(o)?[]:n==="r"&&!r?Bx(e,o,n,a):Sx(e,o,n,r,a,s)}function xd(e,o,n,r,a){const s=[],i=n==="x"?"inXRange":"inYRange";let l=!1;return Fr(e,n,o,(c,d,f)=>{c[i]&&c[i](o[n],a)&&(s.push({element:c,datasetIndex:d,index:f}),l=l||c.inRange(o.x,o.y,a))}),r&&!l?[]:s}var Ax={modes:{index(e,o,n,r){const a=Ro(o,e),s=n.axis||"x",i=n.includeInvisible||!1,l=n.intersect?Ms(e,a,s,r,i):Ts(e,a,s,!1,r,i),c=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{const f=l[0].index,u=d.data[f];u&&!u.skip&&c.push({element:u,datasetIndex:d.index,index:f})}),c):[]},dataset(e,o,n,r){const a=Ro(o,e),s=n.axis||"xy",i=n.includeInvisible||!1;let l=n.intersect?Ms(e,a,s,r,i):Ts(e,a,s,!1,r,i);if(l.length>0){const c=l[0].datasetIndex,d=e.getDatasetMeta(c).data;l=[];for(let f=0;f<d.length;++f)l.push({element:d[f],datasetIndex:c,index:f})}return l},point(e,o,n,r){const a=Ro(o,e),s=n.axis||"xy",i=n.includeInvisible||!1;return Ms(e,a,s,r,i)},nearest(e,o,n,r){const a=Ro(o,e),s=n.axis||"xy",i=n.includeInvisible||!1;return Ts(e,a,s,n.intersect,r,i)},x(e,o,n,r){const a=Ro(o,e);return xd(e,a,"x",n.intersect,r)},y(e,o,n,r){const a=Ro(o,e);return xd(e,a,"y",n.intersect,r)}}};const kd=["left","top","right","bottom"];function $n(e,o){return e.filter(n=>n.pos===o)}function wd(e,o){return e.filter(n=>kd.indexOf(n.pos)===-1&&n.box.axis===o)}function jn(e,o){return e.sort((n,r)=>{const a=o?r:n,s=o?n:r;return a.weight===s.weight?a.index-s.index:a.weight-s.weight})}function vx(e){const o=[];let n,r,a,s,i,l;for(n=0,r=(e||[]).length;n<r;++n)a=e[n],{position:s,options:{stack:i,stackWeight:l=1}}=a,o.push({index:n,box:a,pos:s,horizontal:a.isHorizontal(),weight:a.weight,stack:i&&s+i,stackWeight:l});return o}function Dx(e){const o={};for(const n of e){const{stack:r,pos:a,stackWeight:s}=n;if(!r||!kd.includes(a))continue;const i=o[r]||(o[r]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=s}return o}function Nx(e,o){const n=Dx(e),{vBoxMaxWidth:r,hBoxMaxHeight:a}=o;let s,i,l;for(s=0,i=e.length;s<i;++s){l=e[s];const{fullSize:c}=l.box,d=n[l.stack],f=d&&l.stackWeight/d.weight;l.horizontal?(l.width=f?f*r:c&&o.availableWidth,l.height=a):(l.width=r,l.height=f?f*a:c&&o.availableHeight)}return n}function Vx(e){const o=vx(e),n=jn(o.filter(d=>d.box.fullSize),!0),r=jn($n(o,"left"),!0),a=jn($n(o,"right")),s=jn($n(o,"top"),!0),i=jn($n(o,"bottom")),l=wd(o,"x"),c=wd(o,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:a.concat(c).concat(i).concat(l),chartArea:$n(o,"chartArea"),vertical:r.concat(a).concat(c),horizontal:s.concat(i).concat(l)}}function Cd(e,o,n,r){return Math.max(e[n],o[n])+Math.max(e[r],o[r])}function _d(e,o){e.top=Math.max(e.top,o.top),e.left=Math.max(e.left,o.left),e.bottom=Math.max(e.bottom,o.bottom),e.right=Math.max(e.right,o.right)}function Mx(e,o,n,r){const{pos:a,box:s}=n,i=e.maxPadding;if(!Me(a)){n.size&&(e[a]-=n.size);const u=r[n.stack]||{size:0,count:1};u.size=Math.max(u.size,n.horizontal?s.height:s.width),n.size=u.size/u.count,e[a]+=n.size}s.getPadding&&_d(i,s.getPadding());const l=Math.max(0,o.outerWidth-Cd(i,e,"left","right")),c=Math.max(0,o.outerHeight-Cd(i,e,"top","bottom")),d=l!==e.w,f=c!==e.h;return e.w=l,e.h=c,n.horizontal?{same:d,other:f}:{same:f,other:d}}function Tx(e){const o=e.maxPadding;function n(r){const a=Math.max(o[r]-e[r],0);return e[r]+=a,a}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Px(e,o){const n=o.maxPadding;function r(a){const s={left:0,top:0,right:0,bottom:0};return a.forEach(i=>{s[i]=Math.max(o[i],n[i])}),s}return r(e?["left","right"]:["top","bottom"])}function Un(e,o,n,r){const a=[];let s,i,l,c,d,f;for(s=0,i=e.length,d=0;s<i;++s){l=e[s],c=l.box,c.update(l.width||o.w,l.height||o.h,Px(l.horizontal,o));const{same:u,other:h}=Mx(o,n,l,r);d|=u&&a.length,f=f||h,c.fullSize||a.push(l)}return d&&Un(a,o,n,r)||f}function zr(e,o,n,r,a){e.top=n,e.left=o,e.right=o+r,e.bottom=n+a,e.width=r,e.height=a}function Ed(e,o,n,r){const a=n.padding;let{x:s,y:i}=o;for(const l of e){const c=l.box,d=r[l.stack]||{placed:0,weight:1},f=l.stackWeight/d.weight||1;if(l.horizontal){const u=o.w*f,h=d.size||c.height;Mn(d.start)&&(i=d.start),c.fullSize?zr(c,a.left,i,n.outerWidth-a.right-a.left,h):zr(c,o.left+d.placed,i,u,h),d.start=i,d.placed+=u,i=c.bottom}else{const u=o.h*f,h=d.size||c.width;Mn(d.start)&&(s=d.start),c.fullSize?zr(c,s,a.top,h,n.outerHeight-a.bottom-a.top):zr(c,s,o.top+d.placed,h,u),d.start=s,d.placed+=u,s=c.right}}o.x=s,o.y=i}var Et={addBox(e,o){e.boxes||(e.boxes=[]),o.fullSize=o.fullSize||!1,o.position=o.position||"top",o.weight=o.weight||0,o._layers=o._layers||function(){return[{z:0,draw(n){o.draw(n)}}]},e.boxes.push(o)},removeBox(e,o){const n=e.boxes?e.boxes.indexOf(o):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,o,n){o.fullSize=n.fullSize,o.position=n.position,o.weight=n.weight},update(e,o,n,r){if(!e)return;const a=_t(e.options.layout.padding),s=Math.max(o-a.width,0),i=Math.max(n-a.height,0),l=Vx(e.boxes),c=l.vertical,d=l.horizontal;je(e.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=c.reduce((y,b)=>b.box.options&&b.box.options.display===!1?y:y+1,0)||1,u=Object.freeze({outerWidth:o,outerHeight:n,padding:a,availableWidth:s,availableHeight:i,vBoxMaxWidth:s/2/f,hBoxMaxHeight:i/2}),h=Object.assign({},a);_d(h,_t(r));const m=Object.assign({maxPadding:h,w:s,h:i,x:a.left,y:a.top},a),p=Nx(c.concat(d),u);Un(l.fullSize,m,u,p),Un(c,m,u,p),Un(d,m,u,p)&&Un(c,m,u,p),Tx(m),Ed(l.leftAndTop,m,u,p),m.x+=m.w,m.y+=m.h,Ed(l.rightAndBottom,m,u,p),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},je(l.chartArea,y=>{const b=y.box;Object.assign(b,e.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class Bd{acquireContext(o,n){}releaseContext(o){return!1}addEventListener(o,n,r){}removeEventListener(o,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(o,n,r,a){return n=Math.max(0,n||o.width),r=r||o.height,{width:n,height:Math.max(0,a?Math.floor(n/a):r)}}isAttached(o){return!0}updateConfig(o){}}class Ox extends Bd{acquireContext(o){return o&&o.getContext&&o.getContext("2d")||null}updateConfig(o){o.options.animation=!1}}const $r="$chartjs",Lx={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Sd=e=>e===null||e==="";function Rx(e,o){const n=e.style,r=e.getAttribute("height"),a=e.getAttribute("width");if(e[$r]={initial:{height:r,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Sd(a)){const s=Jc(e,"width");s!==void 0&&(e.width=s)}if(Sd(r))if(e.style.height==="")e.height=e.width/(o||2);else{const s=Jc(e,"height");s!==void 0&&(e.height=s)}return e}const Ad=Fy?{passive:!0}:!1;function Ix(e,o,n){e&&e.addEventListener(o,n,Ad)}function Fx(e,o,n){e&&e.canvas&&e.canvas.removeEventListener(o,n,Ad)}function zx(e,o){const n=Lx[e.type]||e.type,{x:r,y:a}=Ro(e,o);return{type:n,chart:o,native:e,x:r!==void 0?r:null,y:a!==void 0?a:null}}function jr(e,o){for(const n of e)if(n===o||n.contains(o))return!0}function $x(e,o,n){const r=e.canvas,a=new MutationObserver(s=>{let i=!1;for(const l of s)i=i||jr(l.addedNodes,r),i=i&&!jr(l.removedNodes,r);i&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}function jx(e,o,n){const r=e.canvas,a=new MutationObserver(s=>{let i=!1;for(const l of s)i=i||jr(l.removedNodes,r),i=i&&!jr(l.addedNodes,r);i&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}const Wn=new Map;let vd=0;function Dd(){const e=window.devicePixelRatio;e!==vd&&(vd=e,Wn.forEach((o,n)=>{n.currentDevicePixelRatio!==e&&o()}))}function Ux(e,o){Wn.size||window.addEventListener("resize",Dd),Wn.set(e,o)}function Wx(e){Wn.delete(e),Wn.size||window.removeEventListener("resize",Dd)}function Hx(e,o,n){const r=e.canvas,a=r&&Bs(r);if(!a)return;const s=Tc((l,c)=>{const d=a.clientWidth;n(l,c),d<a.clientWidth&&n()},window),i=new ResizeObserver(l=>{const c=l[0],d=c.contentRect.width,f=c.contentRect.height;d===0&&f===0||s(d,f)});return i.observe(a),Ux(e,s),i}function Ps(e,o,n){n&&n.disconnect(),o==="resize"&&Wx(e)}function qx(e,o,n){const r=e.canvas,a=Tc(s=>{e.ctx!==null&&n(zx(s,e))},e);return Ix(r,o,a),a}class Gx extends Bd{acquireContext(o,n){const r=o&&o.getContext&&o.getContext("2d");return r&&r.canvas===o?(Rx(o,n),r):null}releaseContext(o){const n=o.canvas;if(!n[$r])return!1;const r=n[$r].initial;["height","width"].forEach(s=>{const i=r[s];$e(i)?n.removeAttribute(s):n.setAttribute(s,i)});const a=r.style||{};return Object.keys(a).forEach(s=>{n.style[s]=a[s]}),n.width=n.width,delete n[$r],!0}addEventListener(o,n,r){this.removeEventListener(o,n);const a=o.$proxies||(o.$proxies={}),i={attach:$x,detach:jx,resize:Hx}[n]||qx;a[n]=i(o,n,r)}removeEventListener(o,n){const r=o.$proxies||(o.$proxies={}),a=r[n];if(!a)return;({attach:Ps,detach:Ps,resize:Ps}[n]||Fx)(o,n,a),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(o,n,r,a){return Iy(o,n,r,a)}isAttached(o){const n=o&&Bs(o);return!!(n&&n.isConnected)}}function Kx(e){return!Es()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Ox:Gx}let oo=(wa=class{constructor(){be(this,"x");be(this,"y");be(this,"active",!1);be(this,"options");be(this,"$animations")}tooltipPosition(o){const{x:n,y:r}=this.getProps(["x","y"],o);return{x:n,y:r}}hasValue(){return Pn(this.x)&&Pn(this.y)}getProps(o,n){const r=this.$animations;if(!n||!r)return this;const a={};return o.forEach(s=>{a[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),a}},be(wa,"defaults",{}),be(wa,"defaultRoutes"),wa);function Xx(e,o){const n=e.options.ticks,r=Yx(e),a=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?Qx(o):[],i=s.length,l=s[0],c=s[i-1],d=[];if(i>a)return Zx(o,d,s,i/a),d;const f=Jx(s,o,a);if(i>0){let u,h;const m=i>1?Math.round((c-l)/(i-1)):null;for(Ur(o,d,f,$e(m)?0:l-m,l),u=0,h=i-1;u<h;u++)Ur(o,d,f,s[u],s[u+1]);return Ur(o,d,f,c,$e(m)?o.length:c+m),d}return Ur(o,d,f),d}function Yx(e){const o=e.options.offset,n=e._tickSize(),r=e._length/n+(o?0:1),a=e._maxLength/n;return Math.floor(Math.min(r,a))}function Jx(e,o,n){const r=ek(e),a=o.length/n;if(!r)return Math.max(a,1);const s=R0(r);for(let i=0,l=s.length-1;i<l;i++){const c=s[i];if(c>a)return c}return Math.max(a,1)}function Qx(e){const o=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&o.push(n);return o}function Zx(e,o,n,r){let a=0,s=n[0],i;for(r=Math.ceil(r),i=0;i<e.length;i++)i===s&&(o.push(e[i]),a++,s=n[a*r])}function Ur(e,o,n,r,a){const s=Se(r,0),i=Math.min(Se(a,e.length),e.length);let l=0,c,d,f;for(n=Math.ceil(n),a&&(c=a-r,n=c/Math.floor(c/n)),f=s;f<0;)l++,f=Math.round(s+l*n);for(d=Math.max(s,0);d<i;d++)d===f&&(o.push(e[d]),l++,f=Math.round(s+l*n))}function ek(e){const o=e.length;let n,r;if(o<2)return!1;for(r=e[0],n=1;n<o;++n)if(e[n]-e[n-1]!==r)return!1;return r}const tk=e=>e==="left"?"right":e==="right"?"left":e,Nd=(e,o,n)=>o==="top"||o==="left"?e[o]+n:e[o]-n,Vd=(e,o)=>Math.min(o||e,e);function Md(e,o){const n=[],r=e.length/o,a=e.length;let s=0;for(;s<a;s+=r)n.push(e[Math.floor(s)]);return n}function ok(e,o,n){const r=e.ticks.length,a=Math.min(o,r-1),s=e._startPixel,i=e._endPixel,l=1e-6;let c=e.getPixelForTick(a),d;if(!(n&&(r===1?d=Math.max(c-s,i-c):o===0?d=(e.getPixelForTick(1)-c)/2:d=(c-e.getPixelForTick(a-1))/2,c+=a<o?d:-d,c<s-l||c>i+l)))return c}function nk(e,o){je(e,n=>{const r=n.gc,a=r.length/2;let s;if(a>o){for(s=0;s<a;++s)delete n.data[r[s]];r.splice(0,a)}})}function Hn(e){return e.drawTicks?e.tickLength:0}function Td(e,o){if(!e.display)return 0;const n=it(e.font,o),r=_t(e.padding);return(Ze(e.text)?e.text.length:1)*n.lineHeight+r.height}function rk(e,o){return Oo(e,{scale:o,type:"scale"})}function ak(e,o,n){return Oo(e,{tick:n,index:o,type:"tick"})}function sk(e,o,n){let r=hs(e);return(n&&o!=="right"||!n&&o==="right")&&(r=tk(r)),r}function ik(e,o,n,r){const{top:a,left:s,bottom:i,right:l,chart:c}=e,{chartArea:d,scales:f}=c;let u=0,h,m,p;const y=i-a,b=l-s;if(e.isHorizontal()){if(m=st(r,s,l),Me(n)){const g=Object.keys(n)[0],_=n[g];p=f[g].getPixelForValue(_)+y-o}else n==="center"?p=(d.bottom+d.top)/2+y-o:p=Nd(e,n,o);h=l-s}else{if(Me(n)){const g=Object.keys(n)[0],_=n[g];m=f[g].getPixelForValue(_)-b+o}else n==="center"?m=(d.left+d.right)/2-b+o:m=Nd(e,n,o);p=st(r,i,a),u=n==="left"?-tt:tt}return{titleX:m,titleY:p,maxWidth:h,rotation:u}}class an extends oo{constructor(o){super(),this.id=o.id,this.type=o.type,this.options=void 0,this.ctx=o.ctx,this.chart=o.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(o){this.options=o.setContext(this.getContext()),this.axis=o.axis,this._userMin=this.parse(o.min),this._userMax=this.parse(o.max),this._suggestedMin=this.parse(o.suggestedMin),this._suggestedMax=this.parse(o.suggestedMax)}parse(o,n){return o}getUserBounds(){let{_userMin:o,_userMax:n,_suggestedMin:r,_suggestedMax:a}=this;return o=Rt(o,Number.POSITIVE_INFINITY),n=Rt(n,Number.NEGATIVE_INFINITY),r=Rt(r,Number.POSITIVE_INFINITY),a=Rt(a,Number.NEGATIVE_INFINITY),{min:Rt(o,r),max:Rt(n,a),minDefined:rt(o),maxDefined:rt(n)}}getMinMax(o){let{min:n,max:r,minDefined:a,maxDefined:s}=this.getUserBounds(),i;if(a&&s)return{min:n,max:r};const l=this.getMatchingVisibleMetas();for(let c=0,d=l.length;c<d;++c)i=l[c].controller.getMinMax(this,o),a||(n=Math.min(n,i.min)),s||(r=Math.max(r,i.max));return n=s&&n>r?r:n,r=a&&n>r?n:r,{min:Rt(n,Rt(r,n)),max:Rt(r,Rt(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const o=this.chart.data;return this.options.labels||(this.isHorizontal()?o.xLabels:o.yLabels)||o.labels||[]}getLabelItems(o=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(o))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){qe(this.options.beforeUpdate,[this])}update(o,n,r){const{beginAtZero:a,grace:s,ticks:i}=this.options,l=i.sampleSize;this.beforeUpdate(),this.maxWidth=o,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=gy(this,s,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?Md(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||i.source==="auto")&&(this.ticks=Xx(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let o=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,o=!o),this._startPixel=n,this._endPixel=r,this._reversePixels=o,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){qe(this.options.afterUpdate,[this])}beforeSetDimensions(){qe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){qe(this.options.afterSetDimensions,[this])}_callHooks(o){this.chart.notifyPlugins(o,this.getContext()),qe(this.options[o],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){qe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(o){const n=this.options.ticks;let r,a,s;for(r=0,a=o.length;r<a;r++)s=o[r],s.label=qe(n.callback,[s.value,r,o],this)}afterTickToLabelConversion(){qe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){qe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const o=this.options,n=o.ticks,r=Vd(this.ticks.length,o.ticks.maxTicksLimit),a=n.minRotation||0,s=n.maxRotation;let i=a,l,c,d;if(!this._isVisible()||!n.display||a>=s||r<=1||!this.isHorizontal()){this.labelRotation=a;return}const f=this._getLabelSizes(),u=f.widest.width,h=f.highest.height,m=at(this.chart.width-u,0,this.maxWidth);l=o.offset?this.maxWidth/r:m/(r-1),u+6>l&&(l=m/(r-(o.offset?.5:1)),c=this.maxHeight-Hn(o.grid)-n.padding-Td(o.title,this.chart.options.font),d=Math.sqrt(u*u+h*h),i=$0(Math.min(Math.asin(at((f.highest.height+6)/l,-1,1)),Math.asin(at(c/d,-1,1))-Math.asin(at(h/d,-1,1)))),i=Math.max(a,Math.min(s,i))),this.labelRotation=i}afterCalculateLabelRotation(){qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){qe(this.options.beforeFit,[this])}fit(){const o={width:0,height:0},{chart:n,options:{ticks:r,title:a,grid:s}}=this,i=this._isVisible(),l=this.isHorizontal();if(i){const c=Td(a,n.options.font);if(l?(o.width=this.maxWidth,o.height=Hn(s)+c):(o.height=this.maxHeight,o.width=Hn(s)+c),r.display&&this.ticks.length){const{first:d,last:f,widest:u,highest:h}=this._getLabelSizes(),m=r.padding*2,p=Zt(this.labelRotation),y=Math.cos(p),b=Math.sin(p);if(l){const g=r.mirror?0:b*u.width+y*h.height;o.height=Math.min(this.maxHeight,o.height+g+m)}else{const g=r.mirror?0:y*u.width+b*h.height;o.width=Math.min(this.maxWidth,o.width+g+m)}this._calculatePadding(d,f,b,y)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=o.height):(this.width=o.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(o,n,r,a){const{ticks:{align:s,padding:i},position:l}=this.options,c=this.labelRotation!==0,d=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,m=0;c?d?(h=a*o.width,m=r*n.height):(h=r*o.height,m=a*n.width):s==="start"?m=n.width:s==="end"?h=o.width:s!=="inner"&&(h=o.width/2,m=n.width/2),this.paddingLeft=Math.max((h-f+i)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-u+i)*this.width/(this.width-u),0)}else{let f=n.height/2,u=o.height/2;s==="start"?(f=0,u=o.height):s==="end"&&(f=n.height,u=0),this.paddingTop=f+i,this.paddingBottom=u+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){qe(this.options.afterFit,[this])}isHorizontal(){const{axis:o,position:n}=this.options;return n==="top"||n==="bottom"||o==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(o){this.beforeTickToLabelConversion(),this.generateTickLabels(o);let n,r;for(n=0,r=o.length;n<r;n++)$e(o[n].label)&&(o.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let o=this._labelSizes;if(!o){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Md(r,n)),this._labelSizes=o=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return o}_computeLabelSizes(o,n,r){const{ctx:a,_longestTextCache:s}=this,i=[],l=[],c=Math.floor(n/Vd(n,r));let d=0,f=0,u,h,m,p,y,b,g,_,E,B,A;for(u=0;u<n;u+=c){if(p=o[u].label,y=this._resolveTickFontOptions(u),a.font=b=y.string,g=s[b]=s[b]||{data:{},gc:[]},_=y.lineHeight,E=B=0,!$e(p)&&!Ze(p))E=Fc(a,g.data,g.gc,E,p),B=_;else if(Ze(p))for(h=0,m=p.length;h<m;++h)A=p[h],!$e(A)&&!Ze(A)&&(E=Fc(a,g.data,g.gc,E,A),B+=_);i.push(E),l.push(B),d=Math.max(E,d),f=Math.max(B,f)}nk(s,n);const C=i.indexOf(d),x=l.indexOf(f),w=D=>({width:i[D]||0,height:l[D]||0});return{first:w(0),last:w(n-1),widest:w(C),highest:w(x),widths:i,heights:l}}getLabelForValue(o){return o}getPixelForValue(o,n){return NaN}getValueForPixel(o){}getPixelForTick(o){const n=this.ticks;return o<0||o>n.length-1?null:this.getPixelForValue(n[o].value)}getPixelForDecimal(o){this._reversePixels&&(o=1-o);const n=this._startPixel+o*this._length;return U0(this._alignToPixels?Po(this.chart,n,0):n)}getDecimalForPixel(o){const n=(o-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:o,max:n}=this;return o<0&&n<0?n:o>0&&n>0?o:0}getContext(o){const n=this.ticks||[];if(o>=0&&o<n.length){const r=n[o];return r.$context||(r.$context=ak(this.getContext(),o,r))}return this.$context||(this.$context=rk(this.chart.getContext(),this))}_tickSize(){const o=this.options.ticks,n=Zt(this.labelRotation),r=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),s=this._getLabelSizes(),i=o.autoSkipPadding||0,l=s?s.widest.width+i:0,c=s?s.highest.height+i:0;return this.isHorizontal()?c*r>l*a?l/r:c/a:c*a<l*r?c/r:l/a}_isVisible(){const o=this.options.display;return o!=="auto"?!!o:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(o){const n=this.axis,r=this.chart,a=this.options,{grid:s,position:i,border:l}=a,c=s.offset,d=this.isHorizontal(),u=this.ticks.length+(c?1:0),h=Hn(s),m=[],p=l.setContext(this.getContext()),y=p.display?p.width:0,b=y/2,g=function(O){return Po(r,O,y)};let _,E,B,A,C,x,w,D,k,v,S,N;if(i==="top")_=g(this.bottom),x=this.bottom-h,D=_-b,v=g(o.top)+b,N=o.bottom;else if(i==="bottom")_=g(this.top),v=o.top,N=g(o.bottom)-b,x=_+b,D=this.top+h;else if(i==="left")_=g(this.right),C=this.right-h,w=_-b,k=g(o.left)+b,S=o.right;else if(i==="right")_=g(this.left),k=o.left,S=g(o.right)-b,C=_+b,w=this.left+h;else if(n==="x"){if(i==="center")_=g((o.top+o.bottom)/2+.5);else if(Me(i)){const O=Object.keys(i)[0],P=i[O];_=g(this.chart.scales[O].getPixelForValue(P))}v=o.top,N=o.bottom,x=_+b,D=x+h}else if(n==="y"){if(i==="center")_=g((o.left+o.right)/2);else if(Me(i)){const O=Object.keys(i)[0],P=i[O];_=g(this.chart.scales[O].getPixelForValue(P))}C=_-b,w=C-h,k=o.left,S=o.right}const V=Se(a.ticks.maxTicksLimit,u),L=Math.max(1,Math.ceil(u/V));for(E=0;E<u;E+=L){const O=this.getContext(E),P=s.setContext(O),R=l.setContext(O),j=P.lineWidth,M=P.color,I=R.dash||[],K=R.dashOffset,H=P.tickWidth,W=P.tickColor,Z=P.tickBorderDash||[],te=P.tickBorderDashOffset;B=ok(this,E,c),B!==void 0&&(A=Po(r,B,j),d?C=w=k=S=A:x=D=v=N=A,m.push({tx1:C,ty1:x,tx2:w,ty2:D,x1:k,y1:v,x2:S,y2:N,width:j,color:M,borderDash:I,borderDashOffset:K,tickWidth:H,tickColor:W,tickBorderDash:Z,tickBorderDashOffset:te}))}return this._ticksLength=u,this._borderValue=_,m}_computeLabelItems(o){const n=this.axis,r=this.options,{position:a,ticks:s}=r,i=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:d,padding:f,mirror:u}=s,h=Hn(r.grid),m=h+f,p=u?-f:m,y=-Zt(this.labelRotation),b=[];let g,_,E,B,A,C,x,w,D,k,v,S,N="middle";if(a==="top")C=this.bottom-p,x=this._getXAxisLabelAlignment();else if(a==="bottom")C=this.top+p,x=this._getXAxisLabelAlignment();else if(a==="left"){const L=this._getYAxisLabelAlignment(h);x=L.textAlign,A=L.x}else if(a==="right"){const L=this._getYAxisLabelAlignment(h);x=L.textAlign,A=L.x}else if(n==="x"){if(a==="center")C=(o.top+o.bottom)/2+m;else if(Me(a)){const L=Object.keys(a)[0],O=a[L];C=this.chart.scales[L].getPixelForValue(O)+m}x=this._getXAxisLabelAlignment()}else if(n==="y"){if(a==="center")A=(o.left+o.right)/2-m;else if(Me(a)){const L=Object.keys(a)[0],O=a[L];A=this.chart.scales[L].getPixelForValue(O)}x=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(c==="start"?N="top":c==="end"&&(N="bottom"));const V=this._getLabelSizes();for(g=0,_=l.length;g<_;++g){E=l[g],B=E.label;const L=s.setContext(this.getContext(g));w=this.getPixelForTick(g)+s.labelOffset,D=this._resolveTickFontOptions(g),k=D.lineHeight,v=Ze(B)?B.length:1;const O=v/2,P=L.color,R=L.textStrokeColor,j=L.textStrokeWidth;let M=x;i?(A=w,x==="inner"&&(g===_-1?M=this.options.reverse?"left":"right":g===0?M=this.options.reverse?"right":"left":M="center"),a==="top"?d==="near"||y!==0?S=-v*k+k/2:d==="center"?S=-V.highest.height/2-O*k+k:S=-V.highest.height+k/2:d==="near"||y!==0?S=k/2:d==="center"?S=V.highest.height/2-O*k:S=V.highest.height-v*k,u&&(S*=-1),y!==0&&!L.showLabelBackdrop&&(A+=k/2*Math.sin(y))):(C=w,S=(1-v)*k/2);let I;if(L.showLabelBackdrop){const K=_t(L.backdropPadding),H=V.heights[g],W=V.widths[g];let Z=S-K.top,te=0-K.left;switch(N){case"middle":Z-=H/2;break;case"bottom":Z-=H;break}switch(x){case"center":te-=W/2;break;case"right":te-=W;break;case"inner":g===_-1?te-=W:g>0&&(te-=W/2);break}I={left:te,top:Z,width:W+K.width,height:H+K.height,color:L.backdropColor}}b.push({label:B,font:D,textOffset:S,options:{rotation:y,color:P,strokeColor:R,strokeWidth:j,textAlign:M,textBaseline:N,translation:[A,C],backdrop:I}})}return b}_getXAxisLabelAlignment(){const{position:o,ticks:n}=this.options;if(-Zt(this.labelRotation))return o==="top"?"left":"right";let a="center";return n.align==="start"?a="left":n.align==="end"?a="right":n.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(o){const{position:n,ticks:{crossAlign:r,mirror:a,padding:s}}=this.options,i=this._getLabelSizes(),l=o+s,c=i.widest.width;let d,f;return n==="left"?a?(f=this.right+s,r==="near"?d="left":r==="center"?(d="center",f+=c/2):(d="right",f+=c)):(f=this.right-l,r==="near"?d="right":r==="center"?(d="center",f-=c/2):(d="left",f=this.left)):n==="right"?a?(f=this.left+s,r==="near"?d="right":r==="center"?(d="center",f-=c/2):(d="left",f-=c)):(f=this.left+l,r==="near"?d="left":r==="center"?(d="center",f+=c/2):(d="right",f=this.right)):d="right",{textAlign:d,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const o=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:o.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:o.width}}drawBackground(){const{ctx:o,options:{backgroundColor:n},left:r,top:a,width:s,height:i}=this;n&&(o.save(),o.fillStyle=n,o.fillRect(r,a,s,i),o.restore())}getLineWidthForValue(o){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const a=this.ticks.findIndex(s=>s.value===o);return a>=0?n.setContext(this.getContext(a)).lineWidth:0}drawGrid(o){const n=this.options.grid,r=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(o));let s,i;const l=(c,d,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(c.x,c.y),r.lineTo(d.x,d.y),r.stroke(),r.restore())};if(n.display)for(s=0,i=a.length;s<i;++s){const c=a[s];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:o,ctx:n,options:{border:r,grid:a}}=this,s=r.setContext(this.getContext()),i=r.display?s.width:0;if(!i)return;const l=a.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,f,u,h;this.isHorizontal()?(d=Po(o,this.left,i)-i/2,f=Po(o,this.right,l)+l/2,u=h=c):(u=Po(o,this.top,i)-i/2,h=Po(o,this.bottom,l)+l/2,d=f=c),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(d,u),n.lineTo(f,h),n.stroke(),n.restore()}drawLabels(o){if(!this.options.ticks.display)return;const r=this.ctx,a=this._computeLabelArea();a&&Dr(r,a);const s=this.getLabelItems(o);for(const i of s){const l=i.options,c=i.font,d=i.label,f=i.textOffset;Fn(r,d,0,f,c,l)}a&&Nr(r)}drawTitle(){const{ctx:o,options:{position:n,title:r,reverse:a}}=this;if(!r.display)return;const s=it(r.font),i=_t(r.padding),l=r.align;let c=s.lineHeight/2;n==="bottom"||n==="center"||Me(n)?(c+=i.bottom,Ze(r.text)&&(c+=s.lineHeight*(r.text.length-1))):c+=i.top;const{titleX:d,titleY:f,maxWidth:u,rotation:h}=ik(this,c,n,l);Fn(o,r.text,0,0,s,{color:r.color,maxWidth:u,rotation:h,textAlign:sk(l,n,a),textBaseline:"middle",translation:[d,f]})}draw(o){this._isVisible()&&(this.drawBackground(),this.drawGrid(o),this.drawBorder(),this.drawTitle(),this.drawLabels(o))}_layers(){const o=this.options,n=o.ticks&&o.ticks.z||0,r=Se(o.grid&&o.grid.z,-1),a=Se(o.border&&o.border.z,0);return!this._isVisible()||this.draw!==an.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(o){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",a=[];let s,i;for(s=0,i=n.length;s<i;++s){const l=n[s];l[r]===this.id&&(!o||l.type===o)&&a.push(l)}return a}_resolveTickFontOptions(o){const n=this.options.ticks.setContext(this.getContext(o));return it(n.font)}_maxDigits(){const o=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/o}}class Wr{constructor(o,n,r){this.type=o,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(o){return Object.prototype.isPrototypeOf.call(this.type.prototype,o.prototype)}register(o){const n=Object.getPrototypeOf(o);let r;dk(n)&&(r=this.register(n));const a=this.items,s=o.id,i=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+o);return s in a||(a[s]=o,lk(o,i,r),this.override&&Je.override(o.id,o.overrides)),i}get(o){return this.items[o]}unregister(o){const n=this.items,r=o.id,a=this.scope;r in n&&delete n[r],a&&r in Je[a]&&(delete Je[a][r],this.override&&delete To[r])}}function lk(e,o,n){const r=Nn(Object.create(null),[n?Je.get(n):{},Je.get(o),e.defaults]);Je.set(o,r),e.defaultRoutes&&ck(o,e.defaultRoutes),e.descriptors&&Je.describe(o,e.descriptors)}function ck(e,o){Object.keys(o).forEach(n=>{const r=n.split("."),a=r.pop(),s=[e].concat(r).join("."),i=o[n].split("."),l=i.pop(),c=i.join(".");Je.route(s,a,c,l)})}function dk(e){return"id"in e&&"defaults"in e}class fk{constructor(){this.controllers=new Wr(Fo,"datasets",!0),this.elements=new Wr(oo,"elements"),this.plugins=new Wr(Object,"plugins"),this.scales=new Wr(an,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...o){this._each("register",o)}remove(...o){this._each("unregister",o)}addControllers(...o){this._each("register",o,this.controllers)}addElements(...o){this._each("register",o,this.elements)}addPlugins(...o){this._each("register",o,this.plugins)}addScales(...o){this._each("register",o,this.scales)}getController(o){return this._get(o,this.controllers,"controller")}getElement(o){return this._get(o,this.elements,"element")}getPlugin(o){return this._get(o,this.plugins,"plugin")}getScale(o){return this._get(o,this.scales,"scale")}removeControllers(...o){this._each("unregister",o,this.controllers)}removeElements(...o){this._each("unregister",o,this.elements)}removePlugins(...o){this._each("unregister",o,this.plugins)}removeScales(...o){this._each("unregister",o,this.scales)}_each(o,n,r){[...n].forEach(a=>{const s=r||this._getRegistryForType(a);r||s.isForType(a)||s===this.plugins&&a.id?this._exec(o,s,a):je(a,i=>{const l=r||this._getRegistryForType(i);this._exec(o,l,i)})})}_exec(o,n,r){const a=ds(o);qe(r["before"+a],[],r),n[o](r),qe(r["after"+a],[],r)}_getRegistryForType(o){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(o))return r}return this.plugins}_get(o,n,r){const a=n.get(o);if(a===void 0)throw new Error('"'+o+'" is not a registered '+r+".");return a}}var Ft=new fk;class uk{constructor(){this._init=void 0}notify(o,n,r,a){if(n==="beforeInit"&&(this._init=this._createDescriptors(o,!0),this._notify(this._init,o,"install")),this._init===void 0)return;const s=a?this._descriptors(o).filter(a):this._descriptors(o),i=this._notify(s,o,n,r);return n==="afterDestroy"&&(this._notify(s,o,"stop"),this._notify(this._init,o,"uninstall"),this._init=void 0),i}_notify(o,n,r,a){a=a||{};for(const s of o){const i=s.plugin,l=i[r],c=[n,a,s.options];if(qe(l,c,i)===!1&&a.cancelable)return!1}return!0}invalidate(){$e(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(o){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(o);return this._notifyStateChanges(o),n}_createDescriptors(o,n){const r=o&&o.config,a=Se(r.options&&r.options.plugins,{}),s=hk(r);return a===!1&&!n?[]:pk(o,s,a,n)}_notifyStateChanges(o){const n=this._oldCache||[],r=this._cache,a=(s,i)=>s.filter(l=>!i.some(c=>l.plugin.id===c.plugin.id));this._notify(a(n,r),o,"stop"),this._notify(a(r,n),o,"start")}}function hk(e){const o={},n=[],r=Object.keys(Ft.plugins.items);for(let s=0;s<r.length;s++)n.push(Ft.getPlugin(r[s]));const a=e.plugins||[];for(let s=0;s<a.length;s++){const i=a[s];n.indexOf(i)===-1&&(n.push(i),o[i.id]=!0)}return{plugins:n,localIds:o}}function mk(e,o){return!o&&e===!1?null:e===!0?{}:e}function pk(e,{plugins:o,localIds:n},r,a){const s=[],i=e.getContext();for(const l of o){const c=l.id,d=mk(r[c],a);d!==null&&s.push({plugin:l,options:gk(e.config,{plugin:l,local:n[c]},d,i)})}return s}function gk(e,{plugin:o,local:n},r,a){const s=e.pluginScopeKeys(o),i=e.getOptionScopes(r,s);return n&&o.defaults&&i.push(o.defaults),e.createResolver(i,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Os(e,o){const n=Je.datasets[e]||{};return((o.datasets||{})[e]||{}).indexAxis||o.indexAxis||n.indexAxis||"x"}function bk(e,o){let n=e;return e==="_index_"?n=o:e==="_value_"&&(n=o==="x"?"y":"x"),n}function yk(e,o){return e===o?"_index_":"_value_"}function Pd(e){if(e==="x"||e==="y"||e==="r")return e}function xk(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Ls(e,...o){if(Pd(e))return e;for(const n of o){const r=n.axis||xk(n.position)||e.length>1&&Pd(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Od(e,o,n){if(n[o+"AxisID"]===e)return{axis:o}}function kk(e,o){if(o.data&&o.data.datasets){const n=o.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Od(e,"x",n[0])||Od(e,"y",n[0])}return{}}function wk(e,o){const n=To[e.type]||{scales:{}},r=o.scales||{},a=Os(e.type,o),s=Object.create(null);return Object.keys(r).forEach(i=>{const l=r[i];if(!Me(l))return console.error(`Invalid scale configuration for scale: ${i}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${i}`);const c=Ls(i,l,kk(i,e),Je.scales[l.type]),d=yk(c,a),f=n.scales||{};s[i]=Vn(Object.create(null),[{axis:c},l,f[c],f[d]])}),e.data.datasets.forEach(i=>{const l=i.type||e.type,c=i.indexAxis||Os(l,o),f=(To[l]||{}).scales||{};Object.keys(f).forEach(u=>{const h=bk(u,c),m=i[h+"AxisID"]||h;s[m]=s[m]||Object.create(null),Vn(s[m],[{axis:h},r[m],f[u]])})}),Object.keys(s).forEach(i=>{const l=s[i];Vn(l,[Je.scales[l.type],Je.scale])}),s}function Ld(e){const o=e.options||(e.options={});o.plugins=Se(o.plugins,{}),o.scales=wk(e,o)}function Rd(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Ck(e){return e=e||{},e.data=Rd(e.data),Ld(e),e}const Id=new Map,Fd=new Set;function Hr(e,o){let n=Id.get(e);return n||(n=o(),Id.set(e,n),Fd.add(n)),n}const qn=(e,o,n)=>{const r=No(o,n);r!==void 0&&e.add(r)};class _k{constructor(o){this._config=Ck(o),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(o){this._config.type=o}get data(){return this._config.data}set data(o){this._config.data=Rd(o)}get options(){return this._config.options}set options(o){this._config.options=o}get plugins(){return this._config.plugins}update(){const o=this._config;this.clearCache(),Ld(o)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(o){return Hr(o,()=>[[`datasets.${o}`,""]])}datasetAnimationScopeKeys(o,n){return Hr(`${o}.transition.${n}`,()=>[[`datasets.${o}.transitions.${n}`,`transitions.${n}`],[`datasets.${o}`,""]])}datasetElementScopeKeys(o,n){return Hr(`${o}-${n}`,()=>[[`datasets.${o}.elements.${n}`,`datasets.${o}`,`elements.${n}`,""]])}pluginScopeKeys(o){const n=o.id,r=this.type;return Hr(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...o.additionalOptionScopes||[]]])}_cachedScopes(o,n){const r=this._scopeCache;let a=r.get(o);return(!a||n)&&(a=new Map,r.set(o,a)),a}getOptionScopes(o,n,r){const{options:a,type:s}=this,i=this._cachedScopes(o,r),l=i.get(n);if(l)return l;const c=new Set;n.forEach(f=>{o&&(c.add(o),f.forEach(u=>qn(c,o,u))),f.forEach(u=>qn(c,a,u)),f.forEach(u=>qn(c,To[s]||{},u)),f.forEach(u=>qn(c,Je,u)),f.forEach(u=>qn(c,bs,u))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),Fd.has(n)&&i.set(n,d),d}chartOptionScopes(){const{options:o,type:n}=this;return[o,To[n]||{},Je.datasets[n]||{},{type:n},Je,bs]}resolveNamedOptions(o,n,r,a=[""]){const s={$shared:!0},{resolver:i,subPrefixes:l}=zd(this._resolverCache,o,a);let c=i;if(Bk(i,n)){s.$shared=!1,r=go(r)?r():r;const d=this.createResolver(o,r,l);c=tn(i,r,d)}for(const d of n)s[d]=c[d];return s}createResolver(o,n,r=[""],a){const{resolver:s}=zd(this._resolverCache,o,r);return Me(n)?tn(s,n,void 0,a):s}}function zd(e,o,n){let r=e.get(o);r||(r=new Map,e.set(o,r));const a=n.join();let s=r.get(a);return s||(s={resolver:ws(o,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},r.set(a,s)),s}const Ek=e=>Me(e)&&Object.getOwnPropertyNames(e).some(o=>go(e[o]));function Bk(e,o){const{isScriptable:n,isIndexable:r}=Uc(e);for(const a of o){const s=n(a),i=r(a),l=(i||s)&&e[a];if(s&&(go(l)||Ek(l))||i&&Ze(l))return!0}return!1}var Sk="4.5.1";const Ak=["top","bottom","left","right","chartArea"];function $d(e,o){return e==="top"||e==="bottom"||Ak.indexOf(e)===-1&&o==="x"}function jd(e,o){return function(n,r){return n[e]===r[e]?n[o]-r[o]:n[e]-r[e]}}function Ud(e){const o=e.chart,n=o.options.animation;o.notifyPlugins("afterRender"),qe(n&&n.onComplete,[e],o)}function vk(e){const o=e.chart,n=o.options.animation;qe(n&&n.onProgress,[e],o)}function Wd(e){return Es()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const qr={},Hd=e=>{const o=Wd(e);return Object.values(qr).filter(n=>n.canvas===o).pop()};function Dk(e,o,n){const r=Object.keys(e);for(const a of r){const s=+a;if(s>=o){const i=e[a];delete e[a],(n>0||s>o)&&(e[s+n]=i)}}}function Nk(e,o,n,r){return!n||e.type==="mouseout"?null:r?o:e}class no{static register(...o){Ft.add(...o),qd()}static unregister(...o){Ft.remove(...o),qd()}constructor(o,n){const r=this.config=new _k(n),a=Wd(o),s=Hd(a);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const i=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Kx(a)),this.platform.updateConfig(r);const l=this.platform.acquireContext(a,i.aspectRatio),c=l&&l.canvas,d=c&&c.height,f=c&&c.width;if(this.id=v0(),this.ctx=l,this.canvas=c,this.width=f,this.height=d,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new uk,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=G0(u=>this.update(u),i.resizeDelay||0),this._dataChanges=[],qr[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}to.listen(this,"complete",Ud),to.listen(this,"progress",vk),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:o,maintainAspectRatio:n},width:r,height:a,_aspectRatio:s}=this;return $e(o)?n&&s?s:a?r/a:null:o}get data(){return this.config.data}set data(o){this.config.data=o}get options(){return this._options}set options(o){this.config.options=o}get registry(){return Ft}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Yc(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return zc(this.canvas,this.ctx),this}stop(){return to.stop(this),this}resize(o,n){to.running(this)?this._resizeBeforeDraw={width:o,height:n}:this._resize(o,n)}_resize(o,n){const r=this.options,a=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(a,o,n,s),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,Yc(this,l,!0)&&(this.notifyPlugins("resize",{size:i}),qe(r.onResize,[this,i],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};je(n,(r,a)=>{r.id=a})}buildOrUpdateScales(){const o=this.options,n=o.scales,r=this.scales,a=Object.keys(r).reduce((i,l)=>(i[l]=!1,i),{});let s=[];n&&(s=s.concat(Object.keys(n).map(i=>{const l=n[i],c=Ls(i,l),d=c==="r",f=c==="x";return{options:l,dposition:d?"chartArea":f?"bottom":"left",dtype:d?"radialLinear":f?"category":"linear"}}))),je(s,i=>{const l=i.options,c=l.id,d=Ls(c,l),f=Se(l.type,i.dtype);(l.position===void 0||$d(l.position,d)!==$d(i.dposition))&&(l.position=i.dposition),a[c]=!0;let u=null;if(c in r&&r[c].type===f)u=r[c];else{const h=Ft.getScale(f);u=new h({id:c,type:f,ctx:this.ctx,chart:this}),r[u.id]=u}u.init(l,o)}),je(a,(i,l)=>{i||delete r[l]}),je(r,i=>{Et.configure(this,i,i.options),Et.addBox(this,i)})}_updateMetasets(){const o=this._metasets,n=this.data.datasets.length,r=o.length;if(o.sort((a,s)=>a.index-s.index),r>n){for(let a=n;a<r;++a)this._destroyDatasetMeta(a);o.splice(n,r-n)}this._sortedMetasets=o.slice(0).sort(jd("order","index"))}_removeUnreferencedMetasets(){const{_metasets:o,data:{datasets:n}}=this;o.length>n.length&&delete this._stacks,o.forEach((r,a)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const o=[],n=this.data.datasets;let r,a;for(this._removeUnreferencedMetasets(),r=0,a=n.length;r<a;r++){const s=n[r];let i=this.getDatasetMeta(r);const l=s.type||this.config.type;if(i.type&&i.type!==l&&(this._destroyDatasetMeta(r),i=this.getDatasetMeta(r)),i.type=l,i.indexAxis=s.indexAxis||Os(l,this.options),i.order=s.order||0,i.index=r,i.label=""+s.label,i.visible=this.isDatasetVisible(r),i.controller)i.controller.updateIndex(r),i.controller.linkScales();else{const c=Ft.getController(l),{datasetElementType:d,dataElementType:f}=Je.datasets[l];Object.assign(c,{dataElementType:Ft.getElement(f),datasetElementType:d&&Ft.getElement(d)}),i.controller=new c(this,r),o.push(i.controller)}}return this._updateMetasets(),o}_resetElements(){je(this.data.datasets,(o,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(o){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:o,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let d=0,f=this.data.datasets.length;d<f;d++){const{controller:u}=this.getDatasetMeta(d),h=!a&&s.indexOf(u)===-1;u.buildOrUpdateElements(h),i=Math.max(+u.getMaxOverflow(),i)}i=this._minPadding=r.layout.autoPadding?i:0,this._updateLayout(i),a||je(s,d=>{d.reset()}),this._updateDatasets(o),this.notifyPlugins("afterUpdate",{mode:o}),this._layers.sort(jd("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){je(this.scales,o=>{Et.removeBox(this,o)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const o=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(o.events);(!_c(n,r)||!!this._responsiveListeners!==o.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:o}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:a,count:s}of n){const i=r==="_removeElements"?-s:s;Dk(o,a,i)}}_getUniformDataChanges(){const o=this._dataChanges;if(!o||!o.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(o.filter(i=>i[0]===s).map((i,l)=>l+","+i.splice(1).join(","))),a=r(0);for(let s=1;s<n;s++)if(!_c(a,r(s)))return;return Array.from(a).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(o){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Et.update(this,this.width,this.height,o);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],je(this.boxes,a=>{r&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,s)=>{a._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(o){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:o,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,go(o)?o({datasetIndex:n}):o);this.notifyPlugins("afterDatasetsUpdate",{mode:o})}}_updateDataset(o,n){const r=this.getDatasetMeta(o),a={meta:r,index:o,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(r.controller._update(n),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(to.has(this)?this.attached&&!to.running(this)&&to.start(this):(this.draw(),Ud({chart:this})))}draw(){let o;if(this._resizeBeforeDraw){const{width:r,height:a}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,a)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(o=0;o<n.length&&n[o].z<=0;++o)n[o].draw(this.chartArea);for(this._drawDatasets();o<n.length;++o)n[o].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(o){const n=this._sortedMetasets,r=[];let a,s;for(a=0,s=n.length;a<s;++a){const i=n[a];(!o||i.visible)&&r.push(i)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const o=this.getSortedVisibleDatasetMetas();for(let n=o.length-1;n>=0;--n)this._drawDataset(o[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(o){const n=this.ctx,r={meta:o,index:o.index,cancelable:!0},a=sd(this,o);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(a&&Dr(n,a),o.controller.draw(),a&&Nr(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(o){return In(o,this.chartArea,this._minPadding)}getElementsAtEventForMode(o,n,r,a){const s=Ax.modes[n];return typeof s=="function"?s(this,o,r,a):[]}getDatasetMeta(o){const n=this.data.datasets[o],r=this._metasets;let a=r.filter(s=>s&&s._dataset===n).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:o,_dataset:n,_parsed:[],_sorted:!1},r.push(a)),a}getContext(){return this.$context||(this.$context=Oo(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(o){const n=this.data.datasets[o];if(!n)return!1;const r=this.getDatasetMeta(o);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(o,n){const r=this.getDatasetMeta(o);r.hidden=!n}toggleDataVisibility(o){this._hiddenIndices[o]=!this._hiddenIndices[o]}getDataVisibility(o){return!this._hiddenIndices[o]}_updateVisibility(o,n,r){const a=r?"show":"hide",s=this.getDatasetMeta(o),i=s.controller._resolveAnimations(void 0,a);Mn(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(o,r),i.update(s,{visible:r}),this.update(l=>l.datasetIndex===o?a:void 0))}hide(o,n){this._updateVisibility(o,n,!1)}show(o,n){this._updateVisibility(o,n,!0)}_destroyDatasetMeta(o){const n=this._metasets[o];n&&n.controller&&n.controller._destroy(),delete this._metasets[o]}_stop(){let o,n;for(this.stop(),to.remove(this),o=0,n=this.data.datasets.length;o<n;++o)this._destroyDatasetMeta(o)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:o,ctx:n}=this;this._stop(),this.config.clearCache(),o&&(this.unbindEvents(),zc(o,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete qr[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...o){return this.canvas.toDataURL(...o)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const o=this._listeners,n=this.platform,r=(s,i)=>{n.addEventListener(this,s,i),o[s]=i},a=(s,i,l)=>{s.offsetX=i,s.offsetY=l,this._eventHandler(s)};je(this.options.events,s=>r(s,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const o=this._responsiveListeners,n=this.platform,r=(c,d)=>{n.addEventListener(this,c,d),o[c]=d},a=(c,d)=>{o[c]&&(n.removeEventListener(this,c,d),delete o[c])},s=(c,d)=>{this.canvas&&this.resize(c,d)};let i;const l=()=>{a("attach",l),this.attached=!0,this.resize(),r("resize",s),r("detach",i)};i=()=>{this.attached=!1,a("resize",s),this._stop(),this._resize(0,0),r("attach",l)},n.isAttached(this.canvas)?l():i()}unbindEvents(){je(this._listeners,(o,n)=>{this.platform.removeEventListener(this,n,o)}),this._listeners={},je(this._responsiveListeners,(o,n)=>{this.platform.removeEventListener(this,n,o)}),this._responsiveListeners=void 0}updateHoverStyle(o,n,r){const a=r?"set":"remove";let s,i,l,c;for(n==="dataset"&&(s=this.getDatasetMeta(o[0].datasetIndex),s.controller["_"+a+"DatasetHoverStyle"]()),l=0,c=o.length;l<c;++l){i=o[l];const d=i&&this.getDatasetMeta(i.datasetIndex).controller;d&&d[a+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(o){const n=this._active||[],r=o.map(({datasetIndex:s,index:i})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[i],index:i}});!Br(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(o,n,r){return this._plugins.notify(this,o,n,r)}isPluginEnabled(o){return this._plugins._cache.filter(n=>n.plugin.id===o).length===1}_updateHoverStyles(o,n,r){const a=this.options.hover,s=(c,d)=>c.filter(f=>!d.some(u=>f.datasetIndex===u.datasetIndex&&f.index===u.index)),i=s(n,o),l=r?o:s(o,n);i.length&&this.updateHoverStyle(i,a.mode,!1),l.length&&a.mode&&this.updateHoverStyle(l,a.mode,!0)}_eventHandler(o,n){const r={event:o,replay:n,cancelable:!0,inChartArea:this.isPointInArea(o)},a=i=>(i.options.events||this.options.events).includes(o.native.type);if(this.notifyPlugins("beforeEvent",r,a)===!1)return;const s=this._handleEvent(o,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,a),(s||r.changed)&&this.render(),this}_handleEvent(o,n,r){const{_active:a=[],options:s}=this,i=n,l=this._getActiveElements(o,a,r,i),c=P0(o),d=Nk(o,this._lastEvent,r,c);r&&(this._lastEvent=null,qe(s.onHover,[o,l,this],this),c&&qe(s.onClick,[o,l,this],this));const f=!Br(l,a);return(f||n)&&(this._active=l,this._updateHoverStyles(l,a,n)),this._lastEvent=d,f}_getActiveElements(o,n,r,a){if(o.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(o,s.mode,s,a)}}be(no,"defaults",Je),be(no,"instances",qr),be(no,"overrides",To),be(no,"registry",Ft),be(no,"version",Sk),be(no,"getChart",Hd);function qd(){return je(no.instances,e=>e._plugins.invalidate())}function Vk(e,o,n){const{startAngle:r,x:a,y:s,outerRadius:i,innerRadius:l,options:c}=o,{borderWidth:d,borderJoinStyle:f}=c,u=Math.min(d/i,pt(r-n));if(e.beginPath(),e.arc(a,s,i-d/2,r+u/2,n-u/2),l>0){const h=Math.min(d/l,pt(r-n));e.arc(a,s,l+d/2,n-h/2,r+h/2,!0)}else{const h=Math.min(d/2,i*pt(r-n));if(f==="round")e.arc(a,s,h,n-Ue/2,r+Ue/2,!0);else if(f==="bevel"){const m=2*h*h,p=-m*Math.cos(n+Ue/2)+a,y=-m*Math.sin(n+Ue/2)+s,b=m*Math.cos(r+Ue/2)+a,g=m*Math.sin(r+Ue/2)+s;e.lineTo(p,y),e.lineTo(b,g)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Mk(e,o,n){const{startAngle:r,pixelMargin:a,x:s,y:i,outerRadius:l,innerRadius:c}=o;let d=a/l;e.beginPath(),e.arc(s,i,l,r-d,n+d),c>a?(d=a/c,e.arc(s,i,c,n+d,r-d,!0)):e.arc(s,i,a,n+tt,r-tt),e.closePath(),e.clip()}function Tk(e){return ks(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Pk(e,o,n,r){const a=Tk(e.options.borderRadius),s=(n-o)/2,i=Math.min(s,r*o/2),l=c=>{const d=(n-Math.min(s,c))*r/2;return at(c,0,Math.min(s,d))};return{outerStart:l(a.outerStart),outerEnd:l(a.outerEnd),innerStart:at(a.innerStart,0,i),innerEnd:at(a.innerEnd,0,i)}}function sn(e,o,n,r){return{x:n+e*Math.cos(o),y:r+e*Math.sin(o)}}function Gr(e,o,n,r,a,s){const{x:i,y:l,startAngle:c,pixelMargin:d,innerRadius:f}=o,u=Math.max(o.outerRadius+r+n-d,0),h=f>0?f+r+n+d:0;let m=0;const p=a-c;if(r){const L=f>0?f-r:0,O=u>0?u-r:0,P=(L+O)/2,R=P!==0?p*P/(P+r):p;m=(p-R)/2}const y=Math.max(.001,p*u-n/Ue)/u,b=(p-y)/2,g=c+b+m,_=a-b-m,{outerStart:E,outerEnd:B,innerStart:A,innerEnd:C}=Pk(o,h,u,_-g),x=u-E,w=u-B,D=g+E/x,k=_-B/w,v=h+A,S=h+C,N=g+A/v,V=_-C/S;if(e.beginPath(),s){const L=(D+k)/2;if(e.arc(i,l,u,D,L),e.arc(i,l,u,L,k),B>0){const j=sn(w,k,i,l);e.arc(j.x,j.y,B,k,_+tt)}const O=sn(S,_,i,l);if(e.lineTo(O.x,O.y),C>0){const j=sn(S,V,i,l);e.arc(j.x,j.y,C,_+tt,V+Math.PI)}const P=(_-C/h+(g+A/h))/2;if(e.arc(i,l,h,_-C/h,P,!0),e.arc(i,l,h,P,g+A/h,!0),A>0){const j=sn(v,N,i,l);e.arc(j.x,j.y,A,N+Math.PI,g-tt)}const R=sn(x,g,i,l);if(e.lineTo(R.x,R.y),E>0){const j=sn(x,D,i,l);e.arc(j.x,j.y,E,g-tt,D)}}else{e.moveTo(i,l);const L=Math.cos(D)*u+i,O=Math.sin(D)*u+l;e.lineTo(L,O);const P=Math.cos(k)*u+i,R=Math.sin(k)*u+l;e.lineTo(P,R)}e.closePath()}function Ok(e,o,n,r,a){const{fullCircles:s,startAngle:i,circumference:l}=o;let c=o.endAngle;if(s){Gr(e,o,n,r,c,a);for(let d=0;d<s;++d)e.fill();isNaN(l)||(c=i+(l%Ke||Ke))}return Gr(e,o,n,r,c,a),e.fill(),c}function Lk(e,o,n,r,a){const{fullCircles:s,startAngle:i,circumference:l,options:c}=o,{borderWidth:d,borderJoinStyle:f,borderDash:u,borderDashOffset:h,borderRadius:m}=c,p=c.borderAlign==="inner";if(!d)return;e.setLineDash(u||[]),e.lineDashOffset=h,p?(e.lineWidth=d*2,e.lineJoin=f||"round"):(e.lineWidth=d,e.lineJoin=f||"bevel");let y=o.endAngle;if(s){Gr(e,o,n,r,y,a);for(let b=0;b<s;++b)e.stroke();isNaN(l)||(y=i+(l%Ke||Ke))}p&&Mk(e,o,y),c.selfJoin&&y-i>=Ue&&m===0&&f!=="miter"&&Vk(e,o,y),s||(Gr(e,o,n,r,y,a),e.stroke())}class Gn extends oo{constructor(n){super();be(this,"circumference");be(this,"endAngle");be(this,"fullCircles");be(this,"innerRadius");be(this,"outerRadius");be(this,"pixelMargin");be(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,a){const s=this.getProps(["x","y"],a),{angle:i,distance:l}=vc(s,{x:n,y:r}),{startAngle:c,endAngle:d,innerRadius:f,outerRadius:u,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),m=(this.options.spacing+this.options.borderWidth)/2,p=Se(h,d-c),y=On(i,c,d)&&c!==d,b=p>=Ke||y,g=eo(l,f+m,u+m);return b&&g}getCenterPoint(n){const{x:r,y:a,startAngle:s,endAngle:i,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:d,spacing:f}=this.options,u=(s+i)/2,h=(l+c+f+d)/2;return{x:r+Math.cos(u)*h,y:a+Math.sin(u)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:a}=this,s=(r.offset||0)/4,i=(r.spacing||0)/2,l=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=a>Ke?Math.floor(a/Ke):0,a===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*s,Math.sin(c)*s);const d=1-Math.sin(Math.min(Ue,a||0)),f=s*d;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,Ok(n,this,f,i,l),Lk(n,this,f,i,l),n.restore()}}be(Gn,"id","arc"),be(Gn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),be(Gn,"defaultRoutes",{backgroundColor:"backgroundColor"}),be(Gn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Gd(e,o,n=o){e.lineCap=Se(n.borderCapStyle,o.borderCapStyle),e.setLineDash(Se(n.borderDash,o.borderDash)),e.lineDashOffset=Se(n.borderDashOffset,o.borderDashOffset),e.lineJoin=Se(n.borderJoinStyle,o.borderJoinStyle),e.lineWidth=Se(n.borderWidth,o.borderWidth),e.strokeStyle=Se(n.borderColor,o.borderColor)}function Rk(e,o,n){e.lineTo(n.x,n.y)}function Ik(e){return e.stepped?iy:e.tension||e.cubicInterpolationMode==="monotone"?ly:Rk}function Kd(e,o,n={}){const r=e.length,{start:a=0,end:s=r-1}=n,{start:i,end:l}=o,c=Math.max(a,i),d=Math.min(s,l),f=a<i&&s<i||a>l&&s>l;return{count:r,start:c,loop:o.loop,ilen:d<c&&!f?r+d-c:d-c}}function Fk(e,o,n,r){const{points:a,options:s}=o,{count:i,start:l,loop:c,ilen:d}=Kd(a,n,r),f=Ik(s);let{move:u=!0,reverse:h}=r||{},m,p,y;for(m=0;m<=d;++m)p=a[(l+(h?d-m:m))%i],!p.skip&&(u?(e.moveTo(p.x,p.y),u=!1):f(e,y,p,h,s.stepped),y=p);return c&&(p=a[(l+(h?d:0))%i],f(e,y,p,h,s.stepped)),!!c}function zk(e,o,n,r){const a=o.points,{count:s,start:i,ilen:l}=Kd(a,n,r),{move:c=!0,reverse:d}=r||{};let f=0,u=0,h,m,p,y,b,g;const _=B=>(i+(d?l-B:B))%s,E=()=>{y!==b&&(e.lineTo(f,b),e.lineTo(f,y),e.lineTo(f,g))};for(c&&(m=a[_(0)],e.moveTo(m.x,m.y)),h=0;h<=l;++h){if(m=a[_(h)],m.skip)continue;const B=m.x,A=m.y,C=B|0;C===p?(A<y?y=A:A>b&&(b=A),f=(u*f+B)/++u):(E(),e.lineTo(B,A),p=C,u=0,y=b=A),g=A}E()}function Rs(e){const o=e.options,n=o.borderDash&&o.borderDash.length;return!e._decimated&&!e._loop&&!o.tension&&o.cubicInterpolationMode!=="monotone"&&!o.stepped&&!n?zk:Fk}function $k(e){return e.stepped?zy:e.tension||e.cubicInterpolationMode==="monotone"?$y:Io}function jk(e,o,n,r){let a=o._path;a||(a=o._path=new Path2D,o.path(a,n,r)&&a.closePath()),Gd(e,o.options),e.stroke(a)}function Uk(e,o,n,r){const{segments:a,options:s}=o,i=Rs(o);for(const l of a)Gd(e,s,l.style),e.beginPath(),i(e,o,l,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Wk=typeof Path2D=="function";function Hk(e,o,n,r){Wk&&!o.options.segment?jk(e,o,n,r):Uk(e,o,n,r)}class yo extends oo{constructor(o){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,o&&Object.assign(this,o)}updateControlPoints(o,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const a=r.spanGaps?this._loop:this._fullLoop;My(this._points,r,o,a,n),this._pointsUpdated=!0}}set points(o){this._points=o,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Gy(this,this.options.segment))}first(){const o=this.segments,n=this.points;return o.length&&n[o[0].start]}last(){const o=this.segments,n=this.points,r=o.length;return r&&n[o[r-1].end]}interpolate(o,n){const r=this.options,a=o[n],s=this.points,i=nd(this,{property:n,start:a,end:a});if(!i.length)return;const l=[],c=$k(r);let d,f;for(d=0,f=i.length;d<f;++d){const{start:u,end:h}=i[d],m=s[u],p=s[h];if(m===p){l.push(m);continue}const y=Math.abs((a-m[n])/(p[n]-m[n])),b=c(m,p,y,r.stepped);b[n]=o[n],l.push(b)}return l.length===1?l[0]:l}pathSegment(o,n,r){return Rs(this)(o,this,n,r)}path(o,n,r){const a=this.segments,s=Rs(this);let i=this._loop;n=n||0,r=r||this.points.length-n;for(const l of a)i&=s(o,this,l,{start:n,end:n+r-1});return!!i}draw(o,n,r,a){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(o.save(),Hk(o,this,r,a),o.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}be(yo,"id","line"),be(yo,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),be(yo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),be(yo,"descriptors",{_scriptable:!0,_indexable:o=>o!=="borderDash"&&o!=="fill"});function Xd(e,o,n,r){const a=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(o-s)<a.radius+a.hitRadius}class Kr extends oo{constructor(n){super();be(this,"parsed");be(this,"skip");be(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,a){const s=this.options,{x:i,y:l}=this.getProps(["x","y"],a);return Math.pow(n-i,2)+Math.pow(r-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return Xd(this,n,"x",r)}inYRange(n,r){return Xd(this,n,"y",r)}getCenterPoint(n){const{x:r,y:a}=this.getProps(["x","y"],n);return{x:r,y:a}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const a=r&&n.borderWidth||0;return(r+a)*2}draw(n,r){const a=this.options;this.skip||a.radius<.1||!In(this,r,this.size(a)/2)||(n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.fillStyle=a.backgroundColor,xs(n,a,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}be(Kr,"id","point"),be(Kr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),be(Kr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Yd(e,o){const{x:n,y:r,base:a,width:s,height:i}=e.getProps(["x","y","base","width","height"],o);let l,c,d,f,u;return e.horizontal?(u=i/2,l=Math.min(n,a),c=Math.max(n,a),d=r-u,f=r+u):(u=s/2,l=n-u,c=n+u,d=Math.min(r,a),f=Math.max(r,a)),{left:l,top:d,right:c,bottom:f}}function xo(e,o,n,r){return e?0:at(o,n,r)}function qk(e,o,n){const r=e.options.borderWidth,a=e.borderSkipped,s=jc(r);return{t:xo(a.top,s.top,0,n),r:xo(a.right,s.right,0,o),b:xo(a.bottom,s.bottom,0,n),l:xo(a.left,s.left,0,o)}}function Gk(e,o,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),a=e.options.borderRadius,s=en(a),i=Math.min(o,n),l=e.borderSkipped,c=r||Me(a);return{topLeft:xo(!c||l.top||l.left,s.topLeft,0,i),topRight:xo(!c||l.top||l.right,s.topRight,0,i),bottomLeft:xo(!c||l.bottom||l.left,s.bottomLeft,0,i),bottomRight:xo(!c||l.bottom||l.right,s.bottomRight,0,i)}}function Kk(e){const o=Yd(e),n=o.right-o.left,r=o.bottom-o.top,a=qk(e,n/2,r/2),s=Gk(e,n/2,r/2);return{outer:{x:o.left,y:o.top,w:n,h:r,radius:s},inner:{x:o.left+a.l,y:o.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,s.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(a.b,a.r))}}}}function Is(e,o,n,r){const a=o===null,s=n===null,l=e&&!(a&&s)&&Yd(e,r);return l&&(a||eo(o,l.left,l.right))&&(s||eo(n,l.top,l.bottom))}function Xk(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Yk(e,o){e.rect(o.x,o.y,o.w,o.h)}function Fs(e,o,n={}){const r=e.x!==n.x?-o:0,a=e.y!==n.y?-o:0,s=(e.x+e.w!==n.x+n.w?o:0)-r,i=(e.y+e.h!==n.y+n.h?o:0)-a;return{x:e.x+r,y:e.y+a,w:e.w+s,h:e.h+i,radius:e.radius}}class Xr extends oo{constructor(o){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,o&&Object.assign(this,o)}draw(o){const{inflateAmount:n,options:{borderColor:r,backgroundColor:a}}=this,{inner:s,outer:i}=Kk(this),l=Xk(i.radius)?Vr:Yk;o.save(),(i.w!==s.w||i.h!==s.h)&&(o.beginPath(),l(o,Fs(i,n,s)),o.clip(),l(o,Fs(s,-n,i)),o.fillStyle=r,o.fill("evenodd")),o.beginPath(),l(o,Fs(s,n)),o.fillStyle=a,o.fill(),o.restore()}inRange(o,n,r){return Is(this,o,n,r)}inXRange(o,n){return Is(this,o,null,n)}inYRange(o,n){return Is(this,null,o,n)}getCenterPoint(o){const{x:n,y:r,base:a,horizontal:s}=this.getProps(["x","y","base","horizontal"],o);return{x:s?(n+a)/2:n,y:s?r:(r+a)/2}}getRange(o){return o==="x"?this.width/2:this.height/2}}be(Xr,"id","bar"),be(Xr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),be(Xr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Jk(e,o,n){const r=e.segments,a=e.points,s=o.points,i=[];for(const l of r){let{start:c,end:d}=l;d=Yr(c,d,a);const f=zs(n,a[c],a[d],l.loop);if(!o.segments){i.push({source:l,target:f,start:a[c],end:a[d]});continue}const u=nd(o,f);for(const h of u){const m=zs(n,s[h.start],s[h.end],h.loop),p=od(l,a,m);for(const y of p)i.push({source:y,target:h,start:{[n]:Jd(f,m,"start",Math.max)},end:{[n]:Jd(f,m,"end",Math.min)}})}}return i}function zs(e,o,n,r){if(r)return;let a=o[e],s=n[e];return e==="angle"&&(a=pt(a),s=pt(s)),{property:e,start:a,end:s}}function Qk(e,o){const{x:n=null,y:r=null}=e||{},a=o.points,s=[];return o.segments.forEach(({start:i,end:l})=>{l=Yr(i,l,a);const c=a[i],d=a[l];r!==null?(s.push({x:c.x,y:r}),s.push({x:d.x,y:r})):n!==null&&(s.push({x:n,y:c.y}),s.push({x:n,y:d.y}))}),s}function Yr(e,o,n){for(;o>e;o--){const r=n[o];if(!isNaN(r.x)&&!isNaN(r.y))break}return o}function Jd(e,o,n,r){return e&&o?r(e[n],o[n]):e?e[n]:o?o[n]:0}function Qd(e,o){let n=[],r=!1;return Ze(e)?(r=!0,n=e):n=Qk(e,o),n.length?new yo({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Zd(e){return e&&e.fill!==!1}function Zk(e,o,n){let a=e[o].fill;const s=[o];let i;if(!n)return a;for(;a!==!1&&s.indexOf(a)===-1;){if(!rt(a))return a;if(i=e[a],!i)return!1;if(i.visible)return a;s.push(a),a=i.fill}return!1}function e1(e,o,n){const r=r1(e);if(Me(r))return isNaN(r.value)?!1:r;let a=parseFloat(r);return rt(a)&&Math.floor(a)===a?t1(r[0],o,a,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function t1(e,o,n,r){return(e==="-"||e==="+")&&(n=o+n),n===o||n<0||n>=r?!1:n}function o1(e,o){let n=null;return e==="start"?n=o.bottom:e==="end"?n=o.top:Me(e)?n=o.getPixelForValue(e.value):o.getBasePixel&&(n=o.getBasePixel()),n}function n1(e,o,n){let r;return e==="start"?r=n:e==="end"?r=o.options.reverse?o.min:o.max:Me(e)?r=e.value:r=o.getBaseValue(),r}function r1(e){const o=e.options,n=o.fill;let r=Se(n&&n.target,n);return r===void 0&&(r=!!o.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function a1(e){const{scale:o,index:n,line:r}=e,a=[],s=r.segments,i=r.points,l=s1(o,n);l.push(Qd({x:null,y:o.bottom},r));for(let c=0;c<s.length;c++){const d=s[c];for(let f=d.start;f<=d.end;f++)i1(a,i[f],l)}return new yo({points:a,options:{}})}function s1(e,o){const n=[],r=e.getMatchingVisibleMetas("line");for(let a=0;a<r.length;a++){const s=r[a];if(s.index===o)break;s.hidden||n.unshift(s.dataset)}return n}function i1(e,o,n){const r=[];for(let a=0;a<n.length;a++){const s=n[a],{first:i,last:l,point:c}=l1(s,o,"x");if(!(!c||i&&l)){if(i)r.unshift(c);else if(e.push(c),!l)break}}e.push(...r)}function l1(e,o,n){const r=e.interpolate(o,n);if(!r)return{};const a=r[n],s=e.segments,i=e.points;let l=!1,c=!1;for(let d=0;d<s.length;d++){const f=s[d],u=i[f.start][n],h=i[f.end][n];if(eo(a,u,h)){l=a===u,c=a===h;break}}return{first:l,last:c,point:r}}class ef{constructor(o){this.x=o.x,this.y=o.y,this.radius=o.radius}pathSegment(o,n,r){const{x:a,y:s,radius:i}=this;return n=n||{start:0,end:Ke},o.arc(a,s,i,n.end,n.start,!0),!r.bounds}interpolate(o){const{x:n,y:r,radius:a}=this,s=o.angle;return{x:n+Math.cos(s)*a,y:r+Math.sin(s)*a,angle:s}}}function c1(e){const{chart:o,fill:n,line:r}=e;if(rt(n))return d1(o,n);if(n==="stack")return a1(e);if(n==="shape")return!0;const a=f1(e);return a instanceof ef?a:Qd(a,r)}function d1(e,o){const n=e.getDatasetMeta(o);return n&&e.isDatasetVisible(o)?n.dataset:null}function f1(e){return(e.scale||{}).getPointPositionForValue?h1(e):u1(e)}function u1(e){const{scale:o={},fill:n}=e,r=o1(n,o);if(rt(r)){const a=o.isHorizontal();return{x:a?r:null,y:a?null:r}}return null}function h1(e){const{scale:o,fill:n}=e,r=o.options,a=o.getLabels().length,s=r.reverse?o.max:o.min,i=n1(n,o,s),l=[];if(r.grid.circular){const c=o.getPointPositionForValue(0,s);return new ef({x:c.x,y:c.y,radius:o.getDistanceFromCenterForValue(i)})}for(let c=0;c<a;++c)l.push(o.getPointPositionForValue(c,i));return l}function $s(e,o,n){const r=c1(o),{chart:a,index:s,line:i,scale:l,axis:c}=o,d=i.options,f=d.fill,u=d.backgroundColor,{above:h=u,below:m=u}=f||{},p=a.getDatasetMeta(s),y=sd(a,p);r&&i.points.length&&(Dr(e,n),m1(e,{line:i,target:r,above:h,below:m,area:n,scale:l,axis:c,clip:y}),Nr(e))}function m1(e,o){const{line:n,target:r,above:a,below:s,area:i,scale:l,clip:c}=o,d=n._loop?"angle":o.axis;e.save();let f=s;s!==a&&(d==="x"?(tf(e,r,i.top),js(e,{line:n,target:r,color:a,scale:l,property:d,clip:c}),e.restore(),e.save(),tf(e,r,i.bottom)):d==="y"&&(of(e,r,i.left),js(e,{line:n,target:r,color:s,scale:l,property:d,clip:c}),e.restore(),e.save(),of(e,r,i.right),f=a)),js(e,{line:n,target:r,color:f,scale:l,property:d,clip:c}),e.restore()}function tf(e,o,n){const{segments:r,points:a}=o;let s=!0,i=!1;e.beginPath();for(const l of r){const{start:c,end:d}=l,f=a[c],u=a[Yr(c,d,a)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(f.x,n),e.lineTo(f.x,f.y)),i=!!o.pathSegment(e,l,{move:i}),i?e.closePath():e.lineTo(u.x,n)}e.lineTo(o.first().x,n),e.closePath(),e.clip()}function of(e,o,n){const{segments:r,points:a}=o;let s=!0,i=!1;e.beginPath();for(const l of r){const{start:c,end:d}=l,f=a[c],u=a[Yr(c,d,a)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(n,f.y),e.lineTo(f.x,f.y)),i=!!o.pathSegment(e,l,{move:i}),i?e.closePath():e.lineTo(n,u.y)}e.lineTo(n,o.first().y),e.closePath(),e.clip()}function js(e,o){const{line:n,target:r,property:a,color:s,scale:i,clip:l}=o,c=Jk(n,r,a);for(const{source:d,target:f,start:u,end:h}of c){const{style:{backgroundColor:m=s}={}}=d,p=r!==!0;e.save(),e.fillStyle=m,p1(e,i,l,p&&zs(a,u,h)),e.beginPath();const y=!!n.pathSegment(e,d);let b;if(p){y?e.closePath():nf(e,r,h,a);const g=!!r.pathSegment(e,f,{move:y,reverse:!0});b=y&&g,b||nf(e,r,u,a)}e.closePath(),e.fill(b?"evenodd":"nonzero"),e.restore()}}function p1(e,o,n,r){const a=o.chart.chartArea,{property:s,start:i,end:l}=r||{};if(s==="x"||s==="y"){let c,d,f,u;s==="x"?(c=i,d=a.top,f=l,u=a.bottom):(c=a.left,d=i,f=a.right,u=l),e.beginPath(),n&&(c=Math.max(c,n.left),f=Math.min(f,n.right),d=Math.max(d,n.top),u=Math.min(u,n.bottom)),e.rect(c,d,f-c,u-d),e.clip()}}function nf(e,o,n,r){const a=o.interpolate(n,r);a&&e.lineTo(a.x,a.y)}var g1={id:"filler",afterDatasetsUpdate(e,o,n){const r=(e.data.datasets||[]).length,a=[];let s,i,l,c;for(i=0;i<r;++i)s=e.getDatasetMeta(i),l=s.dataset,c=null,l&&l.options&&l instanceof yo&&(c={visible:e.isDatasetVisible(i),index:i,fill:e1(l,i,r),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=c,a.push(c);for(i=0;i<r;++i)c=a[i],!(!c||c.fill===!1)&&(c.fill=Zk(a,i,n.propagate))},beforeDraw(e,o,n){const r=n.drawTime==="beforeDraw",a=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let i=a.length-1;i>=0;--i){const l=a[i].$filler;l&&(l.line.updateControlPoints(s,l.axis),r&&l.fill&&$s(e.ctx,l,s))}},beforeDatasetsDraw(e,o,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let a=r.length-1;a>=0;--a){const s=r[a].$filler;Zd(s)&&$s(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,o,n){const r=o.meta.$filler;!Zd(r)||n.drawTime!=="beforeDatasetDraw"||$s(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const rf=(e,o)=>{let{boxHeight:n=o,boxWidth:r=o}=e;return e.usePointStyle&&(n=Math.min(n,o),r=e.pointStyleWidth||Math.min(r,o)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(o,n)}},b1=(e,o)=>e!==null&&o!==null&&e.datasetIndex===o.datasetIndex&&e.index===o.index;class af extends oo{constructor(o){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=o.chart,this.options=o.options,this.ctx=o.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(o,n,r){this.maxWidth=o,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const o=this.options.labels||{};let n=qe(o.generateLabels,[this.chart],this)||[];o.filter&&(n=n.filter(r=>o.filter(r,this.chart.data))),o.sort&&(n=n.sort((r,a)=>o.sort(r,a,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:o,ctx:n}=this;if(!o.display){this.width=this.height=0;return}const r=o.labels,a=it(r.font),s=a.size,i=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=rf(r,s);let d,f;n.font=a.string,this.isHorizontal()?(d=this.maxWidth,f=this._fitRows(i,s,l,c)+10):(f=this.maxHeight,d=this._fitCols(i,a,l,c)+10),this.width=Math.min(d,o.maxWidth||this.maxWidth),this.height=Math.min(f,o.maxHeight||this.maxHeight)}_fitRows(o,n,r,a){const{ctx:s,maxWidth:i,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],f=a+l;let u=o;s.textAlign="left",s.textBaseline="middle";let h=-1,m=-f;return this.legendItems.forEach((p,y)=>{const b=r+n/2+s.measureText(p.text).width;(y===0||d[d.length-1]+b+2*l>i)&&(u+=f,d[d.length-(y>0?0:1)]=0,m+=f,h++),c[y]={left:0,top:m,row:h,width:b,height:a},d[d.length-1]+=b+l}),u}_fitCols(o,n,r,a){const{ctx:s,maxHeight:i,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],f=i-o;let u=l,h=0,m=0,p=0,y=0;return this.legendItems.forEach((b,g)=>{const{itemWidth:_,itemHeight:E}=y1(r,n,s,b,a);g>0&&m+E+2*l>f&&(u+=h+l,d.push({width:h,height:m}),p+=h+l,y++,h=m=0),c[g]={left:p,top:m,col:y,width:_,height:E},h=Math.max(h,_),m+=E+l}),u+=h,d.push({width:h,height:m}),u}adjustHitBoxes(){if(!this.options.display)return;const o=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:a},rtl:s}}=this,i=nn(s,this.left,this.width);if(this.isHorizontal()){let l=0,c=st(r,this.left+a,this.right-this.lineWidths[l]);for(const d of n)l!==d.row&&(l=d.row,c=st(r,this.left+a,this.right-this.lineWidths[l])),d.top+=this.top+o+a,d.left=i.leftForLtr(i.x(c),d.width),c+=d.width+a}else{let l=0,c=st(r,this.top+o+a,this.bottom-this.columnSizes[l].height);for(const d of n)d.col!==l&&(l=d.col,c=st(r,this.top+o+a,this.bottom-this.columnSizes[l].height)),d.top=c,d.left+=this.left+a,d.left=i.leftForLtr(i.x(d.left),d.width),c+=d.height+a}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const o=this.ctx;Dr(o,this),this._draw(),Nr(o)}}_draw(){const{options:o,columnSizes:n,lineWidths:r,ctx:a}=this,{align:s,labels:i}=o,l=Je.color,c=nn(o.rtl,this.left,this.width),d=it(i.font),{padding:f}=i,u=d.size,h=u/2;let m;this.drawTitle(),a.textAlign=c.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:p,boxHeight:y,itemHeight:b}=rf(i,u),g=function(C,x,w){if(isNaN(p)||p<=0||isNaN(y)||y<0)return;a.save();const D=Se(w.lineWidth,1);if(a.fillStyle=Se(w.fillStyle,l),a.lineCap=Se(w.lineCap,"butt"),a.lineDashOffset=Se(w.lineDashOffset,0),a.lineJoin=Se(w.lineJoin,"miter"),a.lineWidth=D,a.strokeStyle=Se(w.strokeStyle,l),a.setLineDash(Se(w.lineDash,[])),i.usePointStyle){const k={radius:y*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:D},v=c.xPlus(C,p/2),S=x+h;$c(a,k,v,S,i.pointStyleWidth&&p)}else{const k=x+Math.max((u-y)/2,0),v=c.leftForLtr(C,p),S=en(w.borderRadius);a.beginPath(),Object.values(S).some(N=>N!==0)?Vr(a,{x:v,y:k,w:p,h:y,radius:S}):a.rect(v,k,p,y),a.fill(),D!==0&&a.stroke()}a.restore()},_=function(C,x,w){Fn(a,w.text,C,x+b/2,d,{strikethrough:w.hidden,textAlign:c.textAlign(w.textAlign)})},E=this.isHorizontal(),B=this._computeTitleHeight();E?m={x:st(s,this.left+f,this.right-r[0]),y:this.top+f+B,line:0}:m={x:this.left+f,y:st(s,this.top+B+f,this.bottom-n[0].height),line:0},Qc(this.ctx,o.textDirection);const A=b+f;this.legendItems.forEach((C,x)=>{a.strokeStyle=C.fontColor,a.fillStyle=C.fontColor;const w=a.measureText(C.text).width,D=c.textAlign(C.textAlign||(C.textAlign=i.textAlign)),k=p+h+w;let v=m.x,S=m.y;c.setWidth(this.width),E?x>0&&v+k+f>this.right&&(S=m.y+=A,m.line++,v=m.x=st(s,this.left+f,this.right-r[m.line])):x>0&&S+A>this.bottom&&(v=m.x=v+n[m.line].width+f,m.line++,S=m.y=st(s,this.top+B+f,this.bottom-n[m.line].height));const N=c.x(v);if(g(N,S,C),v=K0(D,v+p+h,E?v+k:this.right,o.rtl),_(c.x(v),S,C),E)m.x+=k+f;else if(typeof C.text!="string"){const V=d.lineHeight;m.y+=sf(C,V)+f}else m.y+=A}),Zc(this.ctx,o.textDirection)}drawTitle(){const o=this.options,n=o.title,r=it(n.font),a=_t(n.padding);if(!n.display)return;const s=nn(o.rtl,this.left,this.width),i=this.ctx,l=n.position,c=r.size/2,d=a.top+c;let f,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),f=this.top+d,u=st(o.align,u,this.right-h);else{const p=this.columnSizes.reduce((y,b)=>Math.max(y,b.height),0);f=d+st(o.align,this.top,this.bottom-p-o.labels.padding-this._computeTitleHeight())}const m=st(l,u,u+h);i.textAlign=s.textAlign(hs(l)),i.textBaseline="middle",i.strokeStyle=n.color,i.fillStyle=n.color,i.font=r.string,Fn(i,n.text,m,f,r)}_computeTitleHeight(){const o=this.options.title,n=it(o.font),r=_t(o.padding);return o.display?n.lineHeight+r.height:0}_getLegendItemAt(o,n){let r,a,s;if(eo(o,this.left,this.right)&&eo(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(a=s[r],eo(o,a.left,a.left+a.width)&&eo(n,a.top,a.top+a.height))return this.legendItems[r]}return null}handleEvent(o){const n=this.options;if(!w1(o.type,n))return;const r=this._getLegendItemAt(o.x,o.y);if(o.type==="mousemove"||o.type==="mouseout"){const a=this._hoveredItem,s=b1(a,r);a&&!s&&qe(n.onLeave,[o,a,this],this),this._hoveredItem=r,r&&!s&&qe(n.onHover,[o,r,this],this)}else r&&qe(n.onClick,[o,r,this],this)}}function y1(e,o,n,r,a){const s=x1(r,e,o,n),i=k1(a,r,o.lineHeight);return{itemWidth:s,itemHeight:i}}function x1(e,o,n,r){let a=e.text;return a&&typeof a!="string"&&(a=a.reduce((s,i)=>s.length>i.length?s:i)),o+n.size/2+r.measureText(a).width}function k1(e,o,n){let r=e;return typeof o.text!="string"&&(r=sf(o,n)),r}function sf(e,o){const n=e.text?e.text.length:0;return o*n}function w1(e,o){return!!((e==="mousemove"||e==="mouseout")&&(o.onHover||o.onLeave)||o.onClick&&(e==="click"||e==="mouseup"))}var C1={id:"legend",_element:af,start(e,o,n){const r=e.legend=new af({ctx:e.ctx,options:n,chart:e});Et.configure(e,r,n),Et.addBox(e,r)},stop(e){Et.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,o,n){const r=e.legend;Et.configure(e,r,n),r.options=n},afterUpdate(e){const o=e.legend;o.buildLabels(),o.adjustHitBoxes()},afterEvent(e,o){o.replay||e.legend.handleEvent(o.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,o,n){const r=o.datasetIndex,a=n.chart;a.isDatasetVisible(r)?(a.hide(r),o.hidden=!0):(a.show(r),o.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const o=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:a,color:s,useBorderRadius:i,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(n?0:void 0),f=_t(d.borderWidth);return{text:o[c.index].label,fillStyle:d.backgroundColor,fontColor:s,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:d.borderColor,pointStyle:r||d.pointStyle,rotation:d.rotation,textAlign:a||d.textAlign,borderRadius:i&&(l||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class lf extends oo{constructor(o){super(),this.chart=o.chart,this.options=o.options,this.ctx=o.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(o,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=o,this.height=this.bottom=n;const a=Ze(r.text)?r.text.length:1;this._padding=_t(r.padding);const s=a*it(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const o=this.options.position;return o==="top"||o==="bottom"}_drawArgs(o){const{top:n,left:r,bottom:a,right:s,options:i}=this,l=i.align;let c=0,d,f,u;return this.isHorizontal()?(f=st(l,r,s),u=n+o,d=s-r):(i.position==="left"?(f=r+o,u=st(l,a,n),c=Ue*-.5):(f=s-o,u=st(l,n,a),c=Ue*.5),d=a-n),{titleX:f,titleY:u,maxWidth:d,rotation:c}}draw(){const o=this.ctx,n=this.options;if(!n.display)return;const r=it(n.font),s=r.lineHeight/2+this._padding.top,{titleX:i,titleY:l,maxWidth:c,rotation:d}=this._drawArgs(s);Fn(o,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:d,textAlign:hs(n.align),textBaseline:"middle",translation:[i,l]})}}function _1(e,o){const n=new lf({ctx:e.ctx,options:o,chart:e});Et.configure(e,n,o),Et.addBox(e,n),e.titleBlock=n}var E1={id:"title",_element:lf,start(e,o,n){_1(e,n)},stop(e){const o=e.titleBlock;Et.removeBox(e,o),delete e.titleBlock},beforeUpdate(e,o,n){const r=e.titleBlock;Et.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Kn={average(e){if(!e.length)return!1;let o,n,r=new Set,a=0,s=0;for(o=0,n=e.length;o<n;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.tooltipPosition();r.add(c.x),a+=c.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((l,c)=>l+c)/r.size,y:a/s}},nearest(e,o){if(!e.length)return!1;let n=o.x,r=o.y,a=Number.POSITIVE_INFINITY,s,i,l;for(s=0,i=e.length;s<i;++s){const c=e[s].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),f=fs(o,d);f<a&&(a=f,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,r=c.y}return{x:n,y:r}}};function zt(e,o){return o&&(Ze(o)?Array.prototype.push.apply(e,o):e.push(o)),e}function ro(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
34
|
-
`)>-1?
|
|
35
|
-
`):e}function B1(e,o){const{element:n,datasetIndex:r,index:a}=o,s=e.getDatasetMeta(r).controller,{label:i,value:l}=s.getLabelAndValue(a);return{chart:e,label:i,parsed:s.getParsed(a),raw:e.data.datasets[r].data[a],formattedValue:l,dataset:s.getDataset(),dataIndex:a,datasetIndex:r,element:n}}function cf(e,o){const n=e.chart.ctx,{body:r,footer:a,title:s}=e,{boxWidth:i,boxHeight:l}=o,c=it(o.bodyFont),d=it(o.titleFont),f=it(o.footerFont),u=s.length,h=a.length,m=r.length,p=_t(o.padding);let y=p.height,b=0,g=r.reduce((B,A)=>B+A.before.length+A.lines.length+A.after.length,0);if(g+=e.beforeBody.length+e.afterBody.length,u&&(y+=u*d.lineHeight+(u-1)*o.titleSpacing+o.titleMarginBottom),g){const B=o.displayColors?Math.max(l,c.lineHeight):c.lineHeight;y+=m*B+(g-m)*c.lineHeight+(g-1)*o.bodySpacing}h&&(y+=o.footerMarginTop+h*f.lineHeight+(h-1)*o.footerSpacing);let _=0;const E=function(B){b=Math.max(b,n.measureText(B).width+_)};return n.save(),n.font=d.string,je(e.title,E),n.font=c.string,je(e.beforeBody.concat(e.afterBody),E),_=o.displayColors?i+2+o.boxPadding:0,je(r,B=>{je(B.before,E),je(B.lines,E),je(B.after,E)}),_=0,n.font=f.string,je(e.footer,E),n.restore(),b+=p.width,{width:b,height:y}}function S1(e,o){const{y:n,height:r}=o;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function A1(e,o,n,r){const{x:a,width:s}=r,i=n.caretSize+n.caretPadding;if(e==="left"&&a+s+i>o.width||e==="right"&&a-s-i<0)return!0}function v1(e,o,n,r){const{x:a,width:s}=n,{width:i,chartArea:{left:l,right:c}}=e;let d="center";return r==="center"?d=a<=(l+c)/2?"left":"right":a<=s/2?d="left":a>=i-s/2&&(d="right"),A1(d,e,o,n)&&(d="center"),d}function df(e,o,n){const r=n.yAlign||o.yAlign||S1(e,n);return{xAlign:n.xAlign||o.xAlign||v1(e,o,n,r),yAlign:r}}function D1(e,o){let{x:n,width:r}=e;return o==="right"?n-=r:o==="center"&&(n-=r/2),n}function N1(e,o,n){let{y:r,height:a}=e;return o==="top"?r+=n:o==="bottom"?r-=a+n:r-=a/2,r}function ff(e,o,n,r){const{caretSize:a,caretPadding:s,cornerRadius:i}=e,{xAlign:l,yAlign:c}=n,d=a+s,{topLeft:f,topRight:u,bottomLeft:h,bottomRight:m}=en(i);let p=D1(o,l);const y=N1(o,c,d);return c==="center"?l==="left"?p+=d:l==="right"&&(p-=d):l==="left"?p-=Math.max(f,h)+a:l==="right"&&(p+=Math.max(u,m)+a),{x:at(p,0,r.width-o.width),y:at(y,0,r.height-o.height)}}function Jr(e,o,n){const r=_t(n.padding);return o==="center"?e.x+e.width/2:o==="right"?e.x+e.width-r.right:e.x+r.left}function uf(e){return zt([],ro(e))}function V1(e,o,n){return Oo(e,{tooltip:o,tooltipItems:n,type:"tooltip"})}function hf(e,o){const n=o&&o.dataset&&o.dataset.tooltip&&o.dataset.tooltip.callbacks;return n?e.override(n):e}const mf={beforeTitle:Qt,title(e){if(e.length>0){const o=e[0],n=o.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return o.dataset.label||"";if(o.label)return o.label;if(r>0&&o.dataIndex<r)return n[o.dataIndex]}return""},afterTitle:Qt,beforeBody:Qt,beforeLabel:Qt,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let o=e.dataset.label||"";o&&(o+=": ");const n=e.formattedValue;return $e(n)||(o+=n),o},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Qt,afterBody:Qt,beforeFooter:Qt,footer:Qt,afterFooter:Qt};function ft(e,o,n,r){const a=e[o].call(n,r);return typeof a>"u"?mf[o].call(n,r):a}class Us extends oo{constructor(o){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=o.chart,this.options=o.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(o){this.options=o,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const o=this._cachedAnimations;if(o)return o;const n=this.chart,r=this.options.setContext(this.getContext()),a=r.enabled&&n.options.animation&&r.animations,s=new ld(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=V1(this.chart.getContext(),this,this._tooltipItems))}getTitle(o,n){const{callbacks:r}=n,a=ft(r,"beforeTitle",this,o),s=ft(r,"title",this,o),i=ft(r,"afterTitle",this,o);let l=[];return l=zt(l,ro(a)),l=zt(l,ro(s)),l=zt(l,ro(i)),l}getBeforeBody(o,n){return uf(ft(n.callbacks,"beforeBody",this,o))}getBody(o,n){const{callbacks:r}=n,a=[];return je(o,s=>{const i={before:[],lines:[],after:[]},l=hf(r,s);zt(i.before,ro(ft(l,"beforeLabel",this,s))),zt(i.lines,ft(l,"label",this,s)),zt(i.after,ro(ft(l,"afterLabel",this,s))),a.push(i)}),a}getAfterBody(o,n){return uf(ft(n.callbacks,"afterBody",this,o))}getFooter(o,n){const{callbacks:r}=n,a=ft(r,"beforeFooter",this,o),s=ft(r,"footer",this,o),i=ft(r,"afterFooter",this,o);let l=[];return l=zt(l,ro(a)),l=zt(l,ro(s)),l=zt(l,ro(i)),l}_createItems(o){const n=this._active,r=this.chart.data,a=[],s=[],i=[];let l=[],c,d;for(c=0,d=n.length;c<d;++c)l.push(B1(this.chart,n[c]));return o.filter&&(l=l.filter((f,u,h)=>o.filter(f,u,h,r))),o.itemSort&&(l=l.sort((f,u)=>o.itemSort(f,u,r))),je(l,f=>{const u=hf(o.callbacks,f);a.push(ft(u,"labelColor",this,f)),s.push(ft(u,"labelPointStyle",this,f)),i.push(ft(u,"labelTextColor",this,f))}),this.labelColors=a,this.labelPointStyles=s,this.labelTextColors=i,this.dataPoints=l,l}update(o,n){const r=this.options.setContext(this.getContext()),a=this._active;let s,i=[];if(!a.length)this.opacity!==0&&(s={opacity:0});else{const l=Kn[r.position].call(this,a,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const c=this._size=cf(this,r),d=Object.assign({},l,c),f=df(this.chart,r,d),u=ff(r,d,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,s={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=i,this.$context=void 0,s&&this._resolveAnimations().update(this,s),o&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(o,n,r,a){const s=this.getCaretPosition(o,r,a);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(o,n,r){const{xAlign:a,yAlign:s}=this,{caretSize:i,cornerRadius:l}=r,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:u}=en(l),{x:h,y:m}=o,{width:p,height:y}=n;let b,g,_,E,B,A;return s==="center"?(B=m+y/2,a==="left"?(b=h,g=b-i,E=B+i,A=B-i):(b=h+p,g=b+i,E=B-i,A=B+i),_=b):(a==="left"?g=h+Math.max(c,f)+i:a==="right"?g=h+p-Math.max(d,u)-i:g=this.caretX,s==="top"?(E=m,B=E-i,b=g-i,_=g+i):(E=m+y,B=E+i,b=g+i,_=g-i),A=E),{x1:b,x2:g,x3:_,y1:E,y2:B,y3:A}}drawTitle(o,n,r){const a=this.title,s=a.length;let i,l,c;if(s){const d=nn(r.rtl,this.x,this.width);for(o.x=Jr(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",i=it(r.titleFont),l=r.titleSpacing,n.fillStyle=r.titleColor,n.font=i.string,c=0;c<s;++c)n.fillText(a[c],d.x(o.x),o.y+i.lineHeight/2),o.y+=i.lineHeight+l,c+1===s&&(o.y+=r.titleMarginBottom-l)}}_drawColorBox(o,n,r,a,s){const i=this.labelColors[r],l=this.labelPointStyles[r],{boxHeight:c,boxWidth:d}=s,f=it(s.bodyFont),u=Jr(this,"left",s),h=a.x(u),m=c<f.lineHeight?(f.lineHeight-c)/2:0,p=n.y+m;if(s.usePointStyle){const y={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},b=a.leftForLtr(h,d)+d/2,g=p+c/2;o.strokeStyle=s.multiKeyBackground,o.fillStyle=s.multiKeyBackground,xs(o,y,b,g),o.strokeStyle=i.borderColor,o.fillStyle=i.backgroundColor,xs(o,y,b,g)}else{o.lineWidth=Me(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,o.strokeStyle=i.borderColor,o.setLineDash(i.borderDash||[]),o.lineDashOffset=i.borderDashOffset||0;const y=a.leftForLtr(h,d),b=a.leftForLtr(a.xPlus(h,1),d-2),g=en(i.borderRadius);Object.values(g).some(_=>_!==0)?(o.beginPath(),o.fillStyle=s.multiKeyBackground,Vr(o,{x:y,y:p,w:d,h:c,radius:g}),o.fill(),o.stroke(),o.fillStyle=i.backgroundColor,o.beginPath(),Vr(o,{x:b,y:p+1,w:d-2,h:c-2,radius:g}),o.fill()):(o.fillStyle=s.multiKeyBackground,o.fillRect(y,p,d,c),o.strokeRect(y,p,d,c),o.fillStyle=i.backgroundColor,o.fillRect(b,p+1,d-2,c-2))}o.fillStyle=this.labelTextColors[r]}drawBody(o,n,r){const{body:a}=this,{bodySpacing:s,bodyAlign:i,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:f}=r,u=it(r.bodyFont);let h=u.lineHeight,m=0;const p=nn(r.rtl,this.x,this.width),y=function(w){n.fillText(w,p.x(o.x+m),o.y+h/2),o.y+=h+s},b=p.textAlign(i);let g,_,E,B,A,C,x;for(n.textAlign=i,n.textBaseline="middle",n.font=u.string,o.x=Jr(this,b,r),n.fillStyle=r.bodyColor,je(this.beforeBody,y),m=l&&b!=="right"?i==="center"?d/2+f:d+2+f:0,B=0,C=a.length;B<C;++B){for(g=a[B],_=this.labelTextColors[B],n.fillStyle=_,je(g.before,y),E=g.lines,l&&E.length&&(this._drawColorBox(n,o,B,p,r),h=Math.max(u.lineHeight,c)),A=0,x=E.length;A<x;++A)y(E[A]),h=u.lineHeight;je(g.after,y)}m=0,h=u.lineHeight,je(this.afterBody,y),o.y-=s}drawFooter(o,n,r){const a=this.footer,s=a.length;let i,l;if(s){const c=nn(r.rtl,this.x,this.width);for(o.x=Jr(this,r.footerAlign,r),o.y+=r.footerMarginTop,n.textAlign=c.textAlign(r.footerAlign),n.textBaseline="middle",i=it(r.footerFont),n.fillStyle=r.footerColor,n.font=i.string,l=0;l<s;++l)n.fillText(a[l],c.x(o.x),o.y+i.lineHeight/2),o.y+=i.lineHeight+r.footerSpacing}}drawBackground(o,n,r,a){const{xAlign:s,yAlign:i}=this,{x:l,y:c}=o,{width:d,height:f}=r,{topLeft:u,topRight:h,bottomLeft:m,bottomRight:p}=en(a.cornerRadius);n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.beginPath(),n.moveTo(l+u,c),i==="top"&&this.drawCaret(o,n,r,a),n.lineTo(l+d-h,c),n.quadraticCurveTo(l+d,c,l+d,c+h),i==="center"&&s==="right"&&this.drawCaret(o,n,r,a),n.lineTo(l+d,c+f-p),n.quadraticCurveTo(l+d,c+f,l+d-p,c+f),i==="bottom"&&this.drawCaret(o,n,r,a),n.lineTo(l+m,c+f),n.quadraticCurveTo(l,c+f,l,c+f-m),i==="center"&&s==="left"&&this.drawCaret(o,n,r,a),n.lineTo(l,c+u),n.quadraticCurveTo(l,c,l+u,c),n.closePath(),n.fill(),a.borderWidth>0&&n.stroke()}_updateAnimationTarget(o){const n=this.chart,r=this.$animations,a=r&&r.x,s=r&&r.y;if(a||s){const i=Kn[o.position].call(this,this._active,this._eventPosition);if(!i)return;const l=this._size=cf(this,o),c=Object.assign({},i,this._size),d=df(n,o,c),f=ff(o,c,d,n);(a._to!==f.x||s._to!==f.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(o){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const a={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=_t(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(o.save(),o.globalAlpha=r,this.drawBackground(s,o,a,n),Qc(o,n.textDirection),s.y+=i.top,this.drawTitle(s,o,n),this.drawBody(s,o,n),this.drawFooter(s,o,n),Zc(o,n.textDirection),o.restore())}getActiveElements(){return this._active||[]}setActiveElements(o,n){const r=this._active,a=o.map(({datasetIndex:l,index:c})=>{const d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c}}),s=!Br(r,a),i=this._positionChanged(a,n);(s||i)&&(this._active=a,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(o,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,s=this._active||[],i=this._getActiveElements(o,s,n,r),l=this._positionChanged(i,o),c=n||!Br(i,s)||l;return c&&(this._active=i,(a.enabled||a.external)&&(this._eventPosition={x:o.x,y:o.y},this.update(!0,n))),c}_getActiveElements(o,n,r,a){const s=this.options;if(o.type==="mouseout")return[];if(!a)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const i=this.chart.getElementsAtEventForMode(o,s.mode,s,r);return s.reverse&&i.reverse(),i}_positionChanged(o,n){const{caretX:r,caretY:a,options:s}=this,i=Kn[s.position].call(this,o,n);return i!==!1&&(r!==i.x||a!==i.y)}}be(Us,"positioners",Kn);var M1={id:"tooltip",_element:Us,positioners:Kn,afterInit(e,o,n){n&&(e.tooltip=new Us({chart:e,options:n}))},beforeUpdate(e,o,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,o,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const o=e.tooltip;if(o&&o._willRender()){const n={tooltip:o};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;o.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,o){if(e.tooltip){const n=o.replay;e.tooltip.handleEvent(o.event,n,o.inChartArea)&&(o.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,o)=>o.bodyFont.size,boxWidth:(e,o)=>o.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:mf},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const T1=(e,o,n,r)=>(typeof o=="string"?(n=e.push(o)-1,r.unshift({index:n,label:o})):isNaN(o)&&(n=null),n);function P1(e,o,n,r){const a=e.indexOf(o);if(a===-1)return T1(e,o,n,r);const s=e.lastIndexOf(o);return a!==s?n:a}const O1=(e,o)=>e===null?null:at(Math.round(e),0,o);function pf(e){const o=this.getLabels();return e>=0&&e<o.length?o[e]:e}class Ws extends an{constructor(o){super(o),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(o){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:a,label:s}of n)r[a]===s&&r.splice(a,1);this._addedLabels=[]}super.init(o)}parse(o,n){if($e(o))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===o?n:P1(r,o,Se(n,o),this._addedLabels),O1(n,r.length-1)}determineDataLimits(){const{minDefined:o,maxDefined:n}=this.getUserBounds();let{min:r,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(o||(r=0),n||(a=this.getLabels().length-1)),this.min=r,this.max=a}buildTicks(){const o=this.min,n=this.max,r=this.options.offset,a=[];let s=this.getLabels();s=o===0&&n===s.length-1?s:s.slice(o,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=o;i<=n;i++)a.push({value:i});return a}getLabelForValue(o){return pf.call(this,o)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(o){return typeof o!="number"&&(o=this.parse(o)),o===null?NaN:this.getPixelForDecimal((o-this._startValue)/this._valueRange)}getPixelForTick(o){const n=this.ticks;return o<0||o>n.length-1?null:this.getPixelForValue(n[o].value)}getValueForPixel(o){return Math.round(this._startValue+this.getDecimalForPixel(o)*this._valueRange)}getBasePixel(){return this.bottom}}be(Ws,"id","category"),be(Ws,"defaults",{ticks:{callback:pf}});function L1(e,o){const n=[],{bounds:a,step:s,min:i,max:l,precision:c,count:d,maxTicks:f,maxDigits:u,includeBounds:h}=e,m=s||1,p=f-1,{min:y,max:b}=o,g=!$e(i),_=!$e(l),E=!$e(d),B=(b-y)/(u+1);let A=Sc((b-y)/p/m)*m,C,x,w,D;if(A<1e-14&&!g&&!_)return[{value:y},{value:b}];D=Math.ceil(b/A)-Math.floor(y/A),D>p&&(A=Sc(D*A/p/m)*m),$e(c)||(C=Math.pow(10,c),A=Math.ceil(A*C)/C),a==="ticks"?(x=Math.floor(y/A)*A,w=Math.ceil(b/A)*A):(x=y,w=b),g&&_&&s&&F0((l-i)/s,A/1e3)?(D=Math.round(Math.min((l-i)/A,f)),A=(l-i)/D,x=i,w=l):E?(x=g?i:x,w=_?l:w,D=d-1,A=(w-x)/D):(D=(w-x)/A,Tn(D,Math.round(D),A/1e3)?D=Math.round(D):D=Math.ceil(D));const k=Math.max(Ac(A),Ac(x));C=Math.pow(10,$e(c)?k:c),x=Math.round(x*C)/C,w=Math.round(w*C)/C;let v=0;for(g&&(h&&x!==i?(n.push({value:i}),x<i&&v++,Tn(Math.round((x+v*A)*C)/C,i,gf(i,B,e))&&v++):x<i&&v++);v<D;++v){const S=Math.round((x+v*A)*C)/C;if(_&&S>l)break;n.push({value:S})}return _&&h&&w!==l?n.length&&Tn(n[n.length-1].value,l,gf(l,B,e))?n[n.length-1].value=l:n.push({value:l}):(!_||w===l)&&n.push({value:w}),n}function gf(e,o,{horizontal:n,minRotation:r}){const a=Zt(r),s=(n?Math.sin(a):Math.cos(a))||.001,i=.75*o*(""+e).length;return Math.min(o/s,i)}class R1 extends an{constructor(o){super(o),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(o,n){return $e(o)||(typeof o=="number"||o instanceof Number)&&!isFinite(+o)?null:+o}handleTickRangeOptions(){const{beginAtZero:o}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:a,max:s}=this;const i=c=>a=n?a:c,l=c=>s=r?s:c;if(o){const c=It(a),d=It(s);c<0&&d<0?l(0):c>0&&d>0&&i(0)}if(a===s){let c=s===0?1:Math.abs(s*.05);l(s+c),o||i(a-c)}this.min=a,this.max=s}getTickLimit(){const o=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=o,a;return r?(a=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),n=n||11),n&&(a=Math.min(n,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const o=this.options,n=o.ticks;let r=this.getTickLimit();r=Math.max(2,r);const a={maxTicks:r,bounds:o.bounds,min:o.min,max:o.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,i=L1(a,s);return o.bounds==="ticks"&&z0(i,this,"value"),o.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const o=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&o.length){const a=(r-n)/Math.max(o.length-1,1)/2;n-=a,r+=a}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(o){return gs(o,this.chart.options.locale,this.options.ticks.format)}}class Hs extends R1{determineDataLimits(){const{min:o,max:n}=this.getMinMax(!0);this.min=rt(o)?o:0,this.max=rt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const o=this.isHorizontal(),n=o?this.width:this.height,r=Zt(this.options.ticks.minRotation),a=(o?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/a))}getPixelForValue(o){return o===null?NaN:this.getPixelForDecimal((o-this._startValue)/this._valueRange)}getValueForPixel(o){return this._startValue+this.getDecimalForPixel(o)*this._valueRange}}be(Hs,"id","linear"),be(Hs,"defaults",{ticks:{callback:Ic.formatters.numeric}});const Qr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ut=Object.keys(Qr);function bf(e,o){return e-o}function yf(e,o){if($e(o))return null;const n=e._adapter,{parser:r,round:a,isoWeekday:s}=e._parseOpts;let i=o;return typeof r=="function"&&(i=r(i)),rt(i)||(i=typeof r=="string"?n.parse(i,r):n.parse(i)),i===null?null:(a&&(i=a==="week"&&(Pn(s)||s===!0)?n.startOf(i,"isoWeek",s):n.startOf(i,a)),+i)}function xf(e,o,n,r){const a=ut.length;for(let s=ut.indexOf(e);s<a-1;++s){const i=Qr[ut[s]],l=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((n-o)/(l*i.size))<=r)return ut[s]}return ut[a-1]}function I1(e,o,n,r,a){for(let s=ut.length-1;s>=ut.indexOf(n);s--){const i=ut[s];if(Qr[i].common&&e._adapter.diff(a,r,i)>=o-1)return i}return ut[n?ut.indexOf(n):0]}function F1(e){for(let o=ut.indexOf(e)+1,n=ut.length;o<n;++o)if(Qr[ut[o]].common)return ut[o]}function kf(e,o,n){if(!n)e[o]=!0;else if(n.length){const{lo:r,hi:a}=us(n,o),s=n[r]>=o?n[r]:n[a];e[s]=!0}}function z1(e,o,n,r){const a=e._adapter,s=+a.startOf(o[0].value,r),i=o[o.length-1].value;let l,c;for(l=s;l<=i;l=+a.add(l,1,r))c=n[l],c>=0&&(o[c].major=!0);return o}function wf(e,o,n){const r=[],a={},s=o.length;let i,l;for(i=0;i<s;++i)l=o[i],a[l]=i,r.push({value:l,major:!1});return s===0||!n?r:z1(e,r,a,n)}class Zr extends an{constructor(o){super(o),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(o,n={}){const r=o.time||(o.time={}),a=this._adapter=new Cx._date(o.adapters.date);a.init(n),Vn(r.displayFormats,a.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(o),this._normalized=n.normalized}parse(o,n){return o===void 0?null:yf(this,o)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const o=this.options,n=this._adapter,r=o.time.unit||"day";let{min:a,max:s,minDefined:i,maxDefined:l}=this.getUserBounds();function c(d){!i&&!isNaN(d.min)&&(a=Math.min(a,d.min)),!l&&!isNaN(d.max)&&(s=Math.max(s,d.max))}(!i||!l)&&(c(this._getLabelBounds()),(o.bounds!=="ticks"||o.ticks.source!=="labels")&&c(this.getMinMax(!1))),a=rt(a)&&!isNaN(a)?a:+n.startOf(Date.now(),r),s=rt(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(a,s-1),this.max=Math.max(a+1,s)}_getLabelBounds(){const o=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return o.length&&(n=o[0],r=o[o.length-1]),{min:n,max:r}}buildTicks(){const o=this.options,n=o.time,r=o.ticks,a=r.source==="labels"?this.getLabelTimestamps():this._generate();o.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const s=this.min,i=this.max,l=H0(a,s,i);return this._unit=n.unit||(r.autoSkip?xf(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):I1(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:F1(this._unit),this.initOffsets(a),o.reverse&&l.reverse(),wf(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(o=>+o.value))}initOffsets(o=[]){let n=0,r=0,a,s;this.options.offset&&o.length&&(a=this.getDecimalForValue(o[0]),o.length===1?n=1-a:n=(this.getDecimalForValue(o[1])-a)/2,s=this.getDecimalForValue(o[o.length-1]),o.length===1?r=s:r=(s-this.getDecimalForValue(o[o.length-2]))/2);const i=o.length<3?.5:.25;n=at(n,0,i),r=at(r,0,i),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const o=this._adapter,n=this.min,r=this.max,a=this.options,s=a.time,i=s.unit||xf(s.minUnit,n,r,this._getLabelCapacity(n)),l=Se(a.ticks.stepSize,1),c=i==="week"?s.isoWeekday:!1,d=Pn(c)||c===!0,f={};let u=n,h,m;if(d&&(u=+o.startOf(u,"isoWeek",c)),u=+o.startOf(u,d?"day":i),o.diff(r,n,i)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+i);const p=a.ticks.source==="data"&&this.getDataTimestamps();for(h=u,m=0;h<r;h=+o.add(h,l,i),m++)kf(f,h,p);return(h===r||a.bounds==="ticks"||m===1)&&kf(f,h,p),Object.keys(f).sort(bf).map(y=>+y)}getLabelForValue(o){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(o,r.tooltipFormat):n.format(o,r.displayFormats.datetime)}format(o,n){const a=this.options.time.displayFormats,s=this._unit,i=n||a[s];return this._adapter.format(o,i)}_tickFormatFunction(o,n,r,a){const s=this.options,i=s.ticks.callback;if(i)return qe(i,[o,n,r],this);const l=s.time.displayFormats,c=this._unit,d=this._majorUnit,f=c&&l[c],u=d&&l[d],h=r[n],m=d&&u&&h&&h.major;return this._adapter.format(o,a||(m?u:f))}generateTickLabels(o){let n,r,a;for(n=0,r=o.length;n<r;++n)a=o[n],a.label=this._tickFormatFunction(a.value,n,o)}getDecimalForValue(o){return o===null?NaN:(o-this.min)/(this.max-this.min)}getPixelForValue(o){const n=this._offsets,r=this.getDecimalForValue(o);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(o){const n=this._offsets,r=this.getDecimalForPixel(o)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(o){const n=this.options.ticks,r=this.ctx.measureText(o).width,a=Zt(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(a),i=Math.sin(a),l=this._resolveTickFontOptions(0).size;return{w:r*s+l*i,h:r*i+l*s}}_getLabelCapacity(o){const n=this.options.time,r=n.displayFormats,a=r[n.unit]||r.millisecond,s=this._tickFormatFunction(o,0,wf(this,[o],this._majorUnit),a),i=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return l>0?l:1}getDataTimestamps(){let o=this._cache.data||[],n,r;if(o.length)return o;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(n=0,r=a.length;n<r;++n)o=o.concat(a[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(o)}getLabelTimestamps(){const o=this._cache.labels||[];let n,r;if(o.length)return o;const a=this.getLabels();for(n=0,r=a.length;n<r;++n)o.push(yf(this,a[n]));return this._cache.labels=this._normalized?o:this.normalize(o)}normalize(o){return Vc(o.sort(bf))}}be(Zr,"id","time"),be(Zr,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function ea(e,o,n){let r=0,a=e.length-1,s,i,l,c;n?(o>=e[r].pos&&o<=e[a].pos&&({lo:r,hi:a}=Mo(e,"pos",o)),{pos:s,time:l}=e[r],{pos:i,time:c}=e[a]):(o>=e[r].time&&o<=e[a].time&&({lo:r,hi:a}=Mo(e,"time",o)),{time:s,pos:l}=e[r],{time:i,pos:c}=e[a]);const d=i-s;return d?l+(c-l)*(o-s)/d:l}class Cf extends Zr{constructor(o){super(o),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const o=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(o);this._minPos=ea(n,this.min),this._tableRange=ea(n,this.max)-this._minPos,super.initOffsets(o)}buildLookupTable(o){const{min:n,max:r}=this,a=[],s=[];let i,l,c,d,f;for(i=0,l=o.length;i<l;++i)d=o[i],d>=n&&d<=r&&a.push(d);if(a.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(i=0,l=a.length;i<l;++i)f=a[i+1],c=a[i-1],d=a[i],Math.round((f+c)/2)!==d&&s.push({time:d,pos:i/(l-1)});return s}_generate(){const o=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(o)||!r.length)&&r.splice(0,0,o),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((a,s)=>a-s)}_getTimestampsForTable(){let o=this._cache.all||[];if(o.length)return o;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?o=this.normalize(n.concat(r)):o=n.length?n:r,o=this._cache.all=o,o}getDecimalForValue(o){return(ea(this._table,o)-this._minPos)/this._tableRange}getValueForPixel(o){const n=this._offsets,r=this.getDecimalForPixel(o)/n.factor-n.end;return ea(this._table,r*this._tableRange+this._minPos,!0)}}be(Cf,"id","timeseries"),be(Cf,"defaults",Zr.defaults);const $1={key:0,class:"mb-2 text-sm font-medium text-gray-700"},j1={key:0,class:"text-red-500 ml-1"},U1={key:0,class:"absolute inset-0 flex items-center justify-center bg-white"},W1={key:1,class:"absolute inset-0 flex items-center justify-center bg-red-50 border border-red-200 rounded"},H1={class:"text-red-600 text-sm"},q1={key:1,class:"mt-2 text-xs text-gray-500"},G1={key:0},_f=lt(t.defineComponent({name:"DCodeChart",__name:"DCodeChart",props:{type:{default:"line"},width:{default:400},height:{default:300},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},error:{default:null},showInfo:{type:Boolean,default:!1},responsive:{type:Boolean,default:!0},maintainAspectRatio:{type:Boolean,default:!1},theme:{default:"light"},colors:{default:()=>["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#14B8A6","#F97316","#6366F1","#84CC16"]},data:{},modelValue:{},options:{},onClick:{},onHover:{},label:{}},emits:["update:modelValue","click","hover","ready"],setup(e,{expose:o,emit:n}){no.register(Ws,Hs,Kr,yo,Xr,Gn,E1,M1,C1,g1,Ir,Rr,Ns,rn);const r=e,a=n,s=t.ref(null),i=t.shallowRef(null),l=t.ref(null),c=t.computed(()=>({"opacity-50 pointer-events-none":r.loading||r.error})),d=()=>{const h=r.theme==="dark";return{responsive:r.responsive,maintainAspectRatio:r.maintainAspectRatio,animation:{duration:1e3,easing:"easeInOutQuart",delay:m=>{let p=0;return m.type==="data"&&m.mode==="default"&&(p=m.dataIndex*100+m.datasetIndex*50),p},onComplete:()=>{}},plugins:{legend:{position:"top",labels:{color:h?"#E5E7EB":"#374151",font:{size:12}}},tooltip:{backgroundColor:h?"#1F2937":"#FFFFFF",titleColor:h?"#F3F4F6":"#111827",bodyColor:h?"#D1D5DB":"#4B5563",borderColor:h?"#374151":"#E5E7EB",borderWidth:1,animation:{duration:200,easing:"easeInOutQuad"}}},scales:r.type!=="pie"&&r.type!=="doughnut"&&r.type!=="polarArea"?{x:{grid:{color:h?"#374151":"#E5E7EB"},ticks:{color:h?"#D1D5DB":"#6B7280"}},y:{grid:{color:h?"#374151":"#E5E7EB"},ticks:{color:h?"#D1D5DB":"#6B7280"}}}:void 0}},f=h=>!h||!h.datasets?h:{...h,datasets:h.datasets.map((m,p)=>{const y=p%r.colors.length,b=r.colors[y];let g=m.backgroundColor,_=m.borderColor;return["pie","doughnut","polarArea"].includes(r.type)&&(!g||g.length===0)?m.data&&(g=m.data.map((E,B)=>r.colors[B%r.colors.length]+"80"),_=m.data.map((E,B)=>r.colors[B%r.colors.length])):(g=g||b+"40",_=_||b),{...m,borderColor:_,backgroundColor:g,pointBackgroundColor:m.pointBackgroundColor||b,pointBorderColor:m.pointBorderColor||b,hoverBackgroundColor:m.hoverBackgroundColor||b+"60",hoverBorderColor:m.hoverBorderColor||b}})},u=async()=>{if(!s.value)return;await t.nextTick(),i.value&&i.value.destroy();const h=r.data||r.modelValue;let m=h;if(Array.isArray(h))if(h.length>0&&typeof h[0]=="object"&&h[0]!==null){const y=Object.keys(h[0]),b=y.find(_=>["label","name","x","category","title"].includes(_.toLowerCase()))||y[0],g=y.find(_=>_!==b&&["value","y","count","amount","total","data"].includes(_.toLowerCase()))||y.find(_=>_!==b&&typeof h[0][_]=="number")||(y.length>1?y.find(_=>_!==b):y[0]);m={labels:h.map(_=>_[b||""]),datasets:[{label:r.label||"Data",data:h.map(_=>_[g||""])}]}}else h.length>0?m={labels:h.map((y,b)=>`Data ${b+1}`),datasets:[{label:r.label||"Data",data:h}]}:m={labels:[],datasets:[]};if(l.value=f(m),!l.value)return;const p={...d(),...r.options,onClick:(y,b)=>{a("click",y,b),r.onClick&&r.onClick(y,b)},onHover:(y,b)=>{a("hover",y,b),r.onHover&&r.onHover(y,b)}};i.value=new no(s.value,{type:r.type,data:l.value,options:p}),a("ready",i.value)};return t.watch(()=>[r.data,r.modelValue,r.type,r.options,r.theme],()=>{u()},{deep:!0}),t.watch(()=>[r.width,r.height],()=>{i.value&&i.value.resize()}),t.onMounted(()=>{u()}),t.onUnmounted(()=>{i.value&&i.value.destroy()}),o({chart:i,updateChart:u}),(h,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["d-code-chart",c.value])},[e.label?(t.openBlock(),t.createElementBlock("div",$1,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",j1,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"relative",style:t.normalizeStyle({height:e.height+"px"})},[t.createElementVNode("canvas",{ref_key:"chartCanvas",ref:s},null,512),e.loading?(t.openBlock(),t.createElementBlock("div",U1,[...m[0]||(m[0]=[t.createElementVNode("div",{class:"animate-pulse-slow rounded-full h-8 w-8 border-b-2 border-blue-600"},null,-1)])])):t.createCommentVNode("",!0),e.error?(t.openBlock(),t.createElementBlock("div",W1,[t.createElementVNode("div",H1,t.toDisplayString(e.error),1)])):t.createCommentVNode("",!0)],4),e.showInfo&&l.value?(t.openBlock(),t.createElementBlock("div",q1,[l.value.datasets?(t.openBlock(),t.createElementBlock("div",G1,t.toDisplayString(l.value.datasets.length)+" dataset(s) • "+t.toDisplayString(l.value.labels?l.value.labels.length:0)+" data points ",1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-b1c7c58f"]]),Xn=t.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(xe.Label),t.mergeProps(t.unref(n),{class:t.unref(Ve)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",o.class)}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),K1={key:0,class:"ml-1 text-destructive"},X1=["aria-busy"],Y1={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse mb-2"},J1={key:1,class:"flex items-center"},Q1=["id","checked","indeterminate","disabled","required"],ao=lt(t.defineComponent({name:"DCodeCheckbox",inheritAttrs:!1,__name:"DCodeCheckbox",props:{id:{default:""},label:{default:""},title:{default:""},required:{type:Boolean,default:!1},modelValue:{type:[Boolean,null]},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.computed(()=>a.visible??!0),i=t.computed(()=>a.required),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`dcode-checkbox-${a.id||a.label||"checkbox"}-${l}`),d=t.ref(!!a.modelValue);t.watch(()=>a.modelValue,h=>{d.value=!!h},{immediate:!0});const f=()=>{if(a.disabled||a.readonly)return;const h=!d.value;d.value=h,r("update:modelValue",h)},u=h=>{(h.key===" "||h.key==="Enter")&&(h.preventDefault(),f())};return(h,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid gap-1.5",a.disabled?"cursor-not-allowed":""])},[e.label?(t.openBlock(),t.createBlock(Xn,{key:0,class:"text-sm font-medium mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",K1,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass([t.unref(n).class,{"opacity-60 cursor-not-allowed":e.disabled}]),"aria-busy":e.skeleton},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",Y1)):t.createCommentVNode("",!0),m[0]||(m[0]=t.createElementVNode("div",{class:"flex items-center gap-2.5"},[t.createElementVNode("div",{class:"h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"}),t.createElementVNode("div",{class:"h-4 w-24 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1))],64)):(t.openBlock(),t.createElementBlock("div",J1,[t.createElementVNode("label",{class:t.normalizeClass(["flex items-center gap-2.5 group relative",{"cursor-pointer":!e.disabled&&!e.readonly,"opacity-50 cursor-not-allowed":e.disabled,"cursor-default opacity-80":e.readonly}])},[t.createElementVNode("input",{type:"checkbox",id:c.value,class:"sr-only peer",checked:d.value,indeterminate:e.indeterminate,disabled:e.disabled,required:i.value,onChange:f,onKeydown:u},null,40,Q1),t.createElementVNode("div",{class:t.normalizeClass(["h-4 w-4 shrink-0 rounded-sm border shadow-sm transition-all focus:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-neutral-400 dark:peer-focus-visible:ring-neutral-600 peer-focus-visible:ring-offset-2 flex items-center justify-center",[d.value||e.indeterminate?"bg-primary border-primary text-primary-foreground":"border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800",e.disabled?"cursor-not-allowed":e.readonly?"cursor-default":"cursor-pointer"]]),"aria-hidden":"true"},[d.value&&!e.indeterminate?(t.openBlock(),t.createBlock(t.unref(ne.Check),{key:0,class:"h-3 w-3 text-white","stroke-width":"3"})):e.indeterminate?(t.openBlock(),t.createBlock(t.unref(ne.Minus),{key:1,class:"h-3 w-3 text-white","stroke-width":"3"})):t.createCommentVNode("",!0)],2),e.title?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["text-sm leading-relaxed select-none transition-colors",[e.disabled?"text-gray-400 dark:text-gray-500":"text-gray-700 dark:text-gray-300 group-hover:text-gray-900 dark:group-hover:text-gray-100"]])},t.toDisplayString(e.title),3)):t.createCommentVNode("",!0)],2)]))],10,X1),[[t.vShow,s.value]])],2))}}),[["__scopeId","data-v-0f459b64"]]),Z1={class:"w-full"},ew={key:0,class:"mb-4"},tw={key:0,class:"h-6 w-48 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},ow={key:1,class:"text-sm font-medium text-gray-900 dark:text-gray-100"},nw={key:0,class:"ml-1 text-destructive"},rw={key:0,class:"flex items-center gap-2 text-sm text-gray-500 dark:text-neutral-400 mb-4"},aw={key:1,class:"flex flex-wrap gap-4"},sw={key:0,class:"text-center py-8 text-gray-500 dark:text-gray-400"},iw={key:1,class:"flex flex-wrap gap-x-6 gap-y-4"},lw={key:3,class:"flex items-center gap-1 text-sm text-red-500 mt-4"},qs=lt(t.defineComponent({name:"DCodeCardCheckboxList",inheritAttrs:!1,__name:"DCodeCardCheckboxList",props:{modelValue:{default:()=>[]},icon:{},itemTitle:{default:"name"},itemValue:{default:"id"},label:{default:""},options:{default:()=>[]},items:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},apiModule:{},apiAction:{},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""},columns:{default:2},apiParams:{default:()=>({})},returnArray:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{emit:o}){t.useAttrs();const{apiUrl:n}=Qe(),r=o,a=e,s=t.ref(new Set);t.watch(()=>a.modelValue,A=>{if(!A){s.value=new Set;return}const C=A.map(x=>typeof x=="object"&&x!==null?x.id!==void 0?x.id:x.value:x);s.value=new Set(C)},{immediate:!0,deep:!0});const i=t.ref([]),l=t.ref(!1),c=t.ref(null),d=async()=>{var C,x;const A=((C=a.endpoint)==null?void 0:C.apiUrl)||a.apiUrl;if(!(!A&&!a.apiModule&&!a.apiAction)){l.value=!0,c.value=null;try{let w;const D=((x=a.endpoint)==null?void 0:x.apiMethod)||a.apiMethod||"GET",k={page:1,perPage:100,...a.apiParams};if(A)w=await n(A,D,k);else if(a.apiModule&&a.apiAction){const{DCodeApi:S}=Qe();w=await S(a.apiModule,a.apiAction,k)}let v=w;a.dataPath?v=a.dataPath.split(".").reduce((N,V)=>N&&N[V]!==void 0?N[V]:void 0,w):typeof w=="object"&&!Array.isArray(w)&&w.data&&(v=w.data),Array.isArray(v)?i.value=v:(console.warn("DCodeCardCheckboxList: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),c.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(w){console.error("DCodeCardCheckboxList fetch error:",w),c.value="Gagal memuat data dari endpoint."}finally{l.value=!1}}},f=t.ref(!1);let u=null;const h=()=>{typeof document<"u"&&(f.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{var A;((A=a.endpoint)!=null&&A.apiUrl||a.apiUrl||a.apiModule&&a.apiAction)&&d(),h(),typeof document<"u"&&(u=new MutationObserver(h),u.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),u.observe(document.body,{attributes:!0,attributeFilter:["class"]}))}),t.onBeforeUnmount(()=>{u&&u.disconnect()});const m=t.computed(()=>a.options&&a.options.length>0?a.options:a.items&&a.items.length>0?a.items:i.value),p=A=>{if(typeof A!="object"||A===null)return A;const C=a.itemValue||a.model||"id";return A[C]},y=A=>{if(typeof A!="object"||A===null)return String(A);const C=a.itemTitle||"name";return A[C]},b=A=>s.value.has(A),g=(A,C)=>{if(a.disabled)return;const x=new Set(s.value);C?x.add(A):x.delete(A),s.value=x;const w=Array.from(s.value);r("update:modelValue",w),r("change",w)},_=t.computed(()=>a.skeleton||l.value),E=t.computed(()=>!!a.error||!!c.value),B=t.computed(()=>a.error||c.value);return(A,C)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",Z1,[e.label||_.value?(t.openBlock(),t.createElementBlock("div",ew,[_.value?(t.openBlock(),t.createElementBlock("div",tw)):(t.openBlock(),t.createElementBlock("h3",ow,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",nw,"*")):t.createCommentVNode("",!0)]))])):t.createCommentVNode("",!0),t.createElementVNode("div",null,[l.value?(t.openBlock(),t.createElementBlock("div",rw,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),C[0]||(C[0]=t.createTextVNode(" Sedang memuat opsi... ",-1))])):t.createCommentVNode("",!0),_.value?(t.openBlock(),t.createElementBlock("div",aw,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(6,x=>t.createElementVNode("div",{key:`skeleton-${x}`,class:"flex items-center gap-2.5 min-w-[120px]"},[...C[1]||(C[1]=[t.createElementVNode("div",{class:"h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"},null,-1),t.createElementVNode("div",{class:"h-4 w-24 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])),64))])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[m.value.length===0?(t.openBlock(),t.createElementBlock("div",sw," Tidak ada data ")):(t.openBlock(),t.createElementBlock("div",iw,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,(x,w)=>(t.openBlock(),t.createElementBlock("div",{key:w,class:"flex items-start"},[t.createVNode(ao,{"model-value":b(p(x)),title:y(x),disabled:e.disabled,"onUpdate:modelValue":D=>g(p(x),D)},null,8,["model-value","title","disabled","onUpdate:modelValue"])]))),128))]))],64)),E.value&&B.value?(t.openBlock(),t.createElementBlock("div",lw,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(B.value),1)])):t.createCommentVNode("",!0)])],512)),[[t.vShow,e.visible]])}}),[["__scopeId","data-v-8f934d59"]]),cw=["aria-busy"],dw={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},fw={key:1,class:"flex justify-end"},uw=["for"],hw={key:0,class:"ml-1 text-destructive"},mw={class:"relative w-full group"},pw={class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-r border-gray-300 dark:border-gray-700"},gw={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},bw=["id","disabled","readonly","placeholder","maxlength"],yw={key:0,class:"absolute top-full right-0 z-10 text-[11px] text-gray-400 dark:text-gray-500 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100 mt-0.5"},xw={key:1,class:"flex items-center gap-1 text-xs text-destructive"},Gs=t.defineComponent({name:"DCodeCurrencyField",inheritAttrs:!1,__name:"DCodeCurrencyField",props:{modelValue:{},currency:{default:"IDR"},locale:{},label:{},placeholder:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},prependInner:{},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=Math.random().toString(36).slice(2,7),i=t.computed(()=>`app-currency-field-${n.id||a.label||"currency-field"}-${s}`),l=t.computed(()=>{const v=n.required,S=n["aria-required"];return v===""||v===!0||v==="true"||(S==="true"||S===!0)}),c=t.computed(()=>{const v=n.maxlength??n.maxLength;let S=Number.NaN;return typeof v=="number"?S=v:typeof v=="string"&&(S=Number.parseInt(v,10)),Number.isFinite(S)&&S>0?S:void 0}),d=t.computed(()=>a.locale?a.locale:"en-US"),f=t.computed(()=>a.prependInner?a.prependInner:a.currency==="USD"?"$":a.currency==="IDR"?"Rp":a.currency),u=t.computed(()=>new Intl.NumberFormat(d.value,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})),h=v=>{const S=v.replaceAll(/\D/g,"");return S?Number(S):null},m=v=>u.value.format(v),p=t.ref(""),y=t.ref(null);t.watch(()=>a.modelValue,v=>{v==null?p.value="":h(p.value)!==v&&(p.value=m(v))},{immediate:!0});const b=(v,S)=>{let N=0;for(let V=0;V<S;V++)/\d/.test(v[V])&&N++;return N},g=(v,S)=>{let N=0;for(let V=0;V<v.length;V++)if(/\d/.test(v[V])&&(N++,N===S))return V+1;return v.length},_=v=>{const S=v.target,N=S.value,V=S.selectionStart??N.length,L=h(N);if(L===null){p.value="",r("update:modelValue",null);return}const O=m(L);if(N!==O){const P=b(N,V);p.value=O,t.nextTick(()=>{if(y.value){const R=g(O,P);y.value.setSelectionRange(R,R)}})}r("update:modelValue",L)},E=()=>{p.value="",r("update:modelValue",null),r("clear")},B=t.computed(()=>!a.clearable||a.disabled||a.readonly?!1:a.hideClearWhenEmpty?p.value.length>0:!0),A=t.computed(()=>!!a.error),C=t.computed(()=>{const{class:v,maxlength:S,maxLength:N,...V}=n;return V}),x=t.computed(()=>p.value.length),w=t.computed(()=>a.showCharCount?(c.value??0)>0:!1),D=t.computed(()=>w.value&&x.value>0),k=t.computed(()=>`${x.value} / ${c.value}`);return(v,S)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1.5 w-full",[t.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",dw)):t.createCommentVNode("",!0),S[2]||(S[2]=t.createElementVNode("div",{class:"relative w-full"},[t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1)),w.value?(t.openBlock(),t.createElementBlock("div",fw,[...S[1]||(S[1]=[t.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:i.value,class:"text-sm font-medium text-gray-700 dark:text-gray-300"},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),l.value?(t.openBlock(),t.createElementBlock("span",hw,"*")):t.createCommentVNode("",!0)],8,uw)):t.createCommentVNode("",!0),t.createElementVNode("div",mw,[t.createElementVNode("div",{class:t.normalizeClass(["flex items-center w-full rounded-lg border overflow-hidden transition-all duration-200","bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50",A.value?"border-destructive ring-1 ring-destructive":"border-gray-300 dark:border-gray-700 focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 dark:focus-within:border-blue-400",a.disabled?"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-neutral-800":"",a.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""])},[t.createElementVNode("div",pw,[t.createElementVNode("span",gw,t.toDisplayString(f.value),1)]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:i.value,ref_key:"inputRef",ref:y,"onUpdate:modelValue":S[0]||(S[0]=N=>p.value=N),onInput:_,type:"text",inputmode:"numeric"},C.value,{disabled:a.disabled,readonly:a.readonly,placeholder:a.placeholder,maxlength:c.value,class:["flex-1 h-10 px-3 py-2 text-sm bg-transparent text-foreground dark:text-gray-300 outline-none placeholder:text-gray-400",B.value?"pr-8":""]}),null,16,bw),[[t.vModelText,p.value]]),B.value?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"flex items-center justify-center w-8 h-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors flex-shrink-0","aria-label":"Clear input",onClick:E},[t.createVNode(t.unref(ne.X),{class:"w-3.5 h-3.5"})])):t.createCommentVNode("",!0)],2),D.value&&!A.value?(t.openBlock(),t.createElementBlock("p",yw,t.toDisplayString(k.value),1)):t.createCommentVNode("",!0)]),A.value?(t.openBlock(),t.createElementBlock("p",xw,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-3.5 h-3.5 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(a.error),1)])):t.createCommentVNode("",!0)],64))],10,cw))}}),kw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ww=(e,o,n)=>{let r;const a=kw[e];return typeof a=="string"?r=a:o===1?r=a.one:r=a.other.replace("{{count}}",o.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ln(e){return(o={})=>{const n=o.width?String(o.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Cw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_w={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ew={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Bw={date:ln({formats:Cw,defaultWidth:"full"}),time:ln({formats:_w,defaultWidth:"full"}),dateTime:ln({formats:Ew,defaultWidth:"full"})},Sw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Aw=(e,o,n,r)=>Sw[e];function $t(e){return(o,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):i;a=e.formattingValues[l]||e.formattingValues[i]}else{const i=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[l]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(o):o;return a[s]}}const vw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Dw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Nw={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Vw={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Mw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Tw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Pw={ordinalNumber:(e,o)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:$t({values:vw,defaultWidth:"wide"}),quarter:$t({values:Dw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$t({values:Nw,defaultWidth:"wide"}),day:$t({values:Vw,defaultWidth:"wide"}),dayPeriod:$t({values:Mw,defaultWidth:"wide",formattingValues:Tw,defaultFormattingWidth:"wide"})};function jt(e){return(o,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=o.match(a);if(!s)return null;const i=s[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Lw(l,u=>u.test(i)):Ow(l,u=>u.test(i));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const f=o.slice(i.length);return{value:d,rest:f}}}function Ow(e,o){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&o(e[n]))return n}function Lw(e,o){for(let n=0;n<e.length;n++)if(o(e[n]))return n}function Ef(e){return(o,n={})=>{const r=o.match(e.matchPattern);if(!r)return null;const a=r[0],s=o.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const l=o.slice(a.length);return{value:i,rest:l}}}const Rw=/^(\d+)(th|st|nd|rd)?/i,Iw=/\d+/i,Fw={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zw={any:[/^b/i,/^(a|c)/i]},$w={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},jw={any:[/1/i,/2/i,/3/i,/4/i]},Uw={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ww={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Hw={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},qw={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Gw={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Kw={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Xw={ordinalNumber:Ef({matchPattern:Rw,parsePattern:Iw,valueCallback:e=>parseInt(e,10)}),era:jt({matchPatterns:Fw,defaultMatchWidth:"wide",parsePatterns:zw,defaultParseWidth:"any"}),quarter:jt({matchPatterns:$w,defaultMatchWidth:"wide",parsePatterns:jw,defaultParseWidth:"any",valueCallback:e=>e+1}),month:jt({matchPatterns:Uw,defaultMatchWidth:"wide",parsePatterns:Ww,defaultParseWidth:"any"}),day:jt({matchPatterns:Hw,defaultMatchWidth:"wide",parsePatterns:qw,defaultParseWidth:"any"}),dayPeriod:jt({matchPatterns:Gw,defaultMatchWidth:"any",parsePatterns:Kw,defaultParseWidth:"any"})},Yw={code:"en-US",formatDistance:ww,formatLong:Bw,formatRelative:Aw,localize:Pw,match:Xw,options:{weekStartsOn:0,firstWeekContainsDate:1}},Jw={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},Qw=(e,o,n)=>{let r;const a=Jw[e];return typeof a=="string"?r=a:o===1?r=a.one:r=a.other.replace("{{count}}",o.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+r:r+" yang lalu":r},Zw={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},e2={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},t2={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o2={date:ln({formats:Zw,defaultWidth:"full"}),time:ln({formats:e2,defaultWidth:"full"}),dateTime:ln({formats:t2,defaultWidth:"full"})},n2={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},r2=(e,o,n,r)=>n2[e],a2={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},s2={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},i2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},l2={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},c2={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},d2={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},f2={ordinalNumber:(e,o)=>"ke-"+Number(e),era:$t({values:a2,defaultWidth:"wide"}),quarter:$t({values:s2,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$t({values:i2,defaultWidth:"wide"}),day:$t({values:l2,defaultWidth:"wide"}),dayPeriod:$t({values:c2,defaultWidth:"wide",formattingValues:d2,defaultFormattingWidth:"wide"})},u2=/^ke-(\d+)?/i,h2=/\d+/i,m2={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},p2={any:[/^s/i,/^(m|e)/i]},g2={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},b2={any:[/1/i,/2/i,/3/i,/4/i]},y2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},x2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},k2={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},w2={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},C2={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},_2={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},E2={ordinalNumber:Ef({matchPattern:u2,parsePattern:h2,valueCallback:e=>parseInt(e,10)}),era:jt({matchPatterns:m2,defaultMatchWidth:"wide",parsePatterns:p2,defaultParseWidth:"any"}),quarter:jt({matchPatterns:g2,defaultMatchWidth:"wide",parsePatterns:b2,defaultParseWidth:"any",valueCallback:e=>e+1}),month:jt({matchPatterns:y2,defaultMatchWidth:"wide",parsePatterns:x2,defaultParseWidth:"any"}),day:jt({matchPatterns:k2,defaultMatchWidth:"wide",parsePatterns:w2,defaultParseWidth:"any"}),dayPeriod:jt({matchPatterns:C2,defaultMatchWidth:"any",parsePatterns:_2,defaultParseWidth:"any"})},B2={code:"id",formatDistance:Qw,formatLong:o2,formatRelative:r2,localize:f2,match:E2,options:{weekStartsOn:1,firstWeekContainsDate:1}},Bf={primary:{light:{primary:"hsl(var(--primary))",text:"hsl(var(--primary-foreground))",hover:"hsl(var(--accent))",border:"hsl(var(--border))",range:"#bfdbfe"},dark:{primary:"hsl(var(--primary))",text:"hsl(var(--primary-foreground))",hover:"hsl(var(--accent))",border:"hsl(var(--border))",range:"rgba(30, 58, 138, 0.3)"}},emerald:{light:{primary:"#16a34a",text:"#ffffff",hover:"#dcfce7",border:"#16a34a",range:"#ecfdf5"},dark:{primary:"#22c55e",text:"#0b1220",hover:"#14532d",border:"#22c55e",range:"rgba(6, 78, 59, 0.3)"}},amber:{light:{primary:"#d97706",text:"#ffffff",hover:"#fffbeb",border:"#d97706",range:"#fffbeb"},dark:{primary:"#f59e0b",text:"#0b1220",hover:"#78350f",border:"#f59e0b",range:"rgba(120, 53, 15, 0.3)"}},violet:{light:{primary:"#7c3aed",text:"#ffffff",hover:"#f5f3ff",border:"#7c3aed",range:"#f5f3ff"},dark:{primary:"#8b5cf6",text:"#0b1220",hover:"#2e1065",border:"#8b5cf6",range:"rgba(46, 16, 101, 0.3)"}},destructive:{light:{primary:"hsl(var(--destructive))",text:"hsl(var(--destructive-foreground))",hover:"hsl(var(--destructive) / 0.10)",border:"hsl(var(--destructive))",range:"#fef2f2"},dark:{primary:"hsl(var(--destructive))",text:"hsl(var(--destructive-foreground))",hover:"hsl(var(--destructive) / 0.18)",border:"hsl(var(--destructive))",range:"rgba(127, 29, 29, 0.3)"}}},Sf="dcode-dp-theme-forced";function S2(e,o=Sf){const n=Bf[e]??Bf.primary,r=`
|
|
33
|
+
*/class ax{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(o,n,r,a){const s=n.listeners[a],i=n.duration;s.forEach(l=>l({chart:o,initial:n.initial,numSteps:i,currentStep:Math.min(r-n.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=zc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(o=Date.now()){let n=0;this._charts.forEach((r,a)=>{if(!r.running||!r.items.length)return;const s=r.items;let i=s.length-1,l=!1,c;for(;i>=0;--i)c=s[i],c._active?(c._total>r.duration&&(r.duration=c._total),c.tick(o),l=!0):(s[i]=s[s.length-1],s.pop());l&&(a.draw(),this._notify(a,r,o,"progress")),s.length||(r.running=!1,this._notify(a,r,o,"complete"),r.initial=!1),n+=s.length}),this._lastDate=o,n===0&&(this._running=!1)}_getAnims(o){const n=this._charts;let r=n.get(o);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(o,r)),r}listen(o,n,r){this._getAnims(o).listeners[n].push(r)}add(o,n){!n||!n.length||this._getAnims(o).items.push(...n)}has(o){return this._getAnims(o).items.length>0}start(o){const n=this._charts.get(o);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,a)=>Math.max(r,a._duration),0),this._refresh())}running(o){if(!this._running)return!1;const n=this._charts.get(o);return!(!n||!n.running||!n.items.length)}stop(o){const n=this._charts.get(o);if(!n||!n.items.length)return;const r=n.items;let a=r.length-1;for(;a>=0;--a)r[a].cancel();n.items=[],this._notify(o,n,Date.now(),"complete")}remove(o){return this._charts.delete(o)}}var oo=new ax;const pd="transparent",sx={boolean(t,o,n){return n>.5?o:t},color(t,o,n){const r=Wc(t||pd),a=r.valid&&Wc(o||pd);return a&&a.valid?a.mix(r,n).hexString():o},number(t,o,n){return t+(o-t)*n}};class ix{constructor(o,n,r,a){const s=n[r];a=Or([o.to,a,s,o.from]);const i=Or([o.from,s,a]);this._active=!0,this._fn=o.fn||sx[o.type||typeof i],this._easing=In[o.easing]||In.linear,this._start=Math.floor(Date.now()+(o.delay||0)),this._duration=this._total=Math.floor(o.duration),this._loop=!!o.loop,this._target=n,this._prop=r,this._from=i,this._to=a,this._promises=void 0}active(){return this._active}update(o,n,r){if(this._active){this._notify(!1);const a=this._target[this._prop],s=r-this._start,i=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(i,o.duration)),this._total+=s,this._loop=!!o.loop,this._to=Or([o.to,n,a,o.from]),this._from=Or([o.from,a,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(o){const n=o-this._start,r=this._duration,a=this._prop,s=this._from,i=this._loop,l=this._to;let c;if(this._active=s!==l&&(i||n<r),!this._active){this._target[a]=l,this._notify(!0);return}if(n<0){this._target[a]=s;return}c=n/r%2,c=i&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[a]=this._fn(s,l,c)}wait(){const o=this._promises||(this._promises=[]);return new Promise((n,r)=>{o.push({res:n,rej:r})})}_notify(o){const n=o?"res":"rej",r=this._promises||[];for(let a=0;a<r.length;a++)r[a][n]()}}class gd{constructor(o,n){this._chart=o,this._properties=new Map,this.configure(n)}configure(o){if(!Te(o))return;const n=Object.keys(Je.animation),r=this._properties;Object.getOwnPropertyNames(o).forEach(a=>{const s=o[a];if(!Te(s))return;const i={};for(const l of n)i[l]=s[l];(Qe(s.properties)&&s.properties||[a]).forEach(l=>{(l===a||!r.has(l))&&r.set(l,i)})})}_animateOptions(o,n){const r=n.options,a=cx(o,r);if(!a)return[];const s=this._createAnimations(a,r);return r.$shared&&lx(o.options.$animations,r).then(()=>{o.options=r},()=>{}),s}_createAnimations(o,n){const r=this._properties,a=[],s=o.$animations||(o.$animations={}),i=Object.keys(n),l=Date.now();let c;for(c=i.length-1;c>=0;--c){const d=i[c];if(d.charAt(0)==="$")continue;if(d==="options"){a.push(...this._animateOptions(o,n));continue}const f=n[d];let u=s[d];const h=r.get(d);if(u)if(h&&u.active()){u.update(h,f,l);continue}else u.cancel();if(!h||!h.duration){o[d]=f;continue}s[d]=u=new ix(h,o,d,f),a.push(u)}return a}update(o,n){if(this._properties.size===0){Object.assign(o,n);return}const r=this._createAnimations(o,n);if(r.length)return oo.add(this._chart,r),!0}}function lx(t,o){const n=[],r=Object.keys(o);for(let a=0;a<r.length;a++){const s=t[r[a]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function cx(t,o){if(!o)return;let n=t.options;if(!n){t.options=o;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function bd(t,o){const n=t&&t.options||{},r=n.reverse,a=n.min===void 0?o:0,s=n.max===void 0?o:0;return{start:r?s:a,end:r?a:s}}function dx(t,o,n){if(n===!1)return!1;const r=bd(t,n),a=bd(o,n);return{top:a.end,right:r.end,bottom:a.start,left:r.start}}function fx(t){let o,n,r,a;return Te(t)?(o=t.top,n=t.right,r=t.bottom,a=t.left):o=n=r=a=t,{top:o,right:n,bottom:r,left:a,disabled:t===!1}}function yd(t,o){const n=[],r=t._getSortedDatasetMetas(o);let a,s;for(a=0,s=r.length;a<s;++a)n.push(r[a].index);return n}function xd(t,o,n,r={}){const a=t.keys,s=r.mode==="single";let i,l,c,d;if(o===null)return;let f=!1;for(i=0,l=a.length;i<l;++i){if(c=+a[i],c===n){if(f=!0,r.all)continue;break}d=t.values[c],rt(d)&&(s||o===0||zt(o)===zt(d))&&(o+=d)}return!f&&!r.all?0:o}function ux(t,o){const{iScale:n,vScale:r}=o,a=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",i=Object.keys(t),l=new Array(i.length);let c,d,f;for(c=0,d=i.length;c<d;++c)f=i[c],l[c]={[a]:f,[s]:t[f]};return l}function Ds(t,o){const n=t&&t.options.stacked;return n||n===void 0&&o.stack!==void 0}function hx(t,o,n){return`${t.id}.${o.id}.${n.stack||n.type}`}function mx(t){const{min:o,max:n,minDefined:r,maxDefined:a}=t.getUserBounds();return{min:r?o:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}function px(t,o,n){const r=t[o]||(t[o]={});return r[n]||(r[n]={})}function kd(t,o,n,r){for(const a of o.getMatchingVisibleMetas(r).reverse()){const s=t[a.index];if(n&&s>0||!n&&s<0)return a.index}return null}function wd(t,o){const{chart:n,_cachedMeta:r}=t,a=n._stacks||(n._stacks={}),{iScale:s,vScale:i,index:l}=r,c=s.axis,d=i.axis,f=hx(s,i,r),u=o.length;let h;for(let m=0;m<u;++m){const p=o[m],{[c]:y,[d]:b}=p,g=p._stacks||(p._stacks={});h=g[d]=px(a,f,y),h[l]=b,h._top=kd(h,i,!0,r.type),h._bottom=kd(h,i,!1,r.type);const _=h._visualValues||(h._visualValues={});_[l]=b}}function Ns(t,o){const n=t.scales;return Object.keys(n).filter(r=>n[r].axis===o).shift()}function gx(t,o){return Ro(t,{active:!1,dataset:void 0,datasetIndex:o,index:o,mode:"default",type:"dataset"})}function bx(t,o,n){return Ro(t,{active:!1,dataIndex:o,parsed:void 0,raw:void 0,element:n,index:o,mode:"default",type:"data"})}function jn(t,o){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){o=o||t._parsed;for(const a of o){const s=a._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Vs=t=>t==="reset"||t==="none",Cd=(t,o)=>o?t:Object.assign({},t),yx=(t,o,n)=>t&&!o.hidden&&o._stacked&&{keys:yd(n,!0),values:null};class $o{constructor(o,n){this.chart=o,this._ctx=o.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const o=this._cachedMeta;this.configure(),this.linkScales(),o._stacked=Ds(o.vScale,o),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(o){this.index!==o&&jn(this._cachedMeta),this.index=o}linkScales(){const o=this.chart,n=this._cachedMeta,r=this.getDataset(),a=(u,h,m,p)=>u==="x"?h:u==="r"?p:m,s=n.xAxisID=Ae(r.xAxisID,Ns(o,"x")),i=n.yAxisID=Ae(r.yAxisID,Ns(o,"y")),l=n.rAxisID=Ae(r.rAxisID,Ns(o,"r")),c=n.indexAxis,d=n.iAxisID=a(c,s,i,l),f=n.vAxisID=a(c,i,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(i),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(o){return this.chart.scales[o]}_getOtherScale(o){const n=this._cachedMeta;return o===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const o=this._cachedMeta;this._data&&Ic(this._data,this),o._stacked&&jn(o)}_dataCheck(){const o=this.getDataset(),n=o.data||(o.data=[]),r=this._data;if(Te(n)){const a=this._cachedMeta;this._data=ux(n,a)}else if(r!==n){if(r){Ic(r,this);const a=this._cachedMeta;jn(a),a._parsed=[]}n&&Object.isExtensible(n)&&ey(n,this),this._syncList=[],this._data=n}}addElements(){const o=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(o.dataset=new this.datasetElementType)}buildOrUpdateElements(o){const n=this._cachedMeta,r=this.getDataset();let a=!1;this._dataCheck();const s=n._stacked;n._stacked=Ds(n.vScale,n),n.stack!==r.stack&&(a=!0,jn(n),n.stack=r.stack),this._resyncElements(o),(a||s!==n._stacked)&&(wd(this,n._parsed),n._stacked=Ds(n.vScale,n))}configure(){const o=this.chart.config,n=o.datasetScopeKeys(this._type),r=o.getOptionScopes(this.getDataset(),n,!0);this.options=o.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(o,n){const{_cachedMeta:r,_data:a}=this,{iScale:s,_stacked:i}=r,l=s.axis;let c=o===0&&n===a.length?!0:r._sorted,d=o>0&&r._parsed[o-1],f,u,h;if(this._parsing===!1)r._parsed=a,r._sorted=!0,h=a;else{Qe(a[o])?h=this.parseArrayData(r,a,o,n):Te(a[o])?h=this.parseObjectData(r,a,o,n):h=this.parsePrimitiveData(r,a,o,n);const m=()=>u[l]===null||d&&u[l]<d[l];for(f=0;f<n;++f)r._parsed[f+o]=u=h[f],c&&(m()&&(c=!1),d=u);r._sorted=c}i&&wd(this,h)}parsePrimitiveData(o,n,r,a){const{iScale:s,vScale:i}=o,l=s.axis,c=i.axis,d=s.getLabels(),f=s===i,u=new Array(a);let h,m,p;for(h=0,m=a;h<m;++h)p=h+r,u[h]={[l]:f||s.parse(d[p],p),[c]:i.parse(n[p],p)};return u}parseArrayData(o,n,r,a){const{xScale:s,yScale:i}=o,l=new Array(a);let c,d,f,u;for(c=0,d=a;c<d;++c)f=c+r,u=n[f],l[c]={x:s.parse(u[0],f),y:i.parse(u[1],f)};return l}parseObjectData(o,n,r,a){const{xScale:s,yScale:i}=o,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(a);let f,u,h,m;for(f=0,u=a;f<u;++f)h=f+r,m=n[h],d[f]={x:s.parse(Mo(m,l),h),y:i.parse(Mo(m,c),h)};return d}getParsed(o){return this._cachedMeta._parsed[o]}getDataElement(o){return this._cachedMeta.data[o]}applyStack(o,n,r){const a=this.chart,s=this._cachedMeta,i=n[o.axis],l={keys:yd(a,!0),values:n._stacks[o.axis]._visualValues};return xd(l,i,s.index,{mode:r})}updateRangeFromParsed(o,n,r,a){const s=r[n.axis];let i=s===null?NaN:s;const l=a&&r._stacks[n.axis];a&&l&&(a.values=l,i=xd(a,s,this._cachedMeta.index)),o.min=Math.min(o.min,i),o.max=Math.max(o.max,i)}getMinMax(o,n){const r=this._cachedMeta,a=r._parsed,s=r._sorted&&o===r.iScale,i=a.length,l=this._getOtherScale(o),c=yx(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:u}=mx(l);let h,m;function p(){m=a[h];const y=m[l.axis];return!rt(m[o.axis])||f>y||u<y}for(h=0;h<i&&!(!p()&&(this.updateRangeFromParsed(d,o,m,c),s));++h);if(s){for(h=i-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(d,o,m,c);break}}return d}getAllParsedValues(o){const n=this._cachedMeta._parsed,r=[];let a,s,i;for(a=0,s=n.length;a<s;++a)i=n[a][o.axis],rt(i)&&r.push(i);return r}getMaxOverflow(){return!1}getLabelAndValue(o){const n=this._cachedMeta,r=n.iScale,a=n.vScale,s=this.getParsed(o);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:a?""+a.getLabelForValue(s[a.axis]):""}}_update(o){const n=this._cachedMeta;this.update(o||"default"),n._clip=fx(Ae(this.options.clip,dx(n.xScale,n.yScale,this.getMaxOverflow())))}update(o){}draw(){const o=this._ctx,n=this.chart,r=this._cachedMeta,a=r.data||[],s=n.chartArea,i=[],l=this._drawStart||0,c=this._drawCount||a.length-l,d=this.options.drawActiveElementsOnTop;let f;for(r.dataset&&r.dataset.draw(o,s,l,c),f=l;f<l+c;++f){const u=a[f];u.hidden||(u.active&&d?i.push(u):u.draw(o,s))}for(f=0;f<i.length;++f)i[f].draw(o,s)}getStyle(o,n){const r=n?"active":"default";return o===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(o||0,r)}getContext(o,n,r){const a=this.getDataset();let s;if(o>=0&&o<this._cachedMeta.data.length){const i=this._cachedMeta.data[o];s=i.$context||(i.$context=bx(this.getContext(),o,i)),s.parsed=this.getParsed(o),s.raw=a.data[o],s.index=s.dataIndex=o}else s=this.$context||(this.$context=gx(this.chart.getContext(),this.index)),s.dataset=a,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(o){return this._resolveElementOptions(this.datasetElementType.id,o)}resolveDataElementOptions(o,n){return this._resolveElementOptions(this.dataElementType.id,n,o)}_resolveElementOptions(o,n="default",r){const a=n==="active",s=this._cachedDataOpts,i=o+"-"+n,l=s[i],c=this.enableOptionSharing&&Pn(r);if(l)return Cd(l,c);const d=this.chart.config,f=d.datasetElementScopeKeys(this._type,o),u=a?[`${o}Hover`,"hover",o,""]:[o,""],h=d.getOptionScopes(this.getDataset(),f),m=Object.keys(Je.elements[o]),p=()=>this.getContext(r,a,n),y=d.resolveNamedOptions(h,m,p,u);return y.$shared&&(y.$shared=c,s[i]=Object.freeze(Cd(y,c))),y}_resolveAnimations(o,n,r){const a=this.chart,s=this._cachedDataOpts,i=`animation-${n}`,l=s[i];if(l)return l;let c;if(a.options.animation!==!1){const f=this.chart.config,u=f.datasetAnimationScopeKeys(this._type,n),h=f.getOptionScopes(this.getDataset(),u);c=f.createResolver(h,this.getContext(o,r,n))}const d=new gd(a,c&&c.animations);return c&&c._cacheable&&(s[i]=Object.freeze(d)),d}getSharedOptions(o){if(o.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},o))}includeOptions(o,n){return!n||Vs(o)||this.chart._animationsDisabled}_getSharedOptions(o,n){const r=this.resolveDataElementOptions(o,n),a=this._sharedOptions,s=this.getSharedOptions(r),i=this.includeOptions(n,s)||s!==a;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:i}}updateElement(o,n,r,a){Vs(a)?Object.assign(o,r):this._resolveAnimations(n,a).update(o,r)}updateSharedOptions(o,n,r){o&&!Vs(n)&&this._resolveAnimations(void 0,n).update(o,r)}_setStyle(o,n,r,a){o.active=a;const s=this.getStyle(n,a);this._resolveAnimations(n,r,a).update(o,{options:!a&&this.getSharedOptions(s)||s})}removeHoverStyle(o,n,r){this._setStyle(o,r,"active",!1)}setHoverStyle(o,n,r){this._setStyle(o,r,"active",!0)}_removeDatasetHoverStyle(){const o=this._cachedMeta.dataset;o&&this._setStyle(o,void 0,"active",!1)}_setDatasetHoverStyle(){const o=this._cachedMeta.dataset;o&&this._setStyle(o,void 0,"active",!0)}_resyncElements(o){const n=this._data,r=this._cachedMeta.data;for(const[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];const a=r.length,s=n.length,i=Math.min(s,a);i&&this.parse(0,i),s>a?this._insertElements(a,s-a,o):s<a&&this._removeElements(s,a-s)}_insertElements(o,n,r=!0){const a=this._cachedMeta,s=a.data,i=o+n;let l;const c=d=>{for(d.length+=n,l=d.length-1;l>=i;l--)d[l]=d[l-n]};for(c(s),l=o;l<i;++l)s[l]=new this.dataElementType;this._parsing&&c(a._parsed),this.parse(o,n),r&&this.updateElements(s,o,n,"reset")}updateElements(o,n,r,a){}_removeElements(o,n){const r=this._cachedMeta;if(this._parsing){const a=r._parsed.splice(o,n);r._stacked&&jn(r,a)}r.data.splice(o,n)}_sync(o){if(this._parsing)this._syncList.push(o);else{const[n,r,a]=o;this[n](r,a)}this.chart._dataChanges.push([this.index,...o])}_onDataPush(){const o=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-o,o])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(o,n){n&&this._sync(["_removeElements",o,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",o,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}pe($o,"defaults",{}),pe($o,"datasetElementType",null),pe($o,"dataElementType",null);function xx(t,o){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(o);let r=[];for(let a=0,s=n.length;a<s;a++)r=r.concat(n[a].controller.getAllParsedValues(t));t._cache.$bar=Fc(r.sort((a,s)=>a-s))}return t._cache.$bar}function kx(t){const o=t.iScale,n=xx(o,t.type);let r=o._length,a,s,i,l;const c=()=>{i===32767||i===-32768||(Pn(l)&&(r=Math.min(r,Math.abs(i-l)||r)),l=i)};for(a=0,s=n.length;a<s;++a)i=o.getPixelForValue(n[a]),c();for(l=void 0,a=0,s=o.ticks.length;a<s;++a)i=o.getPixelForTick(a),c();return r}function wx(t,o,n,r){const a=n.barThickness;let s,i;return ze(a)?(s=o.min*n.categoryPercentage,i=n.barPercentage):(s=a*r,i=1),{chunk:s/r,ratio:i,start:o.pixels[t]-s/2}}function Cx(t,o,n,r){const a=o.pixels,s=a[t];let i=t>0?a[t-1]:null,l=t<a.length-1?a[t+1]:null;const c=n.categoryPercentage;i===null&&(i=s-(l===null?o.end-o.start:l-s)),l===null&&(l=s+s-i);const d=s-(s-Math.min(i,l))/2*c;return{chunk:Math.abs(l-i)/2*c/r,ratio:n.barPercentage,start:d}}function _x(t,o,n,r){const a=n.parse(t[0],r),s=n.parse(t[1],r),i=Math.min(a,s),l=Math.max(a,s);let c=i,d=l;Math.abs(i)>Math.abs(l)&&(c=l,d=i),o[n.axis]=d,o._custom={barStart:c,barEnd:d,start:a,end:s,min:i,max:l}}function _d(t,o,n,r){return Qe(t)?_x(t,o,n,r):o[n.axis]=n.parse(t,r),o}function Ed(t,o,n,r){const a=t.iScale,s=t.vScale,i=a.getLabels(),l=a===s,c=[];let d,f,u,h;for(d=n,f=n+r;d<f;++d)h=o[d],u={},u[a.axis]=l||a.parse(i[d],d),c.push(_d(h,u,s,d));return c}function Ms(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function Ex(t,o,n){return t!==0?zt(t):(o.isHorizontal()?1:-1)*(o.min>=n?1:-1)}function Bx(t){let o,n,r,a,s;return t.horizontal?(o=t.base>t.x,n="left",r="right"):(o=t.base<t.y,n="bottom",r="top"),o?(a="end",s="start"):(a="start",s="end"),{start:n,end:r,reverse:o,top:a,bottom:s}}function Sx(t,o,n,r){let a=o.borderSkipped;const s={};if(!a){t.borderSkipped=s;return}if(a===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:i,end:l,reverse:c,top:d,bottom:f}=Bx(t);a==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?a=d:(n._bottom||0)===r?a=f:(s[Bd(f,i,l,c)]=!0,a=d)),s[Bd(a,i,l,c)]=!0,t.borderSkipped=s}function Bd(t,o,n,r){return r?(t=Ax(t,o,n),t=Sd(t,n,o)):t=Sd(t,o,n),t}function Ax(t,o,n){return t===o?n:t===n?o:t}function Sd(t,o,n){return t==="start"?o:t==="end"?n:t}function vx(t,{inflateAmount:o},n){t.inflateAmount=o==="auto"?n===1?.33:0:o}class zr extends $o{parsePrimitiveData(o,n,r,a){return Ed(o,n,r,a)}parseArrayData(o,n,r,a){return Ed(o,n,r,a)}parseObjectData(o,n,r,a){const{iScale:s,vScale:i}=o,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=s.axis==="x"?l:c,f=i.axis==="x"?l:c,u=[];let h,m,p,y;for(h=r,m=r+a;h<m;++h)y=n[h],p={},p[s.axis]=s.parse(Mo(y,d),h),u.push(_d(Mo(y,f),p,i,h));return u}updateRangeFromParsed(o,n,r,a){super.updateRangeFromParsed(o,n,r,a);const s=r._custom;s&&n===this._cachedMeta.vScale&&(o.min=Math.min(o.min,s.min),o.max=Math.max(o.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(o){const n=this._cachedMeta,{iScale:r,vScale:a}=n,s=this.getParsed(o),i=s._custom,l=Ms(i)?"["+i.start+", "+i.end+"]":""+a.getLabelForValue(s[a.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const o=this._cachedMeta;o.stack=this.getDataset().stack}update(o){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,o)}updateElements(o,n,r,a){const s=a==="reset",{index:i,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),f=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(n,a);for(let m=n;m<n+r;m++){const p=this.getParsed(m),y=s||ze(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,f),g=(p._stacks||{})[l.axis],_={horizontal:d,base:y.base,enableBorderRadius:!g||Ms(p._custom)||i===g._top||i===g._bottom,x:d?y.head:b.center,y:d?b.center:y.head,height:d?b.size:Math.abs(y.size),width:d?Math.abs(y.size):b.size};h&&(_.options=u||this.resolveDataElementOptions(m,o[m].active?"active":a));const E=_.options||o[m].options;Sx(_,E,g,i),vx(_,E,f.ratio),this.updateElement(o[m],m,_,a)}}_getStacks(o,n){const{iScale:r}=this._cachedMeta,a=r.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),s=r.options.stacked,i=[],l=this._cachedMeta.controller.getParsed(n),c=l&&l[r.axis],d=f=>{const u=f._parsed.find(m=>m[r.axis]===c),h=u&&u[f.vScale.axis];if(ze(h)||isNaN(h))return!0};for(const f of a)if(!(n!==void 0&&d(f))&&((s===!1||i.indexOf(f.stack)===-1||s===void 0&&f.stack===void 0)&&i.push(f.stack),f.index===o))break;return i.length||i.push(void 0),i}_getStackCount(o){return this._getStacks(void 0,o).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const o=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(o).filter(r=>o[r].axis===n).shift()}_getAxis(){const o={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)o[Ae(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(o)}_getStackIndex(o,n,r){const a=this._getStacks(o,r),s=n!==void 0?a.indexOf(n):-1;return s===-1?a.length-1:s}_getRuler(){const o=this.options,n=this._cachedMeta,r=n.iScale,a=[];let s,i;for(s=0,i=n.data.length;s<i;++s)a.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const l=o.barThickness;return{min:l||kx(n),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:o.grouped,ratio:l?1:o.categoryPercentage*o.barPercentage}}_calculateBarValuePixels(o){const{_cachedMeta:{vScale:n,_stacked:r,index:a},options:{base:s,minBarLength:i}}=this,l=s||0,c=this.getParsed(o),d=c._custom,f=Ms(d);let u=c[n.axis],h=0,m=r?this.applyStack(n,c,r):u,p,y;m!==u&&(h=m-u,m=u),f&&(u=d.barStart,m=d.barEnd-d.barStart,u!==0&&zt(u)!==zt(d.barEnd)&&(h=0),h+=u);const b=!ze(s)&&!f?s:h;let g=n.getPixelForValue(b);if(this.chart.getDataVisibility(o)?p=n.getPixelForValue(h+m):p=g,y=p-g,Math.abs(y)<i){y=Ex(y,n,l)*i,u===l&&(g-=y/2);const _=n.getPixelForDecimal(0),E=n.getPixelForDecimal(1),B=Math.min(_,E),A=Math.max(_,E);g=Math.max(Math.min(g,A),B),p=g+y,r&&!f&&(c._stacks[n.axis]._visualValues[a]=n.getValueForPixel(p)-n.getValueForPixel(g))}if(g===n.getPixelForValue(l)){const _=zt(y)*n.getLineWidthForValue(l)/2;g+=_,y-=_}return{size:y,base:g,head:p,center:p+y/2}}_calculateBarIndexPixels(o,n){const r=n.scale,a=this.options,s=a.skipNull,i=Ae(a.maxBarThickness,1/0);let l,c;const d=this._getAxisCount();if(n.grouped){const f=s?this._getStackCount(o):n.stackCount,u=a.barThickness==="flex"?Cx(o,n,a,f*d):wx(o,n,a,f*d),h=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(Ae(h,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,s?o:void 0)+m;l=u.start+u.chunk*p+u.chunk/2,c=Math.min(i,u.chunk*u.ratio)}else l=r.getPixelForValue(this.getParsed(o)[r.axis],o),c=Math.min(i,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const o=this._cachedMeta,n=o.vScale,r=o.data,a=r.length;let s=0;for(;s<a;++s)this.getParsed(s)[n.axis]!==null&&!r[s].hidden&&r[s].draw(this._ctx)}}pe(zr,"id","bar"),pe(zr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),pe(zr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function Dx(t,o,n){let r=1,a=1,s=0,i=0;if(o<Ge){const l=t,c=l+o,d=Math.cos(l),f=Math.sin(l),u=Math.cos(c),h=Math.sin(c),m=(E,B,A)=>Rn(E,l,c,!0)?1:Math.max(B,B*n,A,A*n),p=(E,B,A)=>Rn(E,l,c,!0)?-1:Math.min(B,B*n,A,A*n),y=m(0,d,u),b=m(et,f,h),g=p(je,d,u),_=p(je+et,f,h);r=(y-g)/2,a=(b-_)/2,s=-(y+g)/2,i=-(b+_)/2}return{ratioX:r,ratioY:a,offsetX:s,offsetY:i}}class ln extends $o{constructor(o,n){super(o,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(o,n){const r=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=r;else{let s=c=>+r[c];if(Te(r[o])){const{key:c="value"}=this._parsing;s=d=>+Mo(r[d],c)}let i,l;for(i=o,l=o+n;i<l;++i)a._parsed[i]=s(i)}}_getRotation(){return eo(this.options.rotation-90)}_getCircumference(){return eo(this.options.circumference)}_getRotationExtents(){let o=Ge,n=-Ge;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const a=this.chart.getDatasetMeta(r).controller,s=a._getRotation(),i=a._getCircumference();o=Math.min(o,s),n=Math.max(n,s+i)}return{rotation:o,circumference:n-o}}update(o){const n=this.chart,{chartArea:r}=n,a=this._cachedMeta,s=a.data,i=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-i)/2,0),c=Math.min(R0(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:f,rotation:u}=this._getRotationExtents(),{ratioX:h,ratioY:m,offsetX:p,offsetY:y}=Dx(u,f,c),b=(r.width-i)/h,g=(r.height-i)/m,_=Math.max(Math.min(b,g)/2,0),E=vc(this.options.radius,_),B=Math.max(E*c,0),A=(E-B)/this._getVisibleDatasetWeightTotal();this.offsetX=p*E,this.offsetY=y*E,a.total=this.calculateTotal(),this.outerRadius=E-A*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-A*d,0),this.updateElements(s,0,s.length,o)}_circumference(o,n){const r=this.options,a=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(o)||a._parsed[o]===null||a.data[o].hidden?0:this.calculateCircumference(a._parsed[o]*s/Ge)}updateElements(o,n,r,a){const s=a==="reset",i=this.chart,l=i.chartArea,d=i.options.animation,f=(l.left+l.right)/2,u=(l.top+l.bottom)/2,h=s&&d.animateScale,m=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:y,includeOptions:b}=this._getSharedOptions(n,a);let g=this._getRotation(),_;for(_=0;_<n;++_)g+=this._circumference(_,s);for(_=n;_<n+r;++_){const E=this._circumference(_,s),B=o[_],A={x:f+this.offsetX,y:u+this.offsetY,startAngle:g,endAngle:g+E,circumference:E,outerRadius:p,innerRadius:m};b&&(A.options=y||this.resolveDataElementOptions(_,B.active?"active":a)),g+=E,this.updateElement(B,_,A,a)}}calculateTotal(){const o=this._cachedMeta,n=o.data;let r=0,a;for(a=0;a<n.length;a++){const s=o._parsed[a];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(a)&&!n[a].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(o){const n=this._cachedMeta.total;return n>0&&!isNaN(o)?Ge*(Math.abs(o)/n):0}getLabelAndValue(o){const n=this._cachedMeta,r=this.chart,a=r.data.labels||[],s=xs(n._parsed[o],r.options.locale);return{label:a[o]||"",value:s}}getMaxBorderWidth(o){let n=0;const r=this.chart;let a,s,i,l,c;if(!o){for(a=0,s=r.data.datasets.length;a<s;++a)if(r.isDatasetVisible(a)){i=r.getDatasetMeta(a),o=i.data,l=i.controller;break}}if(!o)return 0;for(a=0,s=o.length;a<s;++a)c=l.resolveDataElementOptions(a),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(o){let n=0;for(let r=0,a=o.length;r<a;++r){const s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(o){let n=0;for(let r=0;r<o;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(o){return Math.max(Ae(this.chart.data.datasets[o].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}pe(ln,"id","doughnut"),pe(ln,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),pe(ln,"descriptors",{_scriptable:o=>o!=="spacing",_indexable:o=>o!=="spacing"&&!o.startsWith("borderDash")&&!o.startsWith("hoverBorderDash")}),pe(ln,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(o){const n=o.data,{labels:{pointStyle:r,textAlign:a,color:s,useBorderRadius:i,borderRadius:l}}=o.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((c,d)=>{const u=o.getDatasetMeta(0).controller.getStyle(d);return{text:c,fillStyle:u.backgroundColor,fontColor:s,hidden:!o.getDataVisibility(d),lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:u.borderWidth,strokeStyle:u.borderColor,textAlign:a,pointStyle:r,borderRadius:i&&(l||u.borderRadius),index:d}}):[]}},onClick(o,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class $r extends $o{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(o){const n=this._cachedMeta,{dataset:r,data:a=[],_dataset:s}=n,i=this.chart._animationsDisabled;let{start:l,count:c}=ny(n,a,i);this._drawStart=l,this._drawCount=c,ry(n)&&(l=0,c=a.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=a;const d=this.resolveDatasetElementOptions(o);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(r,void 0,{animated:!i,options:d},o),this.updateElements(a,l,c,o)}updateElements(o,n,r,a){const s=a==="reset",{iScale:i,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:f,includeOptions:u}=this._getSharedOptions(n,a),h=i.axis,m=l.axis,{spanGaps:p,segment:y}=this.options,b=Ln(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||s||a==="none",_=n+r,E=o.length;let B=n>0&&this.getParsed(n-1);for(let A=0;A<E;++A){const C=o[A],x=g?C:{};if(A<n||A>=_){x.skip=!0;continue}const w=this.getParsed(A),D=ze(w[m]),k=x[h]=i.getPixelForValue(w[h],A),v=x[m]=s||D?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,w,c):w[m],A);x.skip=isNaN(k)||isNaN(v)||D,x.stop=A>0&&Math.abs(w[h]-B[h])>b,y&&(x.parsed=w,x.raw=d.data[A]),u&&(x.options=f||this.resolveDataElementOptions(A,C.active?"active":a)),g||this.updateElement(C,A,x,a),B=w}}getMaxOverflow(){const o=this._cachedMeta,n=o.dataset,r=n.options&&n.options.borderWidth||0,a=o.data||[];if(!a.length)return r;const s=a[0].size(this.resolveDataElementOptions(0)),i=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(r,s,i)/2}draw(){const o=this._cachedMeta;o.dataset.updateControlPoints(this.chart.chartArea,o.iScale.axis),super.draw()}}pe($r,"id","line"),pe($r,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),pe($r,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ts extends ln{}pe(Ts,"id","pie"),pe(Ts,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});function jo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ps{constructor(o){pe(this,"options");this.options=o||{}}static override(o){Object.assign(Ps.prototype,o)}init(){}formats(){return jo()}parse(){return jo()}format(){return jo()}add(){return jo()}diff(){return jo()}startOf(){return jo()}endOf(){return jo()}}var Nx={_date:Ps};function Vx(t,o,n,r){const{controller:a,data:s,_sorted:i}=t,l=a._cachedMeta.iScale,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(l&&o===l.axis&&o!=="r"&&i&&s.length){const d=l._reversePixels?Q0:Po;if(r){if(a._sharedOptions){const f=s[0],u=typeof f.getRange=="function"&&f.getRange(o);if(u){const h=d(s,o,n-u),m=d(s,o,n+u);return{lo:h.lo,hi:m.hi}}}}else{const f=d(s,o,n);if(c){const{vScale:u}=a._cachedMeta,{_parsed:h}=t,m=h.slice(0,f.lo+1).reverse().findIndex(y=>!ze(y[u.axis]));f.lo-=Math.max(0,m);const p=h.slice(f.hi).findIndex(y=>!ze(y[u.axis]));f.hi+=Math.max(0,p)}return f}}return{lo:0,hi:s.length-1}}function jr(t,o,n,r,a){const s=t.getSortedVisibleDatasetMetas(),i=n[o];for(let l=0,c=s.length;l<c;++l){const{index:d,data:f}=s[l],{lo:u,hi:h}=Vx(s[l],o,i,a);for(let m=u;m<=h;++m){const p=f[m];p.skip||r(p,d,m)}}}function Mx(t){const o=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,a){const s=o?Math.abs(r.x-a.x):0,i=n?Math.abs(r.y-a.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(i,2))}}function Os(t,o,n,r,a){const s=[];return!a&&!t.isPointInArea(o)||jr(t,n,o,function(l,c,d){!a&&!zn(l,t.chartArea,0)||l.inRange(o.x,o.y,r)&&s.push({element:l,datasetIndex:c,index:d})},!0),s}function Tx(t,o,n,r){let a=[];function s(i,l,c){const{startAngle:d,endAngle:f}=i.getProps(["startAngle","endAngle"],r),{angle:u}=Lc(i,{x:o.x,y:o.y});Rn(u,d,f)&&a.push({element:i,datasetIndex:l,index:c})}return jr(t,n,o,s),a}function Px(t,o,n,r,a,s){let i=[];const l=Mx(n);let c=Number.POSITIVE_INFINITY;function d(f,u,h){const m=f.inRange(o.x,o.y,a);if(r&&!m)return;const p=f.getCenterPoint(a);if(!(!!s||t.isPointInArea(p))&&!m)return;const b=l(o,p);b<c?(i=[{element:f,datasetIndex:u,index:h}],c=b):b===c&&i.push({element:f,datasetIndex:u,index:h})}return jr(t,n,o,d),i}function Ls(t,o,n,r,a,s){return!s&&!t.isPointInArea(o)?[]:n==="r"&&!r?Tx(t,o,n,a):Px(t,o,n,r,a,s)}function Ad(t,o,n,r,a){const s=[],i=n==="x"?"inXRange":"inYRange";let l=!1;return jr(t,n,o,(c,d,f)=>{c[i]&&c[i](o[n],a)&&(s.push({element:c,datasetIndex:d,index:f}),l=l||c.inRange(o.x,o.y,a))}),r&&!l?[]:s}var Ox={modes:{index(t,o,n,r){const a=Fo(o,t),s=n.axis||"x",i=n.includeInvisible||!1,l=n.intersect?Os(t,a,s,r,i):Ls(t,a,s,!1,r,i),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach(d=>{const f=l[0].index,u=d.data[f];u&&!u.skip&&c.push({element:u,datasetIndex:d.index,index:f})}),c):[]},dataset(t,o,n,r){const a=Fo(o,t),s=n.axis||"xy",i=n.includeInvisible||!1;let l=n.intersect?Os(t,a,s,r,i):Ls(t,a,s,!1,r,i);if(l.length>0){const c=l[0].datasetIndex,d=t.getDatasetMeta(c).data;l=[];for(let f=0;f<d.length;++f)l.push({element:d[f],datasetIndex:c,index:f})}return l},point(t,o,n,r){const a=Fo(o,t),s=n.axis||"xy",i=n.includeInvisible||!1;return Os(t,a,s,r,i)},nearest(t,o,n,r){const a=Fo(o,t),s=n.axis||"xy",i=n.includeInvisible||!1;return Ls(t,a,s,n.intersect,r,i)},x(t,o,n,r){const a=Fo(o,t);return Ad(t,a,"x",n.intersect,r)},y(t,o,n,r){const a=Fo(o,t);return Ad(t,a,"y",n.intersect,r)}}};const vd=["left","top","right","bottom"];function Un(t,o){return t.filter(n=>n.pos===o)}function Dd(t,o){return t.filter(n=>vd.indexOf(n.pos)===-1&&n.box.axis===o)}function Wn(t,o){return t.sort((n,r)=>{const a=o?r:n,s=o?n:r;return a.weight===s.weight?a.index-s.index:a.weight-s.weight})}function Lx(t){const o=[];let n,r,a,s,i,l;for(n=0,r=(t||[]).length;n<r;++n)a=t[n],{position:s,options:{stack:i,stackWeight:l=1}}=a,o.push({index:n,box:a,pos:s,horizontal:a.isHorizontal(),weight:a.weight,stack:i&&s+i,stackWeight:l});return o}function Rx(t){const o={};for(const n of t){const{stack:r,pos:a,stackWeight:s}=n;if(!r||!vd.includes(a))continue;const i=o[r]||(o[r]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=s}return o}function Ix(t,o){const n=Rx(t),{vBoxMaxWidth:r,hBoxMaxHeight:a}=o;let s,i,l;for(s=0,i=t.length;s<i;++s){l=t[s];const{fullSize:c}=l.box,d=n[l.stack],f=d&&l.stackWeight/d.weight;l.horizontal?(l.width=f?f*r:c&&o.availableWidth,l.height=a):(l.width=r,l.height=f?f*a:c&&o.availableHeight)}return n}function Fx(t){const o=Lx(t),n=Wn(o.filter(d=>d.box.fullSize),!0),r=Wn(Un(o,"left"),!0),a=Wn(Un(o,"right")),s=Wn(Un(o,"top"),!0),i=Wn(Un(o,"bottom")),l=Dd(o,"x"),c=Dd(o,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:a.concat(c).concat(i).concat(l),chartArea:Un(o,"chartArea"),vertical:r.concat(a).concat(c),horizontal:s.concat(i).concat(l)}}function Nd(t,o,n,r){return Math.max(t[n],o[n])+Math.max(t[r],o[r])}function Vd(t,o){t.top=Math.max(t.top,o.top),t.left=Math.max(t.left,o.left),t.bottom=Math.max(t.bottom,o.bottom),t.right=Math.max(t.right,o.right)}function zx(t,o,n,r){const{pos:a,box:s}=n,i=t.maxPadding;if(!Te(a)){n.size&&(t[a]-=n.size);const u=r[n.stack]||{size:0,count:1};u.size=Math.max(u.size,n.horizontal?s.height:s.width),n.size=u.size/u.count,t[a]+=n.size}s.getPadding&&Vd(i,s.getPadding());const l=Math.max(0,o.outerWidth-Nd(i,t,"left","right")),c=Math.max(0,o.outerHeight-Nd(i,t,"top","bottom")),d=l!==t.w,f=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:d,other:f}:{same:f,other:d}}function $x(t){const o=t.maxPadding;function n(r){const a=Math.max(o[r]-t[r],0);return t[r]+=a,a}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function jx(t,o){const n=o.maxPadding;function r(a){const s={left:0,top:0,right:0,bottom:0};return a.forEach(i=>{s[i]=Math.max(o[i],n[i])}),s}return r(t?["left","right"]:["top","bottom"])}function Hn(t,o,n,r){const a=[];let s,i,l,c,d,f;for(s=0,i=t.length,d=0;s<i;++s){l=t[s],c=l.box,c.update(l.width||o.w,l.height||o.h,jx(l.horizontal,o));const{same:u,other:h}=zx(o,n,l,r);d|=u&&a.length,f=f||h,c.fullSize||a.push(l)}return d&&Hn(a,o,n,r)||f}function Ur(t,o,n,r,a){t.top=n,t.left=o,t.right=o+r,t.bottom=n+a,t.width=r,t.height=a}function Md(t,o,n,r){const a=n.padding;let{x:s,y:i}=o;for(const l of t){const c=l.box,d=r[l.stack]||{placed:0,weight:1},f=l.stackWeight/d.weight||1;if(l.horizontal){const u=o.w*f,h=d.size||c.height;Pn(d.start)&&(i=d.start),c.fullSize?Ur(c,a.left,i,n.outerWidth-a.right-a.left,h):Ur(c,o.left+d.placed,i,u,h),d.start=i,d.placed+=u,i=c.bottom}else{const u=o.h*f,h=d.size||c.width;Pn(d.start)&&(s=d.start),c.fullSize?Ur(c,s,a.top,h,n.outerHeight-a.bottom-a.top):Ur(c,s,o.top+d.placed,h,u),d.start=s,d.placed+=u,s=c.right}}o.x=s,o.y=i}var At={addBox(t,o){t.boxes||(t.boxes=[]),o.fullSize=o.fullSize||!1,o.position=o.position||"top",o.weight=o.weight||0,o._layers=o._layers||function(){return[{z:0,draw(n){o.draw(n)}}]},t.boxes.push(o)},removeBox(t,o){const n=t.boxes?t.boxes.indexOf(o):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,o,n){o.fullSize=n.fullSize,o.position=n.position,o.weight=n.weight},update(t,o,n,r){if(!t)return;const a=St(t.options.layout.padding),s=Math.max(o-a.width,0),i=Math.max(n-a.height,0),l=Fx(t.boxes),c=l.vertical,d=l.horizontal;$e(t.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=c.reduce((y,b)=>b.box.options&&b.box.options.display===!1?y:y+1,0)||1,u=Object.freeze({outerWidth:o,outerHeight:n,padding:a,availableWidth:s,availableHeight:i,vBoxMaxWidth:s/2/f,hBoxMaxHeight:i/2}),h=Object.assign({},a);Vd(h,St(r));const m=Object.assign({maxPadding:h,w:s,h:i,x:a.left,y:a.top},a),p=Ix(c.concat(d),u);Hn(l.fullSize,m,u,p),Hn(c,m,u,p),Hn(d,m,u,p)&&Hn(c,m,u,p),$x(m),Md(l.leftAndTop,m,u,p),m.x+=m.w,m.y+=m.h,Md(l.rightAndBottom,m,u,p),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},$e(l.chartArea,y=>{const b=y.box;Object.assign(b,t.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class Td{acquireContext(o,n){}releaseContext(o){return!1}addEventListener(o,n,r){}removeEventListener(o,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(o,n,r,a){return n=Math.max(0,n||o.width),r=r||o.height,{width:n,height:Math.max(0,a?Math.floor(n/a):r)}}isAttached(o){return!0}updateConfig(o){}}class Ux extends Td{acquireContext(o){return o&&o.getContext&&o.getContext("2d")||null}updateConfig(o){o.options.animation=!1}}const Wr="$chartjs",Wx={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Pd=t=>t===null||t==="";function Hx(t,o){const n=t.style,r=t.getAttribute("height"),a=t.getAttribute("width");if(t[Wr]={initial:{height:r,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Pd(a)){const s=ad(t,"width");s!==void 0&&(t.width=s)}if(Pd(r))if(t.style.height==="")t.height=t.width/(o||2);else{const s=ad(t,"height");s!==void 0&&(t.height=s)}return t}const Od=Gy?{passive:!0}:!1;function qx(t,o,n){t&&t.addEventListener(o,n,Od)}function Gx(t,o,n){t&&t.canvas&&t.canvas.removeEventListener(o,n,Od)}function Kx(t,o){const n=Wx[t.type]||t.type,{x:r,y:a}=Fo(t,o);return{type:n,chart:o,native:t,x:r!==void 0?r:null,y:a!==void 0?a:null}}function Hr(t,o){for(const n of t)if(n===o||n.contains(o))return!0}function Xx(t,o,n){const r=t.canvas,a=new MutationObserver(s=>{let i=!1;for(const l of s)i=i||Hr(l.addedNodes,r),i=i&&!Hr(l.removedNodes,r);i&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}function Yx(t,o,n){const r=t.canvas,a=new MutationObserver(s=>{let i=!1;for(const l of s)i=i||Hr(l.removedNodes,r),i=i&&!Hr(l.addedNodes,r);i&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}const qn=new Map;let Ld=0;function Rd(){const t=window.devicePixelRatio;t!==Ld&&(Ld=t,qn.forEach((o,n)=>{n.currentDevicePixelRatio!==t&&o()}))}function Jx(t,o){qn.size||window.addEventListener("resize",Rd),qn.set(t,o)}function Qx(t){qn.delete(t),qn.size||window.removeEventListener("resize",Rd)}function Zx(t,o,n){const r=t.canvas,a=r&&vs(r);if(!a)return;const s=$c((l,c)=>{const d=a.clientWidth;n(l,c),d<a.clientWidth&&n()},window),i=new ResizeObserver(l=>{const c=l[0],d=c.contentRect.width,f=c.contentRect.height;d===0&&f===0||s(d,f)});return i.observe(a),Jx(t,s),i}function Rs(t,o,n){n&&n.disconnect(),o==="resize"&&Qx(t)}function ek(t,o,n){const r=t.canvas,a=$c(s=>{t.ctx!==null&&n(Kx(s,t))},t);return qx(r,o,a),a}class tk extends Td{acquireContext(o,n){const r=o&&o.getContext&&o.getContext("2d");return r&&r.canvas===o?(Hx(o,n),r):null}releaseContext(o){const n=o.canvas;if(!n[Wr])return!1;const r=n[Wr].initial;["height","width"].forEach(s=>{const i=r[s];ze(i)?n.removeAttribute(s):n.setAttribute(s,i)});const a=r.style||{};return Object.keys(a).forEach(s=>{n.style[s]=a[s]}),n.width=n.width,delete n[Wr],!0}addEventListener(o,n,r){this.removeEventListener(o,n);const a=o.$proxies||(o.$proxies={}),i={attach:Xx,detach:Yx,resize:Zx}[n]||ek;a[n]=i(o,n,r)}removeEventListener(o,n){const r=o.$proxies||(o.$proxies={}),a=r[n];if(!a)return;({attach:Rs,detach:Rs,resize:Rs}[n]||Gx)(o,n,a),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(o,n,r,a){return qy(o,n,r,a)}isAttached(o){const n=o&&vs(o);return!!(n&&n.isConnected)}}function ok(t){return!As()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Ux:tk}let no=(Ea=class{constructor(){pe(this,"x");pe(this,"y");pe(this,"active",!1);pe(this,"options");pe(this,"$animations")}tooltipPosition(o){const{x:n,y:r}=this.getProps(["x","y"],o);return{x:n,y:r}}hasValue(){return Ln(this.x)&&Ln(this.y)}getProps(o,n){const r=this.$animations;if(!n||!r)return this;const a={};return o.forEach(s=>{a[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),a}},pe(Ea,"defaults",{}),pe(Ea,"defaultRoutes"),Ea);function nk(t,o){const n=t.options.ticks,r=rk(t),a=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?sk(o):[],i=s.length,l=s[0],c=s[i-1],d=[];if(i>a)return ik(o,d,s,i/a),d;const f=ak(s,o,a);if(i>0){let u,h;const m=i>1?Math.round((c-l)/(i-1)):null;for(qr(o,d,f,ze(m)?0:l-m,l),u=0,h=i-1;u<h;u++)qr(o,d,f,s[u],s[u+1]);return qr(o,d,f,c,ze(m)?o.length:c+m),d}return qr(o,d,f),d}function rk(t){const o=t.options.offset,n=t._tickSize(),r=t._length/n+(o?0:1),a=t._maxLength/n;return Math.floor(Math.min(r,a))}function ak(t,o,n){const r=lk(t),a=o.length/n;if(!r)return Math.max(a,1);const s=H0(r);for(let i=0,l=s.length-1;i<l;i++){const c=s[i];if(c>a)return c}return Math.max(a,1)}function sk(t){const o=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&o.push(n);return o}function ik(t,o,n,r){let a=0,s=n[0],i;for(r=Math.ceil(r),i=0;i<t.length;i++)i===s&&(o.push(t[i]),a++,s=n[a*r])}function qr(t,o,n,r,a){const s=Ae(r,0),i=Math.min(Ae(a,t.length),t.length);let l=0,c,d,f;for(n=Math.ceil(n),a&&(c=a-r,n=c/Math.floor(c/n)),f=s;f<0;)l++,f=Math.round(s+l*n);for(d=Math.max(s,0);d<i;d++)d===f&&(o.push(t[d]),l++,f=Math.round(s+l*n))}function lk(t){const o=t.length;let n,r;if(o<2)return!1;for(r=t[0],n=1;n<o;++n)if(t[n]-t[n-1]!==r)return!1;return r}const ck=t=>t==="left"?"right":t==="right"?"left":t,Id=(t,o,n)=>o==="top"||o==="left"?t[o]+n:t[o]-n,Fd=(t,o)=>Math.min(o||t,t);function zd(t,o){const n=[],r=t.length/o,a=t.length;let s=0;for(;s<a;s+=r)n.push(t[Math.floor(s)]);return n}function dk(t,o,n){const r=t.ticks.length,a=Math.min(o,r-1),s=t._startPixel,i=t._endPixel,l=1e-6;let c=t.getPixelForTick(a),d;if(!(n&&(r===1?d=Math.max(c-s,i-c):o===0?d=(t.getPixelForTick(1)-c)/2:d=(c-t.getPixelForTick(a-1))/2,c+=a<o?d:-d,c<s-l||c>i+l)))return c}function fk(t,o){$e(t,n=>{const r=n.gc,a=r.length/2;let s;if(a>o){for(s=0;s<a;++s)delete n.data[r[s]];r.splice(0,a)}})}function Gn(t){return t.drawTicks?t.tickLength:0}function $d(t,o){if(!t.display)return 0;const n=it(t.font,o),r=St(t.padding);return(Qe(t.text)?t.text.length:1)*n.lineHeight+r.height}function uk(t,o){return Ro(t,{scale:o,type:"scale"})}function hk(t,o,n){return Ro(t,{tick:n,index:o,type:"tick"})}function mk(t,o,n){let r=gs(t);return(n&&o!=="right"||!n&&o==="right")&&(r=ck(r)),r}function pk(t,o,n,r){const{top:a,left:s,bottom:i,right:l,chart:c}=t,{chartArea:d,scales:f}=c;let u=0,h,m,p;const y=i-a,b=l-s;if(t.isHorizontal()){if(m=st(r,s,l),Te(n)){const g=Object.keys(n)[0],_=n[g];p=f[g].getPixelForValue(_)+y-o}else n==="center"?p=(d.bottom+d.top)/2+y-o:p=Id(t,n,o);h=l-s}else{if(Te(n)){const g=Object.keys(n)[0],_=n[g];m=f[g].getPixelForValue(_)-b+o}else n==="center"?m=(d.left+d.right)/2-b+o:m=Id(t,n,o);p=st(r,i,a),u=n==="left"?-et:et}return{titleX:m,titleY:p,maxWidth:h,rotation:u}}class cn extends no{constructor(o){super(),this.id=o.id,this.type=o.type,this.options=void 0,this.ctx=o.ctx,this.chart=o.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(o){this.options=o.setContext(this.getContext()),this.axis=o.axis,this._userMin=this.parse(o.min),this._userMax=this.parse(o.max),this._suggestedMin=this.parse(o.suggestedMin),this._suggestedMax=this.parse(o.suggestedMax)}parse(o,n){return o}getUserBounds(){let{_userMin:o,_userMax:n,_suggestedMin:r,_suggestedMax:a}=this;return o=Ft(o,Number.POSITIVE_INFINITY),n=Ft(n,Number.NEGATIVE_INFINITY),r=Ft(r,Number.POSITIVE_INFINITY),a=Ft(a,Number.NEGATIVE_INFINITY),{min:Ft(o,r),max:Ft(n,a),minDefined:rt(o),maxDefined:rt(n)}}getMinMax(o){let{min:n,max:r,minDefined:a,maxDefined:s}=this.getUserBounds(),i;if(a&&s)return{min:n,max:r};const l=this.getMatchingVisibleMetas();for(let c=0,d=l.length;c<d;++c)i=l[c].controller.getMinMax(this,o),a||(n=Math.min(n,i.min)),s||(r=Math.max(r,i.max));return n=s&&n>r?r:n,r=a&&n>r?n:r,{min:Ft(n,Ft(r,n)),max:Ft(r,Ft(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const o=this.chart.data;return this.options.labels||(this.isHorizontal()?o.xLabels:o.yLabels)||o.labels||[]}getLabelItems(o=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(o))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){He(this.options.beforeUpdate,[this])}update(o,n,r){const{beginAtZero:a,grace:s,ticks:i}=this.options,l=i.sampleSize;this.beforeUpdate(),this.maxWidth=o,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Ey(this,s,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?zd(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||i.source==="auto")&&(this.ticks=nk(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let o=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,o=!o),this._startPixel=n,this._endPixel=r,this._reversePixels=o,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){He(this.options.afterUpdate,[this])}beforeSetDimensions(){He(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){He(this.options.afterSetDimensions,[this])}_callHooks(o){this.chart.notifyPlugins(o,this.getContext()),He(this.options[o],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){He(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(o){const n=this.options.ticks;let r,a,s;for(r=0,a=o.length;r<a;r++)s=o[r],s.label=He(n.callback,[s.value,r,o],this)}afterTickToLabelConversion(){He(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){He(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const o=this.options,n=o.ticks,r=Fd(this.ticks.length,o.ticks.maxTicksLimit),a=n.minRotation||0,s=n.maxRotation;let i=a,l,c,d;if(!this._isVisible()||!n.display||a>=s||r<=1||!this.isHorizontal()){this.labelRotation=a;return}const f=this._getLabelSizes(),u=f.widest.width,h=f.highest.height,m=at(this.chart.width-u,0,this.maxWidth);l=o.offset?this.maxWidth/r:m/(r-1),u+6>l&&(l=m/(r-(o.offset?.5:1)),c=this.maxHeight-Gn(o.grid)-n.padding-$d(o.title,this.chart.options.font),d=Math.sqrt(u*u+h*h),i=X0(Math.min(Math.asin(at((f.highest.height+6)/l,-1,1)),Math.asin(at(c/d,-1,1))-Math.asin(at(h/d,-1,1)))),i=Math.max(a,Math.min(s,i))),this.labelRotation=i}afterCalculateLabelRotation(){He(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){He(this.options.beforeFit,[this])}fit(){const o={width:0,height:0},{chart:n,options:{ticks:r,title:a,grid:s}}=this,i=this._isVisible(),l=this.isHorizontal();if(i){const c=$d(a,n.options.font);if(l?(o.width=this.maxWidth,o.height=Gn(s)+c):(o.height=this.maxHeight,o.width=Gn(s)+c),r.display&&this.ticks.length){const{first:d,last:f,widest:u,highest:h}=this._getLabelSizes(),m=r.padding*2,p=eo(this.labelRotation),y=Math.cos(p),b=Math.sin(p);if(l){const g=r.mirror?0:b*u.width+y*h.height;o.height=Math.min(this.maxHeight,o.height+g+m)}else{const g=r.mirror?0:y*u.width+b*h.height;o.width=Math.min(this.maxWidth,o.width+g+m)}this._calculatePadding(d,f,b,y)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=o.height):(this.width=o.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(o,n,r,a){const{ticks:{align:s,padding:i},position:l}=this.options,c=this.labelRotation!==0,d=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,m=0;c?d?(h=a*o.width,m=r*n.height):(h=r*o.height,m=a*n.width):s==="start"?m=n.width:s==="end"?h=o.width:s!=="inner"&&(h=o.width/2,m=n.width/2),this.paddingLeft=Math.max((h-f+i)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-u+i)*this.width/(this.width-u),0)}else{let f=n.height/2,u=o.height/2;s==="start"?(f=0,u=o.height):s==="end"&&(f=n.height,u=0),this.paddingTop=f+i,this.paddingBottom=u+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){He(this.options.afterFit,[this])}isHorizontal(){const{axis:o,position:n}=this.options;return n==="top"||n==="bottom"||o==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(o){this.beforeTickToLabelConversion(),this.generateTickLabels(o);let n,r;for(n=0,r=o.length;n<r;n++)ze(o[n].label)&&(o.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let o=this._labelSizes;if(!o){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=zd(r,n)),this._labelSizes=o=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return o}_computeLabelSizes(o,n,r){const{ctx:a,_longestTextCache:s}=this,i=[],l=[],c=Math.floor(n/Fd(n,r));let d=0,f=0,u,h,m,p,y,b,g,_,E,B,A;for(u=0;u<n;u+=c){if(p=o[u].label,y=this._resolveTickFontOptions(u),a.font=b=y.string,g=s[b]=s[b]||{data:{},gc:[]},_=y.lineHeight,E=B=0,!ze(p)&&!Qe(p))E=Gc(a,g.data,g.gc,E,p),B=_;else if(Qe(p))for(h=0,m=p.length;h<m;++h)A=p[h],!ze(A)&&!Qe(A)&&(E=Gc(a,g.data,g.gc,E,A),B+=_);i.push(E),l.push(B),d=Math.max(E,d),f=Math.max(B,f)}fk(s,n);const C=i.indexOf(d),x=l.indexOf(f),w=D=>({width:i[D]||0,height:l[D]||0});return{first:w(0),last:w(n-1),widest:w(C),highest:w(x),widths:i,heights:l}}getLabelForValue(o){return o}getPixelForValue(o,n){return NaN}getValueForPixel(o){}getPixelForTick(o){const n=this.ticks;return o<0||o>n.length-1?null:this.getPixelForValue(n[o].value)}getPixelForDecimal(o){this._reversePixels&&(o=1-o);const n=this._startPixel+o*this._length;return J0(this._alignToPixels?Lo(this.chart,n,0):n)}getDecimalForPixel(o){const n=(o-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:o,max:n}=this;return o<0&&n<0?n:o>0&&n>0?o:0}getContext(o){const n=this.ticks||[];if(o>=0&&o<n.length){const r=n[o];return r.$context||(r.$context=hk(this.getContext(),o,r))}return this.$context||(this.$context=uk(this.chart.getContext(),this))}_tickSize(){const o=this.options.ticks,n=eo(this.labelRotation),r=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),s=this._getLabelSizes(),i=o.autoSkipPadding||0,l=s?s.widest.width+i:0,c=s?s.highest.height+i:0;return this.isHorizontal()?c*r>l*a?l/r:c/a:c*a<l*r?c/r:l/a}_isVisible(){const o=this.options.display;return o!=="auto"?!!o:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(o){const n=this.axis,r=this.chart,a=this.options,{grid:s,position:i,border:l}=a,c=s.offset,d=this.isHorizontal(),u=this.ticks.length+(c?1:0),h=Gn(s),m=[],p=l.setContext(this.getContext()),y=p.display?p.width:0,b=y/2,g=function(O){return Lo(r,O,y)};let _,E,B,A,C,x,w,D,k,v,S,N;if(i==="top")_=g(this.bottom),x=this.bottom-h,D=_-b,v=g(o.top)+b,N=o.bottom;else if(i==="bottom")_=g(this.top),v=o.top,N=g(o.bottom)-b,x=_+b,D=this.top+h;else if(i==="left")_=g(this.right),C=this.right-h,w=_-b,k=g(o.left)+b,S=o.right;else if(i==="right")_=g(this.left),k=o.left,S=g(o.right)-b,C=_+b,w=this.left+h;else if(n==="x"){if(i==="center")_=g((o.top+o.bottom)/2+.5);else if(Te(i)){const O=Object.keys(i)[0],P=i[O];_=g(this.chart.scales[O].getPixelForValue(P))}v=o.top,N=o.bottom,x=_+b,D=x+h}else if(n==="y"){if(i==="center")_=g((o.left+o.right)/2);else if(Te(i)){const O=Object.keys(i)[0],P=i[O];_=g(this.chart.scales[O].getPixelForValue(P))}C=_-b,w=C-h,k=o.left,S=o.right}const V=Ae(a.ticks.maxTicksLimit,u),L=Math.max(1,Math.ceil(u/V));for(E=0;E<u;E+=L){const O=this.getContext(E),P=s.setContext(O),R=l.setContext(O),j=P.lineWidth,T=P.color,I=R.dash||[],X=R.dashOffset,H=P.tickWidth,W=P.tickColor,Z=P.tickBorderDash||[],oe=P.tickBorderDashOffset;B=dk(this,E,c),B!==void 0&&(A=Lo(r,B,j),d?C=w=k=S=A:x=D=v=N=A,m.push({tx1:C,ty1:x,tx2:w,ty2:D,x1:k,y1:v,x2:S,y2:N,width:j,color:T,borderDash:I,borderDashOffset:X,tickWidth:H,tickColor:W,tickBorderDash:Z,tickBorderDashOffset:oe}))}return this._ticksLength=u,this._borderValue=_,m}_computeLabelItems(o){const n=this.axis,r=this.options,{position:a,ticks:s}=r,i=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:d,padding:f,mirror:u}=s,h=Gn(r.grid),m=h+f,p=u?-f:m,y=-eo(this.labelRotation),b=[];let g,_,E,B,A,C,x,w,D,k,v,S,N="middle";if(a==="top")C=this.bottom-p,x=this._getXAxisLabelAlignment();else if(a==="bottom")C=this.top+p,x=this._getXAxisLabelAlignment();else if(a==="left"){const L=this._getYAxisLabelAlignment(h);x=L.textAlign,A=L.x}else if(a==="right"){const L=this._getYAxisLabelAlignment(h);x=L.textAlign,A=L.x}else if(n==="x"){if(a==="center")C=(o.top+o.bottom)/2+m;else if(Te(a)){const L=Object.keys(a)[0],O=a[L];C=this.chart.scales[L].getPixelForValue(O)+m}x=this._getXAxisLabelAlignment()}else if(n==="y"){if(a==="center")A=(o.left+o.right)/2-m;else if(Te(a)){const L=Object.keys(a)[0],O=a[L];A=this.chart.scales[L].getPixelForValue(O)}x=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(c==="start"?N="top":c==="end"&&(N="bottom"));const V=this._getLabelSizes();for(g=0,_=l.length;g<_;++g){E=l[g],B=E.label;const L=s.setContext(this.getContext(g));w=this.getPixelForTick(g)+s.labelOffset,D=this._resolveTickFontOptions(g),k=D.lineHeight,v=Qe(B)?B.length:1;const O=v/2,P=L.color,R=L.textStrokeColor,j=L.textStrokeWidth;let T=x;i?(A=w,x==="inner"&&(g===_-1?T=this.options.reverse?"left":"right":g===0?T=this.options.reverse?"right":"left":T="center"),a==="top"?d==="near"||y!==0?S=-v*k+k/2:d==="center"?S=-V.highest.height/2-O*k+k:S=-V.highest.height+k/2:d==="near"||y!==0?S=k/2:d==="center"?S=V.highest.height/2-O*k:S=V.highest.height-v*k,u&&(S*=-1),y!==0&&!L.showLabelBackdrop&&(A+=k/2*Math.sin(y))):(C=w,S=(1-v)*k/2);let I;if(L.showLabelBackdrop){const X=St(L.backdropPadding),H=V.heights[g],W=V.widths[g];let Z=S-X.top,oe=0-X.left;switch(N){case"middle":Z-=H/2;break;case"bottom":Z-=H;break}switch(x){case"center":oe-=W/2;break;case"right":oe-=W;break;case"inner":g===_-1?oe-=W:g>0&&(oe-=W/2);break}I={left:oe,top:Z,width:W+X.width,height:H+X.height,color:L.backdropColor}}b.push({label:B,font:D,textOffset:S,options:{rotation:y,color:P,strokeColor:R,strokeWidth:j,textAlign:T,textBaseline:N,translation:[A,C],backdrop:I}})}return b}_getXAxisLabelAlignment(){const{position:o,ticks:n}=this.options;if(-eo(this.labelRotation))return o==="top"?"left":"right";let a="center";return n.align==="start"?a="left":n.align==="end"?a="right":n.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(o){const{position:n,ticks:{crossAlign:r,mirror:a,padding:s}}=this.options,i=this._getLabelSizes(),l=o+s,c=i.widest.width;let d,f;return n==="left"?a?(f=this.right+s,r==="near"?d="left":r==="center"?(d="center",f+=c/2):(d="right",f+=c)):(f=this.right-l,r==="near"?d="right":r==="center"?(d="center",f-=c/2):(d="left",f=this.left)):n==="right"?a?(f=this.left+s,r==="near"?d="right":r==="center"?(d="center",f-=c/2):(d="left",f-=c)):(f=this.left+l,r==="near"?d="left":r==="center"?(d="center",f+=c/2):(d="right",f=this.right)):d="right",{textAlign:d,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const o=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:o.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:o.width}}drawBackground(){const{ctx:o,options:{backgroundColor:n},left:r,top:a,width:s,height:i}=this;n&&(o.save(),o.fillStyle=n,o.fillRect(r,a,s,i),o.restore())}getLineWidthForValue(o){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const a=this.ticks.findIndex(s=>s.value===o);return a>=0?n.setContext(this.getContext(a)).lineWidth:0}drawGrid(o){const n=this.options.grid,r=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(o));let s,i;const l=(c,d,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(c.x,c.y),r.lineTo(d.x,d.y),r.stroke(),r.restore())};if(n.display)for(s=0,i=a.length;s<i;++s){const c=a[s];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:o,ctx:n,options:{border:r,grid:a}}=this,s=r.setContext(this.getContext()),i=r.display?s.width:0;if(!i)return;const l=a.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,f,u,h;this.isHorizontal()?(d=Lo(o,this.left,i)-i/2,f=Lo(o,this.right,l)+l/2,u=h=c):(u=Lo(o,this.top,i)-i/2,h=Lo(o,this.bottom,l)+l/2,d=f=c),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(d,u),n.lineTo(f,h),n.stroke(),n.restore()}drawLabels(o){if(!this.options.ticks.display)return;const r=this.ctx,a=this._computeLabelArea();a&&Mr(r,a);const s=this.getLabelItems(o);for(const i of s){const l=i.options,c=i.font,d=i.label,f=i.textOffset;$n(r,d,0,f,c,l)}a&&Tr(r)}drawTitle(){const{ctx:o,options:{position:n,title:r,reverse:a}}=this;if(!r.display)return;const s=it(r.font),i=St(r.padding),l=r.align;let c=s.lineHeight/2;n==="bottom"||n==="center"||Te(n)?(c+=i.bottom,Qe(r.text)&&(c+=s.lineHeight*(r.text.length-1))):c+=i.top;const{titleX:d,titleY:f,maxWidth:u,rotation:h}=pk(this,c,n,l);$n(o,r.text,0,0,s,{color:r.color,maxWidth:u,rotation:h,textAlign:mk(l,n,a),textBaseline:"middle",translation:[d,f]})}draw(o){this._isVisible()&&(this.drawBackground(),this.drawGrid(o),this.drawBorder(),this.drawTitle(),this.drawLabels(o))}_layers(){const o=this.options,n=o.ticks&&o.ticks.z||0,r=Ae(o.grid&&o.grid.z,-1),a=Ae(o.border&&o.border.z,0);return!this._isVisible()||this.draw!==cn.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(o){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",a=[];let s,i;for(s=0,i=n.length;s<i;++s){const l=n[s];l[r]===this.id&&(!o||l.type===o)&&a.push(l)}return a}_resolveTickFontOptions(o){const n=this.options.ticks.setContext(this.getContext(o));return it(n.font)}_maxDigits(){const o=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/o}}class Gr{constructor(o,n,r){this.type=o,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(o){return Object.prototype.isPrototypeOf.call(this.type.prototype,o.prototype)}register(o){const n=Object.getPrototypeOf(o);let r;yk(n)&&(r=this.register(n));const a=this.items,s=o.id,i=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+o);return s in a||(a[s]=o,gk(o,i,r),this.override&&Je.override(o.id,o.overrides)),i}get(o){return this.items[o]}unregister(o){const n=this.items,r=o.id,a=this.scope;r in n&&delete n[r],a&&r in Je[a]&&(delete Je[a][r],this.override&&delete Oo[r])}}function gk(t,o,n){const r=Mn(Object.create(null),[n?Je.get(n):{},Je.get(o),t.defaults]);Je.set(o,r),t.defaultRoutes&&bk(o,t.defaultRoutes),t.descriptors&&Je.describe(o,t.descriptors)}function bk(t,o){Object.keys(o).forEach(n=>{const r=n.split("."),a=r.pop(),s=[t].concat(r).join("."),i=o[n].split("."),l=i.pop(),c=i.join(".");Je.route(s,a,c,l)})}function yk(t){return"id"in t&&"defaults"in t}class xk{constructor(){this.controllers=new Gr($o,"datasets",!0),this.elements=new Gr(no,"elements"),this.plugins=new Gr(Object,"plugins"),this.scales=new Gr(cn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...o){this._each("register",o)}remove(...o){this._each("unregister",o)}addControllers(...o){this._each("register",o,this.controllers)}addElements(...o){this._each("register",o,this.elements)}addPlugins(...o){this._each("register",o,this.plugins)}addScales(...o){this._each("register",o,this.scales)}getController(o){return this._get(o,this.controllers,"controller")}getElement(o){return this._get(o,this.elements,"element")}getPlugin(o){return this._get(o,this.plugins,"plugin")}getScale(o){return this._get(o,this.scales,"scale")}removeControllers(...o){this._each("unregister",o,this.controllers)}removeElements(...o){this._each("unregister",o,this.elements)}removePlugins(...o){this._each("unregister",o,this.plugins)}removeScales(...o){this._each("unregister",o,this.scales)}_each(o,n,r){[...n].forEach(a=>{const s=r||this._getRegistryForType(a);r||s.isForType(a)||s===this.plugins&&a.id?this._exec(o,s,a):$e(a,i=>{const l=r||this._getRegistryForType(i);this._exec(o,l,i)})})}_exec(o,n,r){const a=hs(o);He(r["before"+a],[],r),n[o](r),He(r["after"+a],[],r)}_getRegistryForType(o){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(o))return r}return this.plugins}_get(o,n,r){const a=n.get(o);if(a===void 0)throw new Error('"'+o+'" is not a registered '+r+".");return a}}var $t=new xk;class kk{constructor(){this._init=void 0}notify(o,n,r,a){if(n==="beforeInit"&&(this._init=this._createDescriptors(o,!0),this._notify(this._init,o,"install")),this._init===void 0)return;const s=a?this._descriptors(o).filter(a):this._descriptors(o),i=this._notify(s,o,n,r);return n==="afterDestroy"&&(this._notify(s,o,"stop"),this._notify(this._init,o,"uninstall"),this._init=void 0),i}_notify(o,n,r,a){a=a||{};for(const s of o){const i=s.plugin,l=i[r],c=[n,a,s.options];if(He(l,c,i)===!1&&a.cancelable)return!1}return!0}invalidate(){ze(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(o){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(o);return this._notifyStateChanges(o),n}_createDescriptors(o,n){const r=o&&o.config,a=Ae(r.options&&r.options.plugins,{}),s=wk(r);return a===!1&&!n?[]:_k(o,s,a,n)}_notifyStateChanges(o){const n=this._oldCache||[],r=this._cache,a=(s,i)=>s.filter(l=>!i.some(c=>l.plugin.id===c.plugin.id));this._notify(a(n,r),o,"stop"),this._notify(a(r,n),o,"start")}}function wk(t){const o={},n=[],r=Object.keys($t.plugins.items);for(let s=0;s<r.length;s++)n.push($t.getPlugin(r[s]));const a=t.plugins||[];for(let s=0;s<a.length;s++){const i=a[s];n.indexOf(i)===-1&&(n.push(i),o[i.id]=!0)}return{plugins:n,localIds:o}}function Ck(t,o){return!o&&t===!1?null:t===!0?{}:t}function _k(t,{plugins:o,localIds:n},r,a){const s=[],i=t.getContext();for(const l of o){const c=l.id,d=Ck(r[c],a);d!==null&&s.push({plugin:l,options:Ek(t.config,{plugin:l,local:n[c]},d,i)})}return s}function Ek(t,{plugin:o,local:n},r,a){const s=t.pluginScopeKeys(o),i=t.getOptionScopes(r,s);return n&&o.defaults&&i.push(o.defaults),t.createResolver(i,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Is(t,o){const n=Je.datasets[t]||{};return((o.datasets||{})[t]||{}).indexAxis||o.indexAxis||n.indexAxis||"x"}function Bk(t,o){let n=t;return t==="_index_"?n=o:t==="_value_"&&(n=o==="x"?"y":"x"),n}function Sk(t,o){return t===o?"_index_":"_value_"}function jd(t){if(t==="x"||t==="y"||t==="r")return t}function Ak(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Fs(t,...o){if(jd(t))return t;for(const n of o){const r=n.axis||Ak(n.position)||t.length>1&&jd(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Ud(t,o,n){if(n[o+"AxisID"]===t)return{axis:o}}function vk(t,o){if(o.data&&o.data.datasets){const n=o.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return Ud(t,"x",n[0])||Ud(t,"y",n[0])}return{}}function Dk(t,o){const n=Oo[t.type]||{scales:{}},r=o.scales||{},a=Is(t.type,o),s=Object.create(null);return Object.keys(r).forEach(i=>{const l=r[i];if(!Te(l))return console.error(`Invalid scale configuration for scale: ${i}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${i}`);const c=Fs(i,l,vk(i,t),Je.scales[l.type]),d=Sk(c,a),f=n.scales||{};s[i]=Tn(Object.create(null),[{axis:c},l,f[c],f[d]])}),t.data.datasets.forEach(i=>{const l=i.type||t.type,c=i.indexAxis||Is(l,o),f=(Oo[l]||{}).scales||{};Object.keys(f).forEach(u=>{const h=Bk(u,c),m=i[h+"AxisID"]||h;s[m]=s[m]||Object.create(null),Tn(s[m],[{axis:h},r[m],f[u]])})}),Object.keys(s).forEach(i=>{const l=s[i];Tn(l,[Je.scales[l.type],Je.scale])}),s}function Wd(t){const o=t.options||(t.options={});o.plugins=Ae(o.plugins,{}),o.scales=Dk(t,o)}function Hd(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Nk(t){return t=t||{},t.data=Hd(t.data),Wd(t),t}const qd=new Map,Gd=new Set;function Kr(t,o){let n=qd.get(t);return n||(n=o(),qd.set(t,n),Gd.add(n)),n}const Kn=(t,o,n)=>{const r=Mo(o,n);r!==void 0&&t.add(r)};class Vk{constructor(o){this._config=Nk(o),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(o){this._config.type=o}get data(){return this._config.data}set data(o){this._config.data=Hd(o)}get options(){return this._config.options}set options(o){this._config.options=o}get plugins(){return this._config.plugins}update(){const o=this._config;this.clearCache(),Wd(o)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(o){return Kr(o,()=>[[`datasets.${o}`,""]])}datasetAnimationScopeKeys(o,n){return Kr(`${o}.transition.${n}`,()=>[[`datasets.${o}.transitions.${n}`,`transitions.${n}`],[`datasets.${o}`,""]])}datasetElementScopeKeys(o,n){return Kr(`${o}-${n}`,()=>[[`datasets.${o}.elements.${n}`,`datasets.${o}`,`elements.${n}`,""]])}pluginScopeKeys(o){const n=o.id,r=this.type;return Kr(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...o.additionalOptionScopes||[]]])}_cachedScopes(o,n){const r=this._scopeCache;let a=r.get(o);return(!a||n)&&(a=new Map,r.set(o,a)),a}getOptionScopes(o,n,r){const{options:a,type:s}=this,i=this._cachedScopes(o,r),l=i.get(n);if(l)return l;const c=new Set;n.forEach(f=>{o&&(c.add(o),f.forEach(u=>Kn(c,o,u))),f.forEach(u=>Kn(c,a,u)),f.forEach(u=>Kn(c,Oo[s]||{},u)),f.forEach(u=>Kn(c,Je,u)),f.forEach(u=>Kn(c,ks,u))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),Gd.has(n)&&i.set(n,d),d}chartOptionScopes(){const{options:o,type:n}=this;return[o,Oo[n]||{},Je.datasets[n]||{},{type:n},Je,ks]}resolveNamedOptions(o,n,r,a=[""]){const s={$shared:!0},{resolver:i,subPrefixes:l}=Kd(this._resolverCache,o,a);let c=i;if(Tk(i,n)){s.$shared=!1,r=yo(r)?r():r;const d=this.createResolver(o,r,l);c=rn(i,r,d)}for(const d of n)s[d]=c[d];return s}createResolver(o,n,r=[""],a){const{resolver:s}=Kd(this._resolverCache,o,r);return Te(n)?rn(s,n,void 0,a):s}}function Kd(t,o,n){let r=t.get(o);r||(r=new Map,t.set(o,r));const a=n.join();let s=r.get(a);return s||(s={resolver:Es(o,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},r.set(a,s)),s}const Mk=t=>Te(t)&&Object.getOwnPropertyNames(t).some(o=>yo(t[o]));function Tk(t,o){const{isScriptable:n,isIndexable:r}=Jc(t);for(const a of o){const s=n(a),i=r(a),l=(i||s)&&t[a];if(s&&(yo(l)||Mk(l))||i&&Qe(l))return!0}return!1}var Pk="4.5.1";const Ok=["top","bottom","left","right","chartArea"];function Xd(t,o){return t==="top"||t==="bottom"||Ok.indexOf(t)===-1&&o==="x"}function Yd(t,o){return function(n,r){return n[t]===r[t]?n[o]-r[o]:n[t]-r[t]}}function Jd(t){const o=t.chart,n=o.options.animation;o.notifyPlugins("afterRender"),He(n&&n.onComplete,[t],o)}function Lk(t){const o=t.chart,n=o.options.animation;He(n&&n.onProgress,[t],o)}function Qd(t){return As()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Xr={},Zd=t=>{const o=Qd(t);return Object.values(Xr).filter(n=>n.canvas===o).pop()};function Rk(t,o,n){const r=Object.keys(t);for(const a of r){const s=+a;if(s>=o){const i=t[a];delete t[a],(n>0||s>o)&&(t[s+n]=i)}}}function Ik(t,o,n,r){return!n||t.type==="mouseout"?null:r?o:t}class ro{static register(...o){$t.add(...o),ef()}static unregister(...o){$t.remove(...o),ef()}constructor(o,n){const r=this.config=new Vk(n),a=Qd(o),s=Zd(a);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const i=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||ok(a)),this.platform.updateConfig(r);const l=this.platform.acquireContext(a,i.aspectRatio),c=l&&l.canvas,d=c&&c.height,f=c&&c.width;if(this.id=L0(),this.ctx=l,this.canvas=c,this.width=f,this.height=d,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new kk,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=ty(u=>this.update(u),i.resizeDelay||0),this._dataChanges=[],Xr[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}oo.listen(this,"complete",Jd),oo.listen(this,"progress",Lk),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:o,maintainAspectRatio:n},width:r,height:a,_aspectRatio:s}=this;return ze(o)?n&&s?s:a?r/a:null:o}get data(){return this.config.data}set data(o){this.config.data=o}get options(){return this._options}set options(o){this.config.options=o}get registry(){return $t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():rd(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Kc(this.canvas,this.ctx),this}stop(){return oo.stop(this),this}resize(o,n){oo.running(this)?this._resizeBeforeDraw={width:o,height:n}:this._resize(o,n)}_resize(o,n){const r=this.options,a=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(a,o,n,s),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,rd(this,l,!0)&&(this.notifyPlugins("resize",{size:i}),He(r.onResize,[this,i],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};$e(n,(r,a)=>{r.id=a})}buildOrUpdateScales(){const o=this.options,n=o.scales,r=this.scales,a=Object.keys(r).reduce((i,l)=>(i[l]=!1,i),{});let s=[];n&&(s=s.concat(Object.keys(n).map(i=>{const l=n[i],c=Fs(i,l),d=c==="r",f=c==="x";return{options:l,dposition:d?"chartArea":f?"bottom":"left",dtype:d?"radialLinear":f?"category":"linear"}}))),$e(s,i=>{const l=i.options,c=l.id,d=Fs(c,l),f=Ae(l.type,i.dtype);(l.position===void 0||Xd(l.position,d)!==Xd(i.dposition))&&(l.position=i.dposition),a[c]=!0;let u=null;if(c in r&&r[c].type===f)u=r[c];else{const h=$t.getScale(f);u=new h({id:c,type:f,ctx:this.ctx,chart:this}),r[u.id]=u}u.init(l,o)}),$e(a,(i,l)=>{i||delete r[l]}),$e(r,i=>{At.configure(this,i,i.options),At.addBox(this,i)})}_updateMetasets(){const o=this._metasets,n=this.data.datasets.length,r=o.length;if(o.sort((a,s)=>a.index-s.index),r>n){for(let a=n;a<r;++a)this._destroyDatasetMeta(a);o.splice(n,r-n)}this._sortedMetasets=o.slice(0).sort(Yd("order","index"))}_removeUnreferencedMetasets(){const{_metasets:o,data:{datasets:n}}=this;o.length>n.length&&delete this._stacks,o.forEach((r,a)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const o=[],n=this.data.datasets;let r,a;for(this._removeUnreferencedMetasets(),r=0,a=n.length;r<a;r++){const s=n[r];let i=this.getDatasetMeta(r);const l=s.type||this.config.type;if(i.type&&i.type!==l&&(this._destroyDatasetMeta(r),i=this.getDatasetMeta(r)),i.type=l,i.indexAxis=s.indexAxis||Is(l,this.options),i.order=s.order||0,i.index=r,i.label=""+s.label,i.visible=this.isDatasetVisible(r),i.controller)i.controller.updateIndex(r),i.controller.linkScales();else{const c=$t.getController(l),{datasetElementType:d,dataElementType:f}=Je.datasets[l];Object.assign(c,{dataElementType:$t.getElement(f),datasetElementType:d&&$t.getElement(d)}),i.controller=new c(this,r),o.push(i.controller)}}return this._updateMetasets(),o}_resetElements(){$e(this.data.datasets,(o,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(o){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:o,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let d=0,f=this.data.datasets.length;d<f;d++){const{controller:u}=this.getDatasetMeta(d),h=!a&&s.indexOf(u)===-1;u.buildOrUpdateElements(h),i=Math.max(+u.getMaxOverflow(),i)}i=this._minPadding=r.layout.autoPadding?i:0,this._updateLayout(i),a||$e(s,d=>{d.reset()}),this._updateDatasets(o),this.notifyPlugins("afterUpdate",{mode:o}),this._layers.sort(Yd("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){$e(this.scales,o=>{At.removeBox(this,o)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const o=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(o.events);(!Vc(n,r)||!!this._responsiveListeners!==o.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:o}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:a,count:s}of n){const i=r==="_removeElements"?-s:s;Rk(o,a,i)}}_getUniformDataChanges(){const o=this._dataChanges;if(!o||!o.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(o.filter(i=>i[0]===s).map((i,l)=>l+","+i.splice(1).join(","))),a=r(0);for(let s=1;s<n;s++)if(!Vc(a,r(s)))return;return Array.from(a).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(o){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;At.update(this,this.width,this.height,o);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],$e(this.boxes,a=>{r&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,s)=>{a._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(o){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:o,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,yo(o)?o({datasetIndex:n}):o);this.notifyPlugins("afterDatasetsUpdate",{mode:o})}}_updateDataset(o,n){const r=this.getDatasetMeta(o),a={meta:r,index:o,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(r.controller._update(n),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(oo.has(this)?this.attached&&!oo.running(this)&&oo.start(this):(this.draw(),Jd({chart:this})))}draw(){let o;if(this._resizeBeforeDraw){const{width:r,height:a}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,a)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(o=0;o<n.length&&n[o].z<=0;++o)n[o].draw(this.chartArea);for(this._drawDatasets();o<n.length;++o)n[o].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(o){const n=this._sortedMetasets,r=[];let a,s;for(a=0,s=n.length;a<s;++a){const i=n[a];(!o||i.visible)&&r.push(i)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const o=this.getSortedVisibleDatasetMetas();for(let n=o.length-1;n>=0;--n)this._drawDataset(o[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(o){const n=this.ctx,r={meta:o,index:o.index,cancelable:!0},a=md(this,o);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(a&&Mr(n,a),o.controller.draw(),a&&Tr(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(o){return zn(o,this.chartArea,this._minPadding)}getElementsAtEventForMode(o,n,r,a){const s=Ox.modes[n];return typeof s=="function"?s(this,o,r,a):[]}getDatasetMeta(o){const n=this.data.datasets[o],r=this._metasets;let a=r.filter(s=>s&&s._dataset===n).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:o,_dataset:n,_parsed:[],_sorted:!1},r.push(a)),a}getContext(){return this.$context||(this.$context=Ro(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(o){const n=this.data.datasets[o];if(!n)return!1;const r=this.getDatasetMeta(o);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(o,n){const r=this.getDatasetMeta(o);r.hidden=!n}toggleDataVisibility(o){this._hiddenIndices[o]=!this._hiddenIndices[o]}getDataVisibility(o){return!this._hiddenIndices[o]}_updateVisibility(o,n,r){const a=r?"show":"hide",s=this.getDatasetMeta(o),i=s.controller._resolveAnimations(void 0,a);Pn(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(o,r),i.update(s,{visible:r}),this.update(l=>l.datasetIndex===o?a:void 0))}hide(o,n){this._updateVisibility(o,n,!1)}show(o,n){this._updateVisibility(o,n,!0)}_destroyDatasetMeta(o){const n=this._metasets[o];n&&n.controller&&n.controller._destroy(),delete this._metasets[o]}_stop(){let o,n;for(this.stop(),oo.remove(this),o=0,n=this.data.datasets.length;o<n;++o)this._destroyDatasetMeta(o)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:o,ctx:n}=this;this._stop(),this.config.clearCache(),o&&(this.unbindEvents(),Kc(o,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Xr[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...o){return this.canvas.toDataURL(...o)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const o=this._listeners,n=this.platform,r=(s,i)=>{n.addEventListener(this,s,i),o[s]=i},a=(s,i,l)=>{s.offsetX=i,s.offsetY=l,this._eventHandler(s)};$e(this.options.events,s=>r(s,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const o=this._responsiveListeners,n=this.platform,r=(c,d)=>{n.addEventListener(this,c,d),o[c]=d},a=(c,d)=>{o[c]&&(n.removeEventListener(this,c,d),delete o[c])},s=(c,d)=>{this.canvas&&this.resize(c,d)};let i;const l=()=>{a("attach",l),this.attached=!0,this.resize(),r("resize",s),r("detach",i)};i=()=>{this.attached=!1,a("resize",s),this._stop(),this._resize(0,0),r("attach",l)},n.isAttached(this.canvas)?l():i()}unbindEvents(){$e(this._listeners,(o,n)=>{this.platform.removeEventListener(this,n,o)}),this._listeners={},$e(this._responsiveListeners,(o,n)=>{this.platform.removeEventListener(this,n,o)}),this._responsiveListeners=void 0}updateHoverStyle(o,n,r){const a=r?"set":"remove";let s,i,l,c;for(n==="dataset"&&(s=this.getDatasetMeta(o[0].datasetIndex),s.controller["_"+a+"DatasetHoverStyle"]()),l=0,c=o.length;l<c;++l){i=o[l];const d=i&&this.getDatasetMeta(i.datasetIndex).controller;d&&d[a+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(o){const n=this._active||[],r=o.map(({datasetIndex:s,index:i})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[i],index:i}});!vr(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(o,n,r){return this._plugins.notify(this,o,n,r)}isPluginEnabled(o){return this._plugins._cache.filter(n=>n.plugin.id===o).length===1}_updateHoverStyles(o,n,r){const a=this.options.hover,s=(c,d)=>c.filter(f=>!d.some(u=>f.datasetIndex===u.datasetIndex&&f.index===u.index)),i=s(n,o),l=r?o:s(o,n);i.length&&this.updateHoverStyle(i,a.mode,!1),l.length&&a.mode&&this.updateHoverStyle(l,a.mode,!0)}_eventHandler(o,n){const r={event:o,replay:n,cancelable:!0,inChartArea:this.isPointInArea(o)},a=i=>(i.options.events||this.options.events).includes(o.native.type);if(this.notifyPlugins("beforeEvent",r,a)===!1)return;const s=this._handleEvent(o,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,a),(s||r.changed)&&this.render(),this}_handleEvent(o,n,r){const{_active:a=[],options:s}=this,i=n,l=this._getActiveElements(o,a,r,i),c=j0(o),d=Ik(o,this._lastEvent,r,c);r&&(this._lastEvent=null,He(s.onHover,[o,l,this],this),c&&He(s.onClick,[o,l,this],this));const f=!vr(l,a);return(f||n)&&(this._active=l,this._updateHoverStyles(l,a,n)),this._lastEvent=d,f}_getActiveElements(o,n,r,a){if(o.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(o,s.mode,s,a)}}pe(ro,"defaults",Je),pe(ro,"instances",Xr),pe(ro,"overrides",Oo),pe(ro,"registry",$t),pe(ro,"version",Pk),pe(ro,"getChart",Zd);function ef(){return $e(ro.instances,t=>t._plugins.invalidate())}function Fk(t,o,n){const{startAngle:r,x:a,y:s,outerRadius:i,innerRadius:l,options:c}=o,{borderWidth:d,borderJoinStyle:f}=c,u=Math.min(d/i,bt(r-n));if(t.beginPath(),t.arc(a,s,i-d/2,r+u/2,n-u/2),l>0){const h=Math.min(d/l,bt(r-n));t.arc(a,s,l+d/2,n-h/2,r+h/2,!0)}else{const h=Math.min(d/2,i*bt(r-n));if(f==="round")t.arc(a,s,h,n-je/2,r+je/2,!0);else if(f==="bevel"){const m=2*h*h,p=-m*Math.cos(n+je/2)+a,y=-m*Math.sin(n+je/2)+s,b=m*Math.cos(r+je/2)+a,g=m*Math.sin(r+je/2)+s;t.lineTo(p,y),t.lineTo(b,g)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function zk(t,o,n){const{startAngle:r,pixelMargin:a,x:s,y:i,outerRadius:l,innerRadius:c}=o;let d=a/l;t.beginPath(),t.arc(s,i,l,r-d,n+d),c>a?(d=a/c,t.arc(s,i,c,n+d,r-d,!0)):t.arc(s,i,a,n+et,r-et),t.closePath(),t.clip()}function $k(t){return _s(t,["outerStart","outerEnd","innerStart","innerEnd"])}function jk(t,o,n,r){const a=$k(t.options.borderRadius),s=(n-o)/2,i=Math.min(s,r*o/2),l=c=>{const d=(n-Math.min(s,c))*r/2;return at(c,0,Math.min(s,d))};return{outerStart:l(a.outerStart),outerEnd:l(a.outerEnd),innerStart:at(a.innerStart,0,i),innerEnd:at(a.innerEnd,0,i)}}function dn(t,o,n,r){return{x:n+t*Math.cos(o),y:r+t*Math.sin(o)}}function Yr(t,o,n,r,a,s){const{x:i,y:l,startAngle:c,pixelMargin:d,innerRadius:f}=o,u=Math.max(o.outerRadius+r+n-d,0),h=f>0?f+r+n+d:0;let m=0;const p=a-c;if(r){const L=f>0?f-r:0,O=u>0?u-r:0,P=(L+O)/2,R=P!==0?p*P/(P+r):p;m=(p-R)/2}const y=Math.max(.001,p*u-n/je)/u,b=(p-y)/2,g=c+b+m,_=a-b-m,{outerStart:E,outerEnd:B,innerStart:A,innerEnd:C}=jk(o,h,u,_-g),x=u-E,w=u-B,D=g+E/x,k=_-B/w,v=h+A,S=h+C,N=g+A/v,V=_-C/S;if(t.beginPath(),s){const L=(D+k)/2;if(t.arc(i,l,u,D,L),t.arc(i,l,u,L,k),B>0){const j=dn(w,k,i,l);t.arc(j.x,j.y,B,k,_+et)}const O=dn(S,_,i,l);if(t.lineTo(O.x,O.y),C>0){const j=dn(S,V,i,l);t.arc(j.x,j.y,C,_+et,V+Math.PI)}const P=(_-C/h+(g+A/h))/2;if(t.arc(i,l,h,_-C/h,P,!0),t.arc(i,l,h,P,g+A/h,!0),A>0){const j=dn(v,N,i,l);t.arc(j.x,j.y,A,N+Math.PI,g-et)}const R=dn(x,g,i,l);if(t.lineTo(R.x,R.y),E>0){const j=dn(x,D,i,l);t.arc(j.x,j.y,E,g-et,D)}}else{t.moveTo(i,l);const L=Math.cos(D)*u+i,O=Math.sin(D)*u+l;t.lineTo(L,O);const P=Math.cos(k)*u+i,R=Math.sin(k)*u+l;t.lineTo(P,R)}t.closePath()}function Uk(t,o,n,r,a){const{fullCircles:s,startAngle:i,circumference:l}=o;let c=o.endAngle;if(s){Yr(t,o,n,r,c,a);for(let d=0;d<s;++d)t.fill();isNaN(l)||(c=i+(l%Ge||Ge))}return Yr(t,o,n,r,c,a),t.fill(),c}function Wk(t,o,n,r,a){const{fullCircles:s,startAngle:i,circumference:l,options:c}=o,{borderWidth:d,borderJoinStyle:f,borderDash:u,borderDashOffset:h,borderRadius:m}=c,p=c.borderAlign==="inner";if(!d)return;t.setLineDash(u||[]),t.lineDashOffset=h,p?(t.lineWidth=d*2,t.lineJoin=f||"round"):(t.lineWidth=d,t.lineJoin=f||"bevel");let y=o.endAngle;if(s){Yr(t,o,n,r,y,a);for(let b=0;b<s;++b)t.stroke();isNaN(l)||(y=i+(l%Ge||Ge))}p&&zk(t,o,y),c.selfJoin&&y-i>=je&&m===0&&f!=="miter"&&Fk(t,o,y),s||(Yr(t,o,n,r,y,a),t.stroke())}class Xn extends no{constructor(n){super();pe(this,"circumference");pe(this,"endAngle");pe(this,"fullCircles");pe(this,"innerRadius");pe(this,"outerRadius");pe(this,"pixelMargin");pe(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,a){const s=this.getProps(["x","y"],a),{angle:i,distance:l}=Lc(s,{x:n,y:r}),{startAngle:c,endAngle:d,innerRadius:f,outerRadius:u,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),m=(this.options.spacing+this.options.borderWidth)/2,p=Ae(h,d-c),y=Rn(i,c,d)&&c!==d,b=p>=Ge||y,g=to(l,f+m,u+m);return b&&g}getCenterPoint(n){const{x:r,y:a,startAngle:s,endAngle:i,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:d,spacing:f}=this.options,u=(s+i)/2,h=(l+c+f+d)/2;return{x:r+Math.cos(u)*h,y:a+Math.sin(u)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:a}=this,s=(r.offset||0)/4,i=(r.spacing||0)/2,l=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=a>Ge?Math.floor(a/Ge):0,a===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*s,Math.sin(c)*s);const d=1-Math.sin(Math.min(je,a||0)),f=s*d;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,Uk(n,this,f,i,l),Wk(n,this,f,i,l),n.restore()}}pe(Xn,"id","arc"),pe(Xn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),pe(Xn,"defaultRoutes",{backgroundColor:"backgroundColor"}),pe(Xn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function tf(t,o,n=o){t.lineCap=Ae(n.borderCapStyle,o.borderCapStyle),t.setLineDash(Ae(n.borderDash,o.borderDash)),t.lineDashOffset=Ae(n.borderDashOffset,o.borderDashOffset),t.lineJoin=Ae(n.borderJoinStyle,o.borderJoinStyle),t.lineWidth=Ae(n.borderWidth,o.borderWidth),t.strokeStyle=Ae(n.borderColor,o.borderColor)}function Hk(t,o,n){t.lineTo(n.x,n.y)}function qk(t){return t.stepped?py:t.tension||t.cubicInterpolationMode==="monotone"?gy:Hk}function of(t,o,n={}){const r=t.length,{start:a=0,end:s=r-1}=n,{start:i,end:l}=o,c=Math.max(a,i),d=Math.min(s,l),f=a<i&&s<i||a>l&&s>l;return{count:r,start:c,loop:o.loop,ilen:d<c&&!f?r+d-c:d-c}}function Gk(t,o,n,r){const{points:a,options:s}=o,{count:i,start:l,loop:c,ilen:d}=of(a,n,r),f=qk(s);let{move:u=!0,reverse:h}=r||{},m,p,y;for(m=0;m<=d;++m)p=a[(l+(h?d-m:m))%i],!p.skip&&(u?(t.moveTo(p.x,p.y),u=!1):f(t,y,p,h,s.stepped),y=p);return c&&(p=a[(l+(h?d:0))%i],f(t,y,p,h,s.stepped)),!!c}function Kk(t,o,n,r){const a=o.points,{count:s,start:i,ilen:l}=of(a,n,r),{move:c=!0,reverse:d}=r||{};let f=0,u=0,h,m,p,y,b,g;const _=B=>(i+(d?l-B:B))%s,E=()=>{y!==b&&(t.lineTo(f,b),t.lineTo(f,y),t.lineTo(f,g))};for(c&&(m=a[_(0)],t.moveTo(m.x,m.y)),h=0;h<=l;++h){if(m=a[_(h)],m.skip)continue;const B=m.x,A=m.y,C=B|0;C===p?(A<y?y=A:A>b&&(b=A),f=(u*f+B)/++u):(E(),t.lineTo(B,A),p=C,u=0,y=b=A),g=A}E()}function zs(t){const o=t.options,n=o.borderDash&&o.borderDash.length;return!t._decimated&&!t._loop&&!o.tension&&o.cubicInterpolationMode!=="monotone"&&!o.stepped&&!n?Kk:Gk}function Xk(t){return t.stepped?Ky:t.tension||t.cubicInterpolationMode==="monotone"?Xy:zo}function Yk(t,o,n,r){let a=o._path;a||(a=o._path=new Path2D,o.path(a,n,r)&&a.closePath()),tf(t,o.options),t.stroke(a)}function Jk(t,o,n,r){const{segments:a,options:s}=o,i=zs(o);for(const l of a)tf(t,s,l.style),t.beginPath(),i(t,o,l,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}const Qk=typeof Path2D=="function";function Zk(t,o,n,r){Qk&&!o.options.segment?Yk(t,o,n,r):Jk(t,o,n,r)}class ko extends no{constructor(o){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,o&&Object.assign(this,o)}updateControlPoints(o,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const a=r.spanGaps?this._loop:this._fullLoop;zy(this._points,r,o,a,n),this._pointsUpdated=!0}}set points(o){this._points=o,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=tx(this,this.options.segment))}first(){const o=this.segments,n=this.points;return o.length&&n[o[0].start]}last(){const o=this.segments,n=this.points,r=o.length;return r&&n[o[r-1].end]}interpolate(o,n){const r=this.options,a=o[n],s=this.points,i=fd(this,{property:n,start:a,end:a});if(!i.length)return;const l=[],c=Xk(r);let d,f;for(d=0,f=i.length;d<f;++d){const{start:u,end:h}=i[d],m=s[u],p=s[h];if(m===p){l.push(m);continue}const y=Math.abs((a-m[n])/(p[n]-m[n])),b=c(m,p,y,r.stepped);b[n]=o[n],l.push(b)}return l.length===1?l[0]:l}pathSegment(o,n,r){return zs(this)(o,this,n,r)}path(o,n,r){const a=this.segments,s=zs(this);let i=this._loop;n=n||0,r=r||this.points.length-n;for(const l of a)i&=s(o,this,l,{start:n,end:n+r-1});return!!i}draw(o,n,r,a){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(o.save(),Zk(o,this,r,a),o.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}pe(ko,"id","line"),pe(ko,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),pe(ko,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),pe(ko,"descriptors",{_scriptable:!0,_indexable:o=>o!=="borderDash"&&o!=="fill"});function nf(t,o,n,r){const a=t.options,{[n]:s}=t.getProps([n],r);return Math.abs(o-s)<a.radius+a.hitRadius}class Jr extends no{constructor(n){super();pe(this,"parsed");pe(this,"skip");pe(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,a){const s=this.options,{x:i,y:l}=this.getProps(["x","y"],a);return Math.pow(n-i,2)+Math.pow(r-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return nf(this,n,"x",r)}inYRange(n,r){return nf(this,n,"y",r)}getCenterPoint(n){const{x:r,y:a}=this.getProps(["x","y"],n);return{x:r,y:a}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const a=r&&n.borderWidth||0;return(r+a)*2}draw(n,r){const a=this.options;this.skip||a.radius<.1||!zn(this,r,this.size(a)/2)||(n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.fillStyle=a.backgroundColor,Cs(n,a,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}pe(Jr,"id","point"),pe(Jr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),pe(Jr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function rf(t,o){const{x:n,y:r,base:a,width:s,height:i}=t.getProps(["x","y","base","width","height"],o);let l,c,d,f,u;return t.horizontal?(u=i/2,l=Math.min(n,a),c=Math.max(n,a),d=r-u,f=r+u):(u=s/2,l=n-u,c=n+u,d=Math.min(r,a),f=Math.max(r,a)),{left:l,top:d,right:c,bottom:f}}function wo(t,o,n,r){return t?0:at(o,n,r)}function e1(t,o,n){const r=t.options.borderWidth,a=t.borderSkipped,s=Yc(r);return{t:wo(a.top,s.top,0,n),r:wo(a.right,s.right,0,o),b:wo(a.bottom,s.bottom,0,n),l:wo(a.left,s.left,0,o)}}function t1(t,o,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),a=t.options.borderRadius,s=nn(a),i=Math.min(o,n),l=t.borderSkipped,c=r||Te(a);return{topLeft:wo(!c||l.top||l.left,s.topLeft,0,i),topRight:wo(!c||l.top||l.right,s.topRight,0,i),bottomLeft:wo(!c||l.bottom||l.left,s.bottomLeft,0,i),bottomRight:wo(!c||l.bottom||l.right,s.bottomRight,0,i)}}function o1(t){const o=rf(t),n=o.right-o.left,r=o.bottom-o.top,a=e1(t,n/2,r/2),s=t1(t,n/2,r/2);return{outer:{x:o.left,y:o.top,w:n,h:r,radius:s},inner:{x:o.left+a.l,y:o.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,s.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(a.b,a.r))}}}}function $s(t,o,n,r){const a=o===null,s=n===null,l=t&&!(a&&s)&&rf(t,r);return l&&(a||to(o,l.left,l.right))&&(s||to(n,l.top,l.bottom))}function n1(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function r1(t,o){t.rect(o.x,o.y,o.w,o.h)}function js(t,o,n={}){const r=t.x!==n.x?-o:0,a=t.y!==n.y?-o:0,s=(t.x+t.w!==n.x+n.w?o:0)-r,i=(t.y+t.h!==n.y+n.h?o:0)-a;return{x:t.x+r,y:t.y+a,w:t.w+s,h:t.h+i,radius:t.radius}}class Qr extends no{constructor(o){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,o&&Object.assign(this,o)}draw(o){const{inflateAmount:n,options:{borderColor:r,backgroundColor:a}}=this,{inner:s,outer:i}=o1(this),l=n1(i.radius)?Pr:r1;o.save(),(i.w!==s.w||i.h!==s.h)&&(o.beginPath(),l(o,js(i,n,s)),o.clip(),l(o,js(s,-n,i)),o.fillStyle=r,o.fill("evenodd")),o.beginPath(),l(o,js(s,n)),o.fillStyle=a,o.fill(),o.restore()}inRange(o,n,r){return $s(this,o,n,r)}inXRange(o,n){return $s(this,o,null,n)}inYRange(o,n){return $s(this,null,o,n)}getCenterPoint(o){const{x:n,y:r,base:a,horizontal:s}=this.getProps(["x","y","base","horizontal"],o);return{x:s?(n+a)/2:n,y:s?r:(r+a)/2}}getRange(o){return o==="x"?this.width/2:this.height/2}}pe(Qr,"id","bar"),pe(Qr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),pe(Qr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function a1(t,o,n){const r=t.segments,a=t.points,s=o.points,i=[];for(const l of r){let{start:c,end:d}=l;d=Zr(c,d,a);const f=Us(n,a[c],a[d],l.loop);if(!o.segments){i.push({source:l,target:f,start:a[c],end:a[d]});continue}const u=fd(o,f);for(const h of u){const m=Us(n,s[h.start],s[h.end],h.loop),p=dd(l,a,m);for(const y of p)i.push({source:y,target:h,start:{[n]:af(f,m,"start",Math.max)},end:{[n]:af(f,m,"end",Math.min)}})}}return i}function Us(t,o,n,r){if(r)return;let a=o[t],s=n[t];return t==="angle"&&(a=bt(a),s=bt(s)),{property:t,start:a,end:s}}function s1(t,o){const{x:n=null,y:r=null}=t||{},a=o.points,s=[];return o.segments.forEach(({start:i,end:l})=>{l=Zr(i,l,a);const c=a[i],d=a[l];r!==null?(s.push({x:c.x,y:r}),s.push({x:d.x,y:r})):n!==null&&(s.push({x:n,y:c.y}),s.push({x:n,y:d.y}))}),s}function Zr(t,o,n){for(;o>t;o--){const r=n[o];if(!isNaN(r.x)&&!isNaN(r.y))break}return o}function af(t,o,n,r){return t&&o?r(t[n],o[n]):t?t[n]:o?o[n]:0}function sf(t,o){let n=[],r=!1;return Qe(t)?(r=!0,n=t):n=s1(t,o),n.length?new ko({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function lf(t){return t&&t.fill!==!1}function i1(t,o,n){let a=t[o].fill;const s=[o];let i;if(!n)return a;for(;a!==!1&&s.indexOf(a)===-1;){if(!rt(a))return a;if(i=t[a],!i)return!1;if(i.visible)return a;s.push(a),a=i.fill}return!1}function l1(t,o,n){const r=u1(t);if(Te(r))return isNaN(r.value)?!1:r;let a=parseFloat(r);return rt(a)&&Math.floor(a)===a?c1(r[0],o,a,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function c1(t,o,n,r){return(t==="-"||t==="+")&&(n=o+n),n===o||n<0||n>=r?!1:n}function d1(t,o){let n=null;return t==="start"?n=o.bottom:t==="end"?n=o.top:Te(t)?n=o.getPixelForValue(t.value):o.getBasePixel&&(n=o.getBasePixel()),n}function f1(t,o,n){let r;return t==="start"?r=n:t==="end"?r=o.options.reverse?o.min:o.max:Te(t)?r=t.value:r=o.getBaseValue(),r}function u1(t){const o=t.options,n=o.fill;let r=Ae(n&&n.target,n);return r===void 0&&(r=!!o.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function h1(t){const{scale:o,index:n,line:r}=t,a=[],s=r.segments,i=r.points,l=m1(o,n);l.push(sf({x:null,y:o.bottom},r));for(let c=0;c<s.length;c++){const d=s[c];for(let f=d.start;f<=d.end;f++)p1(a,i[f],l)}return new ko({points:a,options:{}})}function m1(t,o){const n=[],r=t.getMatchingVisibleMetas("line");for(let a=0;a<r.length;a++){const s=r[a];if(s.index===o)break;s.hidden||n.unshift(s.dataset)}return n}function p1(t,o,n){const r=[];for(let a=0;a<n.length;a++){const s=n[a],{first:i,last:l,point:c}=g1(s,o,"x");if(!(!c||i&&l)){if(i)r.unshift(c);else if(t.push(c),!l)break}}t.push(...r)}function g1(t,o,n){const r=t.interpolate(o,n);if(!r)return{};const a=r[n],s=t.segments,i=t.points;let l=!1,c=!1;for(let d=0;d<s.length;d++){const f=s[d],u=i[f.start][n],h=i[f.end][n];if(to(a,u,h)){l=a===u,c=a===h;break}}return{first:l,last:c,point:r}}class cf{constructor(o){this.x=o.x,this.y=o.y,this.radius=o.radius}pathSegment(o,n,r){const{x:a,y:s,radius:i}=this;return n=n||{start:0,end:Ge},o.arc(a,s,i,n.end,n.start,!0),!r.bounds}interpolate(o){const{x:n,y:r,radius:a}=this,s=o.angle;return{x:n+Math.cos(s)*a,y:r+Math.sin(s)*a,angle:s}}}function b1(t){const{chart:o,fill:n,line:r}=t;if(rt(n))return y1(o,n);if(n==="stack")return h1(t);if(n==="shape")return!0;const a=x1(t);return a instanceof cf?a:sf(a,r)}function y1(t,o){const n=t.getDatasetMeta(o);return n&&t.isDatasetVisible(o)?n.dataset:null}function x1(t){return(t.scale||{}).getPointPositionForValue?w1(t):k1(t)}function k1(t){const{scale:o={},fill:n}=t,r=d1(n,o);if(rt(r)){const a=o.isHorizontal();return{x:a?r:null,y:a?null:r}}return null}function w1(t){const{scale:o,fill:n}=t,r=o.options,a=o.getLabels().length,s=r.reverse?o.max:o.min,i=f1(n,o,s),l=[];if(r.grid.circular){const c=o.getPointPositionForValue(0,s);return new cf({x:c.x,y:c.y,radius:o.getDistanceFromCenterForValue(i)})}for(let c=0;c<a;++c)l.push(o.getPointPositionForValue(c,i));return l}function Ws(t,o,n){const r=b1(o),{chart:a,index:s,line:i,scale:l,axis:c}=o,d=i.options,f=d.fill,u=d.backgroundColor,{above:h=u,below:m=u}=f||{},p=a.getDatasetMeta(s),y=md(a,p);r&&i.points.length&&(Mr(t,n),C1(t,{line:i,target:r,above:h,below:m,area:n,scale:l,axis:c,clip:y}),Tr(t))}function C1(t,o){const{line:n,target:r,above:a,below:s,area:i,scale:l,clip:c}=o,d=n._loop?"angle":o.axis;t.save();let f=s;s!==a&&(d==="x"?(df(t,r,i.top),Hs(t,{line:n,target:r,color:a,scale:l,property:d,clip:c}),t.restore(),t.save(),df(t,r,i.bottom)):d==="y"&&(ff(t,r,i.left),Hs(t,{line:n,target:r,color:s,scale:l,property:d,clip:c}),t.restore(),t.save(),ff(t,r,i.right),f=a)),Hs(t,{line:n,target:r,color:f,scale:l,property:d,clip:c}),t.restore()}function df(t,o,n){const{segments:r,points:a}=o;let s=!0,i=!1;t.beginPath();for(const l of r){const{start:c,end:d}=l,f=a[c],u=a[Zr(c,d,a)];s?(t.moveTo(f.x,f.y),s=!1):(t.lineTo(f.x,n),t.lineTo(f.x,f.y)),i=!!o.pathSegment(t,l,{move:i}),i?t.closePath():t.lineTo(u.x,n)}t.lineTo(o.first().x,n),t.closePath(),t.clip()}function ff(t,o,n){const{segments:r,points:a}=o;let s=!0,i=!1;t.beginPath();for(const l of r){const{start:c,end:d}=l,f=a[c],u=a[Zr(c,d,a)];s?(t.moveTo(f.x,f.y),s=!1):(t.lineTo(n,f.y),t.lineTo(f.x,f.y)),i=!!o.pathSegment(t,l,{move:i}),i?t.closePath():t.lineTo(n,u.y)}t.lineTo(n,o.first().y),t.closePath(),t.clip()}function Hs(t,o){const{line:n,target:r,property:a,color:s,scale:i,clip:l}=o,c=a1(n,r,a);for(const{source:d,target:f,start:u,end:h}of c){const{style:{backgroundColor:m=s}={}}=d,p=r!==!0;t.save(),t.fillStyle=m,_1(t,i,l,p&&Us(a,u,h)),t.beginPath();const y=!!n.pathSegment(t,d);let b;if(p){y?t.closePath():uf(t,r,h,a);const g=!!r.pathSegment(t,f,{move:y,reverse:!0});b=y&&g,b||uf(t,r,u,a)}t.closePath(),t.fill(b?"evenodd":"nonzero"),t.restore()}}function _1(t,o,n,r){const a=o.chart.chartArea,{property:s,start:i,end:l}=r||{};if(s==="x"||s==="y"){let c,d,f,u;s==="x"?(c=i,d=a.top,f=l,u=a.bottom):(c=a.left,d=i,f=a.right,u=l),t.beginPath(),n&&(c=Math.max(c,n.left),f=Math.min(f,n.right),d=Math.max(d,n.top),u=Math.min(u,n.bottom)),t.rect(c,d,f-c,u-d),t.clip()}}function uf(t,o,n,r){const a=o.interpolate(n,r);a&&t.lineTo(a.x,a.y)}var E1={id:"filler",afterDatasetsUpdate(t,o,n){const r=(t.data.datasets||[]).length,a=[];let s,i,l,c;for(i=0;i<r;++i)s=t.getDatasetMeta(i),l=s.dataset,c=null,l&&l.options&&l instanceof ko&&(c={visible:t.isDatasetVisible(i),index:i,fill:l1(l,i,r),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=c,a.push(c);for(i=0;i<r;++i)c=a[i],!(!c||c.fill===!1)&&(c.fill=i1(a,i,n.propagate))},beforeDraw(t,o,n){const r=n.drawTime==="beforeDraw",a=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let i=a.length-1;i>=0;--i){const l=a[i].$filler;l&&(l.line.updateControlPoints(s,l.axis),r&&l.fill&&Ws(t.ctx,l,s))}},beforeDatasetsDraw(t,o,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=t.getSortedVisibleDatasetMetas();for(let a=r.length-1;a>=0;--a){const s=r[a].$filler;lf(s)&&Ws(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,o,n){const r=o.meta.$filler;!lf(r)||n.drawTime!=="beforeDatasetDraw"||Ws(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const hf=(t,o)=>{let{boxHeight:n=o,boxWidth:r=o}=t;return t.usePointStyle&&(n=Math.min(n,o),r=t.pointStyleWidth||Math.min(r,o)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(o,n)}},B1=(t,o)=>t!==null&&o!==null&&t.datasetIndex===o.datasetIndex&&t.index===o.index;class mf extends no{constructor(o){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=o.chart,this.options=o.options,this.ctx=o.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(o,n,r){this.maxWidth=o,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const o=this.options.labels||{};let n=He(o.generateLabels,[this.chart],this)||[];o.filter&&(n=n.filter(r=>o.filter(r,this.chart.data))),o.sort&&(n=n.sort((r,a)=>o.sort(r,a,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:o,ctx:n}=this;if(!o.display){this.width=this.height=0;return}const r=o.labels,a=it(r.font),s=a.size,i=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=hf(r,s);let d,f;n.font=a.string,this.isHorizontal()?(d=this.maxWidth,f=this._fitRows(i,s,l,c)+10):(f=this.maxHeight,d=this._fitCols(i,a,l,c)+10),this.width=Math.min(d,o.maxWidth||this.maxWidth),this.height=Math.min(f,o.maxHeight||this.maxHeight)}_fitRows(o,n,r,a){const{ctx:s,maxWidth:i,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],f=a+l;let u=o;s.textAlign="left",s.textBaseline="middle";let h=-1,m=-f;return this.legendItems.forEach((p,y)=>{const b=r+n/2+s.measureText(p.text).width;(y===0||d[d.length-1]+b+2*l>i)&&(u+=f,d[d.length-(y>0?0:1)]=0,m+=f,h++),c[y]={left:0,top:m,row:h,width:b,height:a},d[d.length-1]+=b+l}),u}_fitCols(o,n,r,a){const{ctx:s,maxHeight:i,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],f=i-o;let u=l,h=0,m=0,p=0,y=0;return this.legendItems.forEach((b,g)=>{const{itemWidth:_,itemHeight:E}=S1(r,n,s,b,a);g>0&&m+E+2*l>f&&(u+=h+l,d.push({width:h,height:m}),p+=h+l,y++,h=m=0),c[g]={left:p,top:m,col:y,width:_,height:E},h=Math.max(h,_),m+=E+l}),u+=h,d.push({width:h,height:m}),u}adjustHitBoxes(){if(!this.options.display)return;const o=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:a},rtl:s}}=this,i=sn(s,this.left,this.width);if(this.isHorizontal()){let l=0,c=st(r,this.left+a,this.right-this.lineWidths[l]);for(const d of n)l!==d.row&&(l=d.row,c=st(r,this.left+a,this.right-this.lineWidths[l])),d.top+=this.top+o+a,d.left=i.leftForLtr(i.x(c),d.width),c+=d.width+a}else{let l=0,c=st(r,this.top+o+a,this.bottom-this.columnSizes[l].height);for(const d of n)d.col!==l&&(l=d.col,c=st(r,this.top+o+a,this.bottom-this.columnSizes[l].height)),d.top=c,d.left+=this.left+a,d.left=i.leftForLtr(i.x(d.left),d.width),c+=d.height+a}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const o=this.ctx;Mr(o,this),this._draw(),Tr(o)}}_draw(){const{options:o,columnSizes:n,lineWidths:r,ctx:a}=this,{align:s,labels:i}=o,l=Je.color,c=sn(o.rtl,this.left,this.width),d=it(i.font),{padding:f}=i,u=d.size,h=u/2;let m;this.drawTitle(),a.textAlign=c.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:p,boxHeight:y,itemHeight:b}=hf(i,u),g=function(C,x,w){if(isNaN(p)||p<=0||isNaN(y)||y<0)return;a.save();const D=Ae(w.lineWidth,1);if(a.fillStyle=Ae(w.fillStyle,l),a.lineCap=Ae(w.lineCap,"butt"),a.lineDashOffset=Ae(w.lineDashOffset,0),a.lineJoin=Ae(w.lineJoin,"miter"),a.lineWidth=D,a.strokeStyle=Ae(w.strokeStyle,l),a.setLineDash(Ae(w.lineDash,[])),i.usePointStyle){const k={radius:y*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:D},v=c.xPlus(C,p/2),S=x+h;Xc(a,k,v,S,i.pointStyleWidth&&p)}else{const k=x+Math.max((u-y)/2,0),v=c.leftForLtr(C,p),S=nn(w.borderRadius);a.beginPath(),Object.values(S).some(N=>N!==0)?Pr(a,{x:v,y:k,w:p,h:y,radius:S}):a.rect(v,k,p,y),a.fill(),D!==0&&a.stroke()}a.restore()},_=function(C,x,w){$n(a,w.text,C,x+b/2,d,{strikethrough:w.hidden,textAlign:c.textAlign(w.textAlign)})},E=this.isHorizontal(),B=this._computeTitleHeight();E?m={x:st(s,this.left+f,this.right-r[0]),y:this.top+f+B,line:0}:m={x:this.left+f,y:st(s,this.top+B+f,this.bottom-n[0].height),line:0},sd(this.ctx,o.textDirection);const A=b+f;this.legendItems.forEach((C,x)=>{a.strokeStyle=C.fontColor,a.fillStyle=C.fontColor;const w=a.measureText(C.text).width,D=c.textAlign(C.textAlign||(C.textAlign=i.textAlign)),k=p+h+w;let v=m.x,S=m.y;c.setWidth(this.width),E?x>0&&v+k+f>this.right&&(S=m.y+=A,m.line++,v=m.x=st(s,this.left+f,this.right-r[m.line])):x>0&&S+A>this.bottom&&(v=m.x=v+n[m.line].width+f,m.line++,S=m.y=st(s,this.top+B+f,this.bottom-n[m.line].height));const N=c.x(v);if(g(N,S,C),v=oy(D,v+p+h,E?v+k:this.right,o.rtl),_(c.x(v),S,C),E)m.x+=k+f;else if(typeof C.text!="string"){const V=d.lineHeight;m.y+=pf(C,V)+f}else m.y+=A}),id(this.ctx,o.textDirection)}drawTitle(){const o=this.options,n=o.title,r=it(n.font),a=St(n.padding);if(!n.display)return;const s=sn(o.rtl,this.left,this.width),i=this.ctx,l=n.position,c=r.size/2,d=a.top+c;let f,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),f=this.top+d,u=st(o.align,u,this.right-h);else{const p=this.columnSizes.reduce((y,b)=>Math.max(y,b.height),0);f=d+st(o.align,this.top,this.bottom-p-o.labels.padding-this._computeTitleHeight())}const m=st(l,u,u+h);i.textAlign=s.textAlign(gs(l)),i.textBaseline="middle",i.strokeStyle=n.color,i.fillStyle=n.color,i.font=r.string,$n(i,n.text,m,f,r)}_computeTitleHeight(){const o=this.options.title,n=it(o.font),r=St(o.padding);return o.display?n.lineHeight+r.height:0}_getLegendItemAt(o,n){let r,a,s;if(to(o,this.left,this.right)&&to(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(a=s[r],to(o,a.left,a.left+a.width)&&to(n,a.top,a.top+a.height))return this.legendItems[r]}return null}handleEvent(o){const n=this.options;if(!D1(o.type,n))return;const r=this._getLegendItemAt(o.x,o.y);if(o.type==="mousemove"||o.type==="mouseout"){const a=this._hoveredItem,s=B1(a,r);a&&!s&&He(n.onLeave,[o,a,this],this),this._hoveredItem=r,r&&!s&&He(n.onHover,[o,r,this],this)}else r&&He(n.onClick,[o,r,this],this)}}function S1(t,o,n,r,a){const s=A1(r,t,o,n),i=v1(a,r,o.lineHeight);return{itemWidth:s,itemHeight:i}}function A1(t,o,n,r){let a=t.text;return a&&typeof a!="string"&&(a=a.reduce((s,i)=>s.length>i.length?s:i)),o+n.size/2+r.measureText(a).width}function v1(t,o,n){let r=t;return typeof o.text!="string"&&(r=pf(o,n)),r}function pf(t,o){const n=t.text?t.text.length:0;return o*n}function D1(t,o){return!!((t==="mousemove"||t==="mouseout")&&(o.onHover||o.onLeave)||o.onClick&&(t==="click"||t==="mouseup"))}var N1={id:"legend",_element:mf,start(t,o,n){const r=t.legend=new mf({ctx:t.ctx,options:n,chart:t});At.configure(t,r,n),At.addBox(t,r)},stop(t){At.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,o,n){const r=t.legend;At.configure(t,r,n),r.options=n},afterUpdate(t){const o=t.legend;o.buildLabels(),o.adjustHitBoxes()},afterEvent(t,o){o.replay||t.legend.handleEvent(o.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,o,n){const r=o.datasetIndex,a=n.chart;a.isDatasetVisible(r)?(a.hide(r),o.hidden=!0):(a.show(r),o.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const o=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:a,color:s,useBorderRadius:i,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(n?0:void 0),f=St(d.borderWidth);return{text:o[c.index].label,fillStyle:d.backgroundColor,fontColor:s,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:d.borderColor,pointStyle:r||d.pointStyle,rotation:d.rotation,textAlign:a||d.textAlign,borderRadius:i&&(l||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class gf extends no{constructor(o){super(),this.chart=o.chart,this.options=o.options,this.ctx=o.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(o,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=o,this.height=this.bottom=n;const a=Qe(r.text)?r.text.length:1;this._padding=St(r.padding);const s=a*it(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const o=this.options.position;return o==="top"||o==="bottom"}_drawArgs(o){const{top:n,left:r,bottom:a,right:s,options:i}=this,l=i.align;let c=0,d,f,u;return this.isHorizontal()?(f=st(l,r,s),u=n+o,d=s-r):(i.position==="left"?(f=r+o,u=st(l,a,n),c=je*-.5):(f=s-o,u=st(l,n,a),c=je*.5),d=a-n),{titleX:f,titleY:u,maxWidth:d,rotation:c}}draw(){const o=this.ctx,n=this.options;if(!n.display)return;const r=it(n.font),s=r.lineHeight/2+this._padding.top,{titleX:i,titleY:l,maxWidth:c,rotation:d}=this._drawArgs(s);$n(o,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:d,textAlign:gs(n.align),textBaseline:"middle",translation:[i,l]})}}function V1(t,o){const n=new gf({ctx:t.ctx,options:o,chart:t});At.configure(t,n,o),At.addBox(t,n),t.titleBlock=n}var M1={id:"title",_element:gf,start(t,o,n){V1(t,n)},stop(t){const o=t.titleBlock;At.removeBox(t,o),delete t.titleBlock},beforeUpdate(t,o,n){const r=t.titleBlock;At.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yn={average(t){if(!t.length)return!1;let o,n,r=new Set,a=0,s=0;for(o=0,n=t.length;o<n;++o){const l=t[o].element;if(l&&l.hasValue()){const c=l.tooltipPosition();r.add(c.x),a+=c.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((l,c)=>l+c)/r.size,y:a/s}},nearest(t,o){if(!t.length)return!1;let n=o.x,r=o.y,a=Number.POSITIVE_INFINITY,s,i,l;for(s=0,i=t.length;s<i;++s){const c=t[s].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),f=ms(o,d);f<a&&(a=f,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,r=c.y}return{x:n,y:r}}};function jt(t,o){return o&&(Qe(o)?Array.prototype.push.apply(t,o):t.push(o)),t}function ao(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
34
|
+
`)>-1?t.split(`
|
|
35
|
+
`):t}function T1(t,o){const{element:n,datasetIndex:r,index:a}=o,s=t.getDatasetMeta(r).controller,{label:i,value:l}=s.getLabelAndValue(a);return{chart:t,label:i,parsed:s.getParsed(a),raw:t.data.datasets[r].data[a],formattedValue:l,dataset:s.getDataset(),dataIndex:a,datasetIndex:r,element:n}}function bf(t,o){const n=t.chart.ctx,{body:r,footer:a,title:s}=t,{boxWidth:i,boxHeight:l}=o,c=it(o.bodyFont),d=it(o.titleFont),f=it(o.footerFont),u=s.length,h=a.length,m=r.length,p=St(o.padding);let y=p.height,b=0,g=r.reduce((B,A)=>B+A.before.length+A.lines.length+A.after.length,0);if(g+=t.beforeBody.length+t.afterBody.length,u&&(y+=u*d.lineHeight+(u-1)*o.titleSpacing+o.titleMarginBottom),g){const B=o.displayColors?Math.max(l,c.lineHeight):c.lineHeight;y+=m*B+(g-m)*c.lineHeight+(g-1)*o.bodySpacing}h&&(y+=o.footerMarginTop+h*f.lineHeight+(h-1)*o.footerSpacing);let _=0;const E=function(B){b=Math.max(b,n.measureText(B).width+_)};return n.save(),n.font=d.string,$e(t.title,E),n.font=c.string,$e(t.beforeBody.concat(t.afterBody),E),_=o.displayColors?i+2+o.boxPadding:0,$e(r,B=>{$e(B.before,E),$e(B.lines,E),$e(B.after,E)}),_=0,n.font=f.string,$e(t.footer,E),n.restore(),b+=p.width,{width:b,height:y}}function P1(t,o){const{y:n,height:r}=o;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function O1(t,o,n,r){const{x:a,width:s}=r,i=n.caretSize+n.caretPadding;if(t==="left"&&a+s+i>o.width||t==="right"&&a-s-i<0)return!0}function L1(t,o,n,r){const{x:a,width:s}=n,{width:i,chartArea:{left:l,right:c}}=t;let d="center";return r==="center"?d=a<=(l+c)/2?"left":"right":a<=s/2?d="left":a>=i-s/2&&(d="right"),O1(d,t,o,n)&&(d="center"),d}function yf(t,o,n){const r=n.yAlign||o.yAlign||P1(t,n);return{xAlign:n.xAlign||o.xAlign||L1(t,o,n,r),yAlign:r}}function R1(t,o){let{x:n,width:r}=t;return o==="right"?n-=r:o==="center"&&(n-=r/2),n}function I1(t,o,n){let{y:r,height:a}=t;return o==="top"?r+=n:o==="bottom"?r-=a+n:r-=a/2,r}function xf(t,o,n,r){const{caretSize:a,caretPadding:s,cornerRadius:i}=t,{xAlign:l,yAlign:c}=n,d=a+s,{topLeft:f,topRight:u,bottomLeft:h,bottomRight:m}=nn(i);let p=R1(o,l);const y=I1(o,c,d);return c==="center"?l==="left"?p+=d:l==="right"&&(p-=d):l==="left"?p-=Math.max(f,h)+a:l==="right"&&(p+=Math.max(u,m)+a),{x:at(p,0,r.width-o.width),y:at(y,0,r.height-o.height)}}function ea(t,o,n){const r=St(n.padding);return o==="center"?t.x+t.width/2:o==="right"?t.x+t.width-r.right:t.x+r.left}function kf(t){return jt([],ao(t))}function F1(t,o,n){return Ro(t,{tooltip:o,tooltipItems:n,type:"tooltip"})}function wf(t,o){const n=o&&o.dataset&&o.dataset.tooltip&&o.dataset.tooltip.callbacks;return n?t.override(n):t}const Cf={beforeTitle:Zt,title(t){if(t.length>0){const o=t[0],n=o.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return o.dataset.label||"";if(o.label)return o.label;if(r>0&&o.dataIndex<r)return n[o.dataIndex]}return""},afterTitle:Zt,beforeBody:Zt,beforeLabel:Zt,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let o=t.dataset.label||"";o&&(o+=": ");const n=t.formattedValue;return ze(n)||(o+=n),o},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Zt,afterBody:Zt,beforeFooter:Zt,footer:Zt,afterFooter:Zt};function ht(t,o,n,r){const a=t[o].call(n,r);return typeof a>"u"?Cf[o].call(n,r):a}class qs extends no{constructor(o){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=o.chart,this.options=o.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(o){this.options=o,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const o=this._cachedAnimations;if(o)return o;const n=this.chart,r=this.options.setContext(this.getContext()),a=r.enabled&&n.options.animation&&r.animations,s=new gd(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=F1(this.chart.getContext(),this,this._tooltipItems))}getTitle(o,n){const{callbacks:r}=n,a=ht(r,"beforeTitle",this,o),s=ht(r,"title",this,o),i=ht(r,"afterTitle",this,o);let l=[];return l=jt(l,ao(a)),l=jt(l,ao(s)),l=jt(l,ao(i)),l}getBeforeBody(o,n){return kf(ht(n.callbacks,"beforeBody",this,o))}getBody(o,n){const{callbacks:r}=n,a=[];return $e(o,s=>{const i={before:[],lines:[],after:[]},l=wf(r,s);jt(i.before,ao(ht(l,"beforeLabel",this,s))),jt(i.lines,ht(l,"label",this,s)),jt(i.after,ao(ht(l,"afterLabel",this,s))),a.push(i)}),a}getAfterBody(o,n){return kf(ht(n.callbacks,"afterBody",this,o))}getFooter(o,n){const{callbacks:r}=n,a=ht(r,"beforeFooter",this,o),s=ht(r,"footer",this,o),i=ht(r,"afterFooter",this,o);let l=[];return l=jt(l,ao(a)),l=jt(l,ao(s)),l=jt(l,ao(i)),l}_createItems(o){const n=this._active,r=this.chart.data,a=[],s=[],i=[];let l=[],c,d;for(c=0,d=n.length;c<d;++c)l.push(T1(this.chart,n[c]));return o.filter&&(l=l.filter((f,u,h)=>o.filter(f,u,h,r))),o.itemSort&&(l=l.sort((f,u)=>o.itemSort(f,u,r))),$e(l,f=>{const u=wf(o.callbacks,f);a.push(ht(u,"labelColor",this,f)),s.push(ht(u,"labelPointStyle",this,f)),i.push(ht(u,"labelTextColor",this,f))}),this.labelColors=a,this.labelPointStyles=s,this.labelTextColors=i,this.dataPoints=l,l}update(o,n){const r=this.options.setContext(this.getContext()),a=this._active;let s,i=[];if(!a.length)this.opacity!==0&&(s={opacity:0});else{const l=Yn[r.position].call(this,a,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const c=this._size=bf(this,r),d=Object.assign({},l,c),f=yf(this.chart,r,d),u=xf(r,d,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,s={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=i,this.$context=void 0,s&&this._resolveAnimations().update(this,s),o&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(o,n,r,a){const s=this.getCaretPosition(o,r,a);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(o,n,r){const{xAlign:a,yAlign:s}=this,{caretSize:i,cornerRadius:l}=r,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:u}=nn(l),{x:h,y:m}=o,{width:p,height:y}=n;let b,g,_,E,B,A;return s==="center"?(B=m+y/2,a==="left"?(b=h,g=b-i,E=B+i,A=B-i):(b=h+p,g=b+i,E=B-i,A=B+i),_=b):(a==="left"?g=h+Math.max(c,f)+i:a==="right"?g=h+p-Math.max(d,u)-i:g=this.caretX,s==="top"?(E=m,B=E-i,b=g-i,_=g+i):(E=m+y,B=E+i,b=g+i,_=g-i),A=E),{x1:b,x2:g,x3:_,y1:E,y2:B,y3:A}}drawTitle(o,n,r){const a=this.title,s=a.length;let i,l,c;if(s){const d=sn(r.rtl,this.x,this.width);for(o.x=ea(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",i=it(r.titleFont),l=r.titleSpacing,n.fillStyle=r.titleColor,n.font=i.string,c=0;c<s;++c)n.fillText(a[c],d.x(o.x),o.y+i.lineHeight/2),o.y+=i.lineHeight+l,c+1===s&&(o.y+=r.titleMarginBottom-l)}}_drawColorBox(o,n,r,a,s){const i=this.labelColors[r],l=this.labelPointStyles[r],{boxHeight:c,boxWidth:d}=s,f=it(s.bodyFont),u=ea(this,"left",s),h=a.x(u),m=c<f.lineHeight?(f.lineHeight-c)/2:0,p=n.y+m;if(s.usePointStyle){const y={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},b=a.leftForLtr(h,d)+d/2,g=p+c/2;o.strokeStyle=s.multiKeyBackground,o.fillStyle=s.multiKeyBackground,Cs(o,y,b,g),o.strokeStyle=i.borderColor,o.fillStyle=i.backgroundColor,Cs(o,y,b,g)}else{o.lineWidth=Te(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,o.strokeStyle=i.borderColor,o.setLineDash(i.borderDash||[]),o.lineDashOffset=i.borderDashOffset||0;const y=a.leftForLtr(h,d),b=a.leftForLtr(a.xPlus(h,1),d-2),g=nn(i.borderRadius);Object.values(g).some(_=>_!==0)?(o.beginPath(),o.fillStyle=s.multiKeyBackground,Pr(o,{x:y,y:p,w:d,h:c,radius:g}),o.fill(),o.stroke(),o.fillStyle=i.backgroundColor,o.beginPath(),Pr(o,{x:b,y:p+1,w:d-2,h:c-2,radius:g}),o.fill()):(o.fillStyle=s.multiKeyBackground,o.fillRect(y,p,d,c),o.strokeRect(y,p,d,c),o.fillStyle=i.backgroundColor,o.fillRect(b,p+1,d-2,c-2))}o.fillStyle=this.labelTextColors[r]}drawBody(o,n,r){const{body:a}=this,{bodySpacing:s,bodyAlign:i,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:f}=r,u=it(r.bodyFont);let h=u.lineHeight,m=0;const p=sn(r.rtl,this.x,this.width),y=function(w){n.fillText(w,p.x(o.x+m),o.y+h/2),o.y+=h+s},b=p.textAlign(i);let g,_,E,B,A,C,x;for(n.textAlign=i,n.textBaseline="middle",n.font=u.string,o.x=ea(this,b,r),n.fillStyle=r.bodyColor,$e(this.beforeBody,y),m=l&&b!=="right"?i==="center"?d/2+f:d+2+f:0,B=0,C=a.length;B<C;++B){for(g=a[B],_=this.labelTextColors[B],n.fillStyle=_,$e(g.before,y),E=g.lines,l&&E.length&&(this._drawColorBox(n,o,B,p,r),h=Math.max(u.lineHeight,c)),A=0,x=E.length;A<x;++A)y(E[A]),h=u.lineHeight;$e(g.after,y)}m=0,h=u.lineHeight,$e(this.afterBody,y),o.y-=s}drawFooter(o,n,r){const a=this.footer,s=a.length;let i,l;if(s){const c=sn(r.rtl,this.x,this.width);for(o.x=ea(this,r.footerAlign,r),o.y+=r.footerMarginTop,n.textAlign=c.textAlign(r.footerAlign),n.textBaseline="middle",i=it(r.footerFont),n.fillStyle=r.footerColor,n.font=i.string,l=0;l<s;++l)n.fillText(a[l],c.x(o.x),o.y+i.lineHeight/2),o.y+=i.lineHeight+r.footerSpacing}}drawBackground(o,n,r,a){const{xAlign:s,yAlign:i}=this,{x:l,y:c}=o,{width:d,height:f}=r,{topLeft:u,topRight:h,bottomLeft:m,bottomRight:p}=nn(a.cornerRadius);n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.beginPath(),n.moveTo(l+u,c),i==="top"&&this.drawCaret(o,n,r,a),n.lineTo(l+d-h,c),n.quadraticCurveTo(l+d,c,l+d,c+h),i==="center"&&s==="right"&&this.drawCaret(o,n,r,a),n.lineTo(l+d,c+f-p),n.quadraticCurveTo(l+d,c+f,l+d-p,c+f),i==="bottom"&&this.drawCaret(o,n,r,a),n.lineTo(l+m,c+f),n.quadraticCurveTo(l,c+f,l,c+f-m),i==="center"&&s==="left"&&this.drawCaret(o,n,r,a),n.lineTo(l,c+u),n.quadraticCurveTo(l,c,l+u,c),n.closePath(),n.fill(),a.borderWidth>0&&n.stroke()}_updateAnimationTarget(o){const n=this.chart,r=this.$animations,a=r&&r.x,s=r&&r.y;if(a||s){const i=Yn[o.position].call(this,this._active,this._eventPosition);if(!i)return;const l=this._size=bf(this,o),c=Object.assign({},i,this._size),d=yf(n,o,c),f=xf(o,c,d,n);(a._to!==f.x||s._to!==f.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(o){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const a={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=St(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(o.save(),o.globalAlpha=r,this.drawBackground(s,o,a,n),sd(o,n.textDirection),s.y+=i.top,this.drawTitle(s,o,n),this.drawBody(s,o,n),this.drawFooter(s,o,n),id(o,n.textDirection),o.restore())}getActiveElements(){return this._active||[]}setActiveElements(o,n){const r=this._active,a=o.map(({datasetIndex:l,index:c})=>{const d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c}}),s=!vr(r,a),i=this._positionChanged(a,n);(s||i)&&(this._active=a,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(o,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,s=this._active||[],i=this._getActiveElements(o,s,n,r),l=this._positionChanged(i,o),c=n||!vr(i,s)||l;return c&&(this._active=i,(a.enabled||a.external)&&(this._eventPosition={x:o.x,y:o.y},this.update(!0,n))),c}_getActiveElements(o,n,r,a){const s=this.options;if(o.type==="mouseout")return[];if(!a)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const i=this.chart.getElementsAtEventForMode(o,s.mode,s,r);return s.reverse&&i.reverse(),i}_positionChanged(o,n){const{caretX:r,caretY:a,options:s}=this,i=Yn[s.position].call(this,o,n);return i!==!1&&(r!==i.x||a!==i.y)}}pe(qs,"positioners",Yn);var z1={id:"tooltip",_element:qs,positioners:Yn,afterInit(t,o,n){n&&(t.tooltip=new qs({chart:t,options:n}))},beforeUpdate(t,o,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,o,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const o=t.tooltip;if(o&&o._willRender()){const n={tooltip:o};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;o.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,o){if(t.tooltip){const n=o.replay;t.tooltip.handleEvent(o.event,n,o.inChartArea)&&(o.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,o)=>o.bodyFont.size,boxWidth:(t,o)=>o.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Cf},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const $1=(t,o,n,r)=>(typeof o=="string"?(n=t.push(o)-1,r.unshift({index:n,label:o})):isNaN(o)&&(n=null),n);function j1(t,o,n,r){const a=t.indexOf(o);if(a===-1)return $1(t,o,n,r);const s=t.lastIndexOf(o);return a!==s?n:a}const U1=(t,o)=>t===null?null:at(Math.round(t),0,o);function _f(t){const o=this.getLabels();return t>=0&&t<o.length?o[t]:t}class Gs extends cn{constructor(o){super(o),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(o){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:a,label:s}of n)r[a]===s&&r.splice(a,1);this._addedLabels=[]}super.init(o)}parse(o,n){if(ze(o))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===o?n:j1(r,o,Ae(n,o),this._addedLabels),U1(n,r.length-1)}determineDataLimits(){const{minDefined:o,maxDefined:n}=this.getUserBounds();let{min:r,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(o||(r=0),n||(a=this.getLabels().length-1)),this.min=r,this.max=a}buildTicks(){const o=this.min,n=this.max,r=this.options.offset,a=[];let s=this.getLabels();s=o===0&&n===s.length-1?s:s.slice(o,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=o;i<=n;i++)a.push({value:i});return a}getLabelForValue(o){return _f.call(this,o)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(o){return typeof o!="number"&&(o=this.parse(o)),o===null?NaN:this.getPixelForDecimal((o-this._startValue)/this._valueRange)}getPixelForTick(o){const n=this.ticks;return o<0||o>n.length-1?null:this.getPixelForValue(n[o].value)}getValueForPixel(o){return Math.round(this._startValue+this.getDecimalForPixel(o)*this._valueRange)}getBasePixel(){return this.bottom}}pe(Gs,"id","category"),pe(Gs,"defaults",{ticks:{callback:_f}});function W1(t,o){const n=[],{bounds:a,step:s,min:i,max:l,precision:c,count:d,maxTicks:f,maxDigits:u,includeBounds:h}=t,m=s||1,p=f-1,{min:y,max:b}=o,g=!ze(i),_=!ze(l),E=!ze(d),B=(b-y)/(u+1);let A=Pc((b-y)/p/m)*m,C,x,w,D;if(A<1e-14&&!g&&!_)return[{value:y},{value:b}];D=Math.ceil(b/A)-Math.floor(y/A),D>p&&(A=Pc(D*A/p/m)*m),ze(c)||(C=Math.pow(10,c),A=Math.ceil(A*C)/C),a==="ticks"?(x=Math.floor(y/A)*A,w=Math.ceil(b/A)*A):(x=y,w=b),g&&_&&s&&G0((l-i)/s,A/1e3)?(D=Math.round(Math.min((l-i)/A,f)),A=(l-i)/D,x=i,w=l):E?(x=g?i:x,w=_?l:w,D=d-1,A=(w-x)/D):(D=(w-x)/A,On(D,Math.round(D),A/1e3)?D=Math.round(D):D=Math.ceil(D));const k=Math.max(Oc(A),Oc(x));C=Math.pow(10,ze(c)?k:c),x=Math.round(x*C)/C,w=Math.round(w*C)/C;let v=0;for(g&&(h&&x!==i?(n.push({value:i}),x<i&&v++,On(Math.round((x+v*A)*C)/C,i,Ef(i,B,t))&&v++):x<i&&v++);v<D;++v){const S=Math.round((x+v*A)*C)/C;if(_&&S>l)break;n.push({value:S})}return _&&h&&w!==l?n.length&&On(n[n.length-1].value,l,Ef(l,B,t))?n[n.length-1].value=l:n.push({value:l}):(!_||w===l)&&n.push({value:w}),n}function Ef(t,o,{horizontal:n,minRotation:r}){const a=eo(r),s=(n?Math.sin(a):Math.cos(a))||.001,i=.75*o*(""+t).length;return Math.min(o/s,i)}class H1 extends cn{constructor(o){super(o),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(o,n){return ze(o)||(typeof o=="number"||o instanceof Number)&&!isFinite(+o)?null:+o}handleTickRangeOptions(){const{beginAtZero:o}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:a,max:s}=this;const i=c=>a=n?a:c,l=c=>s=r?s:c;if(o){const c=zt(a),d=zt(s);c<0&&d<0?l(0):c>0&&d>0&&i(0)}if(a===s){let c=s===0?1:Math.abs(s*.05);l(s+c),o||i(a-c)}this.min=a,this.max=s}getTickLimit(){const o=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=o,a;return r?(a=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),n=n||11),n&&(a=Math.min(n,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const o=this.options,n=o.ticks;let r=this.getTickLimit();r=Math.max(2,r);const a={maxTicks:r,bounds:o.bounds,min:o.min,max:o.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,i=W1(a,s);return o.bounds==="ticks"&&K0(i,this,"value"),o.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const o=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&o.length){const a=(r-n)/Math.max(o.length-1,1)/2;n-=a,r+=a}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(o){return xs(o,this.chart.options.locale,this.options.ticks.format)}}class Ks extends H1{determineDataLimits(){const{min:o,max:n}=this.getMinMax(!0);this.min=rt(o)?o:0,this.max=rt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const o=this.isHorizontal(),n=o?this.width:this.height,r=eo(this.options.ticks.minRotation),a=(o?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/a))}getPixelForValue(o){return o===null?NaN:this.getPixelForDecimal((o-this._startValue)/this._valueRange)}getValueForPixel(o){return this._startValue+this.getDecimalForPixel(o)*this._valueRange}}pe(Ks,"id","linear"),pe(Ks,"defaults",{ticks:{callback:qc.formatters.numeric}});const ta={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},mt=Object.keys(ta);function Bf(t,o){return t-o}function Sf(t,o){if(ze(o))return null;const n=t._adapter,{parser:r,round:a,isoWeekday:s}=t._parseOpts;let i=o;return typeof r=="function"&&(i=r(i)),rt(i)||(i=typeof r=="string"?n.parse(i,r):n.parse(i)),i===null?null:(a&&(i=a==="week"&&(Ln(s)||s===!0)?n.startOf(i,"isoWeek",s):n.startOf(i,a)),+i)}function Af(t,o,n,r){const a=mt.length;for(let s=mt.indexOf(t);s<a-1;++s){const i=ta[mt[s]],l=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((n-o)/(l*i.size))<=r)return mt[s]}return mt[a-1]}function q1(t,o,n,r,a){for(let s=mt.length-1;s>=mt.indexOf(n);s--){const i=mt[s];if(ta[i].common&&t._adapter.diff(a,r,i)>=o-1)return i}return mt[n?mt.indexOf(n):0]}function G1(t){for(let o=mt.indexOf(t)+1,n=mt.length;o<n;++o)if(ta[mt[o]].common)return mt[o]}function vf(t,o,n){if(!n)t[o]=!0;else if(n.length){const{lo:r,hi:a}=ps(n,o),s=n[r]>=o?n[r]:n[a];t[s]=!0}}function K1(t,o,n,r){const a=t._adapter,s=+a.startOf(o[0].value,r),i=o[o.length-1].value;let l,c;for(l=s;l<=i;l=+a.add(l,1,r))c=n[l],c>=0&&(o[c].major=!0);return o}function Df(t,o,n){const r=[],a={},s=o.length;let i,l;for(i=0;i<s;++i)l=o[i],a[l]=i,r.push({value:l,major:!1});return s===0||!n?r:K1(t,r,a,n)}class oa extends cn{constructor(o){super(o),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(o,n={}){const r=o.time||(o.time={}),a=this._adapter=new Nx._date(o.adapters.date);a.init(n),Tn(r.displayFormats,a.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(o),this._normalized=n.normalized}parse(o,n){return o===void 0?null:Sf(this,o)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const o=this.options,n=this._adapter,r=o.time.unit||"day";let{min:a,max:s,minDefined:i,maxDefined:l}=this.getUserBounds();function c(d){!i&&!isNaN(d.min)&&(a=Math.min(a,d.min)),!l&&!isNaN(d.max)&&(s=Math.max(s,d.max))}(!i||!l)&&(c(this._getLabelBounds()),(o.bounds!=="ticks"||o.ticks.source!=="labels")&&c(this.getMinMax(!1))),a=rt(a)&&!isNaN(a)?a:+n.startOf(Date.now(),r),s=rt(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(a,s-1),this.max=Math.max(a+1,s)}_getLabelBounds(){const o=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return o.length&&(n=o[0],r=o[o.length-1]),{min:n,max:r}}buildTicks(){const o=this.options,n=o.time,r=o.ticks,a=r.source==="labels"?this.getLabelTimestamps():this._generate();o.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const s=this.min,i=this.max,l=Z0(a,s,i);return this._unit=n.unit||(r.autoSkip?Af(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):q1(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:G1(this._unit),this.initOffsets(a),o.reverse&&l.reverse(),Df(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(o=>+o.value))}initOffsets(o=[]){let n=0,r=0,a,s;this.options.offset&&o.length&&(a=this.getDecimalForValue(o[0]),o.length===1?n=1-a:n=(this.getDecimalForValue(o[1])-a)/2,s=this.getDecimalForValue(o[o.length-1]),o.length===1?r=s:r=(s-this.getDecimalForValue(o[o.length-2]))/2);const i=o.length<3?.5:.25;n=at(n,0,i),r=at(r,0,i),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const o=this._adapter,n=this.min,r=this.max,a=this.options,s=a.time,i=s.unit||Af(s.minUnit,n,r,this._getLabelCapacity(n)),l=Ae(a.ticks.stepSize,1),c=i==="week"?s.isoWeekday:!1,d=Ln(c)||c===!0,f={};let u=n,h,m;if(d&&(u=+o.startOf(u,"isoWeek",c)),u=+o.startOf(u,d?"day":i),o.diff(r,n,i)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+i);const p=a.ticks.source==="data"&&this.getDataTimestamps();for(h=u,m=0;h<r;h=+o.add(h,l,i),m++)vf(f,h,p);return(h===r||a.bounds==="ticks"||m===1)&&vf(f,h,p),Object.keys(f).sort(Bf).map(y=>+y)}getLabelForValue(o){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(o,r.tooltipFormat):n.format(o,r.displayFormats.datetime)}format(o,n){const a=this.options.time.displayFormats,s=this._unit,i=n||a[s];return this._adapter.format(o,i)}_tickFormatFunction(o,n,r,a){const s=this.options,i=s.ticks.callback;if(i)return He(i,[o,n,r],this);const l=s.time.displayFormats,c=this._unit,d=this._majorUnit,f=c&&l[c],u=d&&l[d],h=r[n],m=d&&u&&h&&h.major;return this._adapter.format(o,a||(m?u:f))}generateTickLabels(o){let n,r,a;for(n=0,r=o.length;n<r;++n)a=o[n],a.label=this._tickFormatFunction(a.value,n,o)}getDecimalForValue(o){return o===null?NaN:(o-this.min)/(this.max-this.min)}getPixelForValue(o){const n=this._offsets,r=this.getDecimalForValue(o);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(o){const n=this._offsets,r=this.getDecimalForPixel(o)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(o){const n=this.options.ticks,r=this.ctx.measureText(o).width,a=eo(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(a),i=Math.sin(a),l=this._resolveTickFontOptions(0).size;return{w:r*s+l*i,h:r*i+l*s}}_getLabelCapacity(o){const n=this.options.time,r=n.displayFormats,a=r[n.unit]||r.millisecond,s=this._tickFormatFunction(o,0,Df(this,[o],this._majorUnit),a),i=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return l>0?l:1}getDataTimestamps(){let o=this._cache.data||[],n,r;if(o.length)return o;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(n=0,r=a.length;n<r;++n)o=o.concat(a[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(o)}getLabelTimestamps(){const o=this._cache.labels||[];let n,r;if(o.length)return o;const a=this.getLabels();for(n=0,r=a.length;n<r;++n)o.push(Sf(this,a[n]));return this._cache.labels=this._normalized?o:this.normalize(o)}normalize(o){return Fc(o.sort(Bf))}}pe(oa,"id","time"),pe(oa,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function na(t,o,n){let r=0,a=t.length-1,s,i,l,c;n?(o>=t[r].pos&&o<=t[a].pos&&({lo:r,hi:a}=Po(t,"pos",o)),{pos:s,time:l}=t[r],{pos:i,time:c}=t[a]):(o>=t[r].time&&o<=t[a].time&&({lo:r,hi:a}=Po(t,"time",o)),{time:s,pos:l}=t[r],{time:i,pos:c}=t[a]);const d=i-s;return d?l+(c-l)*(o-s)/d:l}class Nf extends oa{constructor(o){super(o),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const o=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(o);this._minPos=na(n,this.min),this._tableRange=na(n,this.max)-this._minPos,super.initOffsets(o)}buildLookupTable(o){const{min:n,max:r}=this,a=[],s=[];let i,l,c,d,f;for(i=0,l=o.length;i<l;++i)d=o[i],d>=n&&d<=r&&a.push(d);if(a.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(i=0,l=a.length;i<l;++i)f=a[i+1],c=a[i-1],d=a[i],Math.round((f+c)/2)!==d&&s.push({time:d,pos:i/(l-1)});return s}_generate(){const o=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(o)||!r.length)&&r.splice(0,0,o),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((a,s)=>a-s)}_getTimestampsForTable(){let o=this._cache.all||[];if(o.length)return o;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?o=this.normalize(n.concat(r)):o=n.length?n:r,o=this._cache.all=o,o}getDecimalForValue(o){return(na(this._table,o)-this._minPos)/this._tableRange}getValueForPixel(o){const n=this._offsets,r=this.getDecimalForPixel(o)/n.factor-n.end;return na(this._table,r*this._tableRange+this._minPos,!0)}}pe(Nf,"id","timeseries"),pe(Nf,"defaults",oa.defaults);const X1={key:0,class:"mb-2 text-sm font-medium text-gray-700"},Y1={key:0,class:"text-red-500 ml-1"},J1={key:0,class:"absolute inset-0 flex items-center justify-center bg-white"},Q1={key:1,class:"absolute inset-0 flex items-center justify-center bg-red-50 border border-red-200 rounded"},Z1={class:"text-red-600 text-sm"},ew={key:1,class:"mt-2 text-xs text-gray-500"},tw={key:0},Vf=dt(e.defineComponent({name:"DCodeChart",__name:"DCodeChart",props:{type:{default:"line"},width:{default:400},height:{default:300},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},error:{default:null},showInfo:{type:Boolean,default:!1},responsive:{type:Boolean,default:!0},maintainAspectRatio:{type:Boolean,default:!1},theme:{default:"light"},colors:{default:()=>["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#14B8A6","#F97316","#6366F1","#84CC16"]},data:{},modelValue:{},options:{},onClick:{},onHover:{},label:{}},emits:["update:modelValue","click","hover","ready"],setup(t,{expose:o,emit:n}){ro.register(Gs,Ks,Jr,ko,Qr,Xn,M1,z1,N1,E1,$r,zr,Ts,ln);const r=t,a=n,s=e.ref(null),i=e.shallowRef(null),l=e.ref(null),c=e.computed(()=>({"opacity-50 pointer-events-none":r.loading||r.error})),d=()=>{const h=r.theme==="dark";return{responsive:r.responsive,maintainAspectRatio:r.maintainAspectRatio,animation:{duration:1e3,easing:"easeInOutQuart",delay:m=>{let p=0;return m.type==="data"&&m.mode==="default"&&(p=m.dataIndex*100+m.datasetIndex*50),p},onComplete:()=>{}},plugins:{legend:{position:"top",labels:{color:h?"#E5E7EB":"#374151",font:{size:12}}},tooltip:{backgroundColor:h?"#1F2937":"#FFFFFF",titleColor:h?"#F3F4F6":"#111827",bodyColor:h?"#D1D5DB":"#4B5563",borderColor:h?"#374151":"#E5E7EB",borderWidth:1,animation:{duration:200,easing:"easeInOutQuad"}}},scales:r.type!=="pie"&&r.type!=="doughnut"&&r.type!=="polarArea"?{x:{grid:{color:h?"#374151":"#E5E7EB"},ticks:{color:h?"#D1D5DB":"#6B7280"}},y:{grid:{color:h?"#374151":"#E5E7EB"},ticks:{color:h?"#D1D5DB":"#6B7280"}}}:void 0}},f=h=>!h||!h.datasets?h:{...h,datasets:h.datasets.map((m,p)=>{const y=p%r.colors.length,b=r.colors[y];let g=m.backgroundColor,_=m.borderColor;return["pie","doughnut","polarArea"].includes(r.type)&&(!g||g.length===0)?m.data&&(g=m.data.map((E,B)=>r.colors[B%r.colors.length]+"80"),_=m.data.map((E,B)=>r.colors[B%r.colors.length])):(g=g||b+"40",_=_||b),{...m,borderColor:_,backgroundColor:g,pointBackgroundColor:m.pointBackgroundColor||b,pointBorderColor:m.pointBorderColor||b,hoverBackgroundColor:m.hoverBackgroundColor||b+"60",hoverBorderColor:m.hoverBorderColor||b}})},u=async()=>{if(!s.value)return;await e.nextTick(),i.value&&i.value.destroy();const h=r.data||r.modelValue;let m=h;if(Array.isArray(h))if(h.length>0&&typeof h[0]=="object"&&h[0]!==null){const y=Object.keys(h[0]),b=y.find(_=>["label","name","x","category","title"].includes(_.toLowerCase()))||y[0],g=y.find(_=>_!==b&&["value","y","count","amount","total","data"].includes(_.toLowerCase()))||y.find(_=>_!==b&&typeof h[0][_]=="number")||(y.length>1?y.find(_=>_!==b):y[0]);m={labels:h.map(_=>_[b||""]),datasets:[{label:r.label||"Data",data:h.map(_=>_[g||""])}]}}else h.length>0?m={labels:h.map((y,b)=>`Data ${b+1}`),datasets:[{label:r.label||"Data",data:h}]}:m={labels:[],datasets:[]};if(l.value=f(m),!l.value)return;const p={...d(),...r.options,onClick:(y,b)=>{a("click",y,b),r.onClick&&r.onClick(y,b)},onHover:(y,b)=>{a("hover",y,b),r.onHover&&r.onHover(y,b)}};i.value=new ro(s.value,{type:r.type,data:l.value,options:p}),a("ready",i.value)};return e.watch(()=>[r.data,r.modelValue,r.type,r.options,r.theme],()=>{u()},{deep:!0}),e.watch(()=>[r.width,r.height],()=>{i.value&&i.value.resize()}),e.onMounted(()=>{u()}),e.onUnmounted(()=>{i.value&&i.value.destroy()}),o({chart:i,updateChart:u}),(h,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-code-chart",c.value])},[t.label?(e.openBlock(),e.createElementBlock("div",X1,[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",Y1,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"relative",style:e.normalizeStyle({height:t.height+"px"})},[e.createElementVNode("canvas",{ref_key:"chartCanvas",ref:s},null,512),t.loading?(e.openBlock(),e.createElementBlock("div",J1,[...m[0]||(m[0]=[e.createElementVNode("div",{class:"animate-pulse-slow rounded-full h-8 w-8 border-b-2 border-blue-600"},null,-1)])])):e.createCommentVNode("",!0),t.error?(e.openBlock(),e.createElementBlock("div",Q1,[e.createElementVNode("div",Z1,e.toDisplayString(t.error),1)])):e.createCommentVNode("",!0)],4),t.showInfo&&l.value?(e.openBlock(),e.createElementBlock("div",ew,[l.value.datasets?(e.openBlock(),e.createElementBlock("div",tw,e.toDisplayString(l.value.datasets.length)+" dataset(s) • "+e.toDisplayString(l.value.labels?l.value.labels.length:0)+" data points ",1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-b1c7c58f"]]),Jn=e.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class");return(r,a)=>(e.openBlock(),e.createBlock(e.unref(_e.Label),e.mergeProps(e.unref(n),{class:e.unref(Me)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",o.class)}),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),ow={key:0,class:"ml-1 text-destructive"},nw=["aria-busy"],rw={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse mb-2"},aw={key:1,class:"flex items-center"},sw=["id","checked","indeterminate","disabled","required"],so=dt(e.defineComponent({name:"DCodeCheckbox",inheritAttrs:!1,__name:"DCodeCheckbox",props:{id:{default:""},label:{default:""},title:{default:""},required:{type:Boolean,default:!1},modelValue:{type:[Boolean,null]},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:o}){const n=e.useAttrs(),r=o,a=t,s=e.computed(()=>a.visible??!0),i=e.computed(()=>a.required),l=Math.random().toString(36).slice(2,7),c=e.computed(()=>`dcode-checkbox-${a.id||a.label||"checkbox"}-${l}`),d=e.ref(!!a.modelValue);e.watch(()=>a.modelValue,h=>{d.value=!!h},{immediate:!0});const f=()=>{if(a.disabled||a.readonly)return;const h=!d.value;d.value=h,r("update:modelValue",h)},u=h=>{(h.key===" "||h.key==="Enter")&&(h.preventDefault(),f())};return(h,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid gap-1.5",a.disabled?"cursor-not-allowed":""])},[t.label?(e.openBlock(),e.createBlock(Jn,{key:0,class:"text-sm font-medium mb-1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",ow,"*")):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([e.unref(n).class,{"opacity-60 cursor-not-allowed":t.disabled}]),"aria-busy":t.skeleton},[t.skeleton?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.label?(e.openBlock(),e.createElementBlock("div",rw)):e.createCommentVNode("",!0),m[0]||(m[0]=e.createElementVNode("div",{class:"flex items-center gap-2.5"},[e.createElementVNode("div",{class:"h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"}),e.createElementVNode("div",{class:"h-4 w-24 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1))],64)):(e.openBlock(),e.createElementBlock("div",aw,[e.createElementVNode("label",{class:e.normalizeClass(["flex items-center gap-2.5 group relative",{"cursor-pointer":!t.disabled&&!t.readonly,"opacity-50 cursor-not-allowed":t.disabled,"cursor-default opacity-80":t.readonly}])},[e.createElementVNode("input",{type:"checkbox",id:c.value,class:"sr-only peer",checked:d.value,indeterminate:t.indeterminate,disabled:t.disabled,required:i.value,onChange:f,onKeydown:u},null,40,sw),e.createElementVNode("div",{class:e.normalizeClass(["h-4 w-4 shrink-0 rounded-sm border shadow-sm transition-all focus:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-neutral-400 dark:peer-focus-visible:ring-neutral-600 peer-focus-visible:ring-offset-2 flex items-center justify-center",[d.value||t.indeterminate?"bg-primary border-primary text-primary-foreground":"border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800",t.disabled?"cursor-not-allowed":t.readonly?"cursor-default":"cursor-pointer"]]),"aria-hidden":"true"},[d.value&&!t.indeterminate?(e.openBlock(),e.createBlock(e.unref(ne.Check),{key:0,class:"h-3 w-3 text-white","stroke-width":"3"})):t.indeterminate?(e.openBlock(),e.createBlock(e.unref(ne.Minus),{key:1,class:"h-3 w-3 text-white","stroke-width":"3"})):e.createCommentVNode("",!0)],2),t.title?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["text-sm leading-relaxed select-none transition-colors",[t.disabled?"text-gray-400 dark:text-gray-500":"text-gray-700 dark:text-gray-300 group-hover:text-gray-900 dark:group-hover:text-gray-100"]])},e.toDisplayString(t.title),3)):e.createCommentVNode("",!0)],2)]))],10,nw),[[e.vShow,s.value]])],2))}}),[["__scopeId","data-v-0f459b64"]]),iw={class:"w-full"},lw={key:0,class:"mb-4"},cw={key:0,class:"h-6 w-48 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},dw={key:1,class:"text-sm font-medium text-gray-900 dark:text-gray-100"},fw={key:0,class:"ml-1 text-destructive"},uw={key:0,class:"flex items-center gap-2 text-sm text-gray-500 dark:text-neutral-400 mb-4"},hw={key:1,class:"flex flex-wrap gap-4"},mw={key:0,class:"text-center py-8 text-gray-500 dark:text-gray-400"},pw={key:1,class:"flex flex-wrap gap-x-6 gap-y-4"},gw={key:3,class:"flex items-center gap-1 text-sm text-red-500 mt-4"},Xs=dt(e.defineComponent({name:"DCodeCardCheckboxList",inheritAttrs:!1,__name:"DCodeCardCheckboxList",props:{modelValue:{default:()=>[]},icon:{},itemTitle:{default:"name"},itemValue:{default:"id"},label:{default:""},options:{default:()=>[]},items:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},apiModule:{},apiAction:{},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""},columns:{default:2},apiParams:{default:()=>({})},returnArray:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:o}){e.useAttrs();const{apiUrl:n}=Ye(),r=o,a=t,s=e.ref(new Set);e.watch(()=>a.modelValue,A=>{if(!A){s.value=new Set;return}const C=A.map(x=>typeof x=="object"&&x!==null?x.id!==void 0?x.id:x.value:x);s.value=new Set(C)},{immediate:!0,deep:!0});const i=e.ref([]),l=e.ref(!1),c=e.ref(null),d=async()=>{var C,x;const A=((C=a.endpoint)==null?void 0:C.apiUrl)||a.apiUrl;if(!(!A&&!a.apiModule&&!a.apiAction)){l.value=!0,c.value=null;try{let w;const D=((x=a.endpoint)==null?void 0:x.apiMethod)||a.apiMethod||"GET",k={page:1,perPage:100,...a.apiParams};if(A)w=await n(A,D,k);else if(a.apiModule&&a.apiAction){const{DCodeApi:S}=Ye();w=await S(a.apiModule,a.apiAction,k)}let v=w;a.dataPath?v=a.dataPath.split(".").reduce((N,V)=>N&&N[V]!==void 0?N[V]:void 0,w):typeof w=="object"&&!Array.isArray(w)&&w.data&&(v=w.data),Array.isArray(v)?i.value=v:(console.warn("DCodeCardCheckboxList: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),c.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(w){console.error("DCodeCardCheckboxList fetch error:",w),c.value="Gagal memuat data dari endpoint."}finally{l.value=!1}}},f=e.ref(!1);let u=null;const h=()=>{typeof document<"u"&&(f.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};e.onMounted(()=>{var A;((A=a.endpoint)!=null&&A.apiUrl||a.apiUrl||a.apiModule&&a.apiAction)&&d(),h(),typeof document<"u"&&(u=new MutationObserver(h),u.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),u.observe(document.body,{attributes:!0,attributeFilter:["class"]}))}),e.onBeforeUnmount(()=>{u&&u.disconnect()});const m=e.computed(()=>a.options&&a.options.length>0?a.options:a.items&&a.items.length>0?a.items:i.value),p=A=>{if(typeof A!="object"||A===null)return A;const C=a.itemValue||a.model||"id";return A[C]},y=A=>{if(typeof A!="object"||A===null)return String(A);const C=a.itemTitle||"name";return A[C]},b=A=>s.value.has(A),g=(A,C)=>{if(a.disabled)return;const x=new Set(s.value);C?x.add(A):x.delete(A),s.value=x;const w=Array.from(s.value);r("update:modelValue",w),r("change",w)},_=e.computed(()=>a.skeleton||l.value),E=e.computed(()=>!!a.error||!!c.value),B=e.computed(()=>a.error||c.value);return(A,C)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",iw,[t.label||_.value?(e.openBlock(),e.createElementBlock("div",lw,[_.value?(e.openBlock(),e.createElementBlock("div",cw)):(e.openBlock(),e.createElementBlock("h3",dw,[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",fw,"*")):e.createCommentVNode("",!0)]))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[l.value?(e.openBlock(),e.createElementBlock("div",uw,[e.createVNode(e.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),C[0]||(C[0]=e.createTextVNode(" Sedang memuat opsi... ",-1))])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",hw,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(6,x=>e.createElementVNode("div",{key:`skeleton-${x}`,class:"flex items-center gap-2.5 min-w-[120px]"},[...C[1]||(C[1]=[e.createElementVNode("div",{class:"h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"},null,-1),e.createElementVNode("div",{class:"h-4 w-24 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])),64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[m.value.length===0?(e.openBlock(),e.createElementBlock("div",mw," Tidak ada data ")):(e.openBlock(),e.createElementBlock("div",pw,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"flex items-start"},[e.createVNode(so,{"model-value":b(p(x)),title:y(x),disabled:t.disabled,"onUpdate:modelValue":D=>g(p(x),D)},null,8,["model-value","title","disabled","onUpdate:modelValue"])]))),128))]))],64)),E.value&&B.value?(e.openBlock(),e.createElementBlock("div",gw,[e.createVNode(e.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),e.createTextVNode(" "+e.toDisplayString(B.value),1)])):e.createCommentVNode("",!0)])],512)),[[e.vShow,t.visible]])}}),[["__scopeId","data-v-8f934d59"]]),bw=["aria-busy"],yw={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},xw={key:1,class:"flex justify-end"},kw=["for"],ww={key:0,class:"ml-1 text-destructive"},Cw={class:"relative w-full group"},_w={class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-r border-gray-300 dark:border-gray-700"},Ew={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},Bw=["id","disabled","readonly","placeholder","maxlength"],Sw={key:0,class:"absolute top-full right-0 z-10 text-[11px] text-gray-400 dark:text-gray-500 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100 mt-0.5"},Aw={key:1,class:"flex items-center gap-1 text-xs text-destructive"},Ys=e.defineComponent({name:"DCodeCurrencyField",inheritAttrs:!1,__name:"DCodeCurrencyField",props:{modelValue:{},currency:{default:"IDR"},locale:{},label:{},placeholder:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},prependInner:{},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0}},emits:["update:modelValue","clear"],setup(t,{emit:o}){const n=e.useAttrs(),r=o,a=t,s=Math.random().toString(36).slice(2,7),i=e.computed(()=>`app-currency-field-${n.id||a.label||"currency-field"}-${s}`),l=e.computed(()=>{const v=n.required,S=n["aria-required"];return v===""||v===!0||v==="true"||(S==="true"||S===!0)}),c=e.computed(()=>{const v=n.maxlength??n.maxLength;let S=Number.NaN;return typeof v=="number"?S=v:typeof v=="string"&&(S=Number.parseInt(v,10)),Number.isFinite(S)&&S>0?S:void 0}),d=e.computed(()=>a.locale?a.locale:"en-US"),f=e.computed(()=>a.prependInner?a.prependInner:a.currency==="USD"?"$":a.currency==="IDR"?"Rp":a.currency),u=e.computed(()=>new Intl.NumberFormat(d.value,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})),h=v=>{const S=v.replaceAll(/\D/g,"");return S?Number(S):null},m=v=>u.value.format(v),p=e.ref(""),y=e.ref(null);e.watch(()=>a.modelValue,v=>{v==null?p.value="":h(p.value)!==v&&(p.value=m(v))},{immediate:!0});const b=(v,S)=>{let N=0;for(let V=0;V<S;V++)/\d/.test(v[V])&&N++;return N},g=(v,S)=>{let N=0;for(let V=0;V<v.length;V++)if(/\d/.test(v[V])&&(N++,N===S))return V+1;return v.length},_=v=>{const S=v.target,N=S.value,V=S.selectionStart??N.length,L=h(N);if(L===null){p.value="",r("update:modelValue",null);return}const O=m(L);if(N!==O){const P=b(N,V);p.value=O,e.nextTick(()=>{if(y.value){const R=g(O,P);y.value.setSelectionRange(R,R)}})}r("update:modelValue",L)},E=()=>{p.value="",r("update:modelValue",null),r("clear")},B=e.computed(()=>!a.clearable||a.disabled||a.readonly?!1:a.hideClearWhenEmpty?p.value.length>0:!0),A=e.computed(()=>!!a.error),C=e.computed(()=>{const{class:v,maxlength:S,maxLength:N,...V}=n;return V}),x=e.computed(()=>p.value.length),w=e.computed(()=>a.showCharCount?(c.value??0)>0:!1),D=e.computed(()=>w.value&&x.value>0),k=e.computed(()=>`${x.value} / ${c.value}`);return(v,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-1.5 w-full",[e.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.label?(e.openBlock(),e.createElementBlock("div",yw)):e.createCommentVNode("",!0),S[2]||(S[2]=e.createElementVNode("div",{class:"relative w-full"},[e.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1)),w.value?(e.openBlock(),e.createElementBlock("div",xw,[...S[1]||(S[1]=[e.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:i.value,class:"text-sm font-medium text-gray-700 dark:text-gray-300"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),l.value?(e.openBlock(),e.createElementBlock("span",ww,"*")):e.createCommentVNode("",!0)],8,kw)):e.createCommentVNode("",!0),e.createElementVNode("div",Cw,[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center w-full rounded-lg border overflow-hidden transition-all duration-200","bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50",A.value?"border-destructive ring-1 ring-destructive":"border-gray-300 dark:border-gray-700 focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 dark:focus-within:border-blue-400",a.disabled?"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-neutral-800":"",a.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""])},[e.createElementVNode("div",_w,[e.createElementVNode("span",Ew,e.toDisplayString(f.value),1)]),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:i.value,ref_key:"inputRef",ref:y,"onUpdate:modelValue":S[0]||(S[0]=N=>p.value=N),onInput:_,type:"text",inputmode:"numeric"},C.value,{disabled:a.disabled,readonly:a.readonly,placeholder:a.placeholder,maxlength:c.value,class:["flex-1 h-10 px-3 py-2 text-sm bg-transparent text-foreground dark:text-gray-300 outline-none placeholder:text-gray-400",B.value?"pr-8":""]}),null,16,Bw),[[e.vModelText,p.value]]),B.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"flex items-center justify-center w-8 h-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors flex-shrink-0","aria-label":"Clear input",onClick:E},[e.createVNode(e.unref(ne.X),{class:"w-3.5 h-3.5"})])):e.createCommentVNode("",!0)],2),D.value&&!A.value?(e.openBlock(),e.createElementBlock("p",Sw,e.toDisplayString(k.value),1)):e.createCommentVNode("",!0)]),A.value?(e.openBlock(),e.createElementBlock("p",Aw,[e.createVNode(e.unref(ne.AlertCircle),{class:"w-3.5 h-3.5 flex-shrink-0"}),e.createTextVNode(" "+e.toDisplayString(a.error),1)])):e.createCommentVNode("",!0)],64))],10,bw))}}),vw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Dw=(t,o,n)=>{let r;const a=vw[t];return typeof a=="string"?r=a:o===1?r=a.one:r=a.other.replace("{{count}}",o.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function fn(t){return(o={})=>{const n=o.width?String(o.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Nw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Vw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Mw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Tw={date:fn({formats:Nw,defaultWidth:"full"}),time:fn({formats:Vw,defaultWidth:"full"}),dateTime:fn({formats:Mw,defaultWidth:"full"})},Pw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ow=(t,o,n,r)=>Pw[t];function Ut(t){return(o,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,l=n!=null&&n.width?String(n.width):i;a=t.formattingValues[l]||t.formattingValues[i]}else{const i=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[l]||t.values[i]}const s=t.argumentCallback?t.argumentCallback(o):o;return a[s]}}const Lw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Iw={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fw={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},zw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$w={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jw={ordinalNumber:(t,o)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ut({values:Lw,defaultWidth:"wide"}),quarter:Ut({values:Rw,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ut({values:Iw,defaultWidth:"wide"}),day:Ut({values:Fw,defaultWidth:"wide"}),dayPeriod:Ut({values:zw,defaultWidth:"wide",formattingValues:$w,defaultFormattingWidth:"wide"})};function Wt(t){return(o,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=o.match(a);if(!s)return null;const i=s[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?Ww(l,u=>u.test(i)):Uw(l,u=>u.test(i));let d;d=t.valueCallback?t.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const f=o.slice(i.length);return{value:d,rest:f}}}function Uw(t,o){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&o(t[n]))return n}function Ww(t,o){for(let n=0;n<t.length;n++)if(o(t[n]))return n}function Mf(t){return(o,n={})=>{const r=o.match(t.matchPattern);if(!r)return null;const a=r[0],s=o.match(t.parsePattern);if(!s)return null;let i=t.valueCallback?t.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const l=o.slice(a.length);return{value:i,rest:l}}}const Hw=/^(\d+)(th|st|nd|rd)?/i,qw=/\d+/i,Gw={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Kw={any:[/^b/i,/^(a|c)/i]},Xw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Yw={any:[/1/i,/2/i,/3/i,/4/i]},Jw={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Qw={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Zw={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},e2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},t2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},o2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},n2={ordinalNumber:Mf({matchPattern:Hw,parsePattern:qw,valueCallback:t=>parseInt(t,10)}),era:Wt({matchPatterns:Gw,defaultMatchWidth:"wide",parsePatterns:Kw,defaultParseWidth:"any"}),quarter:Wt({matchPatterns:Xw,defaultMatchWidth:"wide",parsePatterns:Yw,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Wt({matchPatterns:Jw,defaultMatchWidth:"wide",parsePatterns:Qw,defaultParseWidth:"any"}),day:Wt({matchPatterns:Zw,defaultMatchWidth:"wide",parsePatterns:e2,defaultParseWidth:"any"}),dayPeriod:Wt({matchPatterns:t2,defaultMatchWidth:"any",parsePatterns:o2,defaultParseWidth:"any"})},r2={code:"en-US",formatDistance:Dw,formatLong:Tw,formatRelative:Ow,localize:jw,match:n2,options:{weekStartsOn:0,firstWeekContainsDate:1}},a2={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},s2=(t,o,n)=>{let r;const a=a2[t];return typeof a=="string"?r=a:o===1?r=a.one:r=a.other.replace("{{count}}",o.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+r:r+" yang lalu":r},i2={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},l2={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},c2={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},d2={date:fn({formats:i2,defaultWidth:"full"}),time:fn({formats:l2,defaultWidth:"full"}),dateTime:fn({formats:c2,defaultWidth:"full"})},f2={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},u2=(t,o,n,r)=>f2[t],h2={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},m2={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},p2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},g2={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},b2={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},y2={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},x2={ordinalNumber:(t,o)=>"ke-"+Number(t),era:Ut({values:h2,defaultWidth:"wide"}),quarter:Ut({values:m2,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ut({values:p2,defaultWidth:"wide"}),day:Ut({values:g2,defaultWidth:"wide"}),dayPeriod:Ut({values:b2,defaultWidth:"wide",formattingValues:y2,defaultFormattingWidth:"wide"})},k2=/^ke-(\d+)?/i,w2=/\d+/i,C2={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},_2={any:[/^s/i,/^(m|e)/i]},E2={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},B2={any:[/1/i,/2/i,/3/i,/4/i]},S2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},A2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},v2={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},D2={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},N2={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},V2={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},M2={ordinalNumber:Mf({matchPattern:k2,parsePattern:w2,valueCallback:t=>parseInt(t,10)}),era:Wt({matchPatterns:C2,defaultMatchWidth:"wide",parsePatterns:_2,defaultParseWidth:"any"}),quarter:Wt({matchPatterns:E2,defaultMatchWidth:"wide",parsePatterns:B2,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Wt({matchPatterns:S2,defaultMatchWidth:"wide",parsePatterns:A2,defaultParseWidth:"any"}),day:Wt({matchPatterns:v2,defaultMatchWidth:"wide",parsePatterns:D2,defaultParseWidth:"any"}),dayPeriod:Wt({matchPatterns:N2,defaultMatchWidth:"any",parsePatterns:V2,defaultParseWidth:"any"})},T2={code:"id",formatDistance:s2,formatLong:d2,formatRelative:u2,localize:x2,match:M2,options:{weekStartsOn:1,firstWeekContainsDate:1}},Tf={primary:{light:{primary:"hsl(var(--primary))",text:"hsl(var(--primary-foreground))",hover:"hsl(var(--accent))",border:"hsl(var(--border))",range:"#bfdbfe"},dark:{primary:"hsl(var(--primary))",text:"hsl(var(--primary-foreground))",hover:"hsl(var(--accent))",border:"hsl(var(--border))",range:"rgba(30, 58, 138, 0.3)"}},emerald:{light:{primary:"#16a34a",text:"#ffffff",hover:"#dcfce7",border:"#16a34a",range:"#ecfdf5"},dark:{primary:"#22c55e",text:"#0b1220",hover:"#14532d",border:"#22c55e",range:"rgba(6, 78, 59, 0.3)"}},amber:{light:{primary:"#d97706",text:"#ffffff",hover:"#fffbeb",border:"#d97706",range:"#fffbeb"},dark:{primary:"#f59e0b",text:"#0b1220",hover:"#78350f",border:"#f59e0b",range:"rgba(120, 53, 15, 0.3)"}},violet:{light:{primary:"#7c3aed",text:"#ffffff",hover:"#f5f3ff",border:"#7c3aed",range:"#f5f3ff"},dark:{primary:"#8b5cf6",text:"#0b1220",hover:"#2e1065",border:"#8b5cf6",range:"rgba(46, 16, 101, 0.3)"}},destructive:{light:{primary:"hsl(var(--destructive))",text:"hsl(var(--destructive-foreground))",hover:"hsl(var(--destructive) / 0.10)",border:"hsl(var(--destructive))",range:"#fef2f2"},dark:{primary:"hsl(var(--destructive))",text:"hsl(var(--destructive-foreground))",hover:"hsl(var(--destructive) / 0.18)",border:"hsl(var(--destructive))",range:"rgba(127, 29, 29, 0.3)"}}},Pf="dcode-dp-theme-forced";function P2(t,o=Pf){const n=Tf[t]??Tf.primary,r=`
|
|
36
36
|
.dp__theme_light {
|
|
37
37
|
--dp-primary-color: ${n.light.primary} !important;
|
|
38
38
|
--dp-primary-text-color: ${n.light.text} !important;
|
|
@@ -80,7 +80,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),I=P,M=R),j===void 0&&(
|
|
|
80
80
|
.dcode-datepicker-menu .dp__menu_inner {
|
|
81
81
|
padding: 0 !important;
|
|
82
82
|
}
|
|
83
|
-
`.trim();let a=document.getElementById(o);a||(a=document.createElement("style"),a.id=o,document.head.appendChild(a)),a.textContent=r}function A2(e,o=Sf){t.watch(e,n=>S2(n,o),{immediate:!0})}const v2={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},D2=["for"],N2={key:0,class:"ml-1 text-destructive"},V2=["disabled","onClick"],M2={class:"flex-shrink-0 px-2 text-sm text-muted-foreground select-none whitespace-nowrap"},T2=["id","value","placeholder","disabled","onClick","onFocus","onBlur","onInput","onKeydown","onKeypress","onPaste"],P2={class:"flex items-center justify-end gap-2 w-full p-2"},O2=["disabled","onClick"],L2={key:1,class:"text-xs text-destructive"},ta=t.defineComponent({name:"DCodeDatePicker",inheritAttrs:!1,__name:"DCodeDatePicker",props:{modelValue:{},range:{type:Boolean,default:!1},autoRangeDays:{default:null},disablePast:{type:Boolean,default:!1},maxDaysAhead:{default:null},placeholder:{default:"Pilih tanggal"},label:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},displayFormat:{default:"dd/MM/yyyy"},modelType:{default:"yyyy-MM-dd"},locale:{default:"en"},placement:{default:"bottom-start"},prependInner:{default:void 0},error:{default:null},selectLabel:{default:"Select"},cancelLabel:{default:"Cancel"},tone:{default:"primary"},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=e,a=o,s=Math.random().toString(36).slice(2,7),i=t.computed(()=>`dcode-datepicker-${n.id||r.label||"date-picker"}-${s}`),l=t.computed(()=>{const k=n.required,v=n["aria-required"];return k===""||k===!0||k==="true"||v==="true"||v===!0}),c=t.computed(()=>!!r.error),d=t.computed({get:()=>r.modelValue,set:k=>{a("update:modelValue",k),a("change",k)}}),f=t.computed(()=>r.locale==="en"?Yw:B2),u=t.computed(()=>r.range?2:!1),h=k=>{const v=new Date(k);return v.setHours(0,0,0,0),v},m=k=>{const v=new Date(k);return v.setHours(23,59,59,999),v},p=(k,v)=>{const S=new Date(k);return S.setDate(S.getDate()+v),S},y=t.computed(()=>{if(r.disablePast)return h(new Date)}),b=t.computed(()=>{if(r.maxDaysAhead&&r.maxDaysAhead>0)return m(p(new Date,r.maxDaysAhead))}),g=t.ref(null),_=t.ref(null),E=k=>{_.value={month:k.month,year:k.year}},B=t.ref(!1);let A=null;t.onMounted(()=>{const k=document.documentElement,v=()=>B.value=k.classList.contains("dark");v(),A=new MutationObserver(v),A.observe(k,{attributes:!0,attributeFilter:["class"]})}),t.onBeforeUnmount(()=>{A==null||A.disconnect(),A=null}),A2(t.toRef(r,"tone"));const C=k=>{const v=new Date(k),S=v.getDay(),N=v.getDate()-S+(S===0?-6:1);return v.setDate(N),h(v)},x=k=>{const v=C(k);return v.setDate(v.getDate()+6),m(v)},w=k=>{const v=new Date(k);return v.setDate(1),h(v)},D=k=>{const v=new Date(k);return v.setMonth(v.getMonth()+1),v.setDate(0),m(v)};return t.computed(()=>{if(!r.range)return[];const k=new Date,v=h(k),S=C(k),N=x(k),V=w(k),L=D(k),O=(P,R)=>{let j=P;r.disablePast&&j<v&&(j=v);let M=R;if(r.autoRangeDays&&r.autoRangeDays>0){const I=m(p(j,r.autoRangeDays-1));M>I&&(M=I)}return M<j&&(M=m(new Date(j))),[j,M]};return[{label:r.locale==="id"?"Minggu Ini":"This Week",range:O(S,N)},{label:r.locale==="id"?"Bulan Ini":"This Month",range:O(V,L)}]}),(k,v)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,r.disabled?"cursor-not-allowed":""]])},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",v2)):t.createCommentVNode("",!0),v[2]||(v[2]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:i.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),l.value?(t.openBlock(),t.createElementBlock("span",N2,"*")):t.createCommentVNode("",!0)],8,D2)):t.createCommentVNode("",!0),t.createVNode(t.unref(Cu.VueDatePicker),{ref_key:"dpRef",ref:g,modelValue:d.value,"onUpdate:modelValue":v[1]||(v[1]=S=>d.value=S),dark:B.value,range:e.range,"multi-calendars":u.value,"auto-range":e.autoRangeDays,"max-range":e.autoRangeDays,"partial-range":!1,disabled:e.disabled,clearable:!1,"text-input":"","enable-time-picker":!1,"time-config":{enableTimePicker:!1},"auto-apply":!1,"action-row":{showPreview:!0,showNow:!1},locale:f.value,"model-type":e.modelType,formats:{input:e.displayFormat},"min-date":y.value,"max-date":b.value,floating:{placement:e.placement,offset:8,arrow:!1,flip:!1,shift:!0},teleport:!0,"menu-class-name":"dcode-datepicker-menu","calendar-class-name":"dcode-datepicker-calendar",onUpdateMonthYear:E},{"dp-input":t.withCtx(({value:S,onInput:N,onEnter:V,onTab:L,onBlur:O,onFocus:P,onKeypress:R,onPaste:j,toggleMenu:M})=>[t.createElementVNode("div",{class:t.normalizeClass(["flex items-center w-full h-10 rounded-lg border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 overflow-hidden shadow-none transition-all duration-200 focus-within:ring-1 focus-within:ring-neutral-400 dark:focus-within:ring-neutral-600 focus-within:border-neutral-400 dark:focus-within:border-neutral-600",[c.value?"border-destructive":"",e.disabled?"opacity-50 cursor-not-allowed":"",e.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""]])},[t.createElementVNode("button",{type:"button",tabindex:"-1",disabled:e.disabled||e.readonly,class:"flex-shrink-0 flex items-center justify-center w-10 h-full text-muted-foreground hover:text-foreground transition-colors focus:outline-none",onClick:I=>!e.disabled&&!e.readonly&&M()},[t.createVNode(t.unref(ne.Calendar),{class:"w-4 h-4 pointer-events-none"})],8,V2),v[4]||(v[4]=t.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1)),e.prependInner?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("span",M2,t.toDisplayString(e.prependInner),1),v[3]||(v[3]=t.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1))],64)):t.createCommentVNode("",!0),t.createElementVNode("input",{id:i.value,value:S,placeholder:e.placeholder,disabled:e.disabled,autocomplete:"off",readonly:"",class:t.normalizeClass(["flex-1 min-w-0 px-3 h-full bg-transparent text-sm text-foreground dark:text-gray-300 placeholder:text-muted-foreground outline-none",e.disabled?"cursor-not-allowed":e.readonly?"cursor-default":"cursor-pointer"]),onClick:I=>!e.disabled&&!e.readonly&&M(),onFocus:I=>P(),onBlur:I=>O(),onInput:I=>N(I),onKeydown:[t.withKeys(I=>V(I),["enter"]),t.withKeys(I=>L(I),["tab"])],onKeypress:I=>R(I),onPaste:I=>j()},null,42,T2)],2)]),"action-buttons":t.withCtx(({selectDate:S,selectionDisabled:N})=>[t.createElementVNode("div",P2,[t.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center rounded-md text-sm font-medium border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400",onClick:v[0]||(v[0]=V=>{var L;return(L=g.value)==null?void 0:L.closeMenu()})},t.toDisplayString(e.cancelLabel),1),t.createElementVNode("button",{type:"button",disabled:N,class:"inline-flex items-center justify-center rounded-md text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400 disabled:pointer-events-none disabled:opacity-50",onClick:V=>S()},t.toDisplayString(e.selectLabel),9,O2)])]),_:1},8,["modelValue","dark","range","multi-calendars","auto-range","max-range","disabled","locale","model-type","formats","min-date","max-date","floating"]),c.value?(t.openBlock(),t.createElementBlock("p",L2,t.toDisplayString(r.error),1)):t.createCommentVNode("",!0)],64))],2))}}),R2=t.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:o}){const n=e,r=o,a=xe.useForwardPropsEmits(n,r);return(s,i)=>(t.openBlock(),t.createBlock(t.unref(xe.DialogRoot),t.normalizeProps(t.guardReactiveProps(t.unref(a))),{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:3},16))}}),I2=t.defineComponent({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=xe.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(xe.DialogPortal),null,{default:t.withCtx(()=>[t.createVNode(t.unref(xe.DialogOverlay),{class:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),t.createVNode(t.unref(xe.DialogContent),t.mergeProps({...t.unref(s),...i.$attrs},{class:t.unref(Ve)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:t.withCtx(()=>[t.renderSlot(i.$slots,"default"),t.createVNode(t.unref(xe.DialogClose),{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.X),{class:"w-4 h-4"}),l[0]||(l[0]=t.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["class"])]),_:3}))}}),F2=t.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=xe.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(xe.DialogDescription),t.mergeProps(t.unref(r),{class:t.unref(Ve)("text-sm text-muted-foreground",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),z2=t.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=xe.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(xe.DialogTitle),t.mergeProps(t.unref(r),{class:t.unref(Ve)("text-lg font-medium leading-none tracking-tight",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),$2={key:0,class:"px-6 py-4 flex items-center justify-between border-b border-neutral-200/60 dark:border-neutral-700/50 bg-white/80 dark:bg-neutral-900/30 backdrop-blur-md sticky top-0 z-20"},j2={class:"flex items-center gap-3"},U2={class:"flex flex-col"},W2={key:0,class:"flex items-center gap-2"},H2={key:1,class:"px-6 py-4 border-t border-neutral-200/60 dark:border-neutral-700/50 bg-neutral-50/50 dark:bg-neutral-900/30 sticky bottom-0 z-20"},q2={class:"flex justify-end gap-3 flex-wrap"},so=lt(t.defineComponent({name:"DCodeDialog",inheritAttrs:!1,__name:"DCodeDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:""},icon:{default:""},maxWidth:{default:500},persistent:{type:Boolean,default:!0},contentClass:{default:"p-5"},contentStyle:{default:()=>({})},iconClass:{default:""}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,a=t.useAttrs(),s=t.computed(()=>{const{style:d,...f}=a;return f}),i=t.computed(()=>({maxWidth:typeof n.maxWidth=="number"?`${n.maxWidth}px`:n.maxWidth,width:"100%"})),l=t.computed(()=>n.icon?Pt[n.icon]??null:null),c=d=>{r("update:modelValue",d)};return(d,f)=>(t.openBlock(),t.createBlock(t.unref(R2),{open:e.modelValue,"onUpdate:open":c},{default:t.withCtx(()=>[t.createVNode(t.unref(I2),t.mergeProps(s.value,{style:i.value,class:"p-0 overflow-hidden rounded-xl flex flex-col max-h-[90vh] bg-white dark:bg-neutral-800 border-0",onInteractOutside:f[0]||(f[0]=u=>e.persistent?u.preventDefault():null),onEscapeKeyDown:f[1]||(f[1]=u=>e.persistent?u.preventDefault():null)}),{default:t.withCtx(()=>[e.title||d.$slots["header-append"]?(t.openBlock(),t.createElementBlock("div",$2,[t.createElementVNode("div",j2,[l.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["p-2 rounded-lg",e.iconClass||"bg-primary/10 text-primary"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),{class:"h-5 w-5"}))],2)):t.createCommentVNode("",!0),t.createElementVNode("div",U2,[t.createVNode(t.unref(z2),{class:"text-lg font-bold text-neutral-900 dark:text-neutral-50 leading-tight"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1}),t.createVNode(t.unref(F2),{class:"hidden"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title||"Dialog Content"),1)]),_:1})])]),d.$slots["header-append"]?(t.openBlock(),t.createElementBlock("div",W2,[t.renderSlot(d.$slots,"header-append",{},void 0,!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["flex-1 overflow-y-auto custom-scrollbar",e.contentClass]),style:t.normalizeStyle(e.contentStyle)},[t.renderSlot(d.$slots,"default",{},void 0,!0)],6),d.$slots.actions?(t.openBlock(),t.createElementBlock("div",H2,[t.createElementVNode("div",q2,[t.renderSlot(d.$slots,"actions",{},void 0,!0)])])):t.createCommentVNode("",!0)]),_:3},16,["style"])]),_:3},8,["open"]))}}),[["__scopeId","data-v-52781e0f"]]),$o=t.defineComponent({name:"DCodeLabel",inheritAttrs:!1,__name:"DCodeLabel",props:{label:{},text:{},textSize:{},textType:{},icon:{},iconClass:{}},setup(e){const o=t.useAttrs(),n=e,r=t.computed(()=>Ao(n.icon,Pt)),a=t.computed(()=>n.textSize?`text-${n.textSize}`:"text-xs"),s={xs:"w-3 h-3",sm:"w-3.5 h-3.5",base:"w-4 h-4",lg:"w-5 h-5",xl:"w-5 h-5","2xl":"w-6 h-6","3xl":"w-7 h-7","4xl":"w-8 h-8","5xl":"w-10 h-10","6xl":"w-12 h-12"},i=t.computed(()=>s[n.textSize??"xs"]??"w-3 h-3"),l=t.computed(()=>n.textType==="BOLD"?"font-bold":n.textType==="ITALIC"?"italic font-normal":"font-normal"),c=t.computed(()=>{const f=`${a.value} ${l.value} text-zinc-700 dark:text-zinc-400 ml-1 inline-flex items-center gap-1`,u=o.class??"";return[f,u].filter(Boolean).join(" ")}),d=t.computed(()=>{const{class:f,...u}=o;return u});return(f,u)=>(t.openBlock(),t.createElementBlock("span",t.mergeProps({class:c.value},d.value),[r.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.value),{key:0,class:t.normalizeClass(["shrink-0",i.value,e.iconClass])},null,8,["class"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.label||e.text),1)],16))}}),G2={class:"flex flex-col gap-3 w-full"},K2={key:0,class:"col-span-full flex flex-col gap-2 p-3 bg-white dark:bg-neutral-800 border border-dashed border-slate-200 dark:border-neutral-700/50 rounded-lg opacity-70 pointer-events-none animate-pulse"},X2={class:"flex flex-col items-center justify-center gap-2 py-6 rounded-lg border border-dashed border-slate-300 dark:border-neutral-700/50 bg-slate-50 dark:bg-neutral-900/30 text-slate-400"},Y2={key:1,class:"col-span-full flex flex-col items-center justify-center text-center gap-2 px-3 py-8 bg-slate-50 dark:bg-neutral-900/10 border border-slate-200 dark:border-neutral-700/50 rounded-lg opacity-70"},J2={class:"text-sm font-medium text-slate-500"},Q2={class:"flex items-center justify-between gap-2"},Z2=["onClick"],eC={key:0,class:"flex items-center gap-3 px-3 py-2 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-md"},tC={class:"text-xs text-green-700 dark:text-green-400 flex-1 truncate"},oC=["onClick"],nC=["for","onDrop"],rC={class:"text-xs text-slate-500 dark:text-slate-400"},aC={key:2,class:"text-xs text-slate-400"},sC=["id","disabled","accept","onChange"],iC={class:"flex flex-col items-center justify-center min-h-[300px]"},lC=["src","alt"],cC=["src"],dC={key:2,class:"flex flex-col items-center gap-4 py-12 text-slate-400"},fC={class:"text-sm font-medium"},uC=["href"],Ks=t.defineComponent({__name:"DCodeDynamicUploadList",props:{modelValue:{type:Array,default:()=>[]},label:{type:String,default:""},labelID:{type:String,default:"Documents"},labelEN:{type:String,default:"Documents"},endpoint:{type:Object,default:()=>null},endpointReference:{type:Object,default:()=>null},itemTitle:{type:String,default:"name"},itemValue:{type:String,default:"id"},disabled:Boolean,required:Boolean,typeFile:{type:String,default:void 0},sizeFile:{type:Number,default:void 0},items:{type:Array,default:void 0},baseUrl:{type:String,default:void 0}},emits:["update:modelValue","uploaded","success"],setup(e,{emit:o}){const n=e,r=o,{t:a,locale:s}=kt.useI18n(),i=t.computed(()=>{const C=n.endpoint;if(!(C!=null&&C.apiUrl))return null;let x=C.apiUrl;if(!x.startsWith("http")&&n.baseUrl){const w=n.baseUrl.replace(/\/$/,""),D=x.startsWith("/")?x:`/${x}`;x=`${w}${D}`}return x}),l=t.computed(()=>{const C=c.value.length;return C<=1?"grid-cols-1":C===2?"grid-cols-1 md:grid-cols-2":C===3?"grid-cols-1 md:grid-cols-3 xl:grid-cols-4":C===4?"grid-cols-1 md:grid-cols-2 lg:grid-cols-3":"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}),c=t.ref([]),d=t.ref([]),f=t.ref(new Set),u=t.ref(!0),h=t.ref(!1),m=t.ref(""),p=t.ref(""),y=t.ref(""),b=async()=>{var C;if(u.value=!0,n.items!==void 0){c.value=n.items,u.value=!1;return}if(!((C=n.endpointReference)!=null&&C.apiUrl)){u.value=!1;return}try{const{apiUrl:x}=Qe(),w=await x(n.endpointReference.apiUrl,n.endpointReference.apiMethod||"GET",{page:1,perPage:100});if(n.items!==void 0){u.value=!1;return}let D=(w==null?void 0:w.data)||w;Array.isArray(D)||(D=[D]),c.value=D}catch(x){console.error("Failed to fetch dynamic document list",x)}finally{u.value=!1}};t.onMounted(()=>{Array.isArray(n.modelValue)&&n.modelValue.length>0&&(d.value=JSON.parse(JSON.stringify(n.modelValue))),b()}),t.onBeforeUnmount(()=>{d.value.forEach(C=>{C._localPreviewUrl&&URL.revokeObjectURL(C._localPreviewUrl)})}),t.watch(()=>n.modelValue,C=>{if(Array.isArray(C)&&JSON.stringify(C)!==JSON.stringify(d.value)){const x=JSON.parse(JSON.stringify(C));x.forEach(w=>{const D=d.value.find(k=>k.typeDocument===w.typeDocument||k.idDocumentType===w.idDocumentType);D!=null&&D._localPreviewUrl&&(w._localPreviewUrl=D._localPreviewUrl)}),d.value=x}},{deep:!0}),t.watch(()=>{var C;return(C=n.endpointReference)==null?void 0:C.apiUrl},(C,x)=>{C!==x&&b()}),t.watch(()=>{var C;return(C=n.endpointReference)==null?void 0:C.apiMethod},(C,x)=>{C!==x&&b()}),t.watch(()=>n.items,C=>{c.value=C??[],u.value=!1},{deep:!0,immediate:!0});const g=C=>{const x=C[n.itemValue]||C.id||C.typeDocument;return d.value.find(w=>w.typeDocument===x||w.idDocumentType===x||w[n.itemValue]===x)||null},_=async(C,x,w)=>{var N,V,L,O;const D=w.target,k=(N=D.files)==null?void 0:N[0];if(!k)return;const v=C[n.itemValue]||C.id||C.typeDocument,S=URL.createObjectURL(k);if(!i.value){const P=[...d.value],R=P.findIndex(M=>M.typeDocument===v||M.idDocumentType===v);(V=P[R])!=null&&V._localPreviewUrl&&URL.revokeObjectURL(P[R]._localPreviewUrl);const j={id:null,idDocument:null,idDocumentType:v,filename:k.name,document:v,documentUrl:k.name,typeDocument:v,_localPreviewUrl:S,_fileType:k.type};R>-1?P[R]={...P[R],...j}:P.push(j),d.value=P,r("update:modelValue",P);return}f.value.add(x);try{const{apiUrl:P}=Qe(),R=new FormData;R.append("doc",k),R.append("typeDocument",String(v));const j=await P(i.value,((L=n.endpoint)==null?void 0:L.apiMethod)||"POST",R),M=Array.isArray(j==null?void 0:j.data)?j.data[0]:(j==null?void 0:j.data)||j,I=(M==null?void 0:M.url)||(M==null?void 0:M.document)||k.name,K=(M==null?void 0:M.id)||null,H=(M==null?void 0:M.filename)||(M==null?void 0:M.name)||k.name,W=[...d.value],Z=W.findIndex(ie=>ie.typeDocument===v||ie.idDocumentType===v);(O=W[Z])!=null&&O._localPreviewUrl&&URL.revokeObjectURL(W[Z]._localPreviewUrl);const te={...M,id:K||(M==null?void 0:M.idDocument)||(M==null?void 0:M.id_document)||null,idDocument:(M==null?void 0:M.idDocument)||K||(M==null?void 0:M.id_document)||null,idDocumentType:v,filename:H,document:v,documentUrl:I,typeDocument:v,_localPreviewUrl:S,_fileType:k.type};Z>-1?W[Z]={...W[Z],...te}:W.push(te),d.value=W,r("update:modelValue",W),r("uploaded",M),r("success",M)}catch(P){console.error("Upload failed",P)}finally{f.value.delete(x),D.value=""}},E=C=>{const x=C[n.itemValue]||C.id||C.typeDocument,w=d.value.find(k=>k.typeDocument===x||k.idDocumentType===x);w!=null&&w._localPreviewUrl&&URL.revokeObjectURL(w._localPreviewUrl);const D=d.value.filter(k=>k.typeDocument!==x&&k.idDocumentType!==x);d.value=D,r("update:modelValue",D)},B=C=>{const x=g(C);if(!x)return;let w=x._localPreviewUrl;if(!w)if(x.server&&x.url){const v=x.server.replace(/\/+$/,""),S=x.url.replace(/^\/+/,"");w=`${v}/${S}`}else w=x.document||x.url;if(!w)return;const D=x.mime||x._fileType||"",k=D==="application/pdf"||w.toLowerCase().endsWith(".pdf");k&&!w.includes("#")&&(w+="#toolbar=0&navpanes=0&scrollbar=0&view=FitH&pagemode=none"),m.value=w,p.value=C[n.itemTitle]||C.name||x.filename||"Preview Document",y.value=D||(k?"application/pdf":"image/jpeg"),h.value=!0},A=(C,x,w)=>{var v,S;w.preventDefault();const D=(S=(v=w.dataTransfer)==null?void 0:v.files)==null?void 0:S[0];if(!D)return;_(C,x,{target:{files:[D],value:""}})};return(C,x)=>(t.openBlock(),t.createElementBlock("div",G2,[e.label||e.labelID||e.labelEN?(t.openBlock(),t.createBlock($o,{key:0,text:e.label||(t.unref(s).toLowerCase().startsWith("en")?e.labelEN:e.labelID),class:"font-semibold text-sm text-slate-700 dark:text-slate-300",required:e.required},null,8,["text","required"])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["w-full grid gap-4",l.value])},[c.value.length===0&&u.value?(t.openBlock(),t.createElementBlock("div",K2,[t.createVNode($o,{text:t.unref(a)("dynamicUploadList.loadingDocs"),class:"font-semibold text-sm text-slate-700 dark:text-neutral-300"},null,8,["text"]),t.createElementVNode("div",X2,[t.createVNode(t.unref(ne.Loader2),{class:"w-6 h-6 animate-spin"})])])):c.value.length===0&&!u.value?(t.openBlock(),t.createElementBlock("div",Y2,[t.createVNode(t.unref(ne.CheckCircle2),{class:"w-6 h-6 text-slate-400"}),t.createElementVNode("span",J2,t.toDisplayString(t.unref(a)("dynamicUploadList.noDocsRequired")),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(w,D)=>{var k;return t.openBlock(),t.createElementBlock("div",{key:D,class:"flex flex-col gap-2 p-3 bg-white dark:bg-neutral-800 border border-slate-200 dark:border-neutral-700/50 rounded-lg shadow-sm"},[t.createElementVNode("div",Q2,[t.createVNode($o,{text:w[e.itemTitle]||w.name||w.filename||"Upload Document",class:"font-semibold text-sm text-slate-700 dark:text-neutral-300 truncate flex-1"},null,8,["text"]),g(w)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"p-1 hover:bg-slate-100 dark:hover:bg-zinc-700 rounded transition-colors text-slate-400 hover:text-primary-500",onClick:v=>B(w)},[t.createVNode(t.unref(ne.Eye),{class:"w-4 h-4"})],8,Z2)):t.createCommentVNode("",!0)]),g(w)?(t.openBlock(),t.createElementBlock("div",eC,[t.createVNode(t.unref(ne.CheckCircle2),{class:"w-4 h-4 text-green-600 shrink-0"}),t.createElementVNode("span",tC,t.toDisplayString(((k=g(w))==null?void 0:k.filename)||t.unref(a)("dynamicUploadList.fileUploaded")),1),e.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"text-red-400 hover:text-red-600 transition-colors",onClick:v=>E(w)},[t.createVNode(t.unref(ne.X),{class:"w-4 h-4"})],8,oC))])):(t.openBlock(),t.createElementBlock("label",{key:1,for:`dyn-upload-input-${D}`,class:t.normalizeClass(["flex flex-col items-center justify-center gap-2 py-8 rounded-lg border-2 border-dashed transition-colors cursor-pointer",[e.disabled?"border-slate-200 bg-slate-50 cursor-not-allowed opacity-60":"border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-800 hover:border-primary-400 hover:bg-primary-50 dark:hover:bg-primary-900/10",f.value.has(D)?"pointer-events-none opacity-70":""]]),onDragover:x[0]||(x[0]=t.withModifiers(()=>{},["prevent"])),onDrop:v=>!e.disabled&&!f.value.has(D)&&A(w,D,v)},[f.value.has(D)?(t.openBlock(),t.createBlock(t.unref(ne.Loader2),{key:0,class:"w-6 h-6 animate-spin text-primary-500"})):(t.openBlock(),t.createBlock(t.unref(ne.Upload),{key:1,class:"w-6 h-6 text-slate-400"})),t.createElementVNode("span",rC,t.toDisplayString(f.value.has(D)?t.unref(a)("dynamicUploadList.uploading"):t.unref(a)("dynamicUploadList.clickOrDrag")),1),e.typeFile?(t.openBlock(),t.createElementBlock("span",aC,t.toDisplayString(e.typeFile),1)):t.createCommentVNode("",!0),t.createElementVNode("input",{id:`dyn-upload-input-${D}`,type:"file",class:"sr-only",disabled:e.disabled||f.value.has(D),accept:e.typeFile,onChange:v=>_(w,D,v)},null,40,sC)],42,nC))])}),128))],2),t.createVNode(so,{modelValue:h.value,"onUpdate:modelValue":x[2]||(x[2]=w=>h.value=w),title:p.value,"max-width":y.value==="application/pdf"?"720":"500",class:t.normalizeClass(y.value==="application/pdf"?"max-w-[40vw]":""),"content-class":y.value==="application/pdf"?"p-0 overflow-hidden":"px-6 py-1 overflow-y-auto"},{actions:t.withCtx(()=>[t.createElementVNode("button",{type:"button",class:"px-4 py-2 border border-slate-200 dark:border-zinc-700 rounded-md text-sm font-medium hover:bg-slate-50 dark:hover:bg-zinc-800 transition-colors",onClick:x[1]||(x[1]=w=>h.value=!1)},t.toDisplayString(t.unref(a)("common.close")||"Close"),1)]),default:t.withCtx(()=>[t.createElementVNode("div",iC,[y.value.startsWith("image/")?(t.openBlock(),t.createElementBlock("img",{key:0,src:m.value,alt:p.value,class:"w-full h-auto max-h-[72vh] object-contain rounded-lg shadow-md"},null,8,lC)):y.value==="application/pdf"?(t.openBlock(),t.createElementBlock("iframe",{key:1,src:`${m.value}${m.value.includes("#")?"":"#toolbar=0&navpanes=0&scrollbar=0&view=FitH&pagemode=none"}`,class:"w-full h-[70vh] rounded-lg border border-slate-200",title:"Document Preview"},null,8,cC)):(t.openBlock(),t.createElementBlock("div",dC,[t.createVNode(t.unref(ne.FileText),{class:"w-16 h-16 stroke-1"}),t.createElementVNode("span",fC,t.toDisplayString(t.unref(a)("dynamicUploadList.noSupportPreview")||"Preview not supported for this file type"),1),t.createElementVNode("a",{href:m.value,target:"_blank",class:"px-4 py-2 bg-primary-500 text-white rounded-md text-sm font-semibold hover:bg-primary-600 transition-colors"},t.toDisplayString(t.unref(a)("dynamicUploadList.viewOriginal")||"View Original"),9,uC)]))])]),_:1},8,["modelValue","title","max-width","class","content-class"])]))}}),Af=t.defineComponent({name:"DCodeDialogCloseBtn",__name:"DCodeDialogCloseBtn",props:{icon:{default:"X"},iconSize:{default:22}},setup(e){const o=e,n=t.computed(()=>Pt[o.icon]??Pt.X);return(r,a)=>(t.openBlock(),t.createBlock(t.unref(Nt),{type:"button",variant:"secondary",size:"icon",class:"rounded-full shadow-sm"},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.value),{size:Number(e.iconSize)},null,8,["size"]))]),_:1}))}}),hC=t.defineComponent({__name:"Alert",props:{class:{type:[Boolean,null,String,Object,Array]},variant:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Ve)(t.unref(pC)({variant:e.variant}),o.class)),role:"alert"},[t.renderSlot(n.$slots,"default")],2))}}),mC=t.defineComponent({__name:"AlertDescription",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Ve)("text-sm [&_p]:leading-relaxed",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),pC=hr("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Xs=t.defineComponent({__name:"Badge",props:{variant:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Ve)(t.unref(gC)({variant:e.variant}),o.class))},[t.renderSlot(n.$slots,"default")],2))}}),gC=hr("inline-flex gap-1 items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Ys=t.defineComponent({__name:"Card",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Ve)("rounded-xl border bg-card text-card-foreground shadow",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),Js=t.defineComponent({__name:"CardContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Ve)("p-6 pt-0",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),Qs=t.defineComponent({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Ve)("flex flex-col gap-y-1.5 p-6",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),Zs=t.defineComponent({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("h3",{class:t.normalizeClass(t.unref(Ve)("font-medium leading-none tracking-tight",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),bC={class:"h-full w-full p-6 flex flex-col items-center justify-center text-center gap-2"},yC={class:"flex flex-wrap items-center justify-center gap-2"},xC=["accept","multiple"],oa=lt(t.defineComponent({name:"DCodeDropzone",__name:"DCodeDropzone",props:{label:{default:"Upload File"},hint:{default:"Drag & drop file di sini atau klik area ini"},accept:{default:"*/*"},maxSizeMb:{default:2},mode:{default:"single"},disabled:{type:Boolean,default:!1},showSelected:{type:Boolean,default:!0},error:{default:null}},emits:["picked","picked:multiple","error"],setup(e,{emit:o}){const n=e,r=o,a=t.ref(null),s=t.ref(!1),i=t.ref(null),l=t.ref(null),c=t.ref(null);t.computed(()=>n.accept||"file/*");const d=t.computed(()=>n.error??i.value);function f(){var x;n.disabled||(x=a.value)==null||x.click()}function u(x){const w=x/1024,D=w/1024;return D>=1?`${D.toFixed(2)} MB`:w>=1?`${w.toFixed(1)} KB`:`${x} B`}function h(x){var D;if(!x)return"File tidak valid";if((D=n.accept)!=null&&D.includes("image/")&&!x.type.startsWith("image/"))return"Hanya file gambar yang diizinkan";const w=(n.maxSizeMb??2)*1024*1024;return x.size>w?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:null}function m(x){l.value=x.name,c.value=x.size}function p(x){if(i.value=null,!x.length)return;if(n.mode==="single"){const D=x[0],k=h(D);if(k){i.value=k,r("error",k);return}n.showSelected&&m(D),r("picked",D);return}const w=[];for(const D of x){const k=h(D);if(k){i.value=k,r("error",k);return}w.push(D)}w.length&&(n.showSelected&&m(w[0]),r("picked:multiple",w))}function y(x){const w=x.target,D=Array.from(w.files??[]);p(D),w.value=""}function b(){n.disabled||(s.value=!0)}function g(){n.disabled||(s.value=!0)}function _(){s.value=!1}function E(x){var k,v;if(n.disabled)return;s.value=!1;const w=Array.from(((k=x.dataTransfer)==null?void 0:k.files)??[]),D=(v=n.accept)!=null&&v.includes("image/")?w.filter(S=>S.type.startsWith("image/")):w;p(D)}const B=t.computed(()=>(n.accept||"file/*").split(",").map(x=>x.trim()).filter(Boolean).map(x=>x==="image/*"?"IMAGE":x.replace(/^image\//,"").replace(/^\./,"")).join(", "));t.computed(()=>`${n.maxSizeMb??0}MB`);const A=t.ref(!1),C=t.computed(()=>{if(n.disabled||!A.value)return{};const x=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark");return{borderColor:x?"hsl(var(--primary) / 0.5)":"hsl(var(--primary) / 0.6)",backgroundColor:x?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"}});return(x,w)=>(t.openBlock(),t.createBlock(t.unref(Ys),{class:t.normalizeClass([e.disabled?"opacity-60":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:t.withCtx(()=>[t.createVNode(t.unref(Qs),{class:"pb-2"},{default:t.withCtx(()=>[t.createVNode(t.unref(Zs),{class:"text-sm font-semibold dark:text-neutral-100"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})]),_:1}),t.createVNode(t.unref(Js),{class:"pt-2"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["d-dropzone-area flex justify-center items-center rounded-xl border-2 border-dashed transition cursor-pointer select-none",[s.value?"is-dragging border-primary bg-primary/10 dark:bg-primary/20 -translate-y-[1px]":"border-border dark:border-neutral-700 bg-muted/30 dark:bg-neutral-800/50",e.disabled?"is-disabled":""]]),style:t.normalizeStyle([{minHeight:"190px"},C.value]),onClick:f,onDragenter:t.withModifiers(b,["prevent"]),onDragover:t.withModifiers(g,["prevent"]),onDragleave:t.withModifiers(_,["prevent"]),onDrop:t.withModifiers(E,["prevent"]),onMouseenter:w[0]||(w[0]=D=>A.value=!0),onMouseleave:w[1]||(w[1]=D=>A.value=!1)},[t.createElementVNode("div",bC,[w[2]||(w[2]=t.createElementVNode("div",{class:"text-sm font-medium dark:text-neutral-200"},"Drag & drop file di sini",-1)),w[3]||(w[3]=t.createElementVNode("div",{class:"text-xs text-muted-foreground dark:text-neutral-400"},"atau klik area ini untuk memilih file",-1)),t.createElementVNode("div",yC,[t.createVNode(t.unref(Xs),{variant:"secondary",class:"text-[11px] dark:bg-neutral-800 dark:text-neutral-300"},{default:t.withCtx(()=>[t.createTextVNode(" Allowed: "+t.toDisplayString(B.value),1)]),_:1}),t.createVNode(t.unref(Xs),{variant:"secondary",class:"text-[11px] dark:bg-neutral-800 dark:text-neutral-300"},{default:t.withCtx(()=>[t.createTextVNode(" Max: "+t.toDisplayString(n.maxSizeMb)+"MB ",1)]),_:1})]),e.showSelected&&l.value?(t.openBlock(),t.createBlock(t.unref(Xs),{key:0,variant:"secondary",class:"mt-2 dark:bg-neutral-800 dark:text-neutral-300"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.value)+" • "+t.toDisplayString(c.value?u(c.value):""),1)]),_:1})):t.createCommentVNode("",!0)]),t.createElementVNode("input",{ref_key:"fileInputEl",ref:a,type:"file",class:"hidden",accept:e.accept,multiple:e.mode==="multiple",onChange:y},null,40,xC)],38),d.value?(t.openBlock(),t.createBlock(t.unref(hC),{key:0,variant:"destructive",class:"mt-3"},{default:t.withCtx(()=>[t.createVNode(t.unref(mC),{class:"text-sm"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(d.value),1)]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["class"]))}}),[["__scopeId","data-v-d8943808"]]),kC={key:0,class:"text-xs text-muted-foreground dark:text-neutral-400"},wC=["src"],CC={key:1,class:"h-full w-full flex flex-col items-center justify-center text-muted-foreground dark:text-neutral-400 gap-2 p-4 text-center"},_C={class:"space-y-0.5"},EC={class:"text-sm font-medium truncate max-w-[180px] dark:text-neutral-200"},BC={class:"text-xs opacity-70"},SC=["disabled"],AC={key:1},vC=["disabled"],DC={class:"text-[11px] text-foreground/90 dark:text-neutral-200 space-y-1 whitespace-nowrap"},NC={class:"flex gap-2"},VC={class:"font-medium truncate"},MC={class:"flex gap-2"},TC={class:"font-medium"},PC={class:"flex gap-2"},OC={class:"font-medium truncate"},ei=lt(t.defineComponent({name:"DCodeFileResult",__name:"DCodeFileResult",props:{file:{},title:{default:"File Terpilih"},description:{default:""},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:220},showEdit:{type:Boolean,default:!0},showReplace:{type:Boolean,default:!0},showRemove:{type:Boolean,default:!0},forceFileIcon:{type:Boolean,default:!1}},emits:["edit","replace","remove"],setup(e,{emit:o}){const n=e,r=o,a=t.ref(null),s=t.computed(()=>n.forceFileIcon||!n.file?!1:(n.file.type||"").startsWith("image/"));t.watch(()=>n.file,m=>{a.value&&URL.revokeObjectURL(a.value),a.value=m?URL.createObjectURL(m):null},{immediate:!0}),t.onBeforeUnmount(()=>{a.value&&URL.revokeObjectURL(a.value),f&&f.disconnect()});function i(m){const p=m/1024,y=p/1024;return y>=1?`${y.toFixed(2)} MB`:p>=1?`${p.toFixed(1)} KB`:`${m} B`}const l=t.computed(()=>n.file?{name:n.file.name,size:i(n.file.size),type:n.file.type||"unknown"}:null),c=t.ref(!1),d=t.ref(!1);let f=null;const u=()=>{typeof document<"u"&&(d.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{u(),typeof document<"u"&&(f=new MutationObserver(u),f.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),f.observe(document.body,{attributes:!0,attributeFilter:["class"]}))});const h=t.computed(()=>n.disabled||!c.value?{}:{borderColor:d.value?"hsl(var(--primary) / 0.4)":"hsl(var(--primary) / 0.5)",backgroundColor:d.value?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"});return(m,p)=>e.file?(t.openBlock(),t.createBlock(Ys,{key:0,class:t.normalizeClass([e.disabled?"opacity-60 pointer-events-none":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:t.withCtx(()=>[t.createVNode(Qs,{class:"pb-2"},{default:t.withCtx(()=>[t.createVNode(Zs,{class:"text-sm font-semibold dark:text-neutral-100"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1}),e.description?(t.openBlock(),t.createElementBlock("div",kC,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)]),_:1}),t.createVNode(Js,{class:"pt-2"},{default:t.withCtx(()=>{var y,b,g,_,E;return[t.createElementVNode("div",{class:"d-result-preview-wrap relative rounded-xl overflow-hidden border-2 border-dashed transition-colors duration-200 bg-muted dark:bg-neutral-900/30 border-border dark:border-neutral-700/50 w-full",style:t.normalizeStyle([{height:`${e.previewHeight}px`},h.value]),onMouseenter:p[2]||(p[2]=B=>c.value=!0),onMouseleave:p[3]||(p[3]=B=>c.value=!1)},[s.value&&a.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:a.value,alt:"Preview",class:"h-full w-full object-contain"},null,8,wC)):(t.openBlock(),t.createElementBlock("div",CC,[t.createVNode(t.unref(ne.FileText),{class:"w-10 h-10"}),t.createElementVNode("div",_C,[t.createElementVNode("p",EC,t.toDisplayString((y=l.value)==null?void 0:y.name),1),t.createElementVNode("p",BC,t.toDisplayString((b=l.value)==null?void 0:b.size),1)])])),t.createElementVNode("div",{class:"d-action-buttons",style:t.normalizeStyle({position:"absolute",top:"8px",left:"8px",right:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",zIndex:50,opacity:c.value?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:c.value?"auto":"none"})},[e.showEdit&&s.value?(t.openBlock(),t.createElementBlock("button",{key:0,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#eab308",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s"}),onClick:p[0]||(p[0]=B=>r("edit"))},[t.createVNode(t.unref(ne.Pencil),{style:{width:"16px",height:"16px"}})],12,SC)):(t.openBlock(),t.createElementBlock("div",AC)),e.showRemove?(t.openBlock(),t.createElementBlock("button",{key:2,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s"}),onClick:p[1]||(p[1]=B=>r("remove"))},[t.createVNode(t.unref(ne.Trash2),{style:{width:"16px",height:"16px"}})],12,vC)):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:"d-metadata-overlay",style:t.normalizeStyle({position:"absolute",left:"8px",bottom:"8px",zIndex:10,display:"inline-block",maxWidth:"calc(100% - 16px)",borderRadius:"12px",border:"1px solid rgba(0,0,0,0.1)",padding:"8px 12px",boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1)",backdropFilter:"blur(8px)",transition:"all 0.2s ease-in-out",opacity:c.value?1:0,transform:c.value?"translateY(0) scale(1)":"translateY(4px) scale(0.99)",backgroundColor:d.value?"rgba(38, 38, 38, 0.8)":"rgba(255, 255, 255, 0.8)",color:d.value?"#e5e5e5":"#171717"})},[t.createElementVNode("div",DC,[t.createElementVNode("div",NC,[p[4]||(p[4]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Nama",-1)),t.createElementVNode("span",VC,t.toDisplayString((g=l.value)==null?void 0:g.name),1)]),t.createElementVNode("div",MC,[p[5]||(p[5]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Ukuran",-1)),t.createElementVNode("span",TC,t.toDisplayString((_=l.value)==null?void 0:_.size),1)]),t.createElementVNode("div",PC,[p[6]||(p[6]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Tipe",-1)),t.createElementVNode("span",OC,t.toDisplayString((E=l.value)==null?void 0:E.type),1)])])],4)],36)]}),_:1})]),_:1},8,["class"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-bb5c9599"]]);function ti(){const e=s=>{var c;const i={type:s.type||"info",title:s.title,message:s.message,duration:s.duration??3e3};typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:toast",{detail:i,bubbles:!0,composed:!0})),(i.type==="error"?console.error:i.type==="warning"?console.warn:console.log)(`[Toast][${(c=i.type)==null?void 0:c.toUpperCase()}]`,i.title||"",i.message)};return{show:e,success:(s,i)=>e({type:"success",message:s,title:i}),error:(s,i)=>e({type:"error",message:s,title:i}),warning:(s,i)=>e({type:"warning",message:s,title:i}),info:(s,i)=>e({type:"info",message:s,title:i})}}const LC={class:"space-y-3"},RC={key:1,class:"flex items-center justify-center p-6 border rounded-lg bg-muted/30 dark:bg-neutral-800/20 dark:border-neutral-800"},vf=t.defineComponent({name:"DCodeFileField",inheritAttrs:!1,__name:"DCodeFileField",props:{modelValue:{default:null},label:{default:"Upload File"},hint:{},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:void 0},allowedTypes:{default:null},accept:{default:"*/*"},minSizeMb:{default:null},maxSizeMb:{default:1},endpoint:{},uploadFn:{}},emits:["update:modelValue","error","uploaded"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:C=>r("update:modelValue",C)}),s=t.ref(null),i=t.ref(null);function l(C){i.value=C,r("error",C)}function c(){i.value=null}const d=t.computed(()=>{const C=(n.allowedTypes??"").trim();return C?C.split(/[,\s;]+/g).map(w=>w.trim().toLowerCase()).filter(Boolean).map(w=>w.includes("/")||w.startsWith(".")?w:`.${w}`):[]});function f(C){const x=C.lastIndexOf(".");return x>=0?C.slice(x).toLowerCase():""}const u=t.computed(()=>{if(d.value.length){const C=d.value.filter(w=>w.startsWith("."));return[...d.value.filter(w=>w.includes("/")),...C].join(",")}return n.accept}),h=t.computed(()=>d.value.length?d.value.join(", "):n.accept||"Semua File");function m(C){if(d.value.length){const x=(C.type||"").toLowerCase(),w=f(C.name);return d.value.some(D=>D.includes("/")?x===D:D.startsWith(".")?w===D:w===`.${D}`)}if(n.accept){if(n.accept==="*/*")return!0;const x=n.accept.split(",").map(k=>k.trim().toLowerCase()),w=(C.type||"").toLowerCase(),D=f(C.name);return x.some(k=>{if(k.endsWith("/*")){const v=k.slice(0,-2);return w.startsWith(v)}return k.startsWith(".")?D===k:w===k})}return!0}function p(C){return C*1024*1024}async function y(C){return C?m(C)?n.minSizeMb!=null&&C.size<p(n.minSizeMb)?`Ukuran file terlalu kecil. Minimal ${n.minSizeMb}MB`:n.maxSizeMb!=null&&C.size>p(n.maxSizeMb)?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:null:`File Type not allowed. Allowed: ${h.value}`:"File tidak valid"}const{DCodeApi:b}=Qe(),g=ti(),_=t.ref(!1);async function E(C){var x;if(n.uploadFn){try{_.value=!0;const w=await n.uploadFn(C);a.value=C,r("uploaded",w)}catch(w){console.error("Upload Error",w),g.error("Upload Failed",(w==null?void 0:w.message)||"Unknown error"),l((w==null?void 0:w.message)||"Upload Failed")}finally{_.value=!1}return}if(!((x=n.endpoint)!=null&&x.apiUrl)){a.value=C;return}if(typeof b!="function"){l("useApi() must expose DCodeApi()");return}try{_.value=!0;const w=new FormData;w.append("doc",C);const D=(n.endpoint.apiMethod||"POST").toUpperCase(),k=n.endpoint.apiUrl,v=await b("","",w,{_url:k,_method:D,withCredentials:!0,transformRequest:[(N,V)=>(V&&(delete V["Content-Type"],delete V["content-type"]),N)]}),S=(v==null?void 0:v.data)??v;a.value=C,r("uploaded",S)}catch(w){console.error("Upload Error",w),g.error("Upload Failed",(w==null?void 0:w.message)||"Unknown error"),l((w==null?void 0:w.message)||"Upload Failed")}finally{_.value=!1}}async function B(C){var w;if(n.disabled)return;c();const x=await y(C);if(x){l(x);return}s.value=C,n.uploadFn||(w=n.endpoint)!=null&&w.apiUrl?await E(C):a.value=C}function A(){c(),a.value=null,s.value=null}return t.watch(()=>n.modelValue,C=>{C&&!s.value&&(s.value=C),C||(s.value=null)},{immediate:!0}),(C,x)=>(t.openBlock(),t.createElementBlock("div",LC,[a.value?_.value?(t.openBlock(),t.createElementBlock("div",RC,[...x[1]||(x[1]=[t.createElementVNode("span",{class:"text-sm text-muted-foreground dark:text-neutral-400 animate-pulse"},"Uploading...",-1)])])):(t.openBlock(),t.createBlock(ei,{key:2,file:a.value,title:e.label,description:e.hint,disabled:e.disabled,"show-edit":!1,"show-replace":!1,"show-remove":!0,"force-file-icon":!0,"preview-height":e.previewHeight,"preview-width":e.previewWidth,onRemove:A},null,8,["file","title","description","disabled","preview-height","preview-width"])):(t.openBlock(),t.createBlock(oa,{key:0,label:e.label,hint:e.hint,accept:u.value,maxSizeMb:e.maxSizeMb,disabled:e.disabled||_.value,onPicked:B,error:i.value,onError:x[0]||(x[0]=w=>l(w))},null,8,["label","hint","accept","maxSizeMb","disabled","error"]))]))}}),IC=["for"],FC={key:0,class:"!ml-1 !text-destructive"},zC={class:"relative w-full block box-border"},$C={key:0,class:"absolute inset-y-0 left-3 flex items-center text-muted-foreground pointer-events-none z-10"},jC=["id","readonly","disabled","placeholder"],UC={class:"absolute inset-y-0 right-4 flex items-center z-10"},WC={key:1,class:"absolute z-50 mt-1 w-full rounded-xl border bg-white dark:bg-neutral-800 border-neutral-200/60 dark:border-neutral-700/50 shadow-lg box-border"},HC={key:0,class:"flex items-center justify-center py-10 text-muted-foreground gap-2"},qC={key:1,class:"text-sm text-muted-foreground text-center"},GC=["onClick","title"],KC={class:"flex flex-col items-center justify-between gap-2 py-1 min-h-[72px]"},XC={class:"flex items-center justify-center flex-1"},YC={class:"text-[10px] leading-tight text-muted-foreground truncate w-full text-center block flex-shrink-0"},JC={key:3,class:"pt-2 text-[11px] text-muted-foreground text-center"},Df=t.defineComponent({name:"DCodeIconDropdown",__name:"DCodeIconDropdown",props:{modelValue:{},label:{},placeholder:{default:"Pilih icon…"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},columns:{default:4},maxHeight:{default:"335px"},iconSize:{default:20},pageSize:{default:120}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=e,r=o,a=Pt,s=t.ref(null),i=t.ref(null),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`dcode-icon-dropdown-${n.label||"icon-dropdown"}-${l}`),d=t.ref(!1),f=t.computed(()=>(n.modelValue??"").trim()||""),u=t.ref(""),h=t.ref(!1),m=t.ref(!1),p=t.ref(!1),y=t.shallowRef([]),b=t.ref(n.pageSize),g=new Set(["default","createLucideIcon","LucideIcon","Icon","icons","toKebabCase","camelCase","children","IconNode"]),_=async()=>{if(m.value||p.value)return;p.value=!0,await new Promise(I=>setTimeout(I,0));const M=Object.keys(a).filter(I=>!g.has(I)).filter(I=>/^[A-Z]/.test(I)).filter(I=>typeof a[I]=="function"||typeof a[I]=="object"&&a[I]).sort((I,K)=>I.localeCompare(K));y.value=M,m.value=!0,p.value=!1},E=t.computed(()=>f.value?Ao(f.value,a):null),B=t.ref(f.value),A=t.computed(()=>!!f.value&&!d.value),C=t.computed(()=>{if(!m.value)return[];const M=(u.value??"").trim().toLowerCase();return M?y.value.filter(I=>I.toLowerCase().includes(M)):y.value}),x=t.computed(()=>C.value.slice(0,b.value)),w=t.computed(()=>{const M=n.columns;return M<=2?"grid-cols-2":M===3?"grid-cols-3":M===4?"grid-cols-4":M===5?"grid-cols-5":M>=8?"grid-cols-8":"grid-cols-6"});t.computed(()=>n.clearable?"!pr-10":"!pr-3"),t.computed(()=>E.value&&!d.value?"!pl-12":"!pl-3");const D=async()=>{var M;await t.nextTick(),(M=i.value)==null||M.focus()},k=async M=>{if(n.disabled)return;const I=M!==!1;if(h.value){h.value=!1;return}d.value=!0,await _(),I&&(u.value="",B.value=""),b.value=n.pageSize,await D()},v=()=>{d.value=!1,u.value="",B.value=f.value,b.value=n.pageSize},S=async()=>{n.disabled||(d.value?v():await k())};let N=null;const V=async M=>{if(n.disabled)return;r("update:modelValue",null),d.value||await k(!1),N&&clearTimeout(N);const I=B.value;N=setTimeout(()=>{u.value=I},300)},L=M=>{n.disabled||(r("update:modelValue",M),v(),queueMicrotask(()=>{var I;return(I=i.value)==null?void 0:I.blur()}))},O=()=>{n.disabled||(r("update:modelValue",null),r("clear"),h.value=!0,v(),queueMicrotask(()=>{var M;return(M=i.value)==null?void 0:M.focus()}))},P=M=>{if(M.key==="Escape"){M.preventDefault(),v();return}if(M.key==="Enter"&&d.value){const I=C.value[0];I&&(M.preventDefault(),L(I))}},R=M=>{if(!d.value)return;const I=M.target;s.value&&!s.value.contains(I)&&v()},j=M=>{const I=M.target;I.scrollTop+I.clientHeight>=I.scrollHeight-24&&b.value<C.value.length&&(b.value=Math.min(b.value+n.pageSize,C.value.length))};return t.onMounted(()=>{document.addEventListener("mousedown",R),queueMicrotask(()=>{var M;i.value=((M=s.value)==null?void 0:M.querySelector("input"))??null}),f.value&&_()}),t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",R),N&&clearTimeout(N)}),t.watch(f,M=>{d.value||(B.value=M)}),t.watch(()=>u.value,()=>{b.value=n.pageSize}),(M,I)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"rootEl",ref:s,class:"!w-full !block !box-border"},[n.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:c.value,class:"!text-sm !font-medium !mb-1 !block"},[t.createTextVNode(t.toDisplayString(n.label)+" ",1),n.required?(t.openBlock(),t.createElementBlock("span",FC,"*")):t.createCommentVNode("",!0)],8,IC)):t.createCommentVNode("",!0),t.createElementVNode("div",zC,[E.value&&!d.value?(t.openBlock(),t.createElementBlock("div",$C,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(E.value),{size:18}))])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("input",{id:c.value,"onUpdate:modelValue":I[0]||(I[0]=K=>B.value=K),readonly:A.value,disabled:n.disabled,placeholder:n.placeholder,class:t.normalizeClass(["w-full h-10 m-0 py-0 rounded-lg border bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 pr-10 outline-none box-border truncate",[E.value&&!d.value?"pl-10":"pl-4",A.value?"cursor-pointer select-none":""]]),onClick:k,onFocus:k,onInput:V,onKeydown:P},null,42,jC),[[t.vModelText,B.value]]),t.createElementVNode("div",UC,[n.clearable&&f.value?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"flex items-center justify-center p-1 m-0 bg-transparent border-0 text-muted-foreground hover:text-foreground transition cursor-pointer outline-none",onMousedown:I[1]||(I[1]=t.withModifiers(()=>{},["prevent"])),onClick:O,title:"Clear"},[t.createVNode(t.unref(ne.X),{class:"h-4 w-4"})],32)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:"flex items-center justify-center p-1 m-0 bg-transparent border-0 text-muted-foreground hover:text-foreground transition-transform cursor-pointer outline-none",onMousedown:I[2]||(I[2]=t.withModifiers(()=>{},["prevent"])),onClick:S,title:"Open"},[t.createVNode(t.unref(ne.ChevronDown),{class:"h-4 w-4"})],32))]),d.value?(t.openBlock(),t.createElementBlock("div",WC,[t.createElementVNode("div",{class:"p-2 overflow-auto",style:t.normalizeStyle({maxHeight:n.maxHeight}),onScroll:j},[p.value?(t.openBlock(),t.createElementBlock("div",HC,[t.createVNode(t.unref(ne.Loader2),{class:"h-4 w-4 animate-spin"}),I[3]||(I[3]=t.createElementVNode("span",{class:"text-sm"},"Loading icons…",-1))])):m.value&&C.value.length===0?(t.openBlock(),t.createElementBlock("div",qC," Icon tidak ditemukan ")):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["grid gap-2",w.value])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(x.value,K=>(t.openBlock(),t.createElementBlock("button",{key:K,type:"button",class:t.normalizeClass(["group rounded-lg border p-2 hover:bg-muted/40 transition",f.value===K?"ring-1 ring-primary":""]),onClick:H=>L(K),title:K},[t.createElementVNode("div",KC,[t.createElementVNode("div",XC,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(a)[K]),{size:n.iconSize,class:"shrink-0"},null,8,["size"]))]),t.createElementVNode("span",YC,t.toDisplayString(K),1)])],10,GC))),128))],2)),m.value&&C.value.length>0?(t.openBlock(),t.createElementBlock("div",JC," Showing "+t.toDisplayString(x.value.length)+" / "+t.toDisplayString(C.value.length),1)):t.createCommentVNode("",!0)],36)])):t.createCommentVNode("",!0)])],512))}}),QC={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6"},ZC={class:"flex items-center justify-between border-b dark:border-neutral-700/50 px-6 py-4"},e_={class:"relative overflow-auto p-0"},oi=t.defineComponent({name:"DCodeImageCropperDialog",inheritAttrs:!1,__name:"DCodeImageCropperDialog",props:{modelValue:{type:Boolean},file:{},title:{default:"Resize & Crop Gambar"},description:{default:""},aspectRatio:{default:null},outputWidth:{default:null},outputHeight:{default:null},quality:{default:.92},autoOpenEditor:{type:Boolean,default:!1}},emits:["update:modelValue","done","cancel"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:E=>r("update:modelValue",E)}),s=t.ref(null),i=t.ref(null);let l=null,c=!1,d=0,f=null;function u(){if(l){try{l.close()}catch{}l=null,f&&(f.disconnect(),f=null),s.value&&(s.value.innerHTML=""),i.value=null}}async function h(E,B,A,C,x){const w=await new Promise((v,S)=>{const N=URL.createObjectURL(E),V=new Image;V.onload=()=>{URL.revokeObjectURL(N),v(V)},V.onerror=L=>{URL.revokeObjectURL(N),S(L)},V.src=N}),D=document.createElement("canvas");D.width=B,D.height=A;const k=D.getContext("2d");return k?(k.drawImage(w,0,0,B,A),await new Promise(v=>{D.toBlob(S=>v(S||E),C,x)})):E}function m(){if(!l||!i.value)return;const E=l.getPlugin("Dashboard"),B=l.getFile(i.value);!E||!B||requestAnimationFrame(()=>{try{E.openFileEditor(B)}catch{try{E.openFileEditor(i.value)}catch{}}})}async function p(E){if(l){l.cancelAll(),i.value=null;try{const B=l.addFile({name:E.name,type:E.type,data:E,source:"Local",isRemote:!1});i.value=String(B)}catch{}}}function y(){if(!s.value)return;l&&u(),l=new _u({autoProceed:!1,restrictions:{maxNumberOfFiles:1,allowedFileTypes:["image/*"]}});const E=document.documentElement.classList.contains("dark");l.use(Di,{target:s.value,inline:!0,height:480,theme:E?"dark":"light",proudlyDisplayPoweredByUppy:!1,hideUploadButton:!0,hideRetryButton:!0,hidePauseResumeButton:!0,hideCancelButton:!0,showProgressDetails:!1}),f=new MutationObserver(()=>{if(!l)return;const B=document.documentElement.classList.contains("dark"),A=l.getPlugin("Dashboard");A&&A.setOptions({theme:B?"dark":"light"})}),f.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),l.use(Eu,{target:Di,quality:n.quality,cropperOptions:{viewMode:1,dragMode:"move",autoCropArea:1,aspectRatio:n.aspectRatio==null?Number.NaN:n.aspectRatio}}),l.on("file-editor:cancel",()=>{a.value=!1}),l.on("file-added",B=>{i.value=(B==null?void 0:B.id)??null,n.autoOpenEditor&&setTimeout(()=>m(),80)}),l.on("file-editor:complete",async B=>{const A=++d;try{const C=B.data,x=C.type||B.type||"image/jpeg";let w=C;if(n.outputWidth&&n.outputHeight&&(w=await h(C,n.outputWidth,n.outputHeight,x,n.quality)),c||A!==d)return;const D=B.name||"edited-image.jpg",k=new File([w],D,{type:x});await b(k,"UPPY_EDITOR_COMPLETE"),r("done",k),a.value=!1}catch{}})}async function b(E,B="CROP_RESULT"){const A=URL.createObjectURL(E);try{const C=await new Promise((x,w)=>{const D=new Image;D.onload=()=>x(D),D.onerror=w,D.src=A});console.group(B),console.log("file:",E),console.table({name:E.name,type:E.type,sizeBytes:E.size,sizeMB:+(E.size/1024/1024).toFixed(3),width:C.naturalWidth,height:C.naturalHeight,ratio:+(C.naturalWidth/C.naturalHeight).toFixed(4)}),console.log("previewUrl:",A),console.groupEnd()}finally{URL.revokeObjectURL(A)}}t.watch(a,async E=>{c=!E,d++,E?(await t.nextTick(),y(),n.file&&await p(n.file)):u()},{flush:"post"}),t.watch(()=>n.file,async E=>{a.value&&E&&(await t.nextTick(),await p(E))}),t.onBeforeUnmount(()=>{c=!0,d++,u()});const g=E=>{E.key==="Escape"&&a.value&&(a.value=!1)};t.watch(a,E=>{E?globalThis.addEventListener("keydown",g):globalThis.removeEventListener("keydown",g)},{immediate:!0});const _=t.ref(!1);return(E,B)=>a.value?(t.openBlock(),t.createElementBlock("div",QC,[t.createVNode(t.Transition,{appear:"","enter-active-class":"duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fixed inset-0 bg-black/60 backdrop-blur-sm transition-opacity",onClick:B[0]||(B[0]=A=>a.value=!1)})):t.createCommentVNode("",!0)]),_:1}),t.createVNode(t.Transition,{appear:"","enter-active-class":"duration-300 ease-out","enter-from-class":"opacity-0 scale-95 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 scale-100 translate-y-0 sm:scale-100","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100 scale-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 scale-95 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"relative flex w-fit max-w-4xl flex-col overflow-hidden rounded-xl border border-border dark:border-neutral-700/50 bg-background dark:bg-neutral-800 shadow-2xl transition-all",onClick:B[4]||(B[4]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",ZC,[B[6]||(B[6]=t.createElementVNode("h3",{class:"text-lg font-semibold leading-none tracking-tight dark:text-neutral-100"}," Crop & Resize ",-1)),t.createElementVNode("button",{class:"d-close-btn rounded-sm dark:text-neutral-400 ring-offset-background transition-opacity focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",style:t.normalizeStyle({opacity:_.value?1:.7}),onClick:B[1]||(B[1]=A=>a.value=!1),onMouseenter:B[2]||(B[2]=A=>_.value=!0),onMouseleave:B[3]||(B[3]=A=>_.value=!1)},[t.createVNode(t.unref(ne.X),{class:"h-4 w-4"}),B[5]||(B[5]=t.createElementVNode("span",{class:"sr-only"},"Close",-1))],36)]),t.createElementVNode("div",e_,[t.createElementVNode("div",{ref_key:"dashboardEl",ref:s,class:"uppy-wrap"},null,512)])])):t.createCommentVNode("",!0)]),_:1})])):t.createCommentVNode("",!0)}}),t_={key:0,class:"text-xs text-muted-foreground dark:text-neutral-400"},o_=["src"],n_=["disabled"],r_=["disabled"],a_={class:"text-[11px] text-foreground/90 dark:text-neutral-200 space-y-1 whitespace-nowrap"},s_={class:"flex gap-2"},i_={class:"font-medium truncate"},l_={class:"flex gap-2"},c_={class:"font-medium"},d_={class:"flex gap-2"},f_={class:"font-medium truncate"},ni=lt(t.defineComponent({name:"DCodeImageResult",__name:"DCodeImageResult",props:{file:{},title:{default:"Hasil Gambar"},description:{default:""},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:220},showEdit:{type:Boolean,default:!0},showReplace:{type:Boolean,default:!0},showRemove:{type:Boolean,default:!0}},emits:["edit","replace","remove"],setup(e,{emit:o}){const n=e,r=o,a=t.ref(null);t.watch(()=>n.file,h=>{a.value&&URL.revokeObjectURL(a.value),a.value=h?URL.createObjectURL(h):null},{immediate:!0}),t.onBeforeUnmount(()=>{a.value&&URL.revokeObjectURL(a.value),d&&d.disconnect()});function s(h){const m=h/1024,p=m/1024;return p>=1?`${p.toFixed(2)} MB`:m>=1?`${m.toFixed(1)} KB`:`${h} B`}const i=t.computed(()=>n.file?{name:n.file.name,size:s(n.file.size),type:n.file.type||"unknown"}:null),l=t.ref(!1),c=t.ref(!1);let d=null;const f=()=>{typeof document<"u"&&(c.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{f(),typeof document<"u"&&(d=new MutationObserver(f),d.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),d.observe(document.body,{attributes:!0,attributeFilter:["class"]}))});const u=t.computed(()=>n.disabled||!l.value?{}:{borderColor:c.value?"hsl(var(--primary) / 0.4)":"hsl(var(--primary) / 0.5)",backgroundColor:c.value?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"});return(h,m)=>e.file?(t.openBlock(),t.createBlock(Ys,{key:0,class:t.normalizeClass([e.disabled?"opacity-60 pointer-events-none":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:t.withCtx(()=>[t.createVNode(Qs,{class:"pb-2"},{default:t.withCtx(()=>[t.createVNode(Zs,{class:"text-sm font-semibold dark:text-neutral-100"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1}),e.description?(t.openBlock(),t.createElementBlock("div",t_,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)]),_:1}),t.createVNode(Js,{class:"pt-2"},{default:t.withCtx(()=>{var p,y,b;return[t.createElementVNode("div",{class:"d-result-preview-wrap relative rounded-xl overflow-hidden border-2 border-dashed transition-colors duration-200 bg-muted dark:bg-neutral-900/30 border-border dark:border-neutral-700/50 w-full",style:t.normalizeStyle([{height:`${e.previewHeight}px`},u.value]),onMouseenter:m[2]||(m[2]=g=>l.value=!0),onMouseleave:m[3]||(m[3]=g=>l.value=!1)},[a.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:a.value,alt:"Preview",class:"h-full w-full object-contain"},null,8,o_)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"d-action-buttons",style:t.normalizeStyle({position:"absolute",top:"8px",left:"8px",right:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",zIndex:50,opacity:l.value?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:l.value?"auto":"none"})},[e.showEdit?(t.openBlock(),t.createElementBlock("button",{key:0,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#eab308",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}),onClick:m[0]||(m[0]=g=>r("edit"))},[t.createVNode(t.unref(ne.Pencil),{style:{width:"16px",height:"16px"}})],12,n_)):t.createCommentVNode("",!0),e.showRemove?(t.openBlock(),t.createElementBlock("button",{key:1,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}),onClick:m[1]||(m[1]=g=>r("remove"))},[t.createVNode(t.unref(ne.Trash2),{style:{width:"16px",height:"16px"}})],12,r_)):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:"d-metadata-overlay",style:t.normalizeStyle({position:"absolute",left:"8px",bottom:"8px",zIndex:10,display:"inline-block",maxWidth:"calc(100% - 16px)",borderRadius:"12px",border:"1px solid rgba(0,0,0,0.1)",padding:"8px 12px",boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1)",backdropFilter:"blur(8px)",transition:"all 0.2s ease-in-out",opacity:l.value?1:0,transform:l.value?"translateY(0) scale(1)":"translateY(4px) scale(0.99)",backgroundColor:c.value?"rgba(38, 38, 38, 0.8)":"rgba(255, 255, 255, 0.8)",color:c.value?"#e5e5e5":"#171717"})},[t.createElementVNode("div",a_,[t.createElementVNode("div",s_,[m[4]||(m[4]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Nama",-1)),t.createElementVNode("span",i_,t.toDisplayString((p=i.value)==null?void 0:p.name),1)]),t.createElementVNode("div",l_,[m[5]||(m[5]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Ukuran",-1)),t.createElementVNode("span",c_,t.toDisplayString((y=i.value)==null?void 0:y.size),1)]),t.createElementVNode("div",d_,[m[6]||(m[6]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Tipe",-1)),t.createElementVNode("span",f_,t.toDisplayString((b=i.value)==null?void 0:b.type),1)])])],4)],36)]}),_:1})]),_:1},8,["class"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-e1d893ab"]]),u_={class:"space-y-3"},na=t.defineComponent({name:"DCodeImageField",inheritAttrs:!1,__name:"DCodeImageField",props:{modelValue:{default:null},label:{default:"Upload Gambar"},hint:{default:"Drag & drop atau klik area ini"},disabled:{type:Boolean,default:!1},allowedTypes:{default:null},accept:{default:"image/*"},minSizeMb:{default:null},maxSizeMb:{default:1},title:{default:"Hasil Gambar"},description:{default:""},previewWidth:{default:360},previewHeight:{default:220},aspectRatio:{default:null},outputWidth:{default:null},outputHeight:{default:null},quality:{default:.92},autoOpenEditor:{type:Boolean,default:!0},minWidth:{default:null},minHeight:{default:null},maxWidth:{default:null},maxHeight:{default:null},endpoint:{},uploadFn:{},editUseOriginal:{type:Boolean,default:!1}},emits:["update:modelValue","error","uploaded"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:O=>r("update:modelValue",O)}),s=t.ref(!1),i=t.ref(null),l=t.ref(null),c=t.ref(null);function d(O){c.value=O,r("error",O)}function f(){c.value=null}const u=t.computed(()=>{const O=(n.allowedTypes??"").trim();return O?O.split(/[,\s;]+/g).map(R=>R.trim().toLowerCase()).filter(Boolean).map(R=>R.includes("/")||R.startsWith(".")?R:`.${R}`):[]});function h(O){const P=O.lastIndexOf(".");return P>=0?O.slice(P).toLowerCase():""}const m=t.computed(()=>{if(u.value.length){const O=u.value.filter(R=>R.startsWith("."));return[...u.value.filter(R=>R.includes("/")),...O].join(",")}return n.accept||"image/*"}),p=t.computed(()=>u.value.length?u.value.join(", "):n.accept||"image/*");function y(O){if(u.value.length){const R=(O.type||"").toLowerCase(),j=h(O.name);return u.value.some(M=>M.includes("/")?R===M:M.startsWith(".")?j===M:j===`.${M}`)}return(n.accept||"image/*").toLowerCase().includes("image/")?(O.type||"").toLowerCase().startsWith("image/"):!0}function b(O){return O*1024*1024}async function g(O){var P;return(P=O.type)!=null&&P.startsWith("image/")?await new Promise(R=>{const j=URL.createObjectURL(O),M=new Image;M.onload=()=>{URL.revokeObjectURL(j),R({w:M.naturalWidth,h:M.naturalHeight})},M.onerror=()=>{URL.revokeObjectURL(j),R(null)},M.src=j}):null}async function _(O){if(!(n.minWidth!=null||n.minHeight!=null||n.maxWidth!=null||n.maxHeight!=null))return null;const R=await g(O);return R?n.minWidth!=null&&R.w<n.minWidth?`Lebar gambar minimal ${n.minWidth}px`:n.minHeight!=null&&R.h<n.minHeight?`Tinggi gambar minimal ${n.minHeight}px`:n.maxWidth!=null&&R.w>n.maxWidth?`Lebar gambar maksimal ${n.maxWidth}px`:n.maxHeight!=null&&R.h>n.maxHeight?`Tinggi gambar maksimal ${n.maxHeight}px`:null:"Gagal membaca dimensi gambar"}async function E(O){return O?y(O)?n.minSizeMb!=null&&O.size<b(n.minSizeMb)?`Ukuran file terlalu kecil. Minimal ${n.minSizeMb}MB`:n.maxSizeMb!=null&&O.size>b(n.maxSizeMb)?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:await _(O):`only Allowed: ${p.value}`:"File tidak valid"}function B(O){n.disabled||(i.value=O,s.value=!0)}async function A(O){if(n.disabled)return;f();const P=await E(O);if(P){d(P);return}l.value=O,B(O)}const{DCodeApi:C}=Qe(),x=ti(),w=t.ref(!1);t.ref(null);function D(O,P){return!O||!P?null:O.replace(/\/+$/,"")+"/"+P.replace(/^\/+/,"")}function k(O){var M;const P=(O==null?void 0:O.data)??O,R=(M=P==null?void 0:P.data)==null?void 0:M[0];if(!R)return null;const j=D(R.server,R.url);return{...R,fullUrl:j?encodeURI(j):null}}async function v(O){var P;if(n.uploadFn){try{w.value=!0;const R=await n.uploadFn(O);a.value=O,r("uploaded",R)}catch(R){console.error("Upload Error",R),x.error("Upload Failed",(R==null?void 0:R.message)||"Unknown error"),d((R==null?void 0:R.message)||"Upload Failed")}finally{w.value=!1}return}if(!((P=n.endpoint)!=null&&P.apiUrl)){a.value=O;return}if(typeof C!="function"){d("useApi() must expose DCodeApi()");return}try{w.value=!0;const R=new FormData;R.append("doc",O);const j=(n.endpoint.apiMethod||"POST").toUpperCase(),M=n.endpoint.apiUrl,I=await C("","",R,{_url:M,_method:j,withCredentials:!0,transformRequest:[(H,W)=>(W&&(delete W["Content-Type"],delete W["content-type"]),H)]}),K=(I==null?void 0:I.data)??I;k(K),a.value=O,r("uploaded",K)}catch(R){console.error("Upload Error",R),x.error("Upload Failed",(R==null?void 0:R.message)||"Unknown error"),d((R==null?void 0:R.message)||"Upload Failed")}finally{w.value=!1}}async function S(O){var P;f(),n.uploadFn||(P=n.endpoint)!=null&&P.apiUrl?await v(O):a.value=O,s.value=!1,i.value=null}function N(){s.value=!1,i.value=null}async function V(){if(!a.value)return;f();const O=n.editUseOriginal?l.value??a.value:a.value,P=await E(O);if(P){d(P);return}B(O)}function L(){f(),a.value=null,i.value=null,s.value=!1,l.value=null}return t.watch(()=>n.modelValue,O=>{O&&!l.value&&(l.value=O),O||(l.value=null)},{immediate:!0}),(O,P)=>(t.openBlock(),t.createElementBlock("div",u_,[a.value?(t.openBlock(),t.createBlock(ni,{key:1,file:a.value,title:e.label,description:e.description,"preview-width":e.previewWidth,disabled:e.disabled,"show-edit":!0,"show-remove":!0,"show-replace":!1,onEdit:V,onRemove:L,"aspect-ratio":16/9},null,8,["file","title","description","preview-width","disabled"])):(t.openBlock(),t.createBlock(oa,{key:0,label:e.label,hint:e.hint,accept:m.value,maxSizeMb:e.maxSizeMb,disabled:e.disabled,onPicked:A,error:c.value,onError:P[0]||(P[0]=R=>d(R))},null,8,["label","hint","accept","maxSizeMb","disabled","error"])),t.createVNode(oi,{modelValue:s.value,"onUpdate:modelValue":P[1]||(P[1]=R=>s.value=R),file:i.value,title:e.title,description:e.description,"auto-open-editor":e.autoOpenEditor,"aspect-ratio":e.aspectRatio,"output-width":e.outputWidth,"output-height":e.outputHeight,quality:e.quality,onDone:S,onCancel:N},null,8,["modelValue","file","title","description","auto-open-editor","aspect-ratio","output-width","output-height","quality"])]))}}),h_=["aria-busy"],m_={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},p_=["for"],g_={key:0,class:"ml-1 text-destructive"},b_=["id","disabled"],y_={class:"min-w-0 flex-1 text-left"},x_={key:0,class:"flex flex-wrap gap-1.5"},k_={class:"max-w-[220px] truncate"},w_=["onClick"],C_={key:0,class:"inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 border-transparent"},__={key:1,class:"text-muted-foreground truncate"},E_={class:"flex items-center gap-2 shrink-0"},B_={key:0,class:"p-2 border-b border-gray-200 dark:border-gray-800"},S_=["placeholder","onKeydown"],A_={key:0,class:"h-full flex items-center justify-center px-3 text-sm text-muted-foreground"},v_=["disabled","onClick"],D_={class:"truncate"},N_={key:0,class:"text-primary-600 dark:text-primary-400"},V_={key:1,class:"h-full flex items-center justify-center text-sm text-muted-foreground"},M_={key:0},T_={key:1},P_={key:1,class:"text-xs text-destructive"},ri=t.defineComponent({name:"DCodeMultiSelect",inheritAttrs:!1,__name:"DCodeMultiSelect",props:{modelValue:{},items:{default:()=>[]},endpoint:{default:void 0},fetchItems:{},autoFetchOnOpen:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!1},refreshOnOpen:{type:Boolean,default:!1},label:{default:""},placeholder:{default:"Pilih data…"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},searchPlaceholder:{default:"Cari…"},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},maxChips:{default:5},maxSelected:{default:5},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},returnObject:{type:Boolean,default:!1},virtual:{type:Boolean,default:!0},itemHeight:{default:40},maxRows:{default:5},overscan:{default:6},error:{default:null},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","clear","max"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.computed(()=>(a.label||n.label)??void 0),i=t.computed(()=>a.visible??!0),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`app-multiselect-${n.id||s.value||"field"}-${l}`),d=t.computed(()=>{if(a.required)return!0;const G=n.required,ee=n["aria-required"];return G===""||G===!0||G==="true"||(ee==="true"||ee===!0)}),f=t.computed(()=>!!a.error);function u(G){return G?typeof a.itemTitle=="function"?a.itemTitle(G)??"":String((G==null?void 0:G[a.itemTitle])??""):""}function h(G){return G?typeof a.itemValue=="function"?a.itemValue(G):G==null?void 0:G[a.itemValue]:null}function m(G,ee){return h(G)??ee}const p=t.computed(()=>Array.isArray(a.modelValue)?a.modelValue:[]),y=t.computed(()=>{var G;return!!((G=a.endpoint)!=null&&G.apiUrl)||!!a.fetchItems}),b=t.ref([]),g=t.ref(!1),_=t.ref(!1),E=t.computed(()=>{var ee;const G=(ee=a.endpoint)==null?void 0:ee.apiOptions;if(G)return typeof G=="function"?G():G}),B=t.computed(()=>{var ye,Ge;const G=((ye=a.endpoint)==null?void 0:ye.apiUrl)??"",ee=(((Ge=a.endpoint)==null?void 0:Ge.apiMethod)??"GET").toUpperCase(),ae=JSON.stringify(E.value??null);return`${ee} ${G} :: ${ae}`}),A=t.computed(()=>y.value?b.value:a.items||[]);async function C(){var G;if(y.value&&!(!((G=a.endpoint)!=null&&G.apiUrl)&&!a.fetchItems)&&!g.value){g.value=!0;try{let ee;if(a.fetchItems){const ae=await a.fetchItems(),ye=(ae==null?void 0:ae.data)??ae;ee=(ye==null?void 0:ye.data)??ye}else{const{DCodeApi:ae}=Qe();if(typeof ae!="function"){console.error("[DCodeMultiSelectChips] useApi() must expose DCodeApi()");return}const ye={page:1,perPage:100,...E.value||{}},Ge=await ae("","",ye,{_url:a.endpoint.apiUrl,_method:(a.endpoint.apiMethod||"GET").toUpperCase()}),Tt=(Ge==null?void 0:Ge.data)??Ge;ee=(Tt==null?void 0:Tt.data)??Tt}b.value=Array.isArray(ee)?ee:[],_.value=!0}catch(ee){console.error("[DCodeMultiSelectChips][fetchOptions] ERROR:",ee),b.value=[]}finally{g.value=!1}}}t.watch(()=>B.value,()=>{b.value=[],_.value=!1}),t.onMounted(()=>{a.autoFetchOnMount&&y.value&&C()});const x=t.computed(()=>{const G=p.value;if(a.returnObject)return G;const ee=new Map;for(const ae of A.value)ee.set(h(ae),ae);return G.map(ae=>ee.get(ae)??{[a.itemValue]:ae,[a.itemTitle]:String(ae)})}),w=t.computed(()=>a.maxChips===null?x.value:x.value.slice(0,a.maxChips));function D(G){const ee=p.value;if(a.returnObject){const ae=h(G);return ee.some(ye=>h(ye)===ae)}return ee.includes(h(G))}const k=t.computed(()=>{if(a.maxSelected===null||a.maxSelected===void 0)return null;const G=Number(a.maxSelected);return Number.isFinite(G)&&G>0?G:null}),v=t.computed(()=>{const G=k.value;return G===null?!1:p.value.length>=G});function S(G){return!D(G)&&v.value}const N=t.computed(()=>{const G=p.value,ee=new Set;if(a.returnObject)for(const ae of G)ee.add(h(ae));else for(const ae of G)ee.add(ae);return ee}),V=t.computed(()=>{const G=N.value;return(A.value||[]).filter(ee=>!G.has(h(ee)))}),L=t.computed(()=>A.value.length===0?!1:V.value.length===0),O=t.ref(null),P=t.ref(null),R=t.ref(null),j=t.ref(!1),M=t.ref(""),I=t.ref(0),K=t.ref(0),{floatingStyles:H}=za(O,P,{whileElementsMounted:Oa,placement:"bottom-start",middleware:[La(8),Ia(),Ra({padding:8}),Fa({apply({rects:G,elements:ee}){Object.assign(ee.floating.style,{width:`${G.reference.width}px`,"--floating-width":`${G.reference.width}px`})}})]}),W=t.computed(()=>H.value),Z=t.computed(()=>{const G=Number(a.maxRows);return Number.isFinite(G)&&G>0?G:5});async function te(){a.disabled||a.readonly||(j.value=!0,K.value=0,requestAnimationFrame(()=>{R.value&&(R.value.scrollTop=0),I.value=0}),y.value&&a.autoFetchOnOpen&&(a.refreshOnOpen||!_.value)&&!g.value&&await C())}function ie(){j.value=!1}function Ae(){j.value?ie():te()}function ke(G){var ae,ye;if(!j.value)return;const ee=G.target;(ae=O.value)!=null&&ae.contains(ee)||(ye=P.value)!=null&&ye.contains(ee)||ie()}t.onMounted(()=>document.addEventListener("mousedown",ke)),t.onBeforeUnmount(()=>document.removeEventListener("mousedown",ke));function J(G){if(a.disabled||a.readonly)return;if(S(G)){r("max");return}const ee=[...p.value];if(a.returnObject){const ae=h(G);if(ee.some(Ge=>h(Ge)===ae))return;r("update:modelValue",[...ee,G])}else{const ae=h(G);if(ee.includes(ae))return;r("update:modelValue",[...ee,ae])}M.value="",K.value=0,requestAnimationFrame(()=>{R.value&&(R.value.scrollTop=0),I.value=0})}function $(G){if(a.disabled||a.readonly)return;const ee=[...p.value];if(a.returnObject){const ae=h(G);r("update:modelValue",ee.filter(ye=>h(ye)!==ae))}else{const ae=h(G);r("update:modelValue",ee.filter(ye=>ye!==ae))}}function X(){a.disabled||a.readonly||(r("update:modelValue",[]),r("clear"),ie())}const re=t.computed(()=>{const G=M.value.trim().toLowerCase(),ee=V.value;return G?ee.filter(ae=>u(ae).toLowerCase().includes(G)):ee}),me=t.computed(()=>re.value.length);t.watch(j,G=>{G||(M.value="")});const De=t.computed(()=>{if(L.value)return a.itemHeight;const G=me.value;return(G<=0?1:Math.min(G,Z.value))*a.itemHeight}),Ee=t.computed(()=>a.virtual?me.value*a.itemHeight:0),We=t.computed(()=>a.virtual?Math.ceil(De.value/a.itemHeight)+a.overscan:me.value),Te=t.computed(()=>{if(!a.virtual)return 0;const G=Math.floor(I.value/a.itemHeight)-Math.floor(a.overscan/2);return Math.max(0,G)}),he=t.computed(()=>a.virtual?Math.min(me.value,Te.value+We.value):me.value),Oe=t.computed(()=>a.virtual?Te.value*a.itemHeight:0),Pe=t.computed(()=>{const G=re.value;return a.virtual?G.slice(Te.value,he.value):G});function Be(G){const ee=G.target;I.value=ee.scrollTop}function Fe(G){return G===K.value}function q(G){const ee=R.value;if(!ee||!a.virtual)return;const ae=G*a.itemHeight,ye=ae+a.itemHeight,Ge=ee.scrollTop,Tt=ee.scrollTop+ee.clientHeight;ae<Ge?ee.scrollTop=ae:ye>Tt&&(ee.scrollTop=ye-ee.clientHeight)}function se(G){const ee=Math.max(0,me.value-1);K.value=Math.min(ee,Math.max(0,K.value+G)),q(K.value)}function de(){const G=re.value[K.value];G&&J(G)}const oe=t.computed(()=>a.clearable&&!a.disabled&&!a.readonly&&x.value.length>0),le=t.computed(()=>f.value?"border-destructive ring-1 ring-destructive":j.value?"border-neutral-400 ring-1 ring-neutral-400 dark:border-neutral-600 dark:ring-neutral-600":"");return(G,ee)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.value?(t.openBlock(),t.createElementBlock("div",m_)):t.createCommentVNode("",!0),ee[3]||(ee[3]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:c.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(s.value)+" ",1),d.value?(t.openBlock(),t.createElementBlock("span",g_,"*")):t.createCommentVNode("",!0)],8,p_)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"referenceEl",ref:O,class:"relative"},[t.createElementVNode("button",{id:c.value,type:"button",class:t.normalizeClass(["w-full justify-between h-auto min-h-10 px-3 py-2 transition border rounded-lg flex items-center",["bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 text-foreground dark:text-gray-300",a.disabled?"cursor-not-allowed opacity-50":a.readonly?"cursor-default bg-neutral-50/50 dark:bg-neutral-900/30":"",le.value]]),disabled:a.disabled||a.readonly,onClick:Ae},[t.createElementVNode("div",y_,[x.value.length?(t.openBlock(),t.createElementBlock("div",x_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,(ae,ye)=>(t.openBlock(),t.createElementBlock("div",{key:`chip-${m(ae,ye)}`,class:"inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 border-transparent gap-1"},[t.createElementVNode("span",k_,t.toDisplayString(u(ae)),1),a.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,class:"ml-1 opacity-70 hover:opacity-100",onClick:t.withModifiers(Ge=>$(ae),["stop"]),"aria-label":"Remove"}," ✕ ",8,w_))]))),128)),a.maxChips!==null&&x.value.length>a.maxChips?(t.openBlock(),t.createElementBlock("div",C_," +"+t.toDisplayString(x.value.length-(a.maxChips??0)),1)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",__,t.toDisplayString(a.placeholder),1))]),t.createElementVNode("div",E_,[oe.value?(t.openBlock(),t.createElementBlock("button",{key:0,class:"text-muted-foreground hover:text-foreground",onClick:t.withModifiers(X,["stop"]),"aria-label":"Clear"}," ✕ ")):t.createCommentVNode("",!0),t.createVNode(t.unref(ne.ChevronDown),{class:"h-4 w-4 text-muted-foreground"})])],10,b_),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[j.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"floatingEl",ref:P,class:"-mt-1 z-[9999] w-[var(--floating-width)] rounded-lg border shadow-lg overflow-hidden bg-white dark:bg-neutral-800 border-gray-200 dark:border-neutral-700/50",style:t.normalizeStyle(W.value)},[a.searchable&&!L.value?(t.openBlock(),t.createElementBlock("div",B_,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":ee[0]||(ee[0]=ae=>M.value=ae),placeholder:a.searchPlaceholder,class:"w-full h-10 px-3 py-2 text-sm bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700/50 rounded-md focus:outline-none focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600",onKeydown:[ee[1]||(ee[1]=t.withKeys(t.withModifiers(ae=>se(1),["prevent"]),["down"])),ee[2]||(ee[2]=t.withKeys(t.withModifiers(ae=>se(-1),["prevent"]),["up"])),t.withKeys(t.withModifiers(de,["prevent"]),["enter"]),t.withKeys(t.withModifiers(ie,["prevent"]),["esc"])]},null,40,S_),[[t.vModelText,M.value]])])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"listEl",ref:R,class:"relative overflow-auto",style:t.normalizeStyle({height:De.value+"px"}),onScroll:Be},[L.value?(t.openBlock(),t.createElementBlock("div",A_," All items have been selected ")):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[a.virtual?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle({height:Ee.value+"px"})},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(a.virtual?"absolute left-0 top-0 w-full":""),style:t.normalizeStyle(a.virtual?{transform:`translateY(${Oe.value}px)`}:void 0)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Pe.value,(ae,ye)=>(t.openBlock(),t.createElementBlock("button",{key:String(m(ae,Te.value+ye)),type:"button",class:t.normalizeClass(["w-full px-3 text-left text-sm flex items-center justify-between gap-3",[S(ae)?"cursor-not-allowed opacity-50":"hover:bg-neutral-50 dark:hover:bg-neutral-800/60",Fe(Te.value+ye)?"bg-neutral-50 dark:bg-neutral-800/60":"",D(ae)?"font-semibold":"font-normal"]]),style:t.normalizeStyle({height:a.itemHeight+"px"}),disabled:a.disabled||S(ae),onClick:Ge=>J(ae)},[t.createElementVNode("span",D_,t.toDisplayString(u(ae)),1),D(ae)?(t.openBlock(),t.createElementBlock("span",N_,"✓")):t.createCommentVNode("",!0)],14,v_))),128))],6),me.value===0?(t.openBlock(),t.createElementBlock("div",V_,[g.value?(t.openBlock(),t.createElementBlock("span",M_,"Loading data…")):(t.openBlock(),t.createElementBlock("span",T_,"Tidak ada data"))])):t.createCommentVNode("",!0)],64))],36)],4)):t.createCommentVNode("",!0)]))],512),f.value?(t.openBlock(),t.createElementBlock("p",P_,t.toDisplayString(a.error),1)):t.createCommentVNode("",!0)],64))],10,h_)),[[t.vShow,i.value]])}}),O_={class:"space-y-4"},L_={key:0,class:"flex flex-col gap-0.5"},R_=["for"],I_=["for"],F_={class:"text-[11px] text-gray-500 dark:text-gray-400"},z_={class:"flex items-center gap-2 flex-nowrap"},$_=["id","value","disabled","onKeydown","onInput","onPaste"],ra=t.defineComponent({name:"DCodeOtpInput",inheritAttrs:!1,__name:"DCodeOtpInput",props:{modelValue:{default:""},totalInput:{default:6},default:{default:""},label:{default:""},endpoint:{},submitFn:{}},emits:["updateOtp","update:modelValue","complete","loading","success","error"],setup(e,{emit:o}){const n=t.useAttrs(),r=Math.random().toString(36).slice(2,7),a=t.computed(()=>`app-otp-${(n.id||s.label||"otp-field").replaceAll(/\s+/g,"-").toLowerCase()}-${r}`),s=e,i=o,l=t.ref([]),c=t.ref([]),d=t.ref(!1),{DCodeApi:f}=Qe(),u=ti(),h=t.computed(()=>{const C=Number(s.totalInput);return C&&C>0?C:6}),m=()=>{c.value=Array.from({length:h.value},(C,x)=>{var w;return((w=s.default)==null?void 0:w[x])??""}),i("updateOtp",c.value.join(""))};m(),t.watch(()=>[s.totalInput,s.default],()=>m());const p=C=>{C<0||C>=h.value||t.nextTick(()=>{var x;return(x=l.value[C])==null?void 0:x.focus()})},y=C=>C.match(/[a-zA-Z0-9]/)?C.match(/[a-zA-Z0-9]/)[0]:"";async function b(C){var x;if(i("complete",C),s.submitFn){try{d.value=!0,i("loading",!0);const w=await s.submitFn(C);i("success",w)}catch(w){console.error("OTP Submit Error",w),u.error("Submit Failed",(w==null?void 0:w.message)||"Unknown error"),i("error",(w==null?void 0:w.message)||"Submit Failed")}finally{d.value=!1,i("loading",!1)}return}if((x=s.endpoint)!=null&&x.apiUrl){if(typeof f!="function"){i("error","useApi() must expose DCodeApi()");return}try{d.value=!0,i("loading",!0);const w=(s.endpoint.apiMethod||"POST").toUpperCase(),D=s.endpoint.apiUrl,k=await f("","",{otp:C},{_url:D,_method:w,withCredentials:!0}),v=(k==null?void 0:k.data)??k;i("success",v)}catch(w){console.error("OTP Submit Error",w),u.error("Submit Failed",(w==null?void 0:w.message)||"Unknown error"),i("error",(w==null?void 0:w.message)||"Submit Failed")}finally{d.value=!1,i("loading",!1)}}}const g=(C,x)=>{c.value[C]=y(x);const w=c.value.join("");i("updateOtp",w),i("update:modelValue",w),w.length===h.value&&b(w)},_=(C,x)=>{const w=C.key,D=/^\d$/.test(w),k=/^[a-zA-Z]$/.test(w);if(w==="Backspace"){if(C.preventDefault(),c.value[x]){g(x,"");return}x>0&&(g(x-1,""),p(x-1));return}if(w==="ArrowLeft"){C.preventDefault(),p(x-1);return}if(w==="ArrowRight"){C.preventDefault(),p(x+1);return}if(D||k){C.preventDefault(),g(x,w),x<h.value-1&&p(x+1);return}w.length===1&&C.preventDefault()},E=(C,x)=>{const w=C.target,D=w.value??"",k=y(D);w.value=k,g(x,k),k&&x<h.value-1&&p(x+1)},B=(C,x)=>{var S;C.preventDefault();const D=(((S=C.clipboardData)==null?void 0:S.getData("text"))??"").replaceAll(/[^a-zA-Z0-9]/g,"");if(!D)return;let k=x;for(const N of D){if(k>=h.value)break;c.value[k]=N,k++}const v=c.value.join("");i("updateOtp",v),i("update:modelValue",v),v.length===h.value&&b(v),p(Math.min(k,h.value-1))},A=C=>x=>{l.value[C]=(x==null?void 0:x.$el)??x};return(C,x)=>(t.openBlock(),t.createElementBlock("div",O_,[s.label||h.value?(t.openBlock(),t.createElementBlock("div",L_,[s.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:a.value,class:"text-sm font-medium text-foreground"},t.toDisplayString(s.label),9,R_)):(t.openBlock(),t.createElementBlock("label",{key:1,for:a.value,class:"text-sm font-medium text-foreground"}," Masukkan kode keamanan ",8,I_)),t.createElementVNode("p",F_," Ketik "+t.toDisplayString(h.value)+" digit kode verifikasi Anda ",1)])):t.createCommentVNode("",!0),t.createElementVNode("div",z_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,w=>(t.openBlock(),t.createElementBlock("input",{key:w,id:w===1?a.value:void 0,ref_for:!0,ref:A(w-1),value:c.value[w-1]||"",type:"text",inputmode:"text",maxlength:"1",autocomplete:"one-time-code","aria-label":"`OTP digit ${i}`",placeholder:"*",disabled:d.value,class:t.normalizeClass(["w-12 h-12 flex-none text-center text-xl font-bold rounded-xl border transition-all duration-200 box-border p-0","focus:outline-none focus:scale-105 disabled:opacity-50 disabled:cursor-not-allowed",c.value[w-1]?"border-blue-500 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300":"border-gray-300 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 text-gray-400 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600"]),onKeydown:D=>_(D,w-1),onInput:D=>E(D,w-1),onPaste:D=>B(D,w-1)},null,42,$_))),128))])]))}}),j_={class:"w-full"},U_={key:0,class:"flex items-center justify-between mb-2"},W_={key:0,class:"text-sm font-medium text-gray-700"},H_={key:1,class:"text-sm text-gray-600"},q_={name:"DCodeProgress"},Nf=t.defineComponent({...q_,name:"DCodeProgress",inheritAttrs:!1,props:{modelValue:{default:0},max:{default:100},label:{default:""},showValue:{type:Boolean,default:!1},color:{default:"blue"},size:{default:"md"},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=t.computed(()=>Math.min(n.modelValue/n.max*100,100)),a=t.computed(()=>["w-full rounded-full overflow-hidden",{sm:"h-1",md:"h-2",lg:"h-3"}[n.size],"bg-gray-200"].join(" ")),s=t.computed(()=>{const l={blue:"bg-blue-500",green:"bg-green-500",red:"bg-red-500",yellow:"bg-yellow-500",purple:"bg-purple-500",gray:"bg-gray-500"},c=["h-full transition-all duration-300 ease-out",l[n.color]||l.blue];return n.striped&&c.push("bg-gradient-to-r from-transparent via-white/20 to-transparent"),n.animated&&c.push("animate-pulse"),c.join(" ")}),i=t.computed(()=>`${Math.round(r.value)}%`);return(l,c)=>(t.openBlock(),t.createElementBlock("div",j_,[e.label||e.showValue?(t.openBlock(),t.createElementBlock("div",U_,[e.label?(t.openBlock(),t.createElementBlock("span",W_,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0),e.showValue?(t.openBlock(),t.createElementBlock("span",H_,t.toDisplayString(i.value),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(a.value)},[t.createElementVNode("div",{class:t.normalizeClass(s.value),style:t.normalizeStyle({width:`${r.value}%`})},null,6)],2)]))}}),G_={key:0,class:"fixed top-0 left-0 right-0 z-[10000] h-[3px]"},Vf=lt(t.defineComponent({name:"DCodeProgressBar",__name:"DCodeProgressBar",props:{isApiLoading:{type:Boolean,default:!1},apiProgress:{default:0}},setup(e){return(o,n)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade"},{default:t.withCtx(()=>[e.isApiLoading?(t.openBlock(),t.createElementBlock("div",G_,[t.createElementVNode("div",{class:"h-full bg-primary-600 shadow-[0_0_15px_rgba(37,99,235,0.8)] transition-all duration-300 ease-out",style:t.normalizeStyle({width:`${e.apiProgress}%`})},null,4)])):t.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-85c68054"]]),K_={key:0,class:"ml-1 text-destructive"},X_={class:"flex flex-col"},Y_={key:0,class:"flex items-center gap-2 text-sm text-gray-500 mb-2"},J_={class:"relative flex-shrink-0 mt-0.5"},Q_=["id","name","value","checked","disabled","required","onChange"],Z_=["onClick"],eE=["for"],tE={key:0,class:"ml-1 text-red-500"},oE={key:1,class:"flex items-center gap-1 text-sm text-red-500 mt-1"},ai=t.defineComponent({name:"DCodeRadio",inheritAttrs:!1,__name:"DCodeRadio",props:{modelValue:{default:void 0},label:{default:""},itemTitle:{default:"name"},itemValue:{default:"id"},options:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""}},emits:["update:modelValue","change"],setup(e,{emit:o}){t.useAttrs();const{apiUrl:n}=Qe(),r=o,a=e,s=t.ref([]),i=t.ref(!1),l=t.ref(null),c=async()=>{var B,A;const E=((B=a.endpoint)==null?void 0:B.apiUrl)||a.apiUrl;if(E){i.value=!0,l.value=null;try{const C={page:1,perPage:100},x=((A=a.endpoint)==null?void 0:A.apiMethod)||a.apiMethod,w=await n(E,x,C);let D=w;a.dataPath?D=a.dataPath.split(".").reduce((v,S)=>v&&v[S]!=="undefined"?v[S]:void 0,w):typeof w=="object"&&!Array.isArray(w)&&w.data&&(D=w.data),Array.isArray(D)?s.value=D:(console.warn("DCodeRadio: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),l.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(C){console.error("DCodeRadio fetch error:",C),l.value="Gagal memuat data dari endpoint."}finally{i.value=!1}}};t.onMounted(()=>{var E;((E=a.endpoint)!=null&&E.apiUrl||a.apiUrl)&&c()});const d=t.computed(()=>{if(a.options&&a.options.length>0)return a.options;if(s.value.length>0)return s.value;const E=a.itemValue||a.model||"id",B=a.itemTitle||(a.label===""?"name":a.label);return B&&a.label!==""?[{[E]:E,[B]:B}]:[]}),f=E=>{if(typeof E!="object")return E;const B=a.itemValue||a.model||"id";return E[B]},u=E=>{if(typeof E!="object")return String(E);const B=a.itemTitle||"name";return E[B]},h=t.computed(()=>a.model||`radio-group-${Math.random().toString(36).substr(2,9)}`),m=t.computed(()=>!!a.error||!!l.value),p=t.computed(()=>a.error||l.value),y=E=>E==null?a.modelValue===E:String(a.modelValue)===String(E),b=t.computed(()=>({sm:{radio:"w-3 h-3",label:"text-sm",container:"gap-2"},md:{radio:"w-4 h-4",label:"text-base",container:"gap-2"},lg:{radio:"w-5 h-5",label:"text-lg",container:"gap-3"}})[a.size]),g=(E,B)=>{if(a.disabled||a.readonly){B.preventDefault();return}B.target.checked&&(r("update:modelValue",E),r("change",E))},_=E=>{!a.disabled&&!a.readonly&&!y(E)&&(r("update:modelValue",E),r("change",E))};return(E,B)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid gap-3",e.disabled||e.readonly?"cursor-not-allowed":""])},[e.label?(t.openBlock(),t.createBlock(Xn,{key:0,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",K_,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",X_,[i.value?(t.openBlock(),t.createElementBlock("div",Y_,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),B[0]||(B[0]=t.createTextVNode(" Sedang memuat opsi... ",-1))])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["flex",e.layout?"flex-row flex-wrap gap-4":"flex-col gap-3"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,(A,C)=>(t.openBlock(),t.createElementBlock("div",{key:C,class:t.normalizeClass(["flex items-start",b.value.container,e.disabled||e.readonly?"opacity-60 cursor-not-allowed":"cursor-pointer"])},[t.createElementVNode("div",J_,[t.createElementVNode("input",{id:e.id?`${e.id}-${C}`:`${h.value}-${C}`,name:h.value,type:"radio",value:f(A),checked:y(f(A)),disabled:e.disabled||e.readonly,required:e.required&&C===0,onChange:x=>g(f(A),x),class:"w-5 h-5 text-blue-600 focus:ring-blue-500 border-gray-300"},null,40,Q_)]),t.createElementVNode("div",{class:"flex-1 min-w-0",onClick:x=>_(f(A))},[t.createElementVNode("label",{for:e.id?`${e.id}-${C}`:`${h.value}-${C}`,class:t.normalizeClass([b.value.label,"font-medium cursor-pointer select-none text-foreground dark:text-gray-300",e.disabled||e.readonly?"cursor-not-allowed opacity-60":""])},[t.createTextVNode(t.toDisplayString(u(A))+" ",1),e.required&&d.value.length===1&&e.label?(t.openBlock(),t.createElementBlock("span",tE,"*")):t.createCommentVNode("",!0)],10,eE)],8,Z_)],2))),128))],2),m.value&&p.value?(t.openBlock(),t.createElementBlock("div",oE,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(p.value),1)])):t.createCommentVNode("",!0)])],2))}}),nE={class:"grid gap-3"},rE={key:0,class:"ml-1 text-destructive"},aE={class:"flex flex-col"},sE={key:0,class:"flex items-center gap-2 text-sm text-gray-500 dark:text-neutral-400 mb-2"},iE=["onClick"],lE=["id","name","value","checked","disabled","required","onChange"],cE={key:1,class:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20"},dE=["for"],fE={key:0,class:"ml-1 text-red-500"},uE={key:1,class:"flex items-center gap-1 text-sm text-red-500 mt-2"},si=t.defineComponent({name:"DCodeRadioCustom",inheritAttrs:!1,__name:"DCodeRadioCustom",props:{modelValue:{default:void 0},icon:{},itemTitle:{default:"name"},itemValue:{default:"id"},label:{default:""},options:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""}},emits:["update:modelValue","change"],setup(e,{emit:o}){t.useAttrs();const{apiUrl:n}=Qe(),r=o,a=e,s=t.ref(a.modelValue??void 0);t.watch(()=>a.modelValue,k=>{s.value=k},{immediate:!0});const i=t.ref([]),l=t.ref(!1),c=t.ref(null),d=t.computed(()=>a.disabled||l.value||!!c.value),f=async()=>{var v,S;const k=((v=a.endpoint)==null?void 0:v.apiUrl)||a.apiUrl;if(k){l.value=!0,c.value=null;try{const N={page:1,perPage:100},V=((S=a.endpoint)==null?void 0:S.apiMethod)||a.apiMethod,L=await n(k,V,N);let O=L;a.dataPath?O=a.dataPath.split(".").reduce((R,j)=>R&&R[j]!=="undefined"?R[j]:void 0,L):typeof L=="object"&&!Array.isArray(L)&&L.data&&(O=L.data),Array.isArray(O)?i.value=O:(console.warn("DCodeRadioCustom: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),c.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(N){console.error("DCodeRadioCustom fetch error:",N),c.value="Gagal memuat data dari endpoint."}finally{l.value=!1}}},u=t.ref(!1);let h=null;const m=()=>{typeof document<"u"&&(u.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{var k;((k=a.endpoint)!=null&&k.apiUrl||a.apiUrl)&&f(),m(),typeof document<"u"&&(h=new MutationObserver(m),h.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),h.observe(document.body,{attributes:!0,attributeFilter:["class"]}))}),t.onBeforeUnmount(()=>{h&&h.disconnect()});const p=t.computed(()=>{if(a.options&&a.options.length>0)return a.options;if(i.value.length>0)return i.value;const k=a.itemValue||a.model||"id",v=a.itemTitle||(a.label===""?"name":a.label);return v&&a.label!==""?[{[k]:k,[v]:v}]:[]}),y=k=>{if(typeof k!="object")return k;const v=a.itemValue||a.model||"id";return k[v]},b=k=>{if(typeof k!="object")return String(k);const v=a.itemTitle||"name";return k[v]},g=Math.random().toString(36).slice(2,7),_=t.computed(()=>a.id?`radio-custom-${a.id}`:`radio-custom-${a.model}-${g}`),E=t.computed(()=>!!a.error||!!c.value),B=t.computed(()=>a.error||c.value),A=k=>{const v=s.value;return k==null?v===k:String(v)===String(k)},C=t.computed(()=>({sm:{radio:"w-3 h-3",label:"text-sm",container:"gap-2"},md:{radio:"w-4 h-4",label:"text-base",container:"gap-2"},lg:{radio:"w-5 h-5",label:"text-lg",container:"gap-3"}})[a.size]),x=k=>{const v=(k==null?void 0:k.icon)||a.icon;return Ao(v,Pt)},w=(k,v)=>{v.target.checked&&(s.value=k,r("update:modelValue",k),r("change",k))},D=k=>{a.disabled||A(k)||(s.value=k,r("update:modelValue",k),r("change",k))};return(k,v)=>(t.openBlock(),t.createElementBlock("div",nE,[e.label?(t.openBlock(),t.createBlock(Xn,{key:0,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",rE,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",aE,[l.value?(t.openBlock(),t.createElementBlock("div",sE,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),v[0]||(v[0]=t.createTextVNode(" Sedang memuat opsi... ",-1))])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["grid",e.layout?"grid-cols-2 sm:grid-cols-3":"grid-cols-1","gap-3"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,(S,N)=>(t.openBlock(),t.createElementBlock("div",{key:N,class:t.normalizeClass(["relative flex flex-col items-center justify-center gap-2 p-4 rounded-xl border-2 transition-all duration-200",A(y(S))?u.value?"border-primary-500 bg-primary-500/10 shadow-none":"border-primary-500 bg-primary-50 shadow-md shadow-primary-100":u.value?"border-neutral-700 bg-neutral-800 hover:border-neutral-600":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm",d.value?"opacity-50 cursor-not-allowed":"cursor-pointer"]),onClick:V=>!d.value&&D(y(S))},[t.createElementVNode("input",{id:e.id?`${e.id}-${N}`:`${_.value}-${N}`,name:_.value,type:"radio",value:y(S),checked:A(y(S)),disabled:d.value,required:e.required&&N===0,onChange:V=>w(y(S),V),class:"sr-only",tabindex:"-1"},null,40,lE),t.createElementVNode("div",{class:t.normalizeClass(["w-10 h-10 rounded-full flex items-center justify-center transition-all duration-200",A(y(S))?u.value?"bg-primary-500/25 text-primary-400":"bg-primary-100 text-primary-600":u.value?"bg-neutral-700 text-neutral-500":"bg-gray-100 text-gray-400"])},[x(S)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(x(S)),{key:0,class:"w-6 h-6"})):(t.openBlock(),t.createElementBlock("svg",cE,[...v[1]||(v[1]=[t.createElementVNode("circle",{cx:"10",cy:"10",r:"6"},null,-1)])]))],2),t.createElementVNode("label",{for:e.id?`${e.id}-${N}`:`${_.value}-${N}`,class:t.normalizeClass([C.value.label,"font-medium text-center leading-tight select-none transition-colors duration-200",A(y(S))?u.value?"text-primary-400":"text-primary-700":u.value?"text-neutral-300":"text-gray-700",e.disabled?"cursor-not-allowed":"cursor-pointer"])},[t.createTextVNode(t.toDisplayString(b(S))+" ",1),e.required&&p.value.length===1&&e.label?(t.openBlock(),t.createElementBlock("span",fE,"*")):t.createCommentVNode("",!0)],10,dE)],10,iE))),128))],2),E.value&&B.value?(t.openBlock(),t.createElementBlock("div",uE,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(B.value),1)])):t.createCommentVNode("",!0)])]))}}),hE={key:0,class:"ml-1 text-destructive"},mE={class:"relative w-full"},pE={key:0,class:"mb-2 flex items-center justify-between"},gE={class:"text-sm text-muted-foreground"},bE={class:"text-sm font-medium text-foreground"},yE={class:"text-sm text-muted-foreground"},xE={class:"relative"},kE=["id","value","min","max","step","disabled","placeholder"],wE={key:1,class:"relative mt-2"},CE={class:"text-xs text-muted-foreground mt-1"},_E={key:1,class:"flex items-center gap-1 text-sm text-destructive"},EE={name:"DCodeSlider"},aa=t.defineComponent({...EE,name:"DCodeSlider",inheritAttrs:!1,props:{modelValue:{default:0},min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},label:{default:""},placeholder:{default:""},required:{type:Boolean,default:!1},error:{default:null},showValue:{type:Boolean,default:!0},valuePrefix:{default:""},valueSuffix:{default:""},marks:{default:()=>[]},color:{default:"blue"},size:{default:"md"}},emits:["update:modelValue","change","input"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.ref(),i=t.ref(!1),l=t.computed(()=>!!a.error),c=t.computed(()=>`slider-${Math.random().toString(36).substr(2,9)}`),d=t.computed(()=>(a.label||n.label)??void 0),f=t.computed(()=>!0),u=t.computed(()=>{const A={sm:"h-2",md:"h-2.5",lg:"h-3"},C={blue:"accent-blue-500",green:"accent-green-500",red:"accent-red-500",yellow:"accent-yellow-500",purple:"accent-purple-500",gray:"accent-gray-500"};return["w-full appearance-none bg-transparent rounded-lg outline-none transition-all cursor-pointer relative z-10","disabled:opacity-50 disabled:cursor-not-allowed",A[a.size],C[a.color]||C.blue,l.value?"accent-red-500":"",n.class].filter(Boolean).join(" ")}),h=t.computed(()=>["appearance-none bg-white border-2 border-current rounded-full cursor-pointer transition-all","hover:scale-110 focus:scale-110","shadow-md hover:shadow-lg focus:shadow-lg","focus:outline-none focus:ring-2 focus:ring-offset-2",{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[a.size],a.color==="blue"?"focus:ring-blue-500":a.color==="green"?"focus:ring-green-500":a.color==="red"?"focus:ring-red-500":a.color==="yellow"?"focus:ring-yellow-500":a.color==="purple"?"focus:ring-purple-500":"focus:ring-gray-500"].join(" ")),m=t.computed(()=>`${a.valuePrefix}${a.modelValue}${a.valueSuffix}`),p=t.computed(()=>{const A=a.max-a.min;return(a.modelValue-a.min)/A*100}),y=A=>{const C=A.target,x=parseFloat(C.value);r("update:modelValue",x),r("input",x)},b=A=>{const C=A.target,x=parseFloat(C.value);r("change",x)},g=()=>{i.value=!0},_=()=>{i.value=!1},E=A=>{const C=a.max-a.min;return(A-a.min)/C*100},B=t.computed(()=>{const A={sm:16,md:20,lg:24};return`
|
|
83
|
+
`.trim();let a=document.getElementById(o);a||(a=document.createElement("style"),a.id=o,document.head.appendChild(a)),a.textContent=r}function O2(t,o=Pf){e.watch(t,n=>P2(n,o),{immediate:!0})}const L2={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},R2=["for"],I2={key:0,class:"ml-1 text-destructive"},F2=["disabled","onClick"],z2={class:"flex-shrink-0 px-2 text-sm text-muted-foreground select-none whitespace-nowrap"},$2=["id","value","placeholder","disabled","onClick","onFocus","onBlur","onInput","onKeydown","onKeypress","onPaste"],j2={class:"flex items-center justify-end gap-2 w-full p-2"},U2=["disabled","onClick"],W2={key:1,class:"text-xs text-destructive"},ra=e.defineComponent({name:"DCodeDatePicker",inheritAttrs:!1,__name:"DCodeDatePicker",props:{modelValue:{},range:{type:Boolean,default:!1},autoRangeDays:{default:null},disablePast:{type:Boolean,default:!1},maxDaysAhead:{default:null},placeholder:{default:"Pilih tanggal"},label:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},displayFormat:{default:"dd/MM/yyyy"},modelType:{default:"yyyy-MM-dd"},locale:{default:"en"},placement:{default:"bottom-start"},prependInner:{default:void 0},error:{default:null},selectLabel:{default:"Select"},cancelLabel:{default:"Cancel"},tone:{default:"primary"},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear"],setup(t,{emit:o}){const n=e.useAttrs(),r=t,a=o,s=Math.random().toString(36).slice(2,7),i=e.computed(()=>`dcode-datepicker-${n.id||r.label||"date-picker"}-${s}`),l=e.computed(()=>{const k=n.required,v=n["aria-required"];return k===""||k===!0||k==="true"||v==="true"||v===!0}),c=e.computed(()=>!!r.error),d=e.computed({get:()=>r.modelValue,set:k=>{a("update:modelValue",k),a("change",k)}}),f=e.computed(()=>r.locale==="en"?r2:T2),u=e.computed(()=>r.range?2:!1),h=k=>{const v=new Date(k);return v.setHours(0,0,0,0),v},m=k=>{const v=new Date(k);return v.setHours(23,59,59,999),v},p=(k,v)=>{const S=new Date(k);return S.setDate(S.getDate()+v),S},y=e.computed(()=>{if(r.disablePast)return h(new Date)}),b=e.computed(()=>{if(r.maxDaysAhead&&r.maxDaysAhead>0)return m(p(new Date,r.maxDaysAhead))}),g=e.ref(null),_=e.ref(null),E=k=>{_.value={month:k.month,year:k.year}},B=e.ref(!1);let A=null;e.onMounted(()=>{const k=document.documentElement,v=()=>B.value=k.classList.contains("dark");v(),A=new MutationObserver(v),A.observe(k,{attributes:!0,attributeFilter:["class"]})}),e.onBeforeUnmount(()=>{A==null||A.disconnect(),A=null}),O2(e.toRef(r,"tone"));const C=k=>{const v=new Date(k),S=v.getDay(),N=v.getDate()-S+(S===0?-6:1);return v.setDate(N),h(v)},x=k=>{const v=C(k);return v.setDate(v.getDate()+6),m(v)},w=k=>{const v=new Date(k);return v.setDate(1),h(v)},D=k=>{const v=new Date(k);return v.setMonth(v.getMonth()+1),v.setDate(0),m(v)};return e.computed(()=>{if(!r.range)return[];const k=new Date,v=h(k),S=C(k),N=x(k),V=w(k),L=D(k),O=(P,R)=>{let j=P;r.disablePast&&j<v&&(j=v);let T=R;if(r.autoRangeDays&&r.autoRangeDays>0){const I=m(p(j,r.autoRangeDays-1));T>I&&(T=I)}return T<j&&(T=m(new Date(j))),[j,T]};return[{label:r.locale==="id"?"Minggu Ini":"This Week",range:O(S,N)},{label:r.locale==="id"?"Bulan Ini":"This Month",range:O(V,L)}]}),(k,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-1 w-full",[e.unref(n).class,r.disabled?"cursor-not-allowed":""]])},[t.skeleton?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.label?(e.openBlock(),e.createElementBlock("div",L2)):e.createCommentVNode("",!0),v[2]||(v[2]=e.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:i.value,class:"text-sm font-medium"},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),l.value?(e.openBlock(),e.createElementBlock("span",I2,"*")):e.createCommentVNode("",!0)],8,R2)):e.createCommentVNode("",!0),e.createVNode(e.unref(Nu.VueDatePicker),{ref_key:"dpRef",ref:g,modelValue:d.value,"onUpdate:modelValue":v[1]||(v[1]=S=>d.value=S),dark:B.value,range:t.range,"multi-calendars":u.value,"auto-range":t.autoRangeDays,"max-range":t.autoRangeDays,"partial-range":!1,disabled:t.disabled,clearable:!1,"text-input":"","enable-time-picker":!1,"time-config":{enableTimePicker:!1},"auto-apply":!1,"action-row":{showPreview:!0,showNow:!1},locale:f.value,"model-type":t.modelType,formats:{input:t.displayFormat},"min-date":y.value,"max-date":b.value,floating:{placement:t.placement,offset:8,arrow:!1,flip:!1,shift:!0},teleport:!0,"menu-class-name":"dcode-datepicker-menu","calendar-class-name":"dcode-datepicker-calendar",onUpdateMonthYear:E},{"dp-input":e.withCtx(({value:S,onInput:N,onEnter:V,onTab:L,onBlur:O,onFocus:P,onKeypress:R,onPaste:j,toggleMenu:T})=>[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center w-full h-10 rounded-lg border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 overflow-hidden shadow-none transition-all duration-200 focus-within:ring-1 focus-within:ring-neutral-400 dark:focus-within:ring-neutral-600 focus-within:border-neutral-400 dark:focus-within:border-neutral-600",[c.value?"border-destructive":"",t.disabled?"opacity-50 cursor-not-allowed":"",t.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""]])},[e.createElementVNode("button",{type:"button",tabindex:"-1",disabled:t.disabled||t.readonly,class:"flex-shrink-0 flex items-center justify-center w-10 h-full text-muted-foreground hover:text-foreground transition-colors focus:outline-none",onClick:I=>!t.disabled&&!t.readonly&&T()},[e.createVNode(e.unref(ne.Calendar),{class:"w-4 h-4 pointer-events-none"})],8,F2),v[4]||(v[4]=e.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1)),t.prependInner?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",z2,e.toDisplayString(t.prependInner),1),v[3]||(v[3]=e.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1))],64)):e.createCommentVNode("",!0),e.createElementVNode("input",{id:i.value,value:S,placeholder:t.placeholder,disabled:t.disabled,autocomplete:"off",readonly:"",class:e.normalizeClass(["flex-1 min-w-0 px-3 h-full bg-transparent text-sm text-foreground dark:text-gray-300 placeholder:text-muted-foreground outline-none",t.disabled?"cursor-not-allowed":t.readonly?"cursor-default":"cursor-pointer"]),onClick:I=>!t.disabled&&!t.readonly&&T(),onFocus:I=>P(),onBlur:I=>O(),onInput:I=>N(I),onKeydown:[e.withKeys(I=>V(I),["enter"]),e.withKeys(I=>L(I),["tab"])],onKeypress:I=>R(I),onPaste:I=>j()},null,42,$2)],2)]),"action-buttons":e.withCtx(({selectDate:S,selectionDisabled:N})=>[e.createElementVNode("div",j2,[e.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center rounded-md text-sm font-medium border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400",onClick:v[0]||(v[0]=V=>{var L;return(L=g.value)==null?void 0:L.closeMenu()})},e.toDisplayString(t.cancelLabel),1),e.createElementVNode("button",{type:"button",disabled:N,class:"inline-flex items-center justify-center rounded-md text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400 disabled:pointer-events-none disabled:opacity-50",onClick:V=>S()},e.toDisplayString(t.selectLabel),9,U2)])]),_:1},8,["modelValue","dark","range","multi-calendars","auto-range","max-range","disabled","locale","model-type","formats","min-date","max-date","floating"]),c.value?(e.openBlock(),e.createElementBlock("p",W2,e.toDisplayString(r.error),1)):e.createCommentVNode("",!0)],64))],2))}}),H2=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:o}){const n=t,r=o,a=_e.useForwardPropsEmits(n,r);return(s,i)=>(e.openBlock(),e.createBlock(e.unref(_e.DialogRoot),e.normalizeProps(e.guardReactiveProps(e.unref(a))),{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},16))}}),q2=e.defineComponent({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:o}){const n=t,r=o,a=Ke.reactiveOmit(n,"class"),s=_e.useForwardPropsEmits(a,r);return(i,l)=>(e.openBlock(),e.createBlock(e.unref(_e.DialogPortal),null,{default:e.withCtx(()=>[e.createVNode(e.unref(_e.DialogOverlay),{class:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),e.createVNode(e.unref(_e.DialogContent),e.mergeProps({...e.unref(s),...i.$attrs},{class:e.unref(Me)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default"),e.createVNode(e.unref(_e.DialogClose),{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.X),{class:"w-4 h-4"}),l[0]||(l[0]=e.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["class"])]),_:3}))}}),G2=e.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(e.openBlock(),e.createBlock(e.unref(_e.DialogDescription),e.mergeProps(e.unref(r),{class:e.unref(Me)("text-sm text-muted-foreground",o.class)}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),K2=e.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(e.openBlock(),e.createBlock(e.unref(_e.DialogTitle),e.mergeProps(e.unref(r),{class:e.unref(Me)("text-lg font-medium leading-none tracking-tight",o.class)}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),X2={key:0,class:"px-6 py-4 flex items-center justify-between border-b border-neutral-200/60 dark:border-neutral-700/50 bg-white/80 dark:bg-neutral-900/30 backdrop-blur-md sticky top-0 z-20"},Y2={class:"flex items-center gap-3"},J2={class:"flex flex-col"},Q2={key:0,class:"flex items-center gap-2"},Z2={key:1,class:"px-6 py-4 border-t border-neutral-200/60 dark:border-neutral-700/50 bg-neutral-50/50 dark:bg-neutral-900/30 sticky bottom-0 z-20"},eC={class:"flex justify-end gap-3 flex-wrap"},io=dt(e.defineComponent({name:"DCodeDialog",inheritAttrs:!1,__name:"DCodeDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:""},icon:{default:""},maxWidth:{default:500},persistent:{type:Boolean,default:!0},contentClass:{default:"p-5"},contentStyle:{default:()=>({})},iconClass:{default:""}},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,r=o,a=e.useAttrs(),s=e.computed(()=>{const{style:d,...f}=a;return f}),i=e.computed(()=>({maxWidth:typeof n.maxWidth=="number"?`${n.maxWidth}px`:n.maxWidth,width:"100%"})),l=e.computed(()=>n.icon?Lt[n.icon]??null:null),c=d=>{r("update:modelValue",d)};return(d,f)=>(e.openBlock(),e.createBlock(e.unref(H2),{open:t.modelValue,"onUpdate:open":c},{default:e.withCtx(()=>[e.createVNode(e.unref(q2),e.mergeProps(s.value,{style:i.value,class:"p-0 overflow-hidden rounded-xl flex flex-col max-h-[90vh] bg-white dark:bg-neutral-800 border-0",onInteractOutside:f[0]||(f[0]=u=>t.persistent?u.preventDefault():null),onEscapeKeyDown:f[1]||(f[1]=u=>t.persistent?u.preventDefault():null)}),{default:e.withCtx(()=>[t.title||d.$slots["header-append"]?(e.openBlock(),e.createElementBlock("div",X2,[e.createElementVNode("div",Y2,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["p-2 rounded-lg",t.iconClass||"bg-primary/10 text-primary"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{class:"h-5 w-5"}))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",J2,[e.createVNode(e.unref(K2),{class:"text-lg font-bold text-neutral-900 dark:text-neutral-50 leading-tight"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),e.createVNode(e.unref(G2),{class:"hidden"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title||"Dialog Content"),1)]),_:1})])]),d.$slots["header-append"]?(e.openBlock(),e.createElementBlock("div",Q2,[e.renderSlot(d.$slots,"header-append",{},void 0,!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex-1 overflow-y-auto custom-scrollbar",t.contentClass]),style:e.normalizeStyle(t.contentStyle)},[e.renderSlot(d.$slots,"default",{},void 0,!0)],6),d.$slots.actions?(e.openBlock(),e.createElementBlock("div",Z2,[e.createElementVNode("div",eC,[e.renderSlot(d.$slots,"actions",{},void 0,!0)])])):e.createCommentVNode("",!0)]),_:3},16,["style"])]),_:3},8,["open"]))}}),[["__scopeId","data-v-52781e0f"]]),Uo=e.defineComponent({name:"DCodeLabel",inheritAttrs:!1,__name:"DCodeLabel",props:{label:{},text:{},textSize:{},textType:{},icon:{},iconClass:{}},setup(t){const o=e.useAttrs(),n=t,r=e.computed(()=>Do(n.icon,Lt)),a=e.computed(()=>n.textSize?`text-${n.textSize}`:"text-xs"),s={xs:"w-3 h-3",sm:"w-3.5 h-3.5",base:"w-4 h-4",lg:"w-5 h-5",xl:"w-5 h-5","2xl":"w-6 h-6","3xl":"w-7 h-7","4xl":"w-8 h-8","5xl":"w-10 h-10","6xl":"w-12 h-12"},i=e.computed(()=>s[n.textSize??"xs"]??"w-3 h-3"),l=e.computed(()=>n.textType==="BOLD"?"font-bold":n.textType==="ITALIC"?"italic font-normal":"font-normal"),c=e.computed(()=>{const f=`${a.value} ${l.value} text-zinc-700 dark:text-zinc-400 ml-1 inline-flex items-center gap-1`,u=o.class??"";return[f,u].filter(Boolean).join(" ")}),d=e.computed(()=>{const{class:f,...u}=o;return u});return(f,u)=>(e.openBlock(),e.createElementBlock("span",e.mergeProps({class:c.value},d.value),[r.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{key:0,class:e.normalizeClass(["shrink-0",i.value,t.iconClass])},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.label||t.text),1)],16))}}),tC={class:"flex flex-col gap-3 w-full"},oC={key:0,class:"col-span-full flex flex-col gap-2 p-3 bg-white dark:bg-neutral-800 border border-dashed border-slate-200 dark:border-neutral-700/50 rounded-lg opacity-70 pointer-events-none animate-pulse"},nC={class:"flex flex-col items-center justify-center gap-2 py-6 rounded-lg border border-dashed border-slate-300 dark:border-neutral-700/50 bg-slate-50 dark:bg-neutral-900/30 text-slate-400"},rC={key:1,class:"col-span-full flex flex-col items-center justify-center text-center gap-2 px-3 py-8 bg-slate-50 dark:bg-neutral-900/10 border border-slate-200 dark:border-neutral-700/50 rounded-lg opacity-70"},aC={class:"text-sm font-medium text-slate-500"},sC={class:"flex items-center justify-between gap-2"},iC=["onClick"],lC={key:0,class:"flex items-center gap-3 px-3 py-2 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-md"},cC={class:"text-xs text-green-700 dark:text-green-400 flex-1 truncate"},dC=["onClick"],fC=["for","onDrop"],uC={class:"text-xs text-slate-500 dark:text-slate-400"},hC={key:2,class:"text-xs text-slate-400"},mC=["id","disabled","accept","onChange"],pC={class:"flex flex-col items-center justify-center min-h-[300px]"},gC=["src","alt"],bC=["src"],yC={key:2,class:"flex flex-col items-center gap-4 py-12 text-slate-400"},xC={class:"text-sm font-medium"},kC=["href"],Js=e.defineComponent({__name:"DCodeDynamicUploadList",props:{modelValue:{type:Array,default:()=>[]},label:{type:String,default:""},labelID:{type:String,default:"Documents"},labelEN:{type:String,default:"Documents"},endpoint:{type:Object,default:()=>null},endpointReference:{type:Object,default:()=>null},itemTitle:{type:String,default:"name"},itemValue:{type:String,default:"id"},disabled:Boolean,required:Boolean,typeFile:{type:String,default:void 0},sizeFile:{type:Number,default:void 0},items:{type:Array,default:void 0},baseUrl:{type:String,default:void 0}},emits:["update:modelValue","uploaded","success"],setup(t,{emit:o}){const n=t,r=o,{t:a,locale:s}=_t.useI18n(),i=e.computed(()=>{const C=n.endpoint;if(!(C!=null&&C.apiUrl))return null;let x=C.apiUrl;if(!x.startsWith("http")&&n.baseUrl){const w=n.baseUrl.replace(/\/$/,""),D=x.startsWith("/")?x:`/${x}`;x=`${w}${D}`}return x}),l=e.computed(()=>{const C=c.value.length;return C<=1?"grid-cols-1":C===2?"grid-cols-1 md:grid-cols-2":C===3?"grid-cols-1 md:grid-cols-3 xl:grid-cols-4":C===4?"grid-cols-1 md:grid-cols-2 lg:grid-cols-3":"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}),c=e.ref([]),d=e.ref([]),f=e.ref(new Set),u=e.ref(!0),h=e.ref(!1),m=e.ref(""),p=e.ref(""),y=e.ref(""),b=async()=>{var C;if(u.value=!0,n.items!==void 0){c.value=n.items,u.value=!1;return}if(!((C=n.endpointReference)!=null&&C.apiUrl)){u.value=!1;return}try{const{apiUrl:x}=Ye(),w=await x(n.endpointReference.apiUrl,n.endpointReference.apiMethod||"GET",{page:1,perPage:100});if(n.items!==void 0){u.value=!1;return}let D=(w==null?void 0:w.data)||w;Array.isArray(D)||(D=[D]),c.value=D}catch(x){console.error("Failed to fetch dynamic document list",x)}finally{u.value=!1}};e.onMounted(()=>{Array.isArray(n.modelValue)&&n.modelValue.length>0&&(d.value=JSON.parse(JSON.stringify(n.modelValue))),b()}),e.onBeforeUnmount(()=>{d.value.forEach(C=>{C._localPreviewUrl&&URL.revokeObjectURL(C._localPreviewUrl)})}),e.watch(()=>n.modelValue,C=>{if(Array.isArray(C)&&JSON.stringify(C)!==JSON.stringify(d.value)){const x=JSON.parse(JSON.stringify(C));x.forEach(w=>{const D=d.value.find(k=>k.typeDocument===w.typeDocument||k.idDocumentType===w.idDocumentType);D!=null&&D._localPreviewUrl&&(w._localPreviewUrl=D._localPreviewUrl)}),d.value=x}},{deep:!0}),e.watch(()=>{var C;return(C=n.endpointReference)==null?void 0:C.apiUrl},(C,x)=>{C!==x&&b()}),e.watch(()=>{var C;return(C=n.endpointReference)==null?void 0:C.apiMethod},(C,x)=>{C!==x&&b()}),e.watch(()=>n.items,C=>{c.value=C??[],u.value=!1},{deep:!0,immediate:!0});const g=C=>{const x=C[n.itemValue]||C.id||C.typeDocument;return d.value.find(w=>w.typeDocument===x||w.idDocumentType===x||w[n.itemValue]===x)||null},_=async(C,x,w)=>{var N,V,L,O;const D=w.target,k=(N=D.files)==null?void 0:N[0];if(!k)return;const v=C[n.itemValue]||C.id||C.typeDocument,S=URL.createObjectURL(k);if(!i.value){const P=[...d.value],R=P.findIndex(T=>T.typeDocument===v||T.idDocumentType===v);(V=P[R])!=null&&V._localPreviewUrl&&URL.revokeObjectURL(P[R]._localPreviewUrl);const j={id:null,idDocument:null,idDocumentType:v,filename:k.name,document:v,documentUrl:k.name,typeDocument:v,_localPreviewUrl:S,_fileType:k.type};R>-1?P[R]={...P[R],...j}:P.push(j),d.value=P,r("update:modelValue",P);return}f.value.add(x);try{const{apiUrl:P}=Ye(),R=new FormData;R.append("doc",k),R.append("typeDocument",String(v));const j=await P(i.value,((L=n.endpoint)==null?void 0:L.apiMethod)||"POST",R),T=Array.isArray(j==null?void 0:j.data)?j.data[0]:(j==null?void 0:j.data)||j,I=(T==null?void 0:T.url)||(T==null?void 0:T.document)||k.name,X=(T==null?void 0:T.id)||null,H=(T==null?void 0:T.filename)||(T==null?void 0:T.name)||k.name,W=[...d.value],Z=W.findIndex(ge=>ge.typeDocument===v||ge.idDocumentType===v);(O=W[Z])!=null&&O._localPreviewUrl&&URL.revokeObjectURL(W[Z]._localPreviewUrl);const oe={...T,id:X||(T==null?void 0:T.idDocument)||(T==null?void 0:T.id_document)||null,idDocument:(T==null?void 0:T.idDocument)||X||(T==null?void 0:T.id_document)||null,idDocumentType:v,filename:H,document:v,documentUrl:I,typeDocument:v,_localPreviewUrl:S,_fileType:k.type};Z>-1?W[Z]={...W[Z],...oe}:W.push(oe),d.value=W,r("update:modelValue",W),r("uploaded",T),r("success",T)}catch(P){console.error("Upload failed",P)}finally{f.value.delete(x),D.value=""}},E=C=>{const x=C[n.itemValue]||C.id||C.typeDocument,w=d.value.find(k=>k.typeDocument===x||k.idDocumentType===x);w!=null&&w._localPreviewUrl&&URL.revokeObjectURL(w._localPreviewUrl);const D=d.value.filter(k=>k.typeDocument!==x&&k.idDocumentType!==x);d.value=D,r("update:modelValue",D)},B=C=>{const x=g(C);if(!x)return;let w=x._localPreviewUrl;if(!w)if(x.server&&x.url){const v=x.server.replace(/\/+$/,""),S=x.url.replace(/^\/+/,"");w=`${v}/${S}`}else w=x.document||x.url;if(!w)return;const D=x.mime||x._fileType||"",k=D==="application/pdf"||w.toLowerCase().endsWith(".pdf");k&&!w.includes("#")&&(w+="#toolbar=0&navpanes=0&scrollbar=0&view=FitH&pagemode=none"),m.value=w,p.value=C[n.itemTitle]||C.name||x.filename||"Preview Document",y.value=D||(k?"application/pdf":"image/jpeg"),h.value=!0},A=(C,x,w)=>{var v,S;w.preventDefault();const D=(S=(v=w.dataTransfer)==null?void 0:v.files)==null?void 0:S[0];if(!D)return;_(C,x,{target:{files:[D],value:""}})};return(C,x)=>(e.openBlock(),e.createElementBlock("div",tC,[t.label||t.labelID||t.labelEN?(e.openBlock(),e.createBlock(Uo,{key:0,text:t.label||(e.unref(s).toLowerCase().startsWith("en")?t.labelEN:t.labelID),class:"font-semibold text-sm text-slate-700 dark:text-slate-300",required:t.required},null,8,["text","required"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["w-full grid gap-4",l.value])},[c.value.length===0&&u.value?(e.openBlock(),e.createElementBlock("div",oC,[e.createVNode(Uo,{text:e.unref(a)("dynamicUploadList.loadingDocs"),class:"font-semibold text-sm text-slate-700 dark:text-neutral-300"},null,8,["text"]),e.createElementVNode("div",nC,[e.createVNode(e.unref(ne.Loader2),{class:"w-6 h-6 animate-spin"})])])):c.value.length===0&&!u.value?(e.openBlock(),e.createElementBlock("div",rC,[e.createVNode(e.unref(ne.CheckCircle2),{class:"w-6 h-6 text-slate-400"}),e.createElementVNode("span",aC,e.toDisplayString(e.unref(a)("dynamicUploadList.noDocsRequired")),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(w,D)=>{var k;return e.openBlock(),e.createElementBlock("div",{key:D,class:"flex flex-col gap-2 p-3 bg-white dark:bg-neutral-800 border border-slate-200 dark:border-neutral-700/50 rounded-lg shadow-sm"},[e.createElementVNode("div",sC,[e.createVNode(Uo,{text:w[t.itemTitle]||w.name||w.filename||"Upload Document",class:"font-semibold text-sm text-slate-700 dark:text-neutral-300 truncate flex-1"},null,8,["text"]),g(w)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"p-1 hover:bg-slate-100 dark:hover:bg-zinc-700 rounded transition-colors text-slate-400 hover:text-primary-500",onClick:v=>B(w)},[e.createVNode(e.unref(ne.Eye),{class:"w-4 h-4"})],8,iC)):e.createCommentVNode("",!0)]),g(w)?(e.openBlock(),e.createElementBlock("div",lC,[e.createVNode(e.unref(ne.CheckCircle2),{class:"w-4 h-4 text-green-600 shrink-0"}),e.createElementVNode("span",cC,e.toDisplayString(((k=g(w))==null?void 0:k.filename)||e.unref(a)("dynamicUploadList.fileUploaded")),1),t.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"text-red-400 hover:text-red-600 transition-colors",onClick:v=>E(w)},[e.createVNode(e.unref(ne.X),{class:"w-4 h-4"})],8,dC))])):(e.openBlock(),e.createElementBlock("label",{key:1,for:`dyn-upload-input-${D}`,class:e.normalizeClass(["flex flex-col items-center justify-center gap-2 py-8 rounded-lg border-2 border-dashed transition-colors cursor-pointer",[t.disabled?"border-slate-200 bg-slate-50 cursor-not-allowed opacity-60":"border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-800 hover:border-primary-400 hover:bg-primary-50 dark:hover:bg-primary-900/10",f.value.has(D)?"pointer-events-none opacity-70":""]]),onDragover:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"])),onDrop:v=>!t.disabled&&!f.value.has(D)&&A(w,D,v)},[f.value.has(D)?(e.openBlock(),e.createBlock(e.unref(ne.Loader2),{key:0,class:"w-6 h-6 animate-spin text-primary-500"})):(e.openBlock(),e.createBlock(e.unref(ne.Upload),{key:1,class:"w-6 h-6 text-slate-400"})),e.createElementVNode("span",uC,e.toDisplayString(f.value.has(D)?e.unref(a)("dynamicUploadList.uploading"):e.unref(a)("dynamicUploadList.clickOrDrag")),1),t.typeFile?(e.openBlock(),e.createElementBlock("span",hC,e.toDisplayString(t.typeFile),1)):e.createCommentVNode("",!0),e.createElementVNode("input",{id:`dyn-upload-input-${D}`,type:"file",class:"sr-only",disabled:t.disabled||f.value.has(D),accept:t.typeFile,onChange:v=>_(w,D,v)},null,40,mC)],42,fC))])}),128))],2),e.createVNode(io,{modelValue:h.value,"onUpdate:modelValue":x[2]||(x[2]=w=>h.value=w),title:p.value,"max-width":y.value==="application/pdf"?"720":"500",class:e.normalizeClass(y.value==="application/pdf"?"max-w-[40vw]":""),"content-class":y.value==="application/pdf"?"p-0 overflow-hidden":"px-6 py-1 overflow-y-auto"},{actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"px-4 py-2 border border-slate-200 dark:border-zinc-700 rounded-md text-sm font-medium hover:bg-slate-50 dark:hover:bg-zinc-800 transition-colors",onClick:x[1]||(x[1]=w=>h.value=!1)},e.toDisplayString(e.unref(a)("common.close")||"Close"),1)]),default:e.withCtx(()=>[e.createElementVNode("div",pC,[y.value.startsWith("image/")?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,alt:p.value,class:"w-full h-auto max-h-[72vh] object-contain rounded-lg shadow-md"},null,8,gC)):y.value==="application/pdf"?(e.openBlock(),e.createElementBlock("iframe",{key:1,src:`${m.value}${m.value.includes("#")?"":"#toolbar=0&navpanes=0&scrollbar=0&view=FitH&pagemode=none"}`,class:"w-full h-[70vh] rounded-lg border border-slate-200",title:"Document Preview"},null,8,bC)):(e.openBlock(),e.createElementBlock("div",yC,[e.createVNode(e.unref(ne.FileText),{class:"w-16 h-16 stroke-1"}),e.createElementVNode("span",xC,e.toDisplayString(e.unref(a)("dynamicUploadList.noSupportPreview")||"Preview not supported for this file type"),1),e.createElementVNode("a",{href:m.value,target:"_blank",class:"px-4 py-2 bg-primary-500 text-white rounded-md text-sm font-semibold hover:bg-primary-600 transition-colors"},e.toDisplayString(e.unref(a)("dynamicUploadList.viewOriginal")||"View Original"),9,kC)]))])]),_:1},8,["modelValue","title","max-width","class","content-class"])]))}}),Of=e.defineComponent({name:"DCodeDialogCloseBtn",__name:"DCodeDialogCloseBtn",props:{icon:{default:"X"},iconSize:{default:22}},setup(t){const o=t,n=e.computed(()=>Lt[o.icon]??Lt.X);return(r,a)=>(e.openBlock(),e.createBlock(e.unref(Tt),{type:"button",variant:"secondary",size:"icon",class:"rounded-full shadow-sm"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),{size:Number(t.iconSize)},null,8,["size"]))]),_:1}))}}),wC=e.defineComponent({__name:"Alert",props:{class:{type:[Boolean,null,String,Object,Array]},variant:{}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Me)(e.unref(_C)({variant:t.variant}),o.class)),role:"alert"},[e.renderSlot(n.$slots,"default")],2))}}),CC=e.defineComponent({__name:"AlertDescription",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Me)("text-sm [&_p]:leading-relaxed",o.class))},[e.renderSlot(n.$slots,"default")],2))}}),_C=gr("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Qs=e.defineComponent({__name:"Badge",props:{variant:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Me)(e.unref(EC)({variant:t.variant}),o.class))},[e.renderSlot(n.$slots,"default")],2))}}),EC=gr("inline-flex gap-1 items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),Zs=e.defineComponent({__name:"Card",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Me)("rounded-xl border bg-card text-card-foreground shadow",o.class))},[e.renderSlot(n.$slots,"default")],2))}}),ei=e.defineComponent({__name:"CardContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Me)("p-6 pt-0",o.class))},[e.renderSlot(n.$slots,"default")],2))}}),ti=e.defineComponent({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Me)("flex flex-col gap-y-1.5 p-6",o.class))},[e.renderSlot(n.$slots,"default")],2))}}),oi=e.defineComponent({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createElementBlock("h3",{class:e.normalizeClass(e.unref(Me)("font-medium leading-none tracking-tight",o.class))},[e.renderSlot(n.$slots,"default")],2))}}),BC={class:"h-full w-full p-6 flex flex-col items-center justify-center text-center gap-2"},SC={class:"flex flex-wrap items-center justify-center gap-2"},AC=["accept","multiple"],aa=dt(e.defineComponent({name:"DCodeDropzone",__name:"DCodeDropzone",props:{label:{default:"Upload File"},hint:{default:"Drag & drop file di sini atau klik area ini"},accept:{default:"*/*"},maxSizeMb:{default:2},mode:{default:"single"},disabled:{type:Boolean,default:!1},showSelected:{type:Boolean,default:!0},error:{default:null}},emits:["picked","picked:multiple","error"],setup(t,{emit:o}){const n=t,r=o,a=e.ref(null),s=e.ref(!1),i=e.ref(null),l=e.ref(null),c=e.ref(null);e.computed(()=>n.accept||"file/*");const d=e.computed(()=>n.error??i.value);function f(){var x;n.disabled||(x=a.value)==null||x.click()}function u(x){const w=x/1024,D=w/1024;return D>=1?`${D.toFixed(2)} MB`:w>=1?`${w.toFixed(1)} KB`:`${x} B`}function h(x){var D;if(!x)return"File tidak valid";if((D=n.accept)!=null&&D.includes("image/")&&!x.type.startsWith("image/"))return"Hanya file gambar yang diizinkan";const w=(n.maxSizeMb??2)*1024*1024;return x.size>w?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:null}function m(x){l.value=x.name,c.value=x.size}function p(x){if(i.value=null,!x.length)return;if(n.mode==="single"){const D=x[0],k=h(D);if(k){i.value=k,r("error",k);return}n.showSelected&&m(D),r("picked",D);return}const w=[];for(const D of x){const k=h(D);if(k){i.value=k,r("error",k);return}w.push(D)}w.length&&(n.showSelected&&m(w[0]),r("picked:multiple",w))}function y(x){const w=x.target,D=Array.from(w.files??[]);p(D),w.value=""}function b(){n.disabled||(s.value=!0)}function g(){n.disabled||(s.value=!0)}function _(){s.value=!1}function E(x){var k,v;if(n.disabled)return;s.value=!1;const w=Array.from(((k=x.dataTransfer)==null?void 0:k.files)??[]),D=(v=n.accept)!=null&&v.includes("image/")?w.filter(S=>S.type.startsWith("image/")):w;p(D)}const B=e.computed(()=>(n.accept||"file/*").split(",").map(x=>x.trim()).filter(Boolean).map(x=>x==="image/*"?"IMAGE":x.replace(/^image\//,"").replace(/^\./,"")).join(", "));e.computed(()=>`${n.maxSizeMb??0}MB`);const A=e.ref(!1),C=e.computed(()=>{if(n.disabled||!A.value)return{};const x=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark");return{borderColor:x?"hsl(var(--primary) / 0.5)":"hsl(var(--primary) / 0.6)",backgroundColor:x?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"}});return(x,w)=>(e.openBlock(),e.createBlock(e.unref(Zs),{class:e.normalizeClass([t.disabled?"opacity-60":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:e.withCtx(()=>[e.createVNode(e.unref(ti),{class:"pb-2"},{default:e.withCtx(()=>[e.createVNode(e.unref(oi),{class:"text-sm font-semibold dark:text-neutral-100"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1})]),_:1}),e.createVNode(e.unref(ei),{class:"pt-2"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["d-dropzone-area flex justify-center items-center rounded-xl border-2 border-dashed transition cursor-pointer select-none",[s.value?"is-dragging border-primary bg-primary/10 dark:bg-primary/20 -translate-y-[1px]":"border-border dark:border-neutral-700 bg-muted/30 dark:bg-neutral-800/50",t.disabled?"is-disabled":""]]),style:e.normalizeStyle([{minHeight:"190px"},C.value]),onClick:f,onDragenter:e.withModifiers(b,["prevent"]),onDragover:e.withModifiers(g,["prevent"]),onDragleave:e.withModifiers(_,["prevent"]),onDrop:e.withModifiers(E,["prevent"]),onMouseenter:w[0]||(w[0]=D=>A.value=!0),onMouseleave:w[1]||(w[1]=D=>A.value=!1)},[e.createElementVNode("div",BC,[w[2]||(w[2]=e.createElementVNode("div",{class:"text-sm font-medium dark:text-neutral-200"},"Drag & drop file di sini",-1)),w[3]||(w[3]=e.createElementVNode("div",{class:"text-xs text-muted-foreground dark:text-neutral-400"},"atau klik area ini untuk memilih file",-1)),e.createElementVNode("div",SC,[e.createVNode(e.unref(Qs),{variant:"secondary",class:"text-[11px] dark:bg-neutral-800 dark:text-neutral-300"},{default:e.withCtx(()=>[e.createTextVNode(" Allowed: "+e.toDisplayString(B.value),1)]),_:1}),e.createVNode(e.unref(Qs),{variant:"secondary",class:"text-[11px] dark:bg-neutral-800 dark:text-neutral-300"},{default:e.withCtx(()=>[e.createTextVNode(" Max: "+e.toDisplayString(n.maxSizeMb)+"MB ",1)]),_:1})]),t.showSelected&&l.value?(e.openBlock(),e.createBlock(e.unref(Qs),{key:0,variant:"secondary",class:"mt-2 dark:bg-neutral-800 dark:text-neutral-300"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value)+" • "+e.toDisplayString(c.value?u(c.value):""),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("input",{ref_key:"fileInputEl",ref:a,type:"file",class:"hidden",accept:t.accept,multiple:t.mode==="multiple",onChange:y},null,40,AC)],38),d.value?(e.openBlock(),e.createBlock(e.unref(wC),{key:0,variant:"destructive",class:"mt-3"},{default:e.withCtx(()=>[e.createVNode(e.unref(CC),{class:"text-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["class"]))}}),[["__scopeId","data-v-d8943808"]]),vC={key:0,class:"text-xs text-muted-foreground dark:text-neutral-400"},DC=["src"],NC={key:1,class:"h-full w-full flex flex-col items-center justify-center text-muted-foreground dark:text-neutral-400 gap-2 p-4 text-center"},VC={class:"space-y-0.5"},MC={class:"text-sm font-medium truncate max-w-[180px] dark:text-neutral-200"},TC={class:"text-xs opacity-70"},PC=["disabled"],OC={key:1},LC=["disabled"],RC={class:"text-[11px] text-foreground/90 dark:text-neutral-200 space-y-1 whitespace-nowrap"},IC={class:"flex gap-2"},FC={class:"font-medium truncate"},zC={class:"flex gap-2"},$C={class:"font-medium"},jC={class:"flex gap-2"},UC={class:"font-medium truncate"},ni=dt(e.defineComponent({name:"DCodeFileResult",__name:"DCodeFileResult",props:{file:{},title:{default:"File Terpilih"},description:{default:""},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:220},showEdit:{type:Boolean,default:!0},showReplace:{type:Boolean,default:!0},showRemove:{type:Boolean,default:!0},forceFileIcon:{type:Boolean,default:!1}},emits:["edit","replace","remove"],setup(t,{emit:o}){const n=t,r=o,a=e.ref(null),s=e.computed(()=>n.forceFileIcon||!n.file?!1:(n.file.type||"").startsWith("image/"));e.watch(()=>n.file,m=>{a.value&&URL.revokeObjectURL(a.value),a.value=m?URL.createObjectURL(m):null},{immediate:!0}),e.onBeforeUnmount(()=>{a.value&&URL.revokeObjectURL(a.value),f&&f.disconnect()});function i(m){const p=m/1024,y=p/1024;return y>=1?`${y.toFixed(2)} MB`:p>=1?`${p.toFixed(1)} KB`:`${m} B`}const l=e.computed(()=>n.file?{name:n.file.name,size:i(n.file.size),type:n.file.type||"unknown"}:null),c=e.ref(!1),d=e.ref(!1);let f=null;const u=()=>{typeof document<"u"&&(d.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};e.onMounted(()=>{u(),typeof document<"u"&&(f=new MutationObserver(u),f.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),f.observe(document.body,{attributes:!0,attributeFilter:["class"]}))});const h=e.computed(()=>n.disabled||!c.value?{}:{borderColor:d.value?"hsl(var(--primary) / 0.4)":"hsl(var(--primary) / 0.5)",backgroundColor:d.value?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"});return(m,p)=>t.file?(e.openBlock(),e.createBlock(Zs,{key:0,class:e.normalizeClass([t.disabled?"opacity-60 pointer-events-none":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:e.withCtx(()=>[e.createVNode(ti,{class:"pb-2"},{default:e.withCtx(()=>[e.createVNode(oi,{class:"text-sm font-semibold dark:text-neutral-100"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),t.description?(e.openBlock(),e.createElementBlock("div",vC,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(ei,{class:"pt-2"},{default:e.withCtx(()=>{var y,b,g,_,E;return[e.createElementVNode("div",{class:"d-result-preview-wrap relative rounded-xl overflow-hidden border-2 border-dashed transition-colors duration-200 bg-muted dark:bg-neutral-900/30 border-border dark:border-neutral-700/50 w-full",style:e.normalizeStyle([{height:`${t.previewHeight}px`},h.value]),onMouseenter:p[2]||(p[2]=B=>c.value=!0),onMouseleave:p[3]||(p[3]=B=>c.value=!1)},[s.value&&a.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.value,alt:"Preview",class:"h-full w-full object-contain"},null,8,DC)):(e.openBlock(),e.createElementBlock("div",NC,[e.createVNode(e.unref(ne.FileText),{class:"w-10 h-10"}),e.createElementVNode("div",VC,[e.createElementVNode("p",MC,e.toDisplayString((y=l.value)==null?void 0:y.name),1),e.createElementVNode("p",TC,e.toDisplayString((b=l.value)==null?void 0:b.size),1)])])),e.createElementVNode("div",{class:"d-action-buttons",style:e.normalizeStyle({position:"absolute",top:"8px",left:"8px",right:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",zIndex:50,opacity:c.value?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:c.value?"auto":"none"})},[t.showEdit&&s.value?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:t.disabled,class:"d-action-btn shadow-md",style:e.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#eab308",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:t.disabled?"not-allowed":"pointer",transition:"all 0.2s"}),onClick:p[0]||(p[0]=B=>r("edit"))},[e.createVNode(e.unref(ne.Pencil),{style:{width:"16px",height:"16px"}})],12,PC)):(e.openBlock(),e.createElementBlock("div",OC)),t.showRemove?(e.openBlock(),e.createElementBlock("button",{key:2,disabled:t.disabled,class:"d-action-btn shadow-md",style:e.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:t.disabled?"not-allowed":"pointer",transition:"all 0.2s"}),onClick:p[1]||(p[1]=B=>r("remove"))},[e.createVNode(e.unref(ne.Trash2),{style:{width:"16px",height:"16px"}})],12,LC)):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"d-metadata-overlay",style:e.normalizeStyle({position:"absolute",left:"8px",bottom:"8px",zIndex:10,display:"inline-block",maxWidth:"calc(100% - 16px)",borderRadius:"12px",border:"1px solid rgba(0,0,0,0.1)",padding:"8px 12px",boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1)",backdropFilter:"blur(8px)",transition:"all 0.2s ease-in-out",opacity:c.value?1:0,transform:c.value?"translateY(0) scale(1)":"translateY(4px) scale(0.99)",backgroundColor:d.value?"rgba(38, 38, 38, 0.8)":"rgba(255, 255, 255, 0.8)",color:d.value?"#e5e5e5":"#171717"})},[e.createElementVNode("div",RC,[e.createElementVNode("div",IC,[p[4]||(p[4]=e.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Nama",-1)),e.createElementVNode("span",FC,e.toDisplayString((g=l.value)==null?void 0:g.name),1)]),e.createElementVNode("div",zC,[p[5]||(p[5]=e.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Ukuran",-1)),e.createElementVNode("span",$C,e.toDisplayString((_=l.value)==null?void 0:_.size),1)]),e.createElementVNode("div",jC,[p[6]||(p[6]=e.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Tipe",-1)),e.createElementVNode("span",UC,e.toDisplayString((E=l.value)==null?void 0:E.type),1)])])],4)],36)]}),_:1})]),_:1},8,["class"])):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-bb5c9599"]]);function ri(){const t=s=>{var c;const i={type:s.type||"info",title:s.title,message:s.message,duration:s.duration??3e3};typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:toast",{detail:i,bubbles:!0,composed:!0})),(i.type==="error"?console.error:i.type==="warning"?console.warn:console.log)(`[Toast][${(c=i.type)==null?void 0:c.toUpperCase()}]`,i.title||"",i.message)};return{show:t,success:(s,i)=>t({type:"success",message:s,title:i}),error:(s,i)=>t({type:"error",message:s,title:i}),warning:(s,i)=>t({type:"warning",message:s,title:i}),info:(s,i)=>t({type:"info",message:s,title:i})}}const WC={class:"space-y-3"},HC={key:1,class:"flex items-center justify-center p-6 border rounded-lg bg-muted/30 dark:bg-neutral-800/20 dark:border-neutral-800"},Lf=e.defineComponent({name:"DCodeFileField",inheritAttrs:!1,__name:"DCodeFileField",props:{modelValue:{default:null},label:{default:"Upload File"},hint:{},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:void 0},allowedTypes:{default:null},accept:{default:"*/*"},minSizeMb:{default:null},maxSizeMb:{default:1},endpoint:{},uploadFn:{}},emits:["update:modelValue","error","uploaded"],setup(t,{emit:o}){const n=t,r=o,a=e.computed({get:()=>n.modelValue,set:C=>r("update:modelValue",C)}),s=e.ref(null),i=e.ref(null);function l(C){i.value=C,r("error",C)}function c(){i.value=null}const d=e.computed(()=>{const C=(n.allowedTypes??"").trim();return C?C.split(/[,\s;]+/g).map(w=>w.trim().toLowerCase()).filter(Boolean).map(w=>w.includes("/")||w.startsWith(".")?w:`.${w}`):[]});function f(C){const x=C.lastIndexOf(".");return x>=0?C.slice(x).toLowerCase():""}const u=e.computed(()=>{if(d.value.length){const C=d.value.filter(w=>w.startsWith("."));return[...d.value.filter(w=>w.includes("/")),...C].join(",")}return n.accept}),h=e.computed(()=>d.value.length?d.value.join(", "):n.accept||"Semua File");function m(C){if(d.value.length){const x=(C.type||"").toLowerCase(),w=f(C.name);return d.value.some(D=>D.includes("/")?x===D:D.startsWith(".")?w===D:w===`.${D}`)}if(n.accept){if(n.accept==="*/*")return!0;const x=n.accept.split(",").map(k=>k.trim().toLowerCase()),w=(C.type||"").toLowerCase(),D=f(C.name);return x.some(k=>{if(k.endsWith("/*")){const v=k.slice(0,-2);return w.startsWith(v)}return k.startsWith(".")?D===k:w===k})}return!0}function p(C){return C*1024*1024}async function y(C){return C?m(C)?n.minSizeMb!=null&&C.size<p(n.minSizeMb)?`Ukuran file terlalu kecil. Minimal ${n.minSizeMb}MB`:n.maxSizeMb!=null&&C.size>p(n.maxSizeMb)?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:null:`File Type not allowed. Allowed: ${h.value}`:"File tidak valid"}const{DCodeApi:b}=Ye(),g=ri(),_=e.ref(!1);async function E(C){var x;if(n.uploadFn){try{_.value=!0;const w=await n.uploadFn(C);a.value=C,r("uploaded",w)}catch(w){console.error("Upload Error",w),g.error("Upload Failed",(w==null?void 0:w.message)||"Unknown error"),l((w==null?void 0:w.message)||"Upload Failed")}finally{_.value=!1}return}if(!((x=n.endpoint)!=null&&x.apiUrl)){a.value=C;return}if(typeof b!="function"){l("useApi() must expose DCodeApi()");return}try{_.value=!0;const w=new FormData;w.append("doc",C);const D=(n.endpoint.apiMethod||"POST").toUpperCase(),k=n.endpoint.apiUrl,v=await b("","",w,{_url:k,_method:D,withCredentials:!0,transformRequest:[(N,V)=>(V&&(delete V["Content-Type"],delete V["content-type"]),N)]}),S=(v==null?void 0:v.data)??v;a.value=C,r("uploaded",S)}catch(w){console.error("Upload Error",w),g.error("Upload Failed",(w==null?void 0:w.message)||"Unknown error"),l((w==null?void 0:w.message)||"Upload Failed")}finally{_.value=!1}}async function B(C){var w;if(n.disabled)return;c();const x=await y(C);if(x){l(x);return}s.value=C,n.uploadFn||(w=n.endpoint)!=null&&w.apiUrl?await E(C):a.value=C}function A(){c(),a.value=null,s.value=null}return e.watch(()=>n.modelValue,C=>{C&&!s.value&&(s.value=C),C||(s.value=null)},{immediate:!0}),(C,x)=>(e.openBlock(),e.createElementBlock("div",WC,[a.value?_.value?(e.openBlock(),e.createElementBlock("div",HC,[...x[1]||(x[1]=[e.createElementVNode("span",{class:"text-sm text-muted-foreground dark:text-neutral-400 animate-pulse"},"Uploading...",-1)])])):(e.openBlock(),e.createBlock(ni,{key:2,file:a.value,title:t.label,description:t.hint,disabled:t.disabled,"show-edit":!1,"show-replace":!1,"show-remove":!0,"force-file-icon":!0,"preview-height":t.previewHeight,"preview-width":t.previewWidth,onRemove:A},null,8,["file","title","description","disabled","preview-height","preview-width"])):(e.openBlock(),e.createBlock(aa,{key:0,label:t.label,hint:t.hint,accept:u.value,maxSizeMb:t.maxSizeMb,disabled:t.disabled||_.value,onPicked:B,error:i.value,onError:x[0]||(x[0]=w=>l(w))},null,8,["label","hint","accept","maxSizeMb","disabled","error"]))]))}}),qC=["for"],GC={key:0,class:"!ml-1 !text-destructive"},KC={class:"relative w-full block box-border"},XC={key:0,class:"absolute inset-y-0 left-3 flex items-center text-muted-foreground pointer-events-none z-10"},YC=["id","readonly","disabled","placeholder"],JC={class:"absolute inset-y-0 right-4 flex items-center z-10"},QC={key:1,class:"absolute z-50 mt-1 w-full rounded-xl border bg-white dark:bg-neutral-800 border-neutral-200/60 dark:border-neutral-700/50 shadow-lg box-border"},ZC={key:0,class:"flex items-center justify-center py-10 text-muted-foreground gap-2"},e_={key:1,class:"text-sm text-muted-foreground text-center"},t_=["onClick","title"],o_={class:"flex flex-col items-center justify-between gap-2 py-1 min-h-[72px]"},n_={class:"flex items-center justify-center flex-1"},r_={class:"text-[10px] leading-tight text-muted-foreground truncate w-full text-center block flex-shrink-0"},a_={key:3,class:"pt-2 text-[11px] text-muted-foreground text-center"},Rf=e.defineComponent({name:"DCodeIconDropdown",__name:"DCodeIconDropdown",props:{modelValue:{},label:{},placeholder:{default:"Pilih icon…"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},columns:{default:4},maxHeight:{default:"335px"},iconSize:{default:20},pageSize:{default:120}},emits:["update:modelValue","clear"],setup(t,{emit:o}){const n=t,r=o,a=Lt,s=e.ref(null),i=e.ref(null),l=Math.random().toString(36).slice(2,7),c=e.computed(()=>`dcode-icon-dropdown-${n.label||"icon-dropdown"}-${l}`),d=e.ref(!1),f=e.computed(()=>(n.modelValue??"").trim()||""),u=e.ref(""),h=e.ref(!1),m=e.ref(!1),p=e.ref(!1),y=e.shallowRef([]),b=e.ref(n.pageSize),g=new Set(["default","createLucideIcon","LucideIcon","Icon","icons","toKebabCase","camelCase","children","IconNode"]),_=async()=>{if(m.value||p.value)return;p.value=!0,await new Promise(I=>setTimeout(I,0));const T=Object.keys(a).filter(I=>!g.has(I)).filter(I=>/^[A-Z]/.test(I)).filter(I=>typeof a[I]=="function"||typeof a[I]=="object"&&a[I]).sort((I,X)=>I.localeCompare(X));y.value=T,m.value=!0,p.value=!1},E=e.computed(()=>f.value?Do(f.value,a):null),B=e.ref(f.value),A=e.computed(()=>!!f.value&&!d.value),C=e.computed(()=>{if(!m.value)return[];const T=(u.value??"").trim().toLowerCase();return T?y.value.filter(I=>I.toLowerCase().includes(T)):y.value}),x=e.computed(()=>C.value.slice(0,b.value)),w=e.computed(()=>{const T=n.columns;return T<=2?"grid-cols-2":T===3?"grid-cols-3":T===4?"grid-cols-4":T===5?"grid-cols-5":T>=8?"grid-cols-8":"grid-cols-6"});e.computed(()=>n.clearable?"!pr-10":"!pr-3"),e.computed(()=>E.value&&!d.value?"!pl-12":"!pl-3");const D=async()=>{var T;await e.nextTick(),(T=i.value)==null||T.focus()},k=async T=>{if(n.disabled)return;const I=T!==!1;if(h.value){h.value=!1;return}d.value=!0,await _(),I&&(u.value="",B.value=""),b.value=n.pageSize,await D()},v=()=>{d.value=!1,u.value="",B.value=f.value,b.value=n.pageSize},S=async()=>{n.disabled||(d.value?v():await k())};let N=null;const V=async T=>{if(n.disabled)return;r("update:modelValue",null),d.value||await k(!1),N&&clearTimeout(N);const I=B.value;N=setTimeout(()=>{u.value=I},300)},L=T=>{n.disabled||(r("update:modelValue",T),v(),queueMicrotask(()=>{var I;return(I=i.value)==null?void 0:I.blur()}))},O=()=>{n.disabled||(r("update:modelValue",null),r("clear"),h.value=!0,v(),queueMicrotask(()=>{var T;return(T=i.value)==null?void 0:T.focus()}))},P=T=>{if(T.key==="Escape"){T.preventDefault(),v();return}if(T.key==="Enter"&&d.value){const I=C.value[0];I&&(T.preventDefault(),L(I))}},R=T=>{if(!d.value)return;const I=T.target;s.value&&!s.value.contains(I)&&v()},j=T=>{const I=T.target;I.scrollTop+I.clientHeight>=I.scrollHeight-24&&b.value<C.value.length&&(b.value=Math.min(b.value+n.pageSize,C.value.length))};return e.onMounted(()=>{document.addEventListener("mousedown",R),queueMicrotask(()=>{var T;i.value=((T=s.value)==null?void 0:T.querySelector("input"))??null}),f.value&&_()}),e.onBeforeUnmount(()=>{document.removeEventListener("mousedown",R),N&&clearTimeout(N)}),e.watch(f,T=>{d.value||(B.value=T)}),e.watch(()=>u.value,()=>{b.value=n.pageSize}),(T,I)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootEl",ref:s,class:"!w-full !block !box-border"},[n.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:c.value,class:"!text-sm !font-medium !mb-1 !block"},[e.createTextVNode(e.toDisplayString(n.label)+" ",1),n.required?(e.openBlock(),e.createElementBlock("span",GC,"*")):e.createCommentVNode("",!0)],8,qC)):e.createCommentVNode("",!0),e.createElementVNode("div",KC,[E.value&&!d.value?(e.openBlock(),e.createElementBlock("div",XC,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.value),{size:18}))])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:c.value,"onUpdate:modelValue":I[0]||(I[0]=X=>B.value=X),readonly:A.value,disabled:n.disabled,placeholder:n.placeholder,class:e.normalizeClass(["w-full h-10 m-0 py-0 rounded-lg border bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 pr-10 outline-none box-border truncate",[E.value&&!d.value?"pl-10":"pl-4",A.value?"cursor-pointer select-none":""]]),onClick:k,onFocus:k,onInput:V,onKeydown:P},null,42,YC),[[e.vModelText,B.value]]),e.createElementVNode("div",JC,[n.clearable&&f.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"flex items-center justify-center p-1 m-0 bg-transparent border-0 text-muted-foreground hover:text-foreground transition cursor-pointer outline-none",onMousedown:I[1]||(I[1]=e.withModifiers(()=>{},["prevent"])),onClick:O,title:"Clear"},[e.createVNode(e.unref(ne.X),{class:"h-4 w-4"})],32)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"flex items-center justify-center p-1 m-0 bg-transparent border-0 text-muted-foreground hover:text-foreground transition-transform cursor-pointer outline-none",onMousedown:I[2]||(I[2]=e.withModifiers(()=>{},["prevent"])),onClick:S,title:"Open"},[e.createVNode(e.unref(ne.ChevronDown),{class:"h-4 w-4"})],32))]),d.value?(e.openBlock(),e.createElementBlock("div",QC,[e.createElementVNode("div",{class:"p-2 overflow-auto",style:e.normalizeStyle({maxHeight:n.maxHeight}),onScroll:j},[p.value?(e.openBlock(),e.createElementBlock("div",ZC,[e.createVNode(e.unref(ne.Loader2),{class:"h-4 w-4 animate-spin"}),I[3]||(I[3]=e.createElementVNode("span",{class:"text-sm"},"Loading icons…",-1))])):m.value&&C.value.length===0?(e.openBlock(),e.createElementBlock("div",e_," Icon tidak ditemukan ")):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["grid gap-2",w.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,X=>(e.openBlock(),e.createElementBlock("button",{key:X,type:"button",class:e.normalizeClass(["group rounded-lg border p-2 hover:bg-muted/40 transition",f.value===X?"ring-1 ring-primary":""]),onClick:H=>L(X),title:X},[e.createElementVNode("div",o_,[e.createElementVNode("div",n_,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a)[X]),{size:n.iconSize,class:"shrink-0"},null,8,["size"]))]),e.createElementVNode("span",r_,e.toDisplayString(X),1)])],10,t_))),128))],2)),m.value&&C.value.length>0?(e.openBlock(),e.createElementBlock("div",a_," Showing "+e.toDisplayString(x.value.length)+" / "+e.toDisplayString(C.value.length),1)):e.createCommentVNode("",!0)],36)])):e.createCommentVNode("",!0)])],512))}}),s_={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6"},i_={class:"flex items-center justify-between border-b dark:border-neutral-700/50 px-6 py-4"},l_={class:"relative overflow-auto p-0"},ai=e.defineComponent({name:"DCodeImageCropperDialog",inheritAttrs:!1,__name:"DCodeImageCropperDialog",props:{modelValue:{type:Boolean},file:{},title:{default:"Resize & Crop Gambar"},description:{default:""},aspectRatio:{default:null},outputWidth:{default:null},outputHeight:{default:null},quality:{default:.92},autoOpenEditor:{type:Boolean,default:!1}},emits:["update:modelValue","done","cancel"],setup(t,{emit:o}){const n=t,r=o,a=e.computed({get:()=>n.modelValue,set:E=>r("update:modelValue",E)}),s=e.ref(null),i=e.ref(null);let l=null,c=!1,d=0,f=null;function u(){if(l){try{l.close()}catch{}l=null,f&&(f.disconnect(),f=null),s.value&&(s.value.innerHTML=""),i.value=null}}async function h(E,B,A,C,x){const w=await new Promise((v,S)=>{const N=URL.createObjectURL(E),V=new Image;V.onload=()=>{URL.revokeObjectURL(N),v(V)},V.onerror=L=>{URL.revokeObjectURL(N),S(L)},V.src=N}),D=document.createElement("canvas");D.width=B,D.height=A;const k=D.getContext("2d");return k?(k.drawImage(w,0,0,B,A),await new Promise(v=>{D.toBlob(S=>v(S||E),C,x)})):E}function m(){if(!l||!i.value)return;const E=l.getPlugin("Dashboard"),B=l.getFile(i.value);!E||!B||requestAnimationFrame(()=>{try{E.openFileEditor(B)}catch{try{E.openFileEditor(i.value)}catch{}}})}async function p(E){if(l){l.cancelAll(),i.value=null;try{const B=l.addFile({name:E.name,type:E.type,data:E,source:"Local",isRemote:!1});i.value=String(B)}catch{}}}function y(){if(!s.value)return;l&&u(),l=new Vu({autoProceed:!1,restrictions:{maxNumberOfFiles:1,allowedFileTypes:["image/*"]}});const E=document.documentElement.classList.contains("dark");l.use(Ri,{target:s.value,inline:!0,height:480,theme:E?"dark":"light",proudlyDisplayPoweredByUppy:!1,hideUploadButton:!0,hideRetryButton:!0,hidePauseResumeButton:!0,hideCancelButton:!0,showProgressDetails:!1}),f=new MutationObserver(()=>{if(!l)return;const B=document.documentElement.classList.contains("dark"),A=l.getPlugin("Dashboard");A&&A.setOptions({theme:B?"dark":"light"})}),f.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),l.use(Mu,{target:Ri,quality:n.quality,cropperOptions:{viewMode:1,dragMode:"move",autoCropArea:1,aspectRatio:n.aspectRatio==null?Number.NaN:n.aspectRatio}}),l.on("file-editor:cancel",()=>{a.value=!1}),l.on("file-added",B=>{i.value=(B==null?void 0:B.id)??null,n.autoOpenEditor&&setTimeout(()=>m(),80)}),l.on("file-editor:complete",async B=>{const A=++d;try{const C=B.data,x=C.type||B.type||"image/jpeg";let w=C;if(n.outputWidth&&n.outputHeight&&(w=await h(C,n.outputWidth,n.outputHeight,x,n.quality)),c||A!==d)return;const D=B.name||"edited-image.jpg",k=new File([w],D,{type:x});await b(k,"UPPY_EDITOR_COMPLETE"),r("done",k),a.value=!1}catch{}})}async function b(E,B="CROP_RESULT"){const A=URL.createObjectURL(E);try{const C=await new Promise((x,w)=>{const D=new Image;D.onload=()=>x(D),D.onerror=w,D.src=A});console.group(B),console.log("file:",E),console.table({name:E.name,type:E.type,sizeBytes:E.size,sizeMB:+(E.size/1024/1024).toFixed(3),width:C.naturalWidth,height:C.naturalHeight,ratio:+(C.naturalWidth/C.naturalHeight).toFixed(4)}),console.log("previewUrl:",A),console.groupEnd()}finally{URL.revokeObjectURL(A)}}e.watch(a,async E=>{c=!E,d++,E?(await e.nextTick(),y(),n.file&&await p(n.file)):u()},{flush:"post"}),e.watch(()=>n.file,async E=>{a.value&&E&&(await e.nextTick(),await p(E))}),e.onBeforeUnmount(()=>{c=!0,d++,u()});const g=E=>{E.key==="Escape"&&a.value&&(a.value=!1)};e.watch(a,E=>{E?globalThis.addEventListener("keydown",g):globalThis.removeEventListener("keydown",g)},{immediate:!0});const _=e.ref(!1);return(E,B)=>a.value?(e.openBlock(),e.createElementBlock("div",s_,[e.createVNode(e.Transition,{appear:"","enter-active-class":"duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed inset-0 bg-black/60 backdrop-blur-sm transition-opacity",onClick:B[0]||(B[0]=A=>a.value=!1)})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{appear:"","enter-active-class":"duration-300 ease-out","enter-from-class":"opacity-0 scale-95 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 scale-100 translate-y-0 sm:scale-100","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100 scale-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 scale-95 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative flex w-fit max-w-4xl flex-col overflow-hidden rounded-xl border border-border dark:border-neutral-700/50 bg-background dark:bg-neutral-800 shadow-2xl transition-all",onClick:B[4]||(B[4]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",i_,[B[6]||(B[6]=e.createElementVNode("h3",{class:"text-lg font-semibold leading-none tracking-tight dark:text-neutral-100"}," Crop & Resize ",-1)),e.createElementVNode("button",{class:"d-close-btn rounded-sm dark:text-neutral-400 ring-offset-background transition-opacity focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",style:e.normalizeStyle({opacity:_.value?1:.7}),onClick:B[1]||(B[1]=A=>a.value=!1),onMouseenter:B[2]||(B[2]=A=>_.value=!0),onMouseleave:B[3]||(B[3]=A=>_.value=!1)},[e.createVNode(e.unref(ne.X),{class:"h-4 w-4"}),B[5]||(B[5]=e.createElementVNode("span",{class:"sr-only"},"Close",-1))],36)]),e.createElementVNode("div",l_,[e.createElementVNode("div",{ref_key:"dashboardEl",ref:s,class:"uppy-wrap"},null,512)])])):e.createCommentVNode("",!0)]),_:1})])):e.createCommentVNode("",!0)}}),c_={key:0,class:"text-xs text-muted-foreground dark:text-neutral-400"},d_=["src"],f_=["disabled"],u_=["disabled"],h_={class:"text-[11px] text-foreground/90 dark:text-neutral-200 space-y-1 whitespace-nowrap"},m_={class:"flex gap-2"},p_={class:"font-medium truncate"},g_={class:"flex gap-2"},b_={class:"font-medium"},y_={class:"flex gap-2"},x_={class:"font-medium truncate"},si=dt(e.defineComponent({name:"DCodeImageResult",__name:"DCodeImageResult",props:{file:{},title:{default:"Hasil Gambar"},description:{default:""},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:220},showEdit:{type:Boolean,default:!0},showReplace:{type:Boolean,default:!0},showRemove:{type:Boolean,default:!0}},emits:["edit","replace","remove"],setup(t,{emit:o}){const n=t,r=o,a=e.ref(null);e.watch(()=>n.file,h=>{a.value&&URL.revokeObjectURL(a.value),a.value=h?URL.createObjectURL(h):null},{immediate:!0}),e.onBeforeUnmount(()=>{a.value&&URL.revokeObjectURL(a.value),d&&d.disconnect()});function s(h){const m=h/1024,p=m/1024;return p>=1?`${p.toFixed(2)} MB`:m>=1?`${m.toFixed(1)} KB`:`${h} B`}const i=e.computed(()=>n.file?{name:n.file.name,size:s(n.file.size),type:n.file.type||"unknown"}:null),l=e.ref(!1),c=e.ref(!1);let d=null;const f=()=>{typeof document<"u"&&(c.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};e.onMounted(()=>{f(),typeof document<"u"&&(d=new MutationObserver(f),d.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),d.observe(document.body,{attributes:!0,attributeFilter:["class"]}))});const u=e.computed(()=>n.disabled||!l.value?{}:{borderColor:c.value?"hsl(var(--primary) / 0.4)":"hsl(var(--primary) / 0.5)",backgroundColor:c.value?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"});return(h,m)=>t.file?(e.openBlock(),e.createBlock(Zs,{key:0,class:e.normalizeClass([t.disabled?"opacity-60 pointer-events-none":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:e.withCtx(()=>[e.createVNode(ti,{class:"pb-2"},{default:e.withCtx(()=>[e.createVNode(oi,{class:"text-sm font-semibold dark:text-neutral-100"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),t.description?(e.openBlock(),e.createElementBlock("div",c_,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(ei,{class:"pt-2"},{default:e.withCtx(()=>{var p,y,b;return[e.createElementVNode("div",{class:"d-result-preview-wrap relative rounded-xl overflow-hidden border-2 border-dashed transition-colors duration-200 bg-muted dark:bg-neutral-900/30 border-border dark:border-neutral-700/50 w-full",style:e.normalizeStyle([{height:`${t.previewHeight}px`},u.value]),onMouseenter:m[2]||(m[2]=g=>l.value=!0),onMouseleave:m[3]||(m[3]=g=>l.value=!1)},[a.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.value,alt:"Preview",class:"h-full w-full object-contain"},null,8,d_)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"d-action-buttons",style:e.normalizeStyle({position:"absolute",top:"8px",left:"8px",right:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",zIndex:50,opacity:l.value?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:l.value?"auto":"none"})},[t.showEdit?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:t.disabled,class:"d-action-btn shadow-md",style:e.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#eab308",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:t.disabled?"not-allowed":"pointer",transition:"all 0.2s",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}),onClick:m[0]||(m[0]=g=>r("edit"))},[e.createVNode(e.unref(ne.Pencil),{style:{width:"16px",height:"16px"}})],12,f_)):e.createCommentVNode("",!0),t.showRemove?(e.openBlock(),e.createElementBlock("button",{key:1,disabled:t.disabled,class:"d-action-btn shadow-md",style:e.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:t.disabled?"not-allowed":"pointer",transition:"all 0.2s",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}),onClick:m[1]||(m[1]=g=>r("remove"))},[e.createVNode(e.unref(ne.Trash2),{style:{width:"16px",height:"16px"}})],12,u_)):e.createCommentVNode("",!0)],4),e.createElementVNode("div",{class:"d-metadata-overlay",style:e.normalizeStyle({position:"absolute",left:"8px",bottom:"8px",zIndex:10,display:"inline-block",maxWidth:"calc(100% - 16px)",borderRadius:"12px",border:"1px solid rgba(0,0,0,0.1)",padding:"8px 12px",boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1)",backdropFilter:"blur(8px)",transition:"all 0.2s ease-in-out",opacity:l.value?1:0,transform:l.value?"translateY(0) scale(1)":"translateY(4px) scale(0.99)",backgroundColor:c.value?"rgba(38, 38, 38, 0.8)":"rgba(255, 255, 255, 0.8)",color:c.value?"#e5e5e5":"#171717"})},[e.createElementVNode("div",h_,[e.createElementVNode("div",m_,[m[4]||(m[4]=e.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Nama",-1)),e.createElementVNode("span",p_,e.toDisplayString((p=i.value)==null?void 0:p.name),1)]),e.createElementVNode("div",g_,[m[5]||(m[5]=e.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Ukuran",-1)),e.createElementVNode("span",b_,e.toDisplayString((y=i.value)==null?void 0:y.size),1)]),e.createElementVNode("div",y_,[m[6]||(m[6]=e.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Tipe",-1)),e.createElementVNode("span",x_,e.toDisplayString((b=i.value)==null?void 0:b.type),1)])])],4)],36)]}),_:1})]),_:1},8,["class"])):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-e1d893ab"]]),k_={class:"space-y-3"},sa=e.defineComponent({name:"DCodeImageField",inheritAttrs:!1,__name:"DCodeImageField",props:{modelValue:{default:null},label:{default:"Upload Gambar"},hint:{default:"Drag & drop atau klik area ini"},disabled:{type:Boolean,default:!1},allowedTypes:{default:null},accept:{default:"image/*"},minSizeMb:{default:null},maxSizeMb:{default:1},title:{default:"Hasil Gambar"},description:{default:""},previewWidth:{default:360},previewHeight:{default:220},aspectRatio:{default:null},outputWidth:{default:null},outputHeight:{default:null},quality:{default:.92},autoOpenEditor:{type:Boolean,default:!0},minWidth:{default:null},minHeight:{default:null},maxWidth:{default:null},maxHeight:{default:null},endpoint:{},uploadFn:{},editUseOriginal:{type:Boolean,default:!1}},emits:["update:modelValue","error","uploaded"],setup(t,{emit:o}){const n=t,r=o,a=e.computed({get:()=>n.modelValue,set:O=>r("update:modelValue",O)}),s=e.ref(!1),i=e.ref(null),l=e.ref(null),c=e.ref(null);function d(O){c.value=O,r("error",O)}function f(){c.value=null}const u=e.computed(()=>{const O=(n.allowedTypes??"").trim();return O?O.split(/[,\s;]+/g).map(R=>R.trim().toLowerCase()).filter(Boolean).map(R=>R.includes("/")||R.startsWith(".")?R:`.${R}`):[]});function h(O){const P=O.lastIndexOf(".");return P>=0?O.slice(P).toLowerCase():""}const m=e.computed(()=>{if(u.value.length){const O=u.value.filter(R=>R.startsWith("."));return[...u.value.filter(R=>R.includes("/")),...O].join(",")}return n.accept||"image/*"}),p=e.computed(()=>u.value.length?u.value.join(", "):n.accept||"image/*");function y(O){if(u.value.length){const R=(O.type||"").toLowerCase(),j=h(O.name);return u.value.some(T=>T.includes("/")?R===T:T.startsWith(".")?j===T:j===`.${T}`)}return(n.accept||"image/*").toLowerCase().includes("image/")?(O.type||"").toLowerCase().startsWith("image/"):!0}function b(O){return O*1024*1024}async function g(O){var P;return(P=O.type)!=null&&P.startsWith("image/")?await new Promise(R=>{const j=URL.createObjectURL(O),T=new Image;T.onload=()=>{URL.revokeObjectURL(j),R({w:T.naturalWidth,h:T.naturalHeight})},T.onerror=()=>{URL.revokeObjectURL(j),R(null)},T.src=j}):null}async function _(O){if(!(n.minWidth!=null||n.minHeight!=null||n.maxWidth!=null||n.maxHeight!=null))return null;const R=await g(O);return R?n.minWidth!=null&&R.w<n.minWidth?`Lebar gambar minimal ${n.minWidth}px`:n.minHeight!=null&&R.h<n.minHeight?`Tinggi gambar minimal ${n.minHeight}px`:n.maxWidth!=null&&R.w>n.maxWidth?`Lebar gambar maksimal ${n.maxWidth}px`:n.maxHeight!=null&&R.h>n.maxHeight?`Tinggi gambar maksimal ${n.maxHeight}px`:null:"Gagal membaca dimensi gambar"}async function E(O){return O?y(O)?n.minSizeMb!=null&&O.size<b(n.minSizeMb)?`Ukuran file terlalu kecil. Minimal ${n.minSizeMb}MB`:n.maxSizeMb!=null&&O.size>b(n.maxSizeMb)?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:await _(O):`only Allowed: ${p.value}`:"File tidak valid"}function B(O){n.disabled||(i.value=O,s.value=!0)}async function A(O){if(n.disabled)return;f();const P=await E(O);if(P){d(P);return}l.value=O,B(O)}const{DCodeApi:C}=Ye(),x=ri(),w=e.ref(!1);e.ref(null);function D(O,P){return!O||!P?null:O.replace(/\/+$/,"")+"/"+P.replace(/^\/+/,"")}function k(O){var T;const P=(O==null?void 0:O.data)??O,R=(T=P==null?void 0:P.data)==null?void 0:T[0];if(!R)return null;const j=D(R.server,R.url);return{...R,fullUrl:j?encodeURI(j):null}}async function v(O){var P;if(n.uploadFn){try{w.value=!0;const R=await n.uploadFn(O);a.value=O,r("uploaded",R)}catch(R){console.error("Upload Error",R),x.error("Upload Failed",(R==null?void 0:R.message)||"Unknown error"),d((R==null?void 0:R.message)||"Upload Failed")}finally{w.value=!1}return}if(!((P=n.endpoint)!=null&&P.apiUrl)){a.value=O;return}if(typeof C!="function"){d("useApi() must expose DCodeApi()");return}try{w.value=!0;const R=new FormData;R.append("doc",O);const j=(n.endpoint.apiMethod||"POST").toUpperCase(),T=n.endpoint.apiUrl,I=await C("","",R,{_url:T,_method:j,withCredentials:!0,transformRequest:[(H,W)=>(W&&(delete W["Content-Type"],delete W["content-type"]),H)]}),X=(I==null?void 0:I.data)??I;k(X),a.value=O,r("uploaded",X)}catch(R){console.error("Upload Error",R),x.error("Upload Failed",(R==null?void 0:R.message)||"Unknown error"),d((R==null?void 0:R.message)||"Upload Failed")}finally{w.value=!1}}async function S(O){var P;f(),n.uploadFn||(P=n.endpoint)!=null&&P.apiUrl?await v(O):a.value=O,s.value=!1,i.value=null}function N(){s.value=!1,i.value=null}async function V(){if(!a.value)return;f();const O=n.editUseOriginal?l.value??a.value:a.value,P=await E(O);if(P){d(P);return}B(O)}function L(){f(),a.value=null,i.value=null,s.value=!1,l.value=null}return e.watch(()=>n.modelValue,O=>{O&&!l.value&&(l.value=O),O||(l.value=null)},{immediate:!0}),(O,P)=>(e.openBlock(),e.createElementBlock("div",k_,[a.value?(e.openBlock(),e.createBlock(si,{key:1,file:a.value,title:t.label,description:t.description,"preview-width":t.previewWidth,disabled:t.disabled,"show-edit":!0,"show-remove":!0,"show-replace":!1,onEdit:V,onRemove:L,"aspect-ratio":16/9},null,8,["file","title","description","preview-width","disabled"])):(e.openBlock(),e.createBlock(aa,{key:0,label:t.label,hint:t.hint,accept:m.value,maxSizeMb:t.maxSizeMb,disabled:t.disabled,onPicked:A,error:c.value,onError:P[0]||(P[0]=R=>d(R))},null,8,["label","hint","accept","maxSizeMb","disabled","error"])),e.createVNode(ai,{modelValue:s.value,"onUpdate:modelValue":P[1]||(P[1]=R=>s.value=R),file:i.value,title:t.title,description:t.description,"auto-open-editor":t.autoOpenEditor,"aspect-ratio":t.aspectRatio,"output-width":t.outputWidth,"output-height":t.outputHeight,quality:t.quality,onDone:S,onCancel:N},null,8,["modelValue","file","title","description","auto-open-editor","aspect-ratio","output-width","output-height","quality"])]))}}),w_=["aria-busy"],C_={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},__=["for"],E_={key:0,class:"ml-1 text-destructive"},B_=["id","disabled"],S_={class:"min-w-0 flex-1 text-left"},A_={key:0,class:"flex flex-wrap gap-1.5"},v_={class:"max-w-[220px] truncate"},D_=["onClick"],N_={key:0,class:"inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 border-transparent"},V_={key:1,class:"text-muted-foreground truncate"},M_={class:"flex items-center gap-2 shrink-0"},T_={key:0,class:"p-2 border-b border-gray-200 dark:border-gray-800"},P_=["placeholder","onKeydown"],O_={key:0,class:"h-full flex items-center justify-center px-3 text-sm text-muted-foreground"},L_=["disabled","onClick"],R_={class:"truncate"},I_={key:0,class:"text-primary-600 dark:text-primary-400"},F_={key:1,class:"h-full flex items-center justify-center text-sm text-muted-foreground"},z_={key:0},$_={key:1},j_={key:1,class:"text-xs text-destructive"},ii=e.defineComponent({name:"DCodeMultiSelect",inheritAttrs:!1,__name:"DCodeMultiSelect",props:{modelValue:{},items:{default:()=>[]},endpoint:{default:void 0},fetchItems:{},autoFetchOnOpen:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!1},refreshOnOpen:{type:Boolean,default:!1},label:{default:""},placeholder:{default:"Pilih data…"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},searchPlaceholder:{default:"Cari…"},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},maxChips:{default:5},maxSelected:{default:5},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},returnObject:{type:Boolean,default:!1},virtual:{type:Boolean,default:!0},itemHeight:{default:40},maxRows:{default:5},overscan:{default:6},error:{default:null},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","clear","max"],setup(t,{emit:o}){const n=e.useAttrs(),r=o,a=t,s=e.computed(()=>(a.label||n.label)??void 0),i=e.computed(()=>a.visible??!0),l=Math.random().toString(36).slice(2,7),c=e.computed(()=>`app-multiselect-${n.id||s.value||"field"}-${l}`),d=e.computed(()=>{if(a.required)return!0;const G=n.required,ee=n["aria-required"];return G===""||G===!0||G==="true"||(ee==="true"||ee===!0)}),f=e.computed(()=>!!a.error);function u(G){return G?typeof a.itemTitle=="function"?a.itemTitle(G)??"":String((G==null?void 0:G[a.itemTitle])??""):""}function h(G){return G?typeof a.itemValue=="function"?a.itemValue(G):G==null?void 0:G[a.itemValue]:null}function m(G,ee){return h(G)??ee}const p=e.computed(()=>Array.isArray(a.modelValue)?a.modelValue:[]),y=e.computed(()=>{var G;return!!((G=a.endpoint)!=null&&G.apiUrl)||!!a.fetchItems}),b=e.ref([]),g=e.ref(!1),_=e.ref(!1),E=e.computed(()=>{var ee;const G=(ee=a.endpoint)==null?void 0:ee.apiOptions;if(G)return typeof G=="function"?G():G}),B=e.computed(()=>{var Ce,qe;const G=((Ce=a.endpoint)==null?void 0:Ce.apiUrl)??"",ee=(((qe=a.endpoint)==null?void 0:qe.apiMethod)??"GET").toUpperCase(),re=JSON.stringify(E.value??null);return`${ee} ${G} :: ${re}`}),A=e.computed(()=>y.value?b.value:a.items||[]);async function C(){var G;if(y.value&&!(!((G=a.endpoint)!=null&&G.apiUrl)&&!a.fetchItems)&&!g.value){g.value=!0;try{let ee;if(a.fetchItems){const re=await a.fetchItems(),Ce=(re==null?void 0:re.data)??re;ee=(Ce==null?void 0:Ce.data)??Ce}else{const{DCodeApi:re}=Ye();if(typeof re!="function"){console.error("[DCodeMultiSelectChips] useApi() must expose DCodeApi()");return}const Ce={page:1,perPage:100,...E.value||{}},qe=await re("","",Ce,{_url:a.endpoint.apiUrl,_method:(a.endpoint.apiMethod||"GET").toUpperCase()}),kt=(qe==null?void 0:qe.data)??qe;ee=(kt==null?void 0:kt.data)??kt}b.value=Array.isArray(ee)?ee:[],_.value=!0}catch(ee){console.error("[DCodeMultiSelectChips][fetchOptions] ERROR:",ee),b.value=[]}finally{g.value=!1}}}e.watch(()=>B.value,()=>{b.value=[],_.value=!1}),e.onMounted(()=>{a.autoFetchOnMount&&y.value&&C()});const x=e.computed(()=>{const G=p.value;if(a.returnObject)return G;const ee=new Map;for(const re of A.value)ee.set(h(re),re);return G.map(re=>ee.get(re)??{[a.itemValue]:re,[a.itemTitle]:String(re)})}),w=e.computed(()=>a.maxChips===null?x.value:x.value.slice(0,a.maxChips));function D(G){const ee=p.value;if(a.returnObject){const re=h(G);return ee.some(Ce=>h(Ce)===re)}return ee.includes(h(G))}const k=e.computed(()=>{if(a.maxSelected===null||a.maxSelected===void 0)return null;const G=Number(a.maxSelected);return Number.isFinite(G)&&G>0?G:null}),v=e.computed(()=>{const G=k.value;return G===null?!1:p.value.length>=G});function S(G){return!D(G)&&v.value}const N=e.computed(()=>{const G=p.value,ee=new Set;if(a.returnObject)for(const re of G)ee.add(h(re));else for(const re of G)ee.add(re);return ee}),V=e.computed(()=>{const G=N.value;return(A.value||[]).filter(ee=>!G.has(h(ee)))}),L=e.computed(()=>A.value.length===0?!1:V.value.length===0),O=e.ref(null),P=e.ref(null),R=e.ref(null),j=e.ref(!1),T=e.ref(""),I=e.ref(0),X=e.ref(0),{floatingStyles:H}=Ua(O,P,{whileElementsMounted:Ia,placement:"bottom-start",middleware:[Fa(8),$a(),za({padding:8}),ja({apply({rects:G,elements:ee}){Object.assign(ee.floating.style,{width:`${G.reference.width}px`,"--floating-width":`${G.reference.width}px`})}})]}),W=e.computed(()=>H.value),Z=e.computed(()=>{const G=Number(a.maxRows);return Number.isFinite(G)&&G>0?G:5});async function oe(){a.disabled||a.readonly||(j.value=!0,X.value=0,requestAnimationFrame(()=>{R.value&&(R.value.scrollTop=0),I.value=0}),y.value&&a.autoFetchOnOpen&&(a.refreshOnOpen||!_.value)&&!g.value&&await C())}function ge(){j.value=!1}function Ne(){j.value?ge():oe()}function we(G){var re,Ce;if(!j.value)return;const ee=G.target;(re=O.value)!=null&&re.contains(ee)||(Ce=P.value)!=null&&Ce.contains(ee)||ge()}e.onMounted(()=>document.addEventListener("mousedown",we)),e.onBeforeUnmount(()=>document.removeEventListener("mousedown",we));function Q(G){if(a.disabled||a.readonly)return;if(S(G)){r("max");return}const ee=[...p.value];if(a.returnObject){const re=h(G);if(ee.some(qe=>h(qe)===re))return;r("update:modelValue",[...ee,G])}else{const re=h(G);if(ee.includes(re))return;r("update:modelValue",[...ee,re])}T.value="",X.value=0,requestAnimationFrame(()=>{R.value&&(R.value.scrollTop=0),I.value=0})}function $(G){if(a.disabled||a.readonly)return;const ee=[...p.value];if(a.returnObject){const re=h(G);r("update:modelValue",ee.filter(Ce=>h(Ce)!==re))}else{const re=h(G);r("update:modelValue",ee.filter(Ce=>Ce!==re))}}function Y(){a.disabled||a.readonly||(r("update:modelValue",[]),r("clear"),ge())}const ae=e.computed(()=>{const G=T.value.trim().toLowerCase(),ee=V.value;return G?ee.filter(re=>u(re).toLowerCase().includes(G)):ee}),ye=e.computed(()=>ae.value.length);e.watch(j,G=>{G||(T.value="")});const Pe=e.computed(()=>{if(L.value)return a.itemHeight;const G=ye.value;return(G<=0?1:Math.min(G,Z.value))*a.itemHeight}),Ee=e.computed(()=>a.virtual?ye.value*a.itemHeight:0),Ue=e.computed(()=>a.virtual?Math.ceil(Pe.value/a.itemHeight)+a.overscan:ye.value),Ie=e.computed(()=>{if(!a.virtual)return 0;const G=Math.floor(I.value/a.itemHeight)-Math.floor(a.overscan/2);return Math.max(0,G)}),se=e.computed(()=>a.virtual?Math.min(ye.value,Ie.value+Ue.value):ye.value),Oe=e.computed(()=>a.virtual?Ie.value*a.itemHeight:0),Le=e.computed(()=>{const G=ae.value;return a.virtual?G.slice(Ie.value,se.value):G});function ve(G){const ee=G.target;I.value=ee.scrollTop}function lt(G){return G===X.value}function q(G){const ee=R.value;if(!ee||!a.virtual)return;const re=G*a.itemHeight,Ce=re+a.itemHeight,qe=ee.scrollTop,kt=ee.scrollTop+ee.clientHeight;re<qe?ee.scrollTop=re:Ce>kt&&(ee.scrollTop=Ce-ee.clientHeight)}function ie(G){const ee=Math.max(0,ye.value-1);X.value=Math.min(ee,Math.max(0,X.value+G)),q(X.value)}function he(){const G=ae.value[X.value];G&&Q(G)}const te=e.computed(()=>a.clearable&&!a.disabled&&!a.readonly&&x.value.length>0),le=e.computed(()=>f.value?"border-destructive ring-1 ring-destructive":j.value?"border-neutral-400 ring-1 ring-neutral-400 dark:border-neutral-600 dark:ring-neutral-600":"");return(G,ee)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-1 w-full",[e.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value?(e.openBlock(),e.createElementBlock("div",C_)):e.createCommentVNode("",!0),ee[3]||(ee[3]=e.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.value?(e.openBlock(),e.createElementBlock("label",{key:0,for:c.value,class:"text-sm font-medium"},[e.createTextVNode(e.toDisplayString(s.value)+" ",1),d.value?(e.openBlock(),e.createElementBlock("span",E_,"*")):e.createCommentVNode("",!0)],8,__)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"referenceEl",ref:O,class:"relative"},[e.createElementVNode("button",{id:c.value,type:"button",class:e.normalizeClass(["w-full justify-between h-auto min-h-10 px-3 py-2 transition border rounded-lg flex items-center",["bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 text-foreground dark:text-gray-300",a.disabled?"cursor-not-allowed opacity-50":a.readonly?"cursor-default bg-neutral-50/50 dark:bg-neutral-900/30":"",le.value]]),disabled:a.disabled||a.readonly,onClick:Ne},[e.createElementVNode("div",S_,[x.value.length?(e.openBlock(),e.createElementBlock("div",A_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(re,Ce)=>(e.openBlock(),e.createElementBlock("div",{key:`chip-${m(re,Ce)}`,class:"inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 border-transparent gap-1"},[e.createElementVNode("span",v_,e.toDisplayString(u(re)),1),a.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"ml-1 opacity-70 hover:opacity-100",onClick:e.withModifiers(qe=>$(re),["stop"]),"aria-label":"Remove"}," ✕ ",8,D_))]))),128)),a.maxChips!==null&&x.value.length>a.maxChips?(e.openBlock(),e.createElementBlock("div",N_," +"+e.toDisplayString(x.value.length-(a.maxChips??0)),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",V_,e.toDisplayString(a.placeholder),1))]),e.createElementVNode("div",M_,[te.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-muted-foreground hover:text-foreground",onClick:e.withModifiers(Y,["stop"]),"aria-label":"Clear"}," ✕ ")):e.createCommentVNode("",!0),e.createVNode(e.unref(ne.ChevronDown),{class:"h-4 w-4 text-muted-foreground"})])],10,B_),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[j.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"floatingEl",ref:P,class:"-mt-1 z-[9999] w-[var(--floating-width)] rounded-lg border shadow-lg overflow-hidden bg-white dark:bg-neutral-800 border-gray-200 dark:border-neutral-700/50",style:e.normalizeStyle(W.value)},[a.searchable&&!L.value?(e.openBlock(),e.createElementBlock("div",T_,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":ee[0]||(ee[0]=re=>T.value=re),placeholder:a.searchPlaceholder,class:"w-full h-10 px-3 py-2 text-sm bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700/50 rounded-md focus:outline-none focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600",onKeydown:[ee[1]||(ee[1]=e.withKeys(e.withModifiers(re=>ie(1),["prevent"]),["down"])),ee[2]||(ee[2]=e.withKeys(e.withModifiers(re=>ie(-1),["prevent"]),["up"])),e.withKeys(e.withModifiers(he,["prevent"]),["enter"]),e.withKeys(e.withModifiers(ge,["prevent"]),["esc"])]},null,40,P_),[[e.vModelText,T.value]])])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"listEl",ref:R,class:"relative overflow-auto",style:e.normalizeStyle({height:Pe.value+"px"}),onScroll:ve},[L.value?(e.openBlock(),e.createElementBlock("div",O_," All items have been selected ")):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.virtual?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:Ee.value+"px"})},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(a.virtual?"absolute left-0 top-0 w-full":""),style:e.normalizeStyle(a.virtual?{transform:`translateY(${Oe.value}px)`}:void 0)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Le.value,(re,Ce)=>(e.openBlock(),e.createElementBlock("button",{key:String(m(re,Ie.value+Ce)),type:"button",class:e.normalizeClass(["w-full px-3 text-left text-sm flex items-center justify-between gap-3",[S(re)?"cursor-not-allowed opacity-50":"hover:bg-neutral-50 dark:hover:bg-neutral-800/60",lt(Ie.value+Ce)?"bg-neutral-50 dark:bg-neutral-800/60":"",D(re)?"font-semibold":"font-normal"]]),style:e.normalizeStyle({height:a.itemHeight+"px"}),disabled:a.disabled||S(re),onClick:qe=>Q(re)},[e.createElementVNode("span",R_,e.toDisplayString(u(re)),1),D(re)?(e.openBlock(),e.createElementBlock("span",I_,"✓")):e.createCommentVNode("",!0)],14,L_))),128))],6),ye.value===0?(e.openBlock(),e.createElementBlock("div",F_,[g.value?(e.openBlock(),e.createElementBlock("span",z_,"Loading data…")):(e.openBlock(),e.createElementBlock("span",$_,"Tidak ada data"))])):e.createCommentVNode("",!0)],64))],36)],4)):e.createCommentVNode("",!0)]))],512),f.value?(e.openBlock(),e.createElementBlock("p",j_,e.toDisplayString(a.error),1)):e.createCommentVNode("",!0)],64))],10,w_)),[[e.vShow,i.value]])}}),U_={class:"space-y-4"},W_={key:0,class:"flex flex-col gap-0.5"},H_=["for"],q_=["for"],G_={class:"text-[11px] text-gray-500 dark:text-gray-400"},K_={class:"flex items-center gap-2 flex-nowrap"},X_=["id","value","disabled","onKeydown","onInput","onPaste"],ia=e.defineComponent({name:"DCodeOtpInput",inheritAttrs:!1,__name:"DCodeOtpInput",props:{modelValue:{default:""},totalInput:{default:6},default:{default:""},label:{default:""},endpoint:{},submitFn:{}},emits:["updateOtp","update:modelValue","complete","loading","success","error"],setup(t,{emit:o}){const n=e.useAttrs(),r=Math.random().toString(36).slice(2,7),a=e.computed(()=>`app-otp-${(n.id||s.label||"otp-field").replaceAll(/\s+/g,"-").toLowerCase()}-${r}`),s=t,i=o,l=e.ref([]),c=e.ref([]),d=e.ref(!1),{DCodeApi:f}=Ye(),u=ri(),h=e.computed(()=>{const C=Number(s.totalInput);return C&&C>0?C:6}),m=()=>{c.value=Array.from({length:h.value},(C,x)=>{var w;return((w=s.default)==null?void 0:w[x])??""}),i("updateOtp",c.value.join(""))};m(),e.watch(()=>[s.totalInput,s.default],()=>m());const p=C=>{C<0||C>=h.value||e.nextTick(()=>{var x;return(x=l.value[C])==null?void 0:x.focus()})},y=C=>C.match(/[a-zA-Z0-9]/)?C.match(/[a-zA-Z0-9]/)[0]:"";async function b(C){var x;if(i("complete",C),s.submitFn){try{d.value=!0,i("loading",!0);const w=await s.submitFn(C);i("success",w)}catch(w){console.error("OTP Submit Error",w),u.error("Submit Failed",(w==null?void 0:w.message)||"Unknown error"),i("error",(w==null?void 0:w.message)||"Submit Failed")}finally{d.value=!1,i("loading",!1)}return}if((x=s.endpoint)!=null&&x.apiUrl){if(typeof f!="function"){i("error","useApi() must expose DCodeApi()");return}try{d.value=!0,i("loading",!0);const w=(s.endpoint.apiMethod||"POST").toUpperCase(),D=s.endpoint.apiUrl,k=await f("","",{otp:C},{_url:D,_method:w,withCredentials:!0}),v=(k==null?void 0:k.data)??k;i("success",v)}catch(w){console.error("OTP Submit Error",w),u.error("Submit Failed",(w==null?void 0:w.message)||"Unknown error"),i("error",(w==null?void 0:w.message)||"Submit Failed")}finally{d.value=!1,i("loading",!1)}}}const g=(C,x)=>{c.value[C]=y(x);const w=c.value.join("");i("updateOtp",w),i("update:modelValue",w),w.length===h.value&&b(w)},_=(C,x)=>{const w=C.key,D=/^\d$/.test(w),k=/^[a-zA-Z]$/.test(w);if(w==="Backspace"){if(C.preventDefault(),c.value[x]){g(x,"");return}x>0&&(g(x-1,""),p(x-1));return}if(w==="ArrowLeft"){C.preventDefault(),p(x-1);return}if(w==="ArrowRight"){C.preventDefault(),p(x+1);return}if(D||k){C.preventDefault(),g(x,w),x<h.value-1&&p(x+1);return}w.length===1&&C.preventDefault()},E=(C,x)=>{const w=C.target,D=w.value??"",k=y(D);w.value=k,g(x,k),k&&x<h.value-1&&p(x+1)},B=(C,x)=>{var S;C.preventDefault();const D=(((S=C.clipboardData)==null?void 0:S.getData("text"))??"").replaceAll(/[^a-zA-Z0-9]/g,"");if(!D)return;let k=x;for(const N of D){if(k>=h.value)break;c.value[k]=N,k++}const v=c.value.join("");i("updateOtp",v),i("update:modelValue",v),v.length===h.value&&b(v),p(Math.min(k,h.value-1))},A=C=>x=>{l.value[C]=(x==null?void 0:x.$el)??x};return(C,x)=>(e.openBlock(),e.createElementBlock("div",U_,[s.label||h.value?(e.openBlock(),e.createElementBlock("div",W_,[s.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:a.value,class:"text-sm font-medium text-foreground"},e.toDisplayString(s.label),9,H_)):(e.openBlock(),e.createElementBlock("label",{key:1,for:a.value,class:"text-sm font-medium text-foreground"}," Masukkan kode keamanan ",8,q_)),e.createElementVNode("p",G_," Ketik "+e.toDisplayString(h.value)+" digit kode verifikasi Anda ",1)])):e.createCommentVNode("",!0),e.createElementVNode("div",K_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,w=>(e.openBlock(),e.createElementBlock("input",{key:w,id:w===1?a.value:void 0,ref_for:!0,ref:A(w-1),value:c.value[w-1]||"",type:"text",inputmode:"text",maxlength:"1",autocomplete:"one-time-code","aria-label":"`OTP digit ${i}`",placeholder:"*",disabled:d.value,class:e.normalizeClass(["w-12 h-12 flex-none text-center text-xl font-bold rounded-xl border transition-all duration-200 box-border p-0","focus:outline-none focus:scale-105 disabled:opacity-50 disabled:cursor-not-allowed",c.value[w-1]?"border-blue-500 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300":"border-gray-300 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 text-gray-400 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600"]),onKeydown:D=>_(D,w-1),onInput:D=>E(D,w-1),onPaste:D=>B(D,w-1)},null,42,X_))),128))])]))}}),Y_={class:"w-full"},J_={key:0,class:"flex items-center justify-between mb-2"},Q_={key:0,class:"text-sm font-medium text-gray-700"},Z_={key:1,class:"text-sm text-gray-600"},eE={name:"DCodeProgress"},If=e.defineComponent({...eE,name:"DCodeProgress",inheritAttrs:!1,props:{modelValue:{default:0},max:{default:100},label:{default:""},showValue:{type:Boolean,default:!1},color:{default:"blue"},size:{default:"md"},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,r=e.computed(()=>Math.min(n.modelValue/n.max*100,100)),a=e.computed(()=>["w-full rounded-full overflow-hidden",{sm:"h-1",md:"h-2",lg:"h-3"}[n.size],"bg-gray-200"].join(" ")),s=e.computed(()=>{const l={blue:"bg-blue-500",green:"bg-green-500",red:"bg-red-500",yellow:"bg-yellow-500",purple:"bg-purple-500",gray:"bg-gray-500"},c=["h-full transition-all duration-300 ease-out",l[n.color]||l.blue];return n.striped&&c.push("bg-gradient-to-r from-transparent via-white/20 to-transparent"),n.animated&&c.push("animate-pulse"),c.join(" ")}),i=e.computed(()=>`${Math.round(r.value)}%`);return(l,c)=>(e.openBlock(),e.createElementBlock("div",Y_,[t.label||t.showValue?(e.openBlock(),e.createElementBlock("div",J_,[t.label?(e.openBlock(),e.createElementBlock("span",Q_,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),t.showValue?(e.openBlock(),e.createElementBlock("span",Z_,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(a.value)},[e.createElementVNode("div",{class:e.normalizeClass(s.value),style:e.normalizeStyle({width:`${r.value}%`})},null,6)],2)]))}}),tE={key:0,class:"fixed top-0 left-0 right-0 z-[10000] h-[3px]"},Ff=dt(e.defineComponent({name:"DCodeProgressBar",__name:"DCodeProgressBar",props:{isApiLoading:{type:Boolean,default:!1},apiProgress:{default:0}},setup(t){return(o,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade"},{default:e.withCtx(()=>[t.isApiLoading?(e.openBlock(),e.createElementBlock("div",tE,[e.createElementVNode("div",{class:"h-full bg-primary-600 shadow-[0_0_15px_rgba(37,99,235,0.8)] transition-all duration-300 ease-out",style:e.normalizeStyle({width:`${t.apiProgress}%`})},null,4)])):e.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-85c68054"]]),oE={key:0,class:"ml-1 text-destructive"},nE={class:"flex flex-col"},rE={key:0,class:"flex items-center gap-2 text-sm text-gray-500 mb-2"},aE={class:"relative flex-shrink-0 mt-0.5"},sE=["id","name","value","checked","disabled","required","onChange"],iE=["onClick"],lE=["for"],cE={key:0,class:"ml-1 text-red-500"},dE={key:1,class:"flex items-center gap-1 text-sm text-red-500 mt-1"},li=e.defineComponent({name:"DCodeRadio",inheritAttrs:!1,__name:"DCodeRadio",props:{modelValue:{default:void 0},label:{default:""},itemTitle:{default:"name"},itemValue:{default:"id"},options:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""}},emits:["update:modelValue","change"],setup(t,{emit:o}){e.useAttrs();const{apiUrl:n}=Ye(),r=o,a=t,s=e.ref([]),i=e.ref(!1),l=e.ref(null),c=async()=>{var B,A;const E=((B=a.endpoint)==null?void 0:B.apiUrl)||a.apiUrl;if(E){i.value=!0,l.value=null;try{const C={page:1,perPage:100},x=((A=a.endpoint)==null?void 0:A.apiMethod)||a.apiMethod,w=await n(E,x,C);let D=w;a.dataPath?D=a.dataPath.split(".").reduce((v,S)=>v&&v[S]!=="undefined"?v[S]:void 0,w):typeof w=="object"&&!Array.isArray(w)&&w.data&&(D=w.data),Array.isArray(D)?s.value=D:(console.warn("DCodeRadio: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),l.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(C){console.error("DCodeRadio fetch error:",C),l.value="Gagal memuat data dari endpoint."}finally{i.value=!1}}};e.onMounted(()=>{var E;((E=a.endpoint)!=null&&E.apiUrl||a.apiUrl)&&c()});const d=e.computed(()=>{if(a.options&&a.options.length>0)return a.options;if(s.value.length>0)return s.value;const E=a.itemValue||a.model||"id",B=a.itemTitle||(a.label===""?"name":a.label);return B&&a.label!==""?[{[E]:E,[B]:B}]:[]}),f=E=>{if(typeof E!="object")return E;const B=a.itemValue||a.model||"id";return E[B]},u=E=>{if(typeof E!="object")return String(E);const B=a.itemTitle||"name";return E[B]},h=e.computed(()=>a.model||`radio-group-${Math.random().toString(36).substr(2,9)}`),m=e.computed(()=>!!a.error||!!l.value),p=e.computed(()=>a.error||l.value),y=E=>E==null?a.modelValue===E:String(a.modelValue)===String(E),b=e.computed(()=>({sm:{radio:"w-3 h-3",label:"text-sm",container:"gap-2"},md:{radio:"w-4 h-4",label:"text-base",container:"gap-2"},lg:{radio:"w-5 h-5",label:"text-lg",container:"gap-3"}})[a.size]),g=(E,B)=>{if(a.disabled||a.readonly){B.preventDefault();return}B.target.checked&&(r("update:modelValue",E),r("change",E))},_=E=>{!a.disabled&&!a.readonly&&!y(E)&&(r("update:modelValue",E),r("change",E))};return(E,B)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid gap-3",t.disabled||t.readonly?"cursor-not-allowed":""])},[t.label?(e.openBlock(),e.createBlock(Jn,{key:0,class:"text-sm font-medium"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",oE,"*")):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",nE,[i.value?(e.openBlock(),e.createElementBlock("div",rE,[e.createVNode(e.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),B[0]||(B[0]=e.createTextVNode(" Sedang memuat opsi... ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["flex",t.layout?"flex-row flex-wrap gap-4":"flex-col gap-3"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(A,C)=>(e.openBlock(),e.createElementBlock("div",{key:C,class:e.normalizeClass(["flex items-start",b.value.container,t.disabled||t.readonly?"opacity-60 cursor-not-allowed":"cursor-pointer"])},[e.createElementVNode("div",aE,[e.createElementVNode("input",{id:t.id?`${t.id}-${C}`:`${h.value}-${C}`,name:h.value,type:"radio",value:f(A),checked:y(f(A)),disabled:t.disabled||t.readonly,required:t.required&&C===0,onChange:x=>g(f(A),x),class:"w-5 h-5 text-blue-600 focus:ring-blue-500 border-gray-300"},null,40,sE)]),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:x=>_(f(A))},[e.createElementVNode("label",{for:t.id?`${t.id}-${C}`:`${h.value}-${C}`,class:e.normalizeClass([b.value.label,"font-medium cursor-pointer select-none text-foreground dark:text-gray-300",t.disabled||t.readonly?"cursor-not-allowed opacity-60":""])},[e.createTextVNode(e.toDisplayString(u(A))+" ",1),t.required&&d.value.length===1&&t.label?(e.openBlock(),e.createElementBlock("span",cE,"*")):e.createCommentVNode("",!0)],10,lE)],8,iE)],2))),128))],2),m.value&&p.value?(e.openBlock(),e.createElementBlock("div",dE,[e.createVNode(e.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),e.createTextVNode(" "+e.toDisplayString(p.value),1)])):e.createCommentVNode("",!0)])],2))}}),fE={class:"grid gap-3"},uE={key:0,class:"ml-1 text-destructive"},hE={class:"flex flex-col"},mE={key:0,class:"flex items-center gap-2 text-sm text-gray-500 dark:text-neutral-400 mb-2"},pE=["onClick"],gE=["id","name","value","checked","disabled","required","onChange"],bE={key:1,class:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20"},yE=["for"],xE={key:0,class:"ml-1 text-red-500"},kE={key:1,class:"flex items-center gap-1 text-sm text-red-500 mt-2"},ci=e.defineComponent({name:"DCodeRadioCustom",inheritAttrs:!1,__name:"DCodeRadioCustom",props:{modelValue:{default:void 0},icon:{},itemTitle:{default:"name"},itemValue:{default:"id"},label:{default:""},options:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""}},emits:["update:modelValue","change"],setup(t,{emit:o}){e.useAttrs();const{apiUrl:n}=Ye(),r=o,a=t,s=e.ref(a.modelValue??void 0);e.watch(()=>a.modelValue,k=>{s.value=k},{immediate:!0});const i=e.ref([]),l=e.ref(!1),c=e.ref(null),d=e.computed(()=>a.disabled||l.value||!!c.value),f=async()=>{var v,S;const k=((v=a.endpoint)==null?void 0:v.apiUrl)||a.apiUrl;if(k){l.value=!0,c.value=null;try{const N={page:1,perPage:100},V=((S=a.endpoint)==null?void 0:S.apiMethod)||a.apiMethod,L=await n(k,V,N);let O=L;a.dataPath?O=a.dataPath.split(".").reduce((R,j)=>R&&R[j]!=="undefined"?R[j]:void 0,L):typeof L=="object"&&!Array.isArray(L)&&L.data&&(O=L.data),Array.isArray(O)?i.value=O:(console.warn("DCodeRadioCustom: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),c.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(N){console.error("DCodeRadioCustom fetch error:",N),c.value="Gagal memuat data dari endpoint."}finally{l.value=!1}}},u=e.ref(!1);let h=null;const m=()=>{typeof document<"u"&&(u.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};e.onMounted(()=>{var k;((k=a.endpoint)!=null&&k.apiUrl||a.apiUrl)&&f(),m(),typeof document<"u"&&(h=new MutationObserver(m),h.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),h.observe(document.body,{attributes:!0,attributeFilter:["class"]}))}),e.onBeforeUnmount(()=>{h&&h.disconnect()});const p=e.computed(()=>{if(a.options&&a.options.length>0)return a.options;if(i.value.length>0)return i.value;const k=a.itemValue||a.model||"id",v=a.itemTitle||(a.label===""?"name":a.label);return v&&a.label!==""?[{[k]:k,[v]:v}]:[]}),y=k=>{if(typeof k!="object")return k;const v=a.itemValue||a.model||"id";return k[v]},b=k=>{if(typeof k!="object")return String(k);const v=a.itemTitle||"name";return k[v]},g=Math.random().toString(36).slice(2,7),_=e.computed(()=>a.id?`radio-custom-${a.id}`:`radio-custom-${a.model}-${g}`),E=e.computed(()=>!!a.error||!!c.value),B=e.computed(()=>a.error||c.value),A=k=>{const v=s.value;return k==null?v===k:String(v)===String(k)},C=e.computed(()=>({sm:{radio:"w-3 h-3",label:"text-sm",container:"gap-2"},md:{radio:"w-4 h-4",label:"text-base",container:"gap-2"},lg:{radio:"w-5 h-5",label:"text-lg",container:"gap-3"}})[a.size]),x=k=>{const v=(k==null?void 0:k.icon)||a.icon;return Do(v,Lt)},w=(k,v)=>{v.target.checked&&(s.value=k,r("update:modelValue",k),r("change",k))},D=k=>{a.disabled||A(k)||(s.value=k,r("update:modelValue",k),r("change",k))};return(k,v)=>(e.openBlock(),e.createElementBlock("div",fE,[t.label?(e.openBlock(),e.createBlock(Jn,{key:0,class:"text-sm font-medium"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",uE,"*")):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",hE,[l.value?(e.openBlock(),e.createElementBlock("div",mE,[e.createVNode(e.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),v[0]||(v[0]=e.createTextVNode(" Sedang memuat opsi... ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grid",t.layout?"grid-cols-2 sm:grid-cols-3":"grid-cols-1","gap-3"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(S,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,class:e.normalizeClass(["relative flex flex-col items-center justify-center gap-2 p-4 rounded-xl border-2 transition-all duration-200",A(y(S))?u.value?"border-primary-500 bg-primary-500/10 shadow-none":"border-primary-500 bg-primary-50 shadow-md shadow-primary-100":u.value?"border-neutral-700 bg-neutral-800 hover:border-neutral-600":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm",d.value?"opacity-50 cursor-not-allowed":"cursor-pointer"]),onClick:V=>!d.value&&D(y(S))},[e.createElementVNode("input",{id:t.id?`${t.id}-${N}`:`${_.value}-${N}`,name:_.value,type:"radio",value:y(S),checked:A(y(S)),disabled:d.value,required:t.required&&N===0,onChange:V=>w(y(S),V),class:"sr-only",tabindex:"-1"},null,40,gE),e.createElementVNode("div",{class:e.normalizeClass(["w-10 h-10 rounded-full flex items-center justify-center transition-all duration-200",A(y(S))?u.value?"bg-primary-500/25 text-primary-400":"bg-primary-100 text-primary-600":u.value?"bg-neutral-700 text-neutral-500":"bg-gray-100 text-gray-400"])},[x(S)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x(S)),{key:0,class:"w-6 h-6"})):(e.openBlock(),e.createElementBlock("svg",bE,[...v[1]||(v[1]=[e.createElementVNode("circle",{cx:"10",cy:"10",r:"6"},null,-1)])]))],2),e.createElementVNode("label",{for:t.id?`${t.id}-${N}`:`${_.value}-${N}`,class:e.normalizeClass([C.value.label,"font-medium text-center leading-tight select-none transition-colors duration-200",A(y(S))?u.value?"text-primary-400":"text-primary-700":u.value?"text-neutral-300":"text-gray-700",t.disabled?"cursor-not-allowed":"cursor-pointer"])},[e.createTextVNode(e.toDisplayString(b(S))+" ",1),t.required&&p.value.length===1&&t.label?(e.openBlock(),e.createElementBlock("span",xE,"*")):e.createCommentVNode("",!0)],10,yE)],10,pE))),128))],2),E.value&&B.value?(e.openBlock(),e.createElementBlock("div",kE,[e.createVNode(e.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),e.createTextVNode(" "+e.toDisplayString(B.value),1)])):e.createCommentVNode("",!0)])]))}}),wE={key:0,class:"ml-1 text-destructive"},CE={class:"relative w-full"},_E={key:0,class:"mb-2 flex items-center justify-between"},EE={class:"text-sm text-muted-foreground"},BE={class:"text-sm font-medium text-foreground"},SE={class:"text-sm text-muted-foreground"},AE={class:"relative"},vE=["id","value","min","max","step","disabled","placeholder"],DE={key:1,class:"relative mt-2"},NE={class:"text-xs text-muted-foreground mt-1"},VE={key:1,class:"flex items-center gap-1 text-sm text-destructive"},ME={name:"DCodeSlider"},la=e.defineComponent({...ME,name:"DCodeSlider",inheritAttrs:!1,props:{modelValue:{default:0},min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},label:{default:""},placeholder:{default:""},required:{type:Boolean,default:!1},error:{default:null},showValue:{type:Boolean,default:!0},valuePrefix:{default:""},valueSuffix:{default:""},marks:{default:()=>[]},color:{default:"blue"},size:{default:"md"}},emits:["update:modelValue","change","input"],setup(t,{emit:o}){const n=e.useAttrs(),r=o,a=t,s=e.ref(),i=e.ref(!1),l=e.computed(()=>!!a.error),c=e.computed(()=>`slider-${Math.random().toString(36).substr(2,9)}`),d=e.computed(()=>(a.label||n.label)??void 0),f=e.computed(()=>!0),u=e.computed(()=>{const A={sm:"h-2",md:"h-2.5",lg:"h-3"},C={blue:"accent-blue-500",green:"accent-green-500",red:"accent-red-500",yellow:"accent-yellow-500",purple:"accent-purple-500",gray:"accent-gray-500"};return["w-full appearance-none bg-transparent rounded-lg outline-none transition-all cursor-pointer relative z-10","disabled:opacity-50 disabled:cursor-not-allowed",A[a.size],C[a.color]||C.blue,l.value?"accent-red-500":"",n.class].filter(Boolean).join(" ")}),h=e.computed(()=>["appearance-none bg-white border-2 border-current rounded-full cursor-pointer transition-all","hover:scale-110 focus:scale-110","shadow-md hover:shadow-lg focus:shadow-lg","focus:outline-none focus:ring-2 focus:ring-offset-2",{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[a.size],a.color==="blue"?"focus:ring-blue-500":a.color==="green"?"focus:ring-green-500":a.color==="red"?"focus:ring-red-500":a.color==="yellow"?"focus:ring-yellow-500":a.color==="purple"?"focus:ring-purple-500":"focus:ring-gray-500"].join(" ")),m=e.computed(()=>`${a.valuePrefix}${a.modelValue}${a.valueSuffix}`),p=e.computed(()=>{const A=a.max-a.min;return(a.modelValue-a.min)/A*100}),y=A=>{const C=A.target,x=parseFloat(C.value);r("update:modelValue",x),r("input",x)},b=A=>{const C=A.target,x=parseFloat(C.value);r("change",x)},g=()=>{i.value=!0},_=()=>{i.value=!1},E=A=>{const C=a.max-a.min;return(A-a.min)/C*100},B=e.computed(()=>{const A={sm:16,md:20,lg:24};return`
|
|
84
84
|
input[type="range"]::-webkit-slider-thumb {
|
|
85
85
|
${h.value}
|
|
86
86
|
width: ${A[a.size]}px;
|
|
@@ -109,6 +109,6 @@ https://github.com/highlightjs/highlight.js/issues/2277`),I=P,M=R),j===void 0&&(
|
|
|
109
109
|
input[type="range"]:focus::-moz-range-thumb {
|
|
110
110
|
transform: scale(1.1);
|
|
111
111
|
}
|
|
112
|
-
`});return(A,C)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-2 w-full",t.unref(n).class]),"aria-busy":!1},[d.value?(t.openBlock(),t.createBlock(t.unref(Xn),{key:0,for:c.value,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(d.value)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",hE,"*")):t.createCommentVNode("",!0)]),_:1},8,["for"])):t.createCommentVNode("",!0),t.createElementVNode("div",mE,[e.showValue?(t.openBlock(),t.createElementBlock("div",pE,[t.createElementVNode("span",gE,t.toDisplayString(a.valuePrefix)+t.toDisplayString(e.min)+t.toDisplayString(a.valueSuffix),1),t.createElementVNode("span",bE,t.toDisplayString(m.value),1),t.createElementVNode("span",yE,t.toDisplayString(a.valuePrefix)+t.toDisplayString(e.max)+t.toDisplayString(a.valueSuffix),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",xE,[t.createElementVNode("div",{class:t.normalizeClass(["absolute top-1/2 -translate-y-1/2 w-full h-full bg-gray-200 rounded-lg pointer-events-none",[e.size==="sm"?"h-2":e.size==="md"?"h-2.5":"h-3"]])},[t.createElementVNode("div",{class:t.normalizeClass(["absolute top-0 left-0 h-full rounded-lg transition-all",[e.color==="blue"?"bg-blue-500":e.color==="green"?"bg-green-500":e.color==="red"?"bg-red-500":e.color==="yellow"?"bg-yellow-500":e.color==="purple"?"bg-purple-500":"bg-gray-500"]]),style:t.normalizeStyle({width:`${p.value}%`})},null,6)],2),t.createElementVNode("input",{id:c.value,ref_key:"sliderRef",ref:s,type:"range",value:e.modelValue,min:e.min,max:e.max,step:e.step,disabled:e.disabled,placeholder:e.placeholder,class:t.normalizeClass(u.value),onInput:y,onChange:b,onMousedown:g,onMouseup:_,onTouchstart:g,onTouchend:_},null,42,kE)]),e.marks.length>0?(t.openBlock(),t.createElementBlock("div",wE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.marks,x=>(t.openBlock(),t.createElementBlock("div",{key:x.value,class:"absolute flex flex-col items-center",style:t.normalizeStyle({left:`${E(x.value)}%`,transform:"translateX(-50%)"})},[C[0]||(C[0]=t.createElementVNode("div",{class:"w-1 h-2 bg-gray-400 rounded-full"},null,-1)),t.createElementVNode("span",CE,t.toDisplayString(x.label),1)],4))),128))])):t.createCommentVNode("",!0)]),l.value?(t.openBlock(),t.createElementBlock("div",_E,[C[1]||(C[1]=t.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),t.createTextVNode(" "+t.toDisplayString(e.error),1)])):t.createCommentVNode("",!0),B.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent("style"),{key:2},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(B.value),1)]),_:1})):t.createCommentVNode("",!0)],2)),[[t.vShow,f.value]])}}),BE={key:0,class:"ml-1 text-destructive"},SE={class:"inline-flex items-center gap-3"},AE=["id","name","aria-checked","aria-label","disabled"],vE={key:0,class:"absolute inset-0 flex items-center justify-center"},DE={class:"relative z-10 flex items-center gap-2"},NE=["id","name","aria-checked","aria-label","disabled"],VE={key:0,class:"absolute inset-0 flex items-center justify-center"},ME={name:"DCodeSwitch"},sa=t.defineComponent({...ME,props:{modelValue:{type:Boolean,default:!1},label:{default:""},title:{default:"Title"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},size:{default:"medium"},color:{default:"primary"},loading:{type:Boolean,default:!1},labelPosition:{default:"right"},id:{},name:{},required:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!1},tooltipActiveText:{default:"Aktif"},tooltipInactiveText:{default:"Tidak Aktif"}},emits:["update:modelValue","change"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:u=>{!n.disabled&&!n.loading&&(r("update:modelValue",u),r("change",u))}}),s=t.computed(()=>{switch(n.size){case"small":return"w-9 h-5";case"large":return"w-14 h-7";default:return"w-11 h-6"}}),i=t.computed(()=>{switch(n.size){case"small":return"w-4 h-4";case"large":return"w-6 h-6";default:return"w-5 h-5"}}),l=t.computed(()=>{switch(n.size){case"small":return"translate-x-4";case"large":return"translate-x-7";default:return"translate-x-5"}}),c=t.computed(()=>{if(n.disabled)return"bg-gray-300";if(n.readonly)return a.value?"bg-blue-400 opacity-80":"bg-gray-200 opacity-80";if(!a.value)return"bg-gray-200";switch(n.color){case"success":return"bg-green-500";case"warning":return"bg-yellow-500";case"danger":return"bg-red-500";default:return"bg-blue-500"}}),d=()=>{n.disabled||n.readonly||n.loading||(a.value=!a.value)},f=t.computed(()=>a.value?n.tooltipActiveText:n.tooltipInactiveText);return(u,h)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid gap-3",n.disabled?"cursor-not-allowed":""])},[e.title?(t.openBlock(),t.createBlock(Xn,{key:0,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",BE,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",SE,[t.createVNode(t.unref(Nl),null,{default:t.withCtx(()=>[e.showTooltip?(t.openBlock(),t.createBlock(t.unref(vl),{key:0,"delay-duration":200},{default:t.withCtx(()=>[t.createVNode(t.unref(Vl),{"as-child":""},{default:t.withCtx(()=>[t.createElementVNode("button",{type:"button",id:e.id,name:e.name,"aria-checked":a.value?"true":"false","aria-label":e.label||"Toggle switch",disabled:e.disabled||e.loading,class:t.normalizeClass([s.value,c.value,"relative inline-flex items-center rounded-full transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","hover:scale-105 active:scale-95",{"cursor-not-allowed opacity-50":e.disabled,"cursor-wait":e.loading,"cursor-default opacity-80":e.readonly&&!e.loading,"cursor-pointer":!e.disabled&&!e.loading&&!e.readonly}]),onClick:d},[t.createElementVNode("span",{class:t.normalizeClass([i.value,a.value?l.value:"translate-x-0.5","inline-block transform rounded-full bg-white shadow-lg transition-all duration-300 ease-in-out","hover:shadow-xl flex items-center justify-center"])},[e.loading?(t.openBlock(),t.createElementBlock("span",vE,[...h[0]||(h[0]=[t.createElementVNode("svg",{class:"animate-spin h-3 w-3 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"scale-0 rotate-90 opacity-0","enter-to-class":"scale-100 rotate-0 opacity-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"scale-100 rotate-0 opacity-100","leave-to-class":"scale-0 -rotate-90 opacity-0"},{default:t.withCtx(()=>[a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.Check),{key:0,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-green-600 stroke-[3]"])},null,8,["class"])):!a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.X),{key:1,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-gray-400 stroke-[3]"])},null,8,["class"])):t.createCommentVNode("",!0)]),_:1})],2)],10,AE)]),_:1}),t.createVNode(t.unref(Dl),{side:"top","side-offset":8,class:t.normalizeClass(["animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0",[a.value?"bg-green-600 dark:bg-green-500 text-white":"bg-gray-700 dark:bg-gray-600 text-white"]])},{default:t.withCtx(()=>[t.createElementVNode("span",DE,[t.createElementVNode("span",{class:t.normalizeClass(["inline-block w-2 h-2 rounded-full animate-pulse",a.value?"bg-green-200":"bg-gray-300"])},null,2),t.createTextVNode(" "+t.toDisplayString(f.value),1)])]),_:1},8,["class"])]),_:1})):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",id:e.id,name:e.name,"aria-checked":a.value?"true":"false","aria-label":e.label||"Toggle switch",disabled:e.disabled||e.loading,class:t.normalizeClass([s.value,c.value,"relative inline-flex items-center rounded-full transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","hover:scale-105 active:scale-95",{"cursor-not-allowed opacity-50":e.disabled,"cursor-wait":e.loading,"cursor-default opacity-80":e.readonly&&!e.loading,"cursor-pointer":!e.disabled&&!e.loading&&!e.readonly}]),onClick:d},[t.createElementVNode("span",{class:t.normalizeClass([i.value,a.value?l.value:"translate-x-0.5","inline-block transform rounded-full bg-white shadow-lg transition-all duration-300 ease-in-out","hover:shadow-xl flex items-center justify-center"])},[e.loading?(t.openBlock(),t.createElementBlock("span",VE,[...h[1]||(h[1]=[t.createElementVNode("svg",{class:"animate-spin h-3 w-3 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"scale-0 rotate-90 opacity-0","enter-to-class":"scale-100 rotate-0 opacity-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"scale-100 rotate-0 opacity-100","leave-to-class":"scale-0 -rotate-90 opacity-0"},{default:t.withCtx(()=>[a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.Check),{key:0,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-green-600 stroke-[3]"])},null,8,["class"])):!a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.X),{key:1,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-gray-400 stroke-[3]"])},null,8,["class"])):t.createCommentVNode("",!0)]),_:1})],2)],10,NE))]),_:1})])],2))}}),TE=["aria-busy"],PE={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},OE=["for"],LE={key:0,class:"ml-1 text-destructive"},RE={class:"relative w-full group"},IE=["id","value"],FE={key:0,class:"absolute top-1 right-2"},zE={key:1,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},$E={key:1,class:"text-xs text-destructive"},cn=t.defineComponent({name:"DCodeTextarea",inheritAttrs:!1,__name:"DCodeTextarea",props:{modelValue:{},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},error:{default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.computed(()=>n.label),i=t.computed(()=>a.visible??!0),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`app-textarea-${n.id||s.value||"field"}-${l}`),d=t.computed(()=>{const J=n.required,$=n["aria-required"];return J===""||J===!0||J==="true"||($==="true"||$===!0)}),f=t.computed(()=>{const{label:J,class:$,id:X,required:re,"aria-required":me,...De}=n,Ee={...De};return a.disabled&&(Ee.disabled=!0),a.readonly&&(Ee.readonly=!0),Ee}),u=t.computed(()=>{const J=n.maxlength;let $=Number.NaN;return typeof J=="number"?$=J:typeof J=="string"&&($=Number.parseInt(J,10)),Number.isFinite($)&&$>0?$:-1}),h=J=>u.value>0?J.slice(0,u.value):J,m=t.computed(()=>{const J=a.modelValue;return J==null||String(J).length===0}),p=t.computed(()=>a.clearable?a.hideClearWhenEmpty?!m.value:!0:!1),y=t.ref(String(a.modelValue??""));t.watch(()=>a.modelValue,J=>{const $=String(J??"");$!==y.value&&(y.value=$)});const b=t.ref(!1),g=t.ref(!1),_=J=>J.split(/(\s+)/).map($=>{if($.trim()==="")return $;const X=$.toLowerCase();return X.charAt(0).toUpperCase()+X.slice(1)}).join(""),E=J=>{const $=J.toLowerCase(),X=$.search(new RegExp("\\p{L}","u"));return X<0?$:$.slice(0,X)+$.charAt(X).toUpperCase()+$.slice(X+1)},B=J=>{switch(a.textCase){case"uppercase":return J.toUpperCase();case"lowercase":return J.toLowerCase();case"titlecase":return _(J);case"sentencecase":return E(J);case"none":default:return J}},A=t.computed(()=>{switch(a.textCase){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}}),C=J=>{if(!J)return null;const $=Array.isArray(J)?J.join(""):J;return $?new Set($):null},x=t.computed(()=>C(a.allowChars)),w=(J,$)=>(J.lastIndex=0,J.test($)),D=J=>{if(J===`
|
|
113
|
-
`)return a.valueType!=="number";if(a.valueType==="free")return!0;const $=
|
|
114
|
-
`,""),X=Number($);return Number.isFinite(X)?X:null}return J},V=J=>{y.value=J,r("update:modelValue",N(J))},L=(J,$)=>{const X=h($);g.value=!0,J.value=X,V(X),queueMicrotask(()=>g.value=!1)},O=(J,$)=>{const X=J.selectionStart??J.value.length,re=J.selectionEnd??J.value.length;if(u.value>0){const me=J.value.length-(re-X),De=u.value-me;if(De<=0)return;$=$.slice(0,De)}J.setRangeText($,X,re,"end"),L(J,v(J.value))},P=J=>{var re;if(!S||b.value||g.value||!((re=J.inputType)!=null&&re.startsWith("insert")))return;const $=J.data;if($==null)return;const X=v($);X!==$&&(J.preventDefault(),X.length>0&&O(S,X))},R=J=>{var re;if(!S||b.value||g.value)return;const $=((re=J.clipboardData)==null?void 0:re.getData("text"))??"",X=v($);X!==$&&(J.preventDefault(),X.length>0&&O(S,X))},j=async J=>{if(!S||b.value||g.value)return;const $=J.target,X=$.value??"",re=v(X);if(re===X){const me=$.selectionStart??re.length,De=$.selectionEnd??re.length;L($,re),await t.nextTick();try{$.setSelectionRange(me,De)}catch{}V(re)}else{const me=$.selectionStart??re.length,De=$.selectionEnd??re.length;L($,re),await t.nextTick();try{$.setSelectionRange(me,De)}catch{}}},M=()=>b.value=!0,I=()=>{if(b.value=!1,!S)return;const J=S.value??"",$=v(J);$===J?V($):L(S,$)};t.onMounted(()=>{if(S=document.getElementById(c.value),!S)return;S.addEventListener("beforeinput",P),S.addEventListener("paste",R),S.addEventListener("input",j),S.addEventListener("compositionstart",M),S.addEventListener("compositionend",I);const J=S.value??"",$=v(J);$===J?V($):L(S,$)}),t.onBeforeUnmount(()=>{S&&(S.removeEventListener("beforeinput",P),S.removeEventListener("paste",R),S.removeEventListener("input",j),S.removeEventListener("compositionstart",M),S.removeEventListener("compositionend",I),S=null)});const K=()=>{y.value="",S&&(S.value=""),r("update:modelValue",null),r("clear")},H=t.computed(()=>y.value.length),W=t.computed(()=>a.showCharCount?u.value>0:!1),Z=t.computed(()=>W.value&&H.value>0),te=t.computed(()=>`${H.value} / ${u.value}`),ie=t.computed(()=>!!a.error),Ae=t.computed(()=>{const J=n.rows,$=typeof J=="number"?J:Number.parseInt(String(J??""),10);return Number.isFinite($)&&$>0?$:3}),ke=t.computed(()=>({height:`${Ae.value*24+16}px`}));return(J,$)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.value?(t.openBlock(),t.createElementBlock("div",PE)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse",style:t.normalizeStyle(ke.value)},null,4)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:c.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(s.value)+" ",1),d.value?(t.openBlock(),t.createElementBlock("span",LE,"*")):t.createCommentVNode("",!0)],8,OE)):t.createCommentVNode("",!0),t.createElementVNode("div",RE,[t.createElementVNode("textarea",t.mergeProps({id:c.value,value:y.value},f.value,{style:`text-transform: ${A.value}; padding-right: ${p.value?"2.5rem":"0.75rem"} !important; padding-left: 0.75rem !important;`,class:["flex min-h-[120px] w-full rounded-lg border py-2 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600 text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 readonly:bg-neutral-50/50 dark:readonly:bg-neutral-900/30",ie.value?"border-destructive focus-visible:ring-destructive focus:ring-destructive":""]}),null,16,IE),p.value?(t.openBlock(),t.createElementBlock("div",FE,[t.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground text-sm leading-none","aria-label":"Clear textarea",onClick:K}," ✕ ")])):t.createCommentVNode("",!0),Z.value&&!ie.value?(t.openBlock(),t.createElementBlock("p",zE,t.toDisplayString(te.value),1)):t.createCommentVNode("",!0)]),ie.value?(t.openBlock(),t.createElementBlock("p",$E,t.toDisplayString(a.error),1)):t.createCommentVNode("",!0)],64))],10,TE)),[[t.vShow,i.value]])}}),Mf=t.defineComponent({__name:"Avatar",props:{class:{type:[Boolean,null,String,Object,Array]},size:{default:"sm"},shape:{default:"circle"}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(xe.AvatarRoot),{class:t.normalizeClass(t.unref(Ve)(t.unref(jE)({size:e.size,shape:e.shape}),o.class))},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},8,["class"]))}}),Tf=t.defineComponent({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(xe.AvatarFallback),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),Pf=t.defineComponent({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(xe.AvatarImage),t.mergeProps(o,{class:"h-full w-full object-cover"}),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),jE=hr("inline-flex items-center justify-center font-normal text-foreground select-none shrink-0 bg-secondary overflow-hidden",{variants:{size:{sm:"h-10 w-10 text-xs",base:"h-16 w-16 text-2xl",lg:"h-32 w-32 text-5xl"},shape:{circle:"rounded-full",square:"rounded-md"}}}),ia=t.defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(xe.Separator),t.mergeProps(t.unref(n),{class:t.unref(Ve)("shrink-0 bg-border",o.orientation==="horizontal"?"h-px w-full":"w-px h-full",o.class)}),null,16,["class"]))}}),UE={class:"bg-card text-card-foreground"},WE={class:"pb-6 px-3"},HE={key:0,class:"flex justify-center p-8"},qE={key:1,class:"p-8 text-center text-red-500"},GE={key:2,class:"relative"},KE={class:"space-y-6"},XE={class:"rounded-xl border bg-card text-card-foreground shadow"},YE={class:"p-4"},JE={class:"flex items-center justify-between gap-3"},QE={class:"font-medium"},ZE={class:"text-xs text-muted-foreground"},eB={class:"mt-1 text-sm text-muted-foreground"},tB={class:"text-foreground"},oB={class:"text-foreground"},nB={class:"mt-1 text-xs text-muted-foreground"},rB={key:0,class:"mt-3 flex items-center gap-2 text-sm"},aB={class:"flex items-center justify-between gap-3"},sB={class:"font-medium"},iB={class:"text-xs text-muted-foreground"},lB={class:"mt-2 text-sm text-muted-foreground"},cB={class:"flex flex-wrap items-center justify-between gap-3"},dB={class:"flex items-center gap-3"},fB={class:"leading-tight"},uB={class:"text-sm font-medium"},hB={class:"text-xs text-muted-foreground"},mB={class:"flex items-center gap-2"},pB={key:2,class:"flex flex-col gap-3 sm:flex-row sm:items-start"},gB={class:"h-16 w-16 shrink-0 rounded-lg bg-muted flex items-center justify-center"},bB=["src"],yB={class:"flex-1"},xB={class:"flex items-center justify-between gap-3"},kB={class:"font-medium"},wB={class:"text-xs text-muted-foreground"},CB={class:"mt-1 text-sm text-muted-foreground"},_B={class:"text-left sm:text-center"},EB={class:"text-xs text-muted-foreground"},BB={class:"text-left sm:text-center"},SB={class:"text-xs text-muted-foreground"},AB={class:"text-left sm:text-center"},vB={class:"text-xs text-muted-foreground"},DB={class:"flex items-center justify-between gap-3"},NB={class:"font-medium"},VB={class:"text-xs text-muted-foreground"},MB={class:"mt-2 text-sm text-muted-foreground"},TB={class:"mt-3 flex items-center gap-3"},PB={class:"text-sm font-medium"},OB={class:"flex items-start justify-between gap-3"},LB={class:"font-medium"},RB={class:"mt-3 grid gap-2 text-sm"},IB={class:"flex items-center justify-between gap-3"},FB={class:"flex items-center gap-2 text-muted-foreground"},zB={class:"font-medium"},$B={class:"flex items-center justify-between gap-3"},jB={class:"flex items-center gap-2 text-muted-foreground"},UB={class:"font-medium"},WB={class:"flex items-center justify-between gap-3"},HB={class:"flex items-center gap-2 text-muted-foreground"},qB={class:"font-medium"},GB={class:"flex items-center justify-between"},KB={class:"flex items-center gap-2"},XB={class:"flex items-start justify-between gap-3"},YB={class:"flex items-center gap-2"},JB={class:"font-medium"},QB={class:"mt-2 text-sm text-muted-foreground"},ZB={key:0,class:"mt-1 text-sm text-muted-foreground"},eS={class:"flex flex-wrap items-center justify-between gap-3"},tS={class:"flex items-center gap-2"},oS={class:"text-xs text-muted-foreground"},Of=t.defineComponent({name:"DCodeTimelineWithIcons",__name:"DCodeTimelineWithIcons",props:{items:{},apiUrl:{},apiMethod:{}},setup(e){const n=Xe.useBreakpoints(Xe.breakpointsTailwind).smaller("md");t.ref(!1);const r=e,a=t.ref(!1),s=t.ref(null),i=t.ref([]),l=t.computed(()=>i.value.length>0?i.value:r.items&&r.items.length>0?r.items:[]),c=async()=>{if(r.apiUrl){a.value=!0,s.value=null;try{const u=await fetch(r.apiUrl,{method:r.apiMethod||"GET",headers:{"Content-Type":"application/json"}});if(!u.ok)throw new Error(`Error: ${u.status} ${u.statusText}`);const h=await u.json();Array.isArray(h)?i.value=h:h.data&&Array.isArray(h.data)?i.value=h.data:h.items&&Array.isArray(h.items)?i.value=h.items:i.value=[]}catch(u){console.error("Failed to fetch timeline items:",u),s.value=u.message||"Failed to fetch data"}finally{a.value=!1}}};t.onMounted(()=>{r.apiUrl&&c()}),t.watch(()=>r.apiUrl,()=>{r.apiUrl?c():i.value=[]});const d=u=>{switch(u){case"flight":return{Icon:ne.PlaneIcon,Circle:"bg-primary/10 text-primary border-primary/30"};case"interview":return{Icon:ne.ClockIcon,Circle:"bg-emerald-500/10 text-emerald-600 border-emerald-500/30"};case"product":return{Icon:ne.ShoppingCartIcon,Circle:"bg-amber-500/10 text-amber-600 border-amber-500/30"};case"design":return{Icon:ne.PencilIcon,Circle:"bg-sky-500/10 text-sky-600 border-sky-500/30"};case"server":return{Icon:ne.ServerIcon,Circle:"bg-rose-500/10 text-rose-600 border-rose-500/30"};case"location":return{Icon:ne.MapPinIcon,Circle:"bg-emerald-500/10 text-emerald-600 border-emerald-500/30"};default:return{Icon:ne.Circle,Circle:"bg-primary/10 text-primary border-primary/30"}}},f=u=>u.split(" ").filter(Boolean).slice(0,2).map(h=>{var m;return(m=h[0])==null?void 0:m.toUpperCase()}).join("");return(u,h)=>{const m=t.resolveComponent("ShoppingCart"),p=t.resolveComponent("DCodeBadge"),y=t.resolveComponent("RefreshCcw"),b=t.resolveComponent("MapPin");return t.openBlock(),t.createElementBlock("div",UE,[h[8]||(h[8]=t.createElementVNode("div",{class:"flex flex-col space-y-1.5 py-6 px-3"},[t.createElementVNode("h3",{class:"leading-none tracking-tight text-lg font-medium"},"Timeline With Icons")],-1)),t.createElementVNode("div",WE,[a.value?(t.openBlock(),t.createElementBlock("div",HE,[...h[0]||(h[0]=[t.createElementVNode("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"},null,-1)])])):s.value?(t.openBlock(),t.createElementBlock("div",qE,t.toDisplayString(s.value),1)):(t.openBlock(),t.createElementBlock("div",GE,[h[7]||(h[7]=t.createElementVNode("div",{class:"absolute left-4 top-0 h-full w-px bg-border"},null,-1)),t.createElementVNode("div",KE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(g,_)=>(t.openBlock(),t.createElementBlock("div",{key:_,class:"relative pl-14"},[t.createElementVNode("div",{class:t.normalizeClass(["absolute left-0 top-2 flex h-8 w-8 items-center justify-center rounded-full border",d(g.type).Circle])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d(g.type).Icon),{class:"h-4 w-4"}))],2),t.createElementVNode("div",XE,[t.createElementVNode("div",YE,[g.type==="flight"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",JE,[t.createElementVNode("p",QE,t.toDisplayString(g.title),1),t.createElementVNode("p",ZE,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",eB,[t.createElementVNode("span",tB,t.toDisplayString(g.from),1),t.createVNode(t.unref(ne.ArrowRight),{class:"mx-2 inline h-4 w-4"}),t.createElementVNode("span",oB,t.toDisplayString(g.to),1)]),t.createElementVNode("p",nB,t.toDisplayString(g.time),1),g.fileName?(t.openBlock(),t.createElementBlock("div",rB,[t.createVNode(t.unref(ne.FileText),{class:"h-4 w-4 text-muted-foreground"}),t.createElementVNode("span",null,t.toDisplayString(g.fileName),1)])):t.createCommentVNode("",!0)],64)):g.type==="interview"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",aB,[t.createElementVNode("p",sB,t.toDisplayString(g.title),1),t.createElementVNode("p",iB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",lB,t.toDisplayString(g.desc),1),t.createVNode(t.unref(ia),{class:"my-4"}),t.createElementVNode("div",cB,[t.createElementVNode("div",dB,[t.createVNode(t.unref(Mf),{class:"h-10 w-10"},{default:t.withCtx(()=>[g.avatarUrl?(t.openBlock(),t.createBlock(t.unref(Pf),{key:0,src:g.avatarUrl},null,8,["src"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Tf),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f(g.personName??"")),1)]),_:2},1024)]),_:2},1024),t.createElementVNode("div",fB,[t.createElementVNode("p",uB,t.toDisplayString(g.personName),1),t.createElementVNode("p",hB,t.toDisplayString(g.personRole),1)])]),t.createElementVNode("div",mB,[t.createVNode(t.unref(Nt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.MessageSquare),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Nt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Phone),{class:"h-4 w-4"})]),_:1})])])],64)):g.type==="product"?(t.openBlock(),t.createElementBlock("div",pB,[t.createElementVNode("div",gB,[g.imgUrl?(t.openBlock(),t.createElementBlock("img",{key:0,src:g.imgUrl,class:"h-full w-full rounded-lg object-cover",alt:"product"},null,8,bB)):(t.openBlock(),t.createBlock(m,{key:1,class:"h-5 w-5 text-muted-foreground"}))]),t.createElementVNode("div",yB,[t.createElementVNode("div",xB,[t.createElementVNode("p",kB,t.toDisplayString(g.title),1),t.createElementVNode("p",wB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",CB,t.toDisplayString(g.desc),1),t.createElementVNode("div",{class:t.normalizeClass(["mt-4 grid gap-3",t.unref(n)?"grid-cols-1":"grid-cols-3"])},[t.createElementVNode("div",_B,[h[1]||(h[1]=t.createElementVNode("p",{class:"text-sm font-medium"},"Customer",-1)),t.createElementVNode("p",EB,t.toDisplayString(g.customer),1)]),t.createElementVNode("div",BB,[h[2]||(h[2]=t.createElementVNode("p",{class:"text-sm font-medium"},"Price",-1)),t.createElementVNode("p",SB,t.toDisplayString(g.price),1)]),t.createElementVNode("div",AB,[h[3]||(h[3]=t.createElementVNode("p",{class:"text-sm font-medium"},"Quantity",-1)),t.createElementVNode("p",vB,t.toDisplayString(g.qty),1)])],2)])])):g.type==="design"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createElementVNode("div",DB,[t.createElementVNode("p",NB,t.toDisplayString(g.title),1),t.createElementVNode("p",VB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",MB,t.toDisplayString(g.desc),1),t.createElementVNode("div",TB,[t.createVNode(t.unref(Mf),{class:"h-10 w-10"},{default:t.withCtx(()=>[g.avatarUrl?(t.openBlock(),t.createBlock(t.unref(Pf),{key:0,src:g.avatarUrl},null,8,["src"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Tf),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f(g.personName??"")),1)]),_:2},1024)]),_:2},1024),t.createElementVNode("p",PB,t.toDisplayString(g.personName),1)])],64)):g.type==="server"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createElementVNode("div",OB,[t.createElementVNode("p",LB,t.toDisplayString(g.title),1),t.createVNode(p,{variant:"destructive",class:"h-6"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.chipText??""),1)]),_:2},1024)]),t.createElementVNode("div",RB,[t.createElementVNode("div",IB,[t.createElementVNode("div",FB,[t.createVNode(t.unref(ne.Globe),{class:"h-4 w-4"}),h[4]||(h[4]=t.createElementVNode("span",null,"IP Address",-1))]),t.createElementVNode("span",zB,t.toDisplayString(g.ip),1)]),t.createElementVNode("div",$B,[t.createElementVNode("div",jB,[t.createVNode(t.unref(ne.Cpu),{class:"h-4 w-4"}),h[5]||(h[5]=t.createElementVNode("span",null,"CPU",-1))]),t.createElementVNode("span",UB,t.toDisplayString(g.cpu),1)]),t.createElementVNode("div",WB,[t.createElementVNode("div",HB,[t.createVNode(t.unref(ne.CpuIcon),{class:"h-4 w-4"}),h[6]||(h[6]=t.createElementVNode("span",null,"Memory",-1))]),t.createElementVNode("span",qB,t.toDisplayString(g.memory),1)])]),t.createVNode(t.unref(ia),{class:"my-4"}),t.createElementVNode("div",GB,[t.createElementVNode("div",KB,[t.createVNode(t.unref(Nt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Share2),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Nt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(y,{class:"h-4 w-4"})]),_:1})])])],64)):g.type==="location"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[t.createElementVNode("div",XB,[t.createElementVNode("div",YB,[t.createVNode(b,{class:"h-4 w-4 text-muted-foreground"}),t.createElementVNode("p",JB,t.toDisplayString(g.title),1)]),t.createVNode(p,{variant:"destructive",class:"h-6"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.chipText),1)]),_:2},1024)]),t.createElementVNode("p",QB,t.toDisplayString(g.desc1),1),g.desc2?(t.openBlock(),t.createElementBlock("p",ZB,t.toDisplayString(g.desc2),1)):t.createCommentVNode("",!0),t.createVNode(t.unref(ia),{class:"my-4"}),t.createElementVNode("div",eS,[t.createElementVNode("div",tS,[t.createVNode(t.unref(Nt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Link),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Nt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.MessageSquare),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Nt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.User),{class:"h-4 w-4"})]),_:1})]),t.createElementVNode("p",oS,"Due date: "+t.toDisplayString(g.due),1)])],64)):t.createCommentVNode("",!0)])])]))),128))])]))])])}}}),nS={class:"dcode-upload-file"},rS={class:"border-2 border-dashed border-gray-300 dark:border-gray-700 rounded-lg p-6 flex flex-col items-center justify-center text-center hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors cursor-pointer"},aS={key:0,class:"text-xs text-gray-500 mt-1"},sS=["accept"],iS={key:1,class:"text-xs text-red-600 mt-1"},Lf=t.defineComponent({name:"DCodeUploadFile",__name:"DCodeUploadFile",props:{label:{},accept:{},errorMessage:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:o}){const n=o,r=a=>{var i;const s=(i=a.target.files)==null?void 0:i[0];s&&n("update:modelValue",s)};return(a,s)=>(t.openBlock(),t.createElementBlock("div",nS,[e.label?(t.openBlock(),t.createBlock($o,{key:0,label:e.label},null,8,["label"])):t.createCommentVNode("",!0),t.createElementVNode("div",rS,[t.createVNode(t.unref(ne.UploadCloud),{class:"w-8 h-8 text-gray-400 mb-2"}),s[0]||(s[0]=t.createElementVNode("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[t.createElementVNode("span",{class:"font-medium text-primary-600"},"Click to upload"),t.createTextVNode(" or drag and drop ")],-1)),e.accept?(t.openBlock(),t.createElementBlock("p",aS,t.toDisplayString(e.accept),1)):t.createCommentVNode("",!0),t.createElementVNode("input",{type:"file",class:"hidden",onChange:r,accept:e.accept},null,40,sS)]),e.errorMessage?(t.openBlock(),t.createElementBlock("p",iS,t.toDisplayString(e.errorMessage),1)):t.createCommentVNode("",!0)]))}}),lS=["onClick"],cS={key:1,class:"mr-2 text-xs font-bold shrink-0 opacity-50"},dS={class:"font-semibold text-sm whitespace-normal text-center leading-tight"},fS={key:1},uS={key:0,class:"text-white"},hS={key:1},mS={key:2},pS=["disabled","onClick"],gS={key:1,class:"mr-2 text-sm font-bold opacity-70"},bS={class:"whitespace-normal text-sm text-center leading-tight"},yS={class:"flex flex-col flex-1 min-w-0"},xS={class:"rounded-lg border bg-muted/30 px-4 py-3 text-sm text-muted-foreground flex items-center gap-2"},kS={class:"text-sm text-muted-foreground"},wS={class:"px-1"},CS=["disabled"],_S=["type"],ES=["disabled"],ii=lt(t.defineComponent({name:"DCodeWizard",__name:"DCodeWizard",props:{tabs:{},modelValue:{},defaultTab:{default:0},allowTabClick:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},cache:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!0},apiOptions:{type:[Object,Function],default:void 0},isVertical:{type:Boolean,default:!1},isWizard:{type:Boolean,default:!1},typeWizard:{default:"icon"},showNavigation:{type:Boolean,default:!0},submitText:{default:"Simpan"},loading:{type:Boolean,default:!1},isSubmit:{type:Boolean,default:!1}},emits:["update:modelValue","change","loaded","error"],setup(e,{emit:o}){const n=e,r=o,a=Qe(),s=a==null?void 0:a.DCodeApi;typeof s!="function"&&console.error("[DCodeWizardTabs] useApi() must expose DCodeApi()");const i=t.ref(n.defaultTab),l=t.computed({get(){var x;if(typeof n.modelValue=="string"){const w=(x=n.tabs)==null?void 0:x.findIndex(D=>D.key===n.modelValue);if(w!==void 0&&w>=0)return w}return(typeof n.modelValue=="number"?n.modelValue:void 0)??i.value},set(x){var w;if(i.value=x,typeof n.modelValue=="string"){const D=(w=n.tabs)==null?void 0:w[x];D?r("update:modelValue",D.key):r("update:modelValue",x)}else r("update:modelValue",x)}}),c=t.computed(()=>{var x;return((x=n.tabs)==null?void 0:x.length)??0}),d=t.computed(()=>{var x;return(x=n.tabs)==null?void 0:x[l.value]});function f(x){return c.value<=0?0:Math.min(Math.max(x,0),c.value-1)}function u(x){return x?typeof x=="string"?Ao(x,Pt):x:null}const h=t.reactive({});function m(x){return h[x.key]||(h[x.key]={loaded:!1,loading:!1,data:null,error:null}),h[x.key]}function p(){if(n.apiOptions)return typeof n.apiOptions=="function"?n.apiOptions():n.apiOptions}function y(x){const w=x.endpoint||{};return{apiModule:x.apiModule||w.apiModule,apiAction:x.apiAction||w.apiAction,apiUrl:w.apiUrl,apiMethod:w.apiMethod||"GET",apiParams:x.apiParams}}function b(x){if(n.isWizard||!n.allowTabClick||n.disabled)return!1;const w=n.tabs[x];return!(!w||w.disabled)}async function g(x){if(typeof x.tab.fetchData=="function"){const V=await x.tab.fetchData(),L=(V==null?void 0:V.data)??V;return(L==null?void 0:L.data)??L}const w=y(x.tab);if(!(w.apiModule&&w.apiAction||w.apiUrl))return null;if(typeof s!="function")throw new Error("DCodeApi is not available");const k=p();let v;if(w.apiUrl)v=await s("","",k,{_url:w.apiUrl,_method:w.apiMethod,_data:w.apiParams??void 0});else{const V={...k,...w.apiParams};v=await s(w.apiModule,w.apiAction,V)}const S=(v==null?void 0:v.data)??v;return(S==null?void 0:S.data)??S}async function _(x,{force:w=!1}={}){const D=f(x),k=n.tabs[D];if(!k)return;const v=m(k);if(!(n.cache&&v.loaded&&!w)&&!v.loading){v.loading=!0,v.error=null;try{const S=await g({tabIndex:D,tab:k});v.data=S,v.loaded=!0,r("loaded",{tabIndex:D,tab:k,data:S})}catch(S){const N=typeof(S==null?void 0:S.message)=="string"&&S.message||typeof S=="string"&&S||"Failed to load tab data.";v.error=N,r("error",{tabIndex:D,tab:k,message:N})}finally{v.loading=!1}}}function E(x){const w=f(x);b(w)&&w!==l.value&&(l.value=w)}function B(x=l.value){return _(x,{force:!0})}function A(){const x=f(l.value-1);x!==l.value&&(l.value=x)}function C(){const x=f(l.value+1);x!==l.value&&(l.value=x)}return t.watch(()=>n.tabs,x=>{for(const w of x??[])m(w)},{immediate:!0}),t.watch(()=>l.value,async x=>{var D;const w=(D=n.tabs)==null?void 0:D[x];w&&r("change",{tabIndex:x,tab:w}),await _(x)},{immediate:!0}),t.watch(()=>n.autoFetchOnMount,async x=>{x&&await _(l.value)},{immediate:!0}),(x,w)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["w-full rounded-lg border bg-card text-card-foreground shadow-sm",{"flex flex-row":e.isVertical}])},[t.createElementVNode("div",{class:t.normalizeClass(["flex flex-col space-y-1.5 p-6",{"w-64 border-r pr-0":e.isVertical,"pb-2":e.isWizard&&!e.isVertical}])},[t.createElementVNode("div",{class:t.normalizeClass({"mt-4":!e.isVertical||e.isWizard})},[e.isWizard?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["w-full relative flex overflow-visible rounded-lg",e.isVertical?"flex-col gap-2":""])},[e.isVertical?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.tabs,(D,k)=>(t.openBlock(),t.createElementBlock("div",{key:D.key,class:"relative z-10 box-border flex items-center gap-3 w-full pb-6 last:pb-0"},[t.createElementVNode("div",{class:t.normalizeClass(["w-8 h-8 rounded-full flex shrink-0 items-center justify-center font-bold text-sm border-2 transition-all bg-card",[k<l.value?"border-[#2563eb] bg-[#2563eb] text-white dark:border-[#1e3a8a] dark:bg-[#1e3a8a]":k===l.value?"border-[#2563eb] text-[#2563eb] shadow-[0_0_0_2px_rgba(37,99,235,0.2)] dark:border-[#1e3a8a] dark:text-[#3b82f6] dark:shadow-[0_0_0_2px_rgba(30,58,138,0.2)]":"border-[#e2e8f0] text-[#94a3b8] dark:border-[#3f3f46] dark:text-[#71717a]"]])},[e.typeWizard==="icon"&&D.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(D.icon)),{key:0,class:"w-4 h-4"})):e.typeWizard==="number"||!D.icon&&e.typeWizard!=="none"?(t.openBlock(),t.createElementBlock("span",fS,[k<l.value?(t.openBlock(),t.createElementBlock("span",uS,"✓")):(t.openBlock(),t.createElementBlock("span",hS,t.toDisplayString(k+1),1))])):(t.openBlock(),t.createElementBlock("span",mS))],2),t.createElementVNode("span",{class:t.normalizeClass(["text-xs font-semibold whitespace-normal px-2 py-1 rounded transition-colors text-left",k===l.value?"text-[#2563eb] dark:text-[#3b82f6]":"text-[#64748b] dark:text-[#a1a1aa]"])},t.toDisplayString(D.title),3)]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.tabs,(D,k)=>(t.openBlock(),t.createElementBlock("div",{key:D.key,onClick:v=>E(k),style:t.normalizeStyle({zIndex:e.tabs.length-k}),class:"relative flex-1 group"},[t.createElementVNode("div",{class:t.normalizeClass(["relative flex items-center justify-center min-h-[3rem] h-auto py-2 px-2 cursor-pointer transition-colors w-full",[k>0?"pl-8":"",k===l.value?"bg-[#2563eb] text-white dark:bg-[#1e3a8a]":k<l.value?"bg-[#eff6ff] text-[#2563eb] hover:bg-[#dbeafe] dark:bg-[#191d2c] dark:text-[#3b82f6] dark:hover:bg-[#1e263d]":"bg-[#f8fafc] text-[#64748b] hover:bg-[#f1f5f9] hover:text-[#334155] dark:bg-[#18181b] dark:text-[#a1a1aa] dark:hover:bg-[#27272a] dark:hover:text-[#d4d4d8]"]])},[e.typeWizard==="icon"&&D.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(D.icon)),{key:0,class:"w-4 h-4 mr-2 shrink-0"})):e.typeWizard==="number"?(t.openBlock(),t.createElementBlock("span",cS,t.toDisplayString(k+1),1)):t.createCommentVNode("",!0),t.createElementVNode("span",dS,t.toDisplayString(D.title),1)],2),k<e.tabs.length-1?(t.openBlock(),t.createElementBlock("svg",{key:0,class:t.normalizeClass(["absolute top-0 -right-[15.5px] w-[16px] h-full transition-colors block z-10",[k===l.value?"fill-[#2563eb] text-[#2563eb] dark:fill-[#1e3a8a] dark:text-[#1e3a8a]":k<l.value?"fill-[#eff6ff] text-[#eff6ff] group-hover:fill-[#dbeafe] group-hover:text-[#dbeafe] dark:fill-[#191d2c] dark:text-[#191d2c] dark:group-hover:fill-[#1e263d] dark:group-hover:text-[#1e263d]":"fill-[#f8fafc] text-[#f8fafc] group-hover:fill-[#f1f5f9] group-hover:text-[#f1f5f9] dark:fill-[#18181b] dark:text-[#18181b] dark:group-hover:fill-[#27272a] dark:group-hover:text-[#27272a]"]]),preserveAspectRatio:"none",viewBox:"0 0 16 48"},[...w[0]||(w[0]=[t.createElementVNode("polygon",{points:"0,0 16,24 0,48"},null,-1)])],2)):t.createCommentVNode("",!0)],12,lS))),128))],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["flex w-full",e.isVertical?"flex-col gap-1":"flex-wrap border-b border-separate"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabs,(D,k)=>(t.openBlock(),t.createElementBlock("button",{key:D.key,type:"button",disabled:!b(k),onClick:v=>E(k),class:t.normalizeClass(["relative min-h-[3rem] h-auto py-2 flex items-center justify-center gap-2 px-4 transition-all rounded-none focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 border-[#e2e8f0] dark:border-[#3f3f46]",t.unref(Ve)("border-b border-r",!e.isVertical&&k===e.tabs.length-1&&"border-r-0",k===l.value?"bg-[#2563eb]/[0.08] text-[#2563eb] font-semibold dark:bg-[#191d2c] dark:text-[#3b82f6]":"bg-transparent text-[#64748b] hover:bg-[#f1f5f9] hover:text-[#334155] dark:text-[#a1a1aa] dark:hover:bg-[#27272a] dark:hover:text-[#f4f4f5]",!b(k)&&"opacity-60 cursor-not-allowed",e.isVertical?"w-full justify-start border-r-0":"flex-1")])},[e.typeWizard==="icon"&&D.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(D.icon)),{key:0,class:"h-4 w-4 shrink-0"})):e.typeWizard==="number"?(t.openBlock(),t.createElementBlock("span",gS,t.toDisplayString(k+1),1)):t.createCommentVNode("",!0),t.createElementVNode("span",bS,t.toDisplayString(D.title),1)],10,pS))),128))],2))],2)],2),e.isVertical?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(ia),{key:0})),t.createElementVNode("div",yS,[t.createElementVNode("div",{class:t.normalizeClass(["p-6 flex-1 min-w-0",{"pl-6":e.isVertical}])},[t.createVNode(t.Transition,{name:"wizard-fade",mode:"out-in"},{default:t.withCtx(()=>{var D,k,v,S;return[(t.openBlock(),t.createElementBlock("div",{key:((D=d.value)==null?void 0:D.key)||l.value,class:"w-full"},[d.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(k=h[d.value.key])!=null&&k.loading?t.renderSlot(x.$slots,"loading",{key:0,tab:d.value,tabIndex:l.value},()=>[t.createElementVNode("div",xS,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),w[1]||(w[1]=t.createTextVNode(" Loading... ",-1))])],!0):t.renderSlot(x.$slots,`tab-${d.value.key}`,{key:1,tab:d.value,tabIndex:l.value,data:(v=h[d.value.key])==null?void 0:v.data,loaded:(S=h[d.value.key])==null?void 0:S.loaded,reload:B},()=>[t.createElementVNode("div",kS,[w[2]||(w[2]=t.createTextVNode(" Slot ",-1)),t.createElementVNode("code",wS,"tab-"+t.toDisplayString(d.value.key),1),w[3]||(w[3]=t.createTextVNode(" belum dibuat. ",-1))])],!0)],64)):t.createCommentVNode("",!0)]))]}),_:3})],2),e.isWizard||e.showNavigation?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["flex items-center justify-between p-6 pt-0",{"pl-6":e.isVertical}])},[t.createElementVNode("button",{type:"button",onClick:A,disabled:l.value<=0,class:"relative inline-flex items-center justify-center gap-2 px-5 py-2.5 text-sm font-medium transition-all duration-300 rounded-lg bg-[#ffffff] border border-[#e2e8f0] text-[#334155] shadow-sm hover:bg-[#f8fafc] hover:text-[#0f172a] hover:-translate-y-0.5 hover:shadow disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#ffffff] disabled:hover:text-[#334155] disabled:hover:translate-y-0 disabled:active:scale-100 dark:bg-[#18181b] dark:border-[#27272a] dark:text-[#d4d4d8] dark:hover:bg-[#27272a] dark:hover:border-[#3f3f46] dark:disabled:hover:bg-[#18181b] dark:disabled:hover:text-[#d4d4d8] focus:outline-none focus:ring-2 focus:ring-[#e2e8f0] focus:ring-offset-2 active:scale-95"}," Sebelumnya ",8,CS),l.value<c.value-1?(t.openBlock(),t.createElementBlock("button",{key:0,type:e.isSubmit?"submit":"button",onClick:C,class:"relative inline-flex items-center justify-center gap-2 px-6 py-2.5 text-sm font-medium text-[#ffffff] transition-all duration-300 rounded-lg shadow-md bg-[#2563eb] hover:bg-[#1d4ed8] hover:shadow-lg hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#2563eb] disabled:hover:translate-y-0 disabled:active:scale-100 focus:outline-none focus:ring-2 focus:ring-[#2563eb] focus:ring-offset-2 active:scale-95"}," Selanjutnya ",8,_S)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"submit",disabled:e.loading,class:"relative inline-flex items-center justify-center gap-2 px-6 py-2.5 text-sm font-medium text-[#ffffff] transition-all duration-300 rounded-lg shadow-md bg-[#2563eb] hover:bg-[#1d4ed8] hover:shadow-lg hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#2563eb] disabled:hover:translate-y-0 disabled:active:scale-100 dark:bg-[#1e3a8a] dark:hover:bg-[#1e40af] focus:outline-none focus:ring-2 focus:ring-[#2563eb] focus:ring-offset-2 active:scale-95"},[e.loading?(t.openBlock(),t.createBlock(t.unref(ne.Loader2),{key:0,class:"w-4 h-4 mr-2 animate-spin"})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.submitText),1)],8,ES))],2)):t.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-3330e7b3"]]),BS={class:"permission-menu w-full space-y-4"},SS={class:"bg-neutral-50/50 dark:bg-neutral-900/30 border-b border-neutral-200/60 dark:border-neutral-700/30 text-neutral-900 dark:text-neutral-100 p-4"},AS={class:"flex items-center justify-between"},vS={class:"flex items-center gap-3 flex-1"},DS=["onClick"],NS={key:1,class:"w-7"},VS={key:2,class:"flex-shrink-0"},MS={class:"text-lg font-semibold flex-1"},TS={key:0,class:"p-4 bg-gray-50 dark:bg-zinc-900/50 border-b border-gray-200 dark:border-neutral-700"},PS={class:"text-xs font-semibold text-gray-600 dark:text-neutral-400 uppercase tracking-wide mb-3"},OS={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2 w-full"},LS=["checked","disabled","onChange"],RS={class:"text-sm font-medium text-gray-700 dark:text-neutral-300 group-hover:text-blue-700 dark:group-hover:text-primary-400"},IS={key:0,class:"p-4 space-y-3 bg-gray-50 dark:bg-zinc-900/30"},FS={class:"text-sm font-semibold text-gray-700 dark:text-neutral-300 mb-3 flex items-center gap-2"},zS={class:"bg-neutral-50 dark:bg-neutral-900/30 border-b border-neutral-200/60 dark:border-neutral-700/30 text-neutral-900 dark:text-neutral-100 p-3"},$S={class:"flex items-center justify-between"},jS={class:"flex items-center gap-3 flex-1"},US={key:0,class:"flex-shrink-0"},WS={class:"text-base font-semibold flex-1"},HS={key:1,class:"text-xs bg-white/20 px-2 py-1 rounded font-mono hidden sm:inline-block"},qS={class:"flex items-center gap-2 px-2.5 py-1 bg-white/20 hover:bg-white/30 rounded-lg cursor-pointer transition-colors"},GS=["checked","onChange"],KS={class:"text-xs font-medium"},XS={key:0,class:"p-3"},YS={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2 w-full"},JS=["checked","disabled","onChange"],QS={class:"text-xs font-medium text-gray-700 dark:text-neutral-300 group-hover:text-pink-700 dark:group-hover:text-pink-400"},li=lt(t.defineComponent({__name:"DCodePermissionMenu",props:{menuList:{default:()=>[]},enableParentControl:{type:Boolean,default:!1},showIcons:{type:Boolean,default:!0},modelValue:{default:()=>[]},treeData:{default:()=>[]}},emits:["permission-change","menu-check","update:modelValue"],setup(e,{expose:o,emit:n}){const{t:r}=kt.useI18n(),a=e,s=n,i=t.computed(()=>a.menuList&&a.menuList.length>0?a.menuList:a.treeData||[]),l=t.ref(new Map),c=t.ref(new Set),d=(k=!0)=>{(S=>{S.forEach(N=>{N.permission.forEach(V=>{const L=`${N.id}-${V.id}-parent`,O=V.code==="VIEW"||V.name.toUpperCase()==="VIEW";l.value.has(L)||l.value.set(L,O||(k?N.checked??!1:!1))}),N.detail&&N.detail.length>0&&N.detail.forEach(V=>{V.permission.forEach(L=>{const O=`${V.id}-${L.id}-child`,P=L.code==="VIEW"||L.name.toUpperCase()==="VIEW";l.value.has(O)||l.value.set(O,P||(k?V.checked??!1:!1))})})})})(i.value)},f=()=>{console.log("[DCodePermissionMenu] initializeFromModelValue called. modelValue:",a.modelValue),l.value.clear(),d(!1),a.modelValue&&a.modelValue.length>0&&a.modelValue.forEach(k=>{const v=k.menuId,S=k.actionsIds;i.value.forEach(N=>{N.id===v&&S.forEach(V=>{const L=`${v}-${V}-parent`;l.value.set(L,!0)}),N.detail&&N.detail.length>0&&N.detail.forEach(V=>{V.id===v&&S.forEach(L=>{const O=`${v}-${L}-child`;l.value.set(O,!0)})})})})};f(),t.watch(()=>a.modelValue,()=>{f()},{deep:!0}),t.watch(()=>i.value.length,(k,v)=>{v===0&&k>0&&f()});const u=k=>k.detail&&k.detail.length>0,h=k=>{c.value.has(k)?c.value.delete(k):c.value.add(k)},m=k=>c.value.has(k),p=(k,v,S=!1)=>{const N=`${k}-${v}-${S?"child":"parent"}`;return l.value.get(N)??!1},y=()=>{const k=C();s("update:modelValue",k.permissions)},b=(k,v,S,N=!1)=>{const V=S.target.checked,L=`${k}-${v}-${N?"child":"parent"}`;l.value.set(L,V),s("permission-change",k,v,V,!N),y()},g=k=>k.permission.filter(_),_=k=>k.code==="VIEW"||k.name.toUpperCase()==="VIEW",E=(k,v,S)=>{const N=S.target.checked;v.permission.forEach(V=>{if(_(V)){const O=`${v.id}-${V.id}-child`;l.value.set(O,!0);return}const L=`${v.id}-${V.id}-child`;l.value.set(L,N)}),l.value=new Map(l.value),s("menu-check",v.id,N),y()},B=(k,v=!1)=>{const S=v?k.permission:g(k);return!S||S.length===0?!1:S.every(N=>{const V=`${k.id}-${N.id}-${v?"child":"parent"}`;return l.value.get(V)??!1})},A=()=>{const k={};return i.value.forEach(v=>{var S;k[v.id]={name:v.name,parentPermissions:v.permission.map(N=>({id:N.id,name:N.name,checked:p(v.id,N.id,!1)})),children:((S=v.detail)==null?void 0:S.map(N=>({id:N.id,name:N.name,permissions:N.permission.map(V=>({id:V.id,name:V.name,checked:p(N.id,V.id,!0)}))})))||[]}}),k},C=()=>{const k=[],v=(S,N=!1)=>{const V=[];S.permission.forEach(L=>{const O=`${S.id}-${L.id}-${N?"child":"parent"}`;(l.value.get(O)??!1)&&V.push(L.id)}),V.length>0&&k.push({menuId:S.id,actionsIds:V})};return i.value.forEach(S=>{v(S,!1),S.detail&&S.detail.length>0&&S.detail.forEach(N=>{v(N,!0)})}),{permissions:k}};return o({getCurrentStates:A,getPermissionsForDatabase:C,getAllPermissionsWithStatus:()=>{const k=[],v=(S,N=!1)=>{const V=S.permission.map(O=>{const P=`${S.id}-${O.id}-${N?"child":"parent"}`,R=l.value.get(P)??!1;return{id:O.id,name:O.name,checked:R}}),L=V.filter(O=>O.checked).map(O=>O.id);k.push({menuId:S.id,menuName:S.name,actionsIds:L,actions:V})};return i.value.forEach(S=>{v(S,!1),S.detail&&S.detail.length>0&&S.detail.forEach(N=>{v(N,!0)})}),{permissions:k}},permissionStates:l,expandAll:()=>{i.value.forEach(k=>{u(k)&&c.value.add(k.id)})},collapseAll:()=>{c.value.clear()}}),(k,v)=>(t.openBlock(),t.createElementBlock("div",BS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,S=>(t.openBlock(),t.createElementBlock("div",{key:S.id,class:t.normalizeClass(["dcode-card overflow-hidden",{"border-l-4 border-l-blue-500":u(S)}])},[t.createElementVNode("div",SS,[t.createElementVNode("div",AS,[t.createElementVNode("div",vS,[u(S)?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:N=>h(S.id),type:"button",class:"p-1 hover:bg-white/20 rounded-lg transition-colors"},[m(S.id)?(t.openBlock(),t.createBlock(t.unref(ne.ChevronDown),{key:0,class:"w-5 h-5"})):(t.openBlock(),t.createBlock(t.unref(ne.ChevronRight),{key:1,class:"w-5 h-5"}))],8,DS)):(t.openBlock(),t.createElementBlock("div",NS)),e.showIcons&&S.icon?(t.openBlock(),t.createElementBlock("span",VS,[t.createElementVNode("i",{class:t.normalizeClass([S.icon,"text-2xl"])},null,2)])):t.createCommentVNode("",!0),t.createElementVNode("h3",MS,t.toDisplayString(S.name),1)])])]),S.permission&&S.permission.length>0&&!u(S)?(t.openBlock(),t.createElementBlock("div",TS,[t.createElementVNode("h4",PS,t.toDisplayString(t.unref(r)("common.permissions"))+": ",1),t.createElementVNode("div",OS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g(S),N=>(t.openBlock(),t.createElementBlock("label",{key:N.id,class:"flex items-center gap-2 px-3 py-2 bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700/50 rounded-lg cursor-pointer hover:border-blue-400 dark:hover:border-primary-500 hover:bg-blue-50 dark:hover:bg-neutral-900/50 transition-all group"},[t.createElementVNode("input",{type:"checkbox",checked:_(N)||p(S.id,N.id,!1),disabled:_(N),onChange:V=>b(S.id,N.id,V,!1),class:t.normalizeClass(["w-4 h-4 text-blue-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-blue-500 dark:focus:ring-blue-600",_(N)?"cursor-not-allowed opacity-75":"cursor-pointer"])},null,42,LS),t.createElementVNode("span",RS,t.toDisplayString(N.name),1)]))),128))])])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"opacity-100 max-h-[5000px]","leave-active-class":"transition-all duration-300 ease-in","leave-from-class":"opacity-100 max-h-[5000px]","leave-to-class":"opacity-0 max-h-0"},{default:t.withCtx(()=>[u(S)&&m(S.id)?(t.openBlock(),t.createElementBlock("div",IS,[t.createElementVNode("h4",FS,[v[0]||(v[0]=t.createElementVNode("span",{class:"w-1 h-4 bg-blue-500 rounded"},null,-1)),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("common.subMenus")),1)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.detail,N=>(t.openBlock(),t.createElementBlock("div",{key:N.id,class:"bg-white dark:bg-neutral-800 rounded-lg border border-gray-200 dark:border-neutral-700/50 overflow-hidden shadow-sm hover:shadow transition-shadow"},[t.createElementVNode("div",zS,[t.createElementVNode("div",$S,[t.createElementVNode("div",jS,[e.showIcons&&N.icon?(t.openBlock(),t.createElementBlock("span",US,[t.createElementVNode("i",{class:t.normalizeClass([N.icon,"text-xl"])},null,2)])):t.createCommentVNode("",!0),t.createElementVNode("h5",WS,t.toDisplayString(N.name),1),N.path?(t.openBlock(),t.createElementBlock("span",HS,t.toDisplayString(N.path),1)):t.createCommentVNode("",!0),t.createElementVNode("label",qS,[t.createElementVNode("input",{type:"checkbox",checked:B(N,!0),onChange:V=>E(S,N,V),class:"w-3.5 h-3.5 text-pink-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-pink-500 dark:focus:ring-pink-600 cursor-pointer"},null,40,GS),t.createElementVNode("span",KS,t.toDisplayString(t.unref(r)("common.selectAll")),1)])])])]),N.permission&&N.permission.length>0?(t.openBlock(),t.createElementBlock("div",XS,[t.createElementVNode("div",YS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(N.permission,V=>(t.openBlock(),t.createElementBlock("label",{key:V.id,class:"flex items-center gap-2 px-2.5 py-1.5 bg-gray-50 dark:bg-zinc-900/50 border border-gray-200 dark:border-neutral-700 rounded-md cursor-pointer hover:border-pink-400 dark:hover:border-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/20 transition-all group"},[t.createElementVNode("input",{type:"checkbox",checked:_(V)||p(N.id,V.id,!0),disabled:_(V),onChange:L=>b(N.id,V.id,L,!0),class:t.normalizeClass(["w-3.5 h-3.5 text-pink-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-pink-500 dark:focus:ring-pink-600",_(V)?"cursor-not-allowed opacity-75":"cursor-pointer"])},null,42,JS),t.createElementVNode("span",QS,t.toDisplayString(V.name),1)]))),128))])])):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0)]),_:2},1024)],2))),128))]))}}),[["__scopeId","data-v-40ddf81d"]]),ZS={class:"space-y-4"},eA={key:0,class:"block text-sm font-medium text-neutral-700 dark:text-neutral-300 mb-2"},tA={key:0,class:"text-danger-500"},oA={key:1,class:"flex items-center justify-center p-8 bg-white dark:bg-gray-800 rounded-lg shadow"},nA={class:"text-neutral-600 dark:text-neutral-400"},rA={key:2,class:"p-6 bg-white dark:bg-gray-800 rounded-lg shadow text-center"},aA={class:"text-neutral-500 dark:text-neutral-400"},sA={key:3,class:"space-y-3"},iA={class:"flex items-center justify-between p-4 bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700"},lA={class:"flex items-center gap-3"},cA={class:"font-medium text-gray-900 dark:text-gray-100 text-base"},dA={class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},fA={class:"flex items-center gap-2 text-sm font-medium"},uA={class:"px-2.5 py-1 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-700 dark:text-primary-300"},hA={class:"p-4"},mA={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3"},pA={class:"ml-2 flex-1 min-w-0"},gA=["for"],bA={key:0,class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5 line-clamp-2"},yA={key:4,class:"mt-1 text-xs text-danger-600"},ci=t.defineComponent({__name:"DCodeTreePermissions",props:{modelValue:{},label:{},required:{type:Boolean},disabled:{type:Boolean},error:{},treeData:{}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,{t:a}=kt.useI18n(),s=t.ref(!0),i=t.ref([]),l=t.ref({}),c=t.ref([]),d=t.ref({}),f=g=>{if(console.log(g),!g)return[];if(Array.isArray(g)&&g.length>0&&g[0].module&&Array.isArray(g[0].permissions))return g.map(_=>({menuId:_.menuId,module:_.module,label:_.label||_.module,permissions:_.permissions}));if(Array.isArray(g)&&g.length>0&&g[0].key){const _={};return g.forEach(E=>{const B=E.key,A=B&&B.includes(".")?B.split(".")[0]:"other";_[A]||(_[A]={menuId:0,module:A,label:A,permissions:[]}),_[A].permissions.push({id:E.id,key:E.key,label:E.label,description:E.description})}),Object.values(_)}if(Array.isArray(g)&&g.length>0&&g[0].id&&g[0].name&&Array.isArray(g[0].permission)){const _=[],E=(B,A="")=>{const C=A?`${A}.${B.name}`:B.name,x=C.toLowerCase().replace(/\s+/g,"_"),w=[];if(B.detail&&Array.isArray(B.detail)&&B.detail.forEach(D=>{w.push(D.id)}),B.permission&&B.permission.length>0){const D=B.permission.map(k=>({id:k.id,key:`${x}.${k.name.toLowerCase().replace(/\s+/g,"_")}`,label:`${k.name} ${B.name}`,description:`Permission to ${k.name.toLowerCase()} ${B.name.toLowerCase()}`}));_.push({menuId:B.id,module:x,label:B.name,permissions:D,subMenuIds:w.length>0?w:void 0})}B.detail&&Array.isArray(B.detail)&&B.detail.forEach(D=>{E(D,C)})};return g.forEach(B=>E(B)),_}return g.data?f(g.data):[]},u=async()=>{s.value=!0;try{let g;n.treeData&&n.treeData.length>0?g=n.treeData:g=[];const _=f(g);i.value=_;const E={},B=[],A={};_.forEach(x=>{x.permissions.forEach(w=>{const D=typeof w.id=="string"?parseInt(w.id):w.id;A[D]=x.menuId})});const C=new Set;n.modelValue&&Array.isArray(n.modelValue)&&n.modelValue.forEach(x=>{B.push(x.menuId),x.actionsIds&&Array.isArray(x.actionsIds)&&x.actionsIds.forEach(w=>C.add(w))}),_.forEach(x=>x.permissions.forEach(w=>{const D=typeof w.id=="string"?parseInt(w.id):w.id;E[D]=C.has(D)})),l.value=E,c.value=B,d.value=A}catch{i.value=[]}finally{s.value=!1}},h=g=>g.permissions.filter(_=>{const E=typeof _.id=="string"?parseInt(_.id):_.id;return l.value[E]}).length,m=g=>g.permissions.every(_=>{const E=typeof _.id=="string"?parseInt(_.id):_.id;return l.value[E]}),p=g=>{const _=h(g);return _>0&&_<g.permissions.length},y=t.ref(!1),b=(g,_)=>{y.value=!0,g.permissions.map(A=>typeof A.id=="string"?parseInt(A.id):A.id),g.permissions.forEach(A=>{const C=typeof A.id=="string"?parseInt(A.id):A.id;l.value[C]=_});let E=n.modelValue?[...n.modelValue]:[],B=[g.menuId];g.subMenuIds&&g.subMenuIds.length>0&&(B=[...B,...g.subMenuIds],g.subMenuIds.forEach(A=>{const C=i.value.find(x=>x.menuId===A);C&&C.permissions.forEach(x=>{const w=typeof x.id=="string"?parseInt(x.id):x.id;l.value[w]=_})})),_?B.forEach(A=>{const C=i.value.find(x=>x.menuId===A);if(C){const x=C.permissions.map(D=>typeof D.id=="string"?parseInt(D.id):D.id),w=E.findIndex(D=>D.menuId===A);w!==-1?E[w]={menuId:A,actionsIds:x}:E.push({menuId:A,actionsIds:x})}}):E=E.filter(A=>!B.includes(A.menuId)),c.value=E.map(A=>A.menuId),console.log("Full Result:",JSON.stringify(E,null,2)),r("update:modelValue",E),setTimeout(()=>{y.value=!1},100)};return t.watch(()=>n.modelValue,g=>{if(!g)return;const _=new Set,E=[];g.forEach(B=>{E.push(B.menuId),B.actionsIds&&Array.isArray(B.actionsIds)&&B.actionsIds.forEach(A=>_.add(A))}),Object.keys(l.value).forEach(B=>{const A=parseInt(B);l.value[A]=_.has(A)}),c.value=E}),t.watch(()=>n.treeData,g=>{g&&g.length>0&&u()},{deep:!0}),t.watch(l,(g,_)=>{if(y.value)return;if(Object.keys(g).map(B=>parseInt(B)).filter(B=>g[B]!==(_==null?void 0:_[B])).length>0){let B=n.modelValue?[...n.modelValue]:[];const A={};Object.keys(g).forEach(C=>{const x=parseInt(C);if(g[x]){const w=d.value[x];console.log(`Permission ${x} belongs to Menu ${w}`),w!==void 0&&(A[w]||(A[w]=[]),A[w].push(x))}}),Object.keys(A).forEach(C=>{const x=parseInt(C),w=A[x],D=B.findIndex(k=>k.menuId===x);D!==-1?B[D]={menuId:x,actionsIds:w}:B.push({menuId:x,actionsIds:w})}),B=B.filter(C=>A[C.menuId]&&A[C.menuId].length>0),c.value=B.map(C=>C.menuId),console.log("Result:",JSON.stringify(B,null,2)),r("update:modelValue",B)}},{deep:!0}),t.onMounted(u),(g,_)=>(t.openBlock(),t.createElementBlock("div",ZS,[e.label?(t.openBlock(),t.createElementBlock("label",eA,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",tA,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),s.value?(t.openBlock(),t.createElementBlock("div",oA,[t.createVNode(t.unref(ne.Loader2),{class:"animate-spin text-primary-600 mr-2",size:24}),t.createElementVNode("span",nA,t.toDisplayString(t.unref(a)("common.loadingPermissions")),1)])):i.value.length===0?(t.openBlock(),t.createElementBlock("div",rA,[t.createElementVNode("p",aA,t.toDisplayString(t.unref(a)("common.noPermissions")),1)])):(t.openBlock(),t.createElementBlock("div",sA,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,E=>(t.openBlock(),t.createElementBlock("div",{key:E.module,class:"bg-white dark:bg-neutral-800 rounded-lg border border-neutral-200/60 dark:border-neutral-700/50 shadow-sm hover:shadow-md transition-shadow"},[t.createElementVNode("div",iA,[t.createElementVNode("div",lA,[t.createVNode(ao,{modelValue:m(E),indeterminate:p(E),"onUpdate:modelValue":B=>b(E,!!B),disabled:e.disabled},null,8,["modelValue","indeterminate","onUpdate:modelValue","disabled"]),t.createElementVNode("div",null,[t.createElementVNode("div",cA,t.toDisplayString(E.label||E.module),1),t.createElementVNode("div",dA,t.toDisplayString(h(E))+" "+t.toDisplayString(t.unref(a)("common.from"))+" "+t.toDisplayString(E.permissions.length)+" "+t.toDisplayString(t.unref(a)("common.selected")),1)])]),t.createElementVNode("div",fA,[t.createElementVNode("div",uA,t.toDisplayString(h(E))+"/"+t.toDisplayString(E.permissions.length),1)])]),t.createElementVNode("div",hA,[t.createElementVNode("div",mA,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(E.permissions,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"flex items-start p-2 rounded hover:bg-gray-50 dark:hover:bg-gray-750 transition-colors"},[t.createVNode(ao,{modelValue:l.value[typeof B.id=="string"?parseInt(B.id):B.id],"onUpdate:modelValue":A=>l.value[typeof B.id=="string"?parseInt(B.id):B.id]=A,disabled:e.disabled,class:"flex-shrink-0"},null,8,["modelValue","onUpdate:modelValue","disabled"]),t.createElementVNode("div",pA,[t.createElementVNode("label",{for:`perm-${B.id}`,class:"text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer block"},t.toDisplayString(B.label||B.key),9,gA),B.description?(t.openBlock(),t.createElementBlock("p",bA,t.toDisplayString(B.description),1)):t.createCommentVNode("",!0)])]))),128))])])]))),128))])),e.error?(t.openBlock(),t.createElementBlock("p",yA,t.toDisplayString(e.error),1)):t.createCommentVNode("",!0)]))}}),xA={key:0,class:"fixed inset-0 z-[100] flex justify-end"},kA={key:0,class:"relative w-full max-w-sm h-full bg-white dark:bg-slate-900 shadow-2xl flex flex-col border-l border-gray-200 dark:border-gray-800"},wA={class:"px-6 py-4 border-b border-gray-100 dark:border-gray-800 flex items-center justify-between"},CA={class:"text-lg font-semibold text-gray-900 dark:text-gray-100"},_A={key:0,class:"text-sm text-gray-500 dark:text-gray-400 mt-1"},EA={class:"flex-1 overflow-y-auto p-6 scrollbar-thin scrollbar-thumb-gray-200 dark:scrollbar-thumb-gray-800"},BA={class:"px-6 py-4 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-slate-900/50"},SA=t.defineComponent({__name:"DataFilterSheet",props:{title:{default:"Filter Data"},description:{default:"Masukan parameter pencarian untuk memfilter data."}},setup(e,{expose:o}){const n=t.ref(!1),r=()=>{n.value=!0,document.body.style.overflow="hidden"},a=()=>{n.value=!1,document.body.style.overflow=""};return o({open:r,close:a}),(s,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{onClick:r},[t.renderSlot(s.$slots,"trigger",{},()=>[t.createVNode(He,{variant:"outline",class:"gap-2",icon:"Search",text:"Pencarian"})])]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[n.value?(t.openBlock(),t.createElementBlock("div",xA,[t.createVNode(t.Transition,{appear:"","enter-active-class":"transition-opacity duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[n.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:a})):t.createCommentVNode("",!0)]),_:1}),t.createVNode(t.Transition,{appear:"","enter-active-class":"transition-transform duration-300 ease-out","enter-from-class":"translate-x-full","enter-to-class":"translate-x-0","leave-active-class":"transition-transform duration-200 ease-in","leave-from-class":"translate-x-0","leave-to-class":"translate-x-full"},{default:t.withCtx(()=>[n.value?(t.openBlock(),t.createElementBlock("div",kA,[t.createElementVNode("div",wA,[t.createElementVNode("div",null,[t.createElementVNode("h3",CA,t.toDisplayString(e.title),1),e.description?(t.openBlock(),t.createElementBlock("p",_A,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)]),t.createVNode(He,{variant:"ghost",size:"icon",onClick:a,icon:"X",class:"text-gray-400 hover:text-gray-600"})]),t.createElementVNode("div",EA,[t.renderSlot(s.$slots,"default")]),t.createElementVNode("div",BA,[t.renderSlot(s.$slots,"footer")])])):t.createCommentVNode("",!0)]),_:3})])):t.createCommentVNode("",!0)]))]))}}),AA={key:0},vA=["value","name"],DA=t.defineComponent({__name:"DynamicFilterField",props:{field:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:o}){const{locale:n}=kt.useI18n(),r=e,a=o,s=t.ref(r.modelValue);t.watch(()=>r.modelValue,f=>{s.value=f});const i={DCodeTextField:Qo,DCodeAutoComplete:lr,DCodeDatePicker:ta,DCodeTextarea:cn,DCodeTextArea:cn,DCodeCheckbox:ao,DCodeSwitch:sa,DCodeOtpInput:ra,DCodeImageField:na,DCodeSlider:aa},l=t.computed(()=>{const f=r.field.component;return i[f]||null}),c=t.computed(()=>{const f=r.field.props,u={};return(f.labelID||f.labelEN)&&(u.label=n.value==="id"?f.labelID:f.labelEN),(f.placeholderID||f.placeholderEN)&&(u.placeholder=n.value==="id"?f.placeholderID:f.placeholderEN),f.required!==void 0&&(u.required=f.required),f.disabled!==void 0&&(u.disabled=f.disabled),f.readonly!==void 0&&(u.readonly=f.readonly),f.valueType&&(u.type=f.valueType),f.minLength!==void 0&&(u.minlength=f.minLength),f.maxLength!==void 0&&(u.maxlength=f.maxLength),f.min!==void 0&&(u.min=f.min),f.max!==void 0&&(u.max=f.max),f.options&&(u.options=f.options),f.endpoint&&(u.endpoint=f.endpoint),f.itemTitle&&(u.itemTitle=f.itemTitle),f.itemValue&&(u.itemValue=f.itemValue),f.returnObject!==void 0&&(u.returnObject=f.returnObject),f.clearable!==void 0&&(u.clearable=f.clearable),Object.keys(f).forEach(h=>{!["labelID","labelEN","placeholderID","placeholderEN"].includes(h)&&!u.hasOwnProperty(h)&&(u[h]=f[h])}),u}),d=f=>{s.value=f,a("update:modelValue",f)};return(f,u)=>e.field.isHidden?(t.openBlock(),t.createElementBlock("div",AA,[t.createElementVNode("input",{type:"hidden",value:s.value,name:e.field.model},null,8,vA)])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),t.mergeProps({key:1},c.value,{modelValue:s.value,"onUpdate:modelValue":[u[0]||(u[0]=h=>s.value=h),d]}),null,16,["modelValue"]))}}),NA={class:"flex items-center gap-2 shrink-0"},VA={class:"flex-1 text-right overflow-hidden"},MA=["title"],dn=lt(t.defineComponent({name:"DCodeStaticLabel",__name:"DCodeStaticLabel",props:{label:{},value:{},icon:{},color:{}},setup(e){const o=e,n=t.computed(()=>{const a=o.color||"secondary",s={primary:"border-blue-200 text-blue-700",success:"border-green-200 text-green-700",warning:"border-yellow-200 text-yellow-700",danger:"border-red-200 text-red-700",info:"border-cyan-200 text-cyan-700",secondary:"border-slate-200 text-slate-700 dark:border-slate-700/50",dark:"border-b border-gray-300 text-gray-900 dark:text-gray-100"};return s[a]||s.secondary}),r=a=>a==null||a===""?"-":typeof a=="boolean"?a?"Yes":"No":String(a);return(a,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-row justify-between items-center gap-4 py-3 px-0 border-b transition-all duration-300 rounded-none bg-transparent",n.value])},[t.createElementVNode("div",NA,[t.createVNode($o,{label:e.label,icon:e.icon,class:"text-xs font-semibold text-neutral-500 dark:text-neutral-400 uppercase tracking-wider"},null,8,["label","icon"])]),t.createElementVNode("div",VA,[t.renderSlot(a.$slots,"value",{},()=>[t.createElementVNode("span",{class:"text-sm font-medium truncate block",title:r(e.value)},t.toDisplayString(r(e.value)),9,MA)],!0)])],2))}}),[["__scopeId","data-v-dd90fa7f"]]),TA={class:"space-y-2 group"},PA=["onClick"],OA=["src","alt"],LA={key:0,class:"absolute inset-0 bg-black/0 group-hover/item:bg-black/20 flex items-center justify-center opacity-0 group-hover/item:opacity-100 transition-all duration-300"},RA={class:"bg-white/90 dark:bg-neutral-800/90 p-1.5 rounded-full shadow-sm"},IA={key:0,class:"flex flex-col h-full"},FA={class:"flex flex-col items-center justify-center p-8 bg-neutral-50 dark:bg-neutral-950/50"},zA=["src","alt"],$A={class:"px-8 py-4 bg-white dark:bg-neutral-900 border-t border-neutral-200 dark:border-neutral-700/50"},jA={class:"flex flex-col space-y-0.5"},di=lt(t.defineComponent({name:"DCodeStaticImage",__name:"DCodeStaticImage",props:{items:{},alt:{default:"Image"},label:{},aspectRatio:{default:"16/9"},width:{},height:{},fit:{default:"cover"},rounded:{type:Boolean,default:!1},allowPreview:{type:Boolean,default:!0},columns:{default:3},gap:{default:"0.5rem"}},setup(e){const o=e,n=t.computed(()=>Array.isArray(o.items)?o.items.map(d=>typeof d=="string"?{src:d,alt:o.alt}:{...d,alt:d.alt||o.alt}):[]),r=t.ref(null),a=t.ref(!1),s=d=>{o.allowPreview&&(r.value=d,a.value=!0)},i=()=>{r.value=null,a.value=!1},l=t.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${o.columns}, minmax(0, 1fr))`,gap:o.gap,width:o.width||"100%"})),c=t.computed(()=>["w-full h-full transition-all duration-500",o.rounded?"rounded-xl":"rounded-none",o.fit==="cover"?"object-cover":o.fit==="contain"?"object-contain":o.fit==="fill"?"object-fill":"object-none"].join(" "));return t.onMounted(()=>{window.addEventListener("keydown",d=>{r.value!==null&&d.key==="Escape"&&i()})}),(d,f)=>(t.openBlock(),t.createElementBlock("div",TA,[t.createElementVNode("div",{style:t.normalizeStyle(l.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(u,h)=>(t.openBlock(),t.createElementBlock("div",{key:h,class:"flex flex-col space-y-1 group/item"},[t.createElementVNode("div",{class:t.normalizeClass(["relative overflow-hidden bg-neutral-100 dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 transition-all duration-300 transform hover:scale-[1.02] hover:z-10",[e.rounded?"rounded-xl":"rounded-none",e.allowPreview?"cursor-zoom-in":""]]),style:t.normalizeStyle({aspectRatio:e.aspectRatio}),onClick:m=>s(h)},[t.createElementVNode("img",{src:u.src,alt:u.alt,class:t.normalizeClass(c.value),loading:"lazy"},null,10,OA),e.allowPreview?(t.openBlock(),t.createElementBlock("div",LA,[t.createElementVNode("div",RA,[t.createVNode(t.unref(ne.Maximize2),{class:"w-3.5 h-3.5 text-neutral-700 dark:text-neutral-200"})])])):t.createCommentVNode("",!0)],14,PA)]))),128))],4),t.createVNode(so,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=u=>a.value=u),title:(r.value!==null?n.value[r.value].label:null)||e.label||"Preview Image","max-width":"1200",persistent:!1,onClose:i},{"header-append":t.withCtx(()=>[t.createElementVNode("button",{type:"button",class:"p-2 hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-full text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-200 transition-colors",onClick:i},[t.createVNode(t.unref(ne.X),{class:"w-5 h-5"})])]),actions:t.withCtx(()=>[t.createElementVNode("button",{type:"button",class:"px-5 py-2 text-sm font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-700 dark:text-neutral-200 rounded-md hover:bg-neutral-200 dark:hover:bg-neutral-700 transition-colors",onClick:i}," Close Preview ")]),default:t.withCtx(()=>[r.value!==null?(t.openBlock(),t.createElementBlock("div",IA,[t.createElementVNode("div",FA,[t.createElementVNode("img",{src:n.value[r.value].src,alt:n.value[r.value].alt||e.alt,class:"max-w-full max-h-[60vh] object-contain shadow-2xl rounded-sm border border-neutral-200 dark:border-white/10"},null,8,zA)]),t.createElementVNode("div",$A,[t.createElementVNode("div",jA,[t.createVNode(dn,{label:"File Name",value:n.value[r.value].src.split("/").pop()||"Untitled"},null,8,["value"]),n.value[r.value].label?(t.openBlock(),t.createBlock(dn,{key:0,label:"Item Label",value:n.value[r.value].label},null,8,["value"])):t.createCommentVNode("",!0),e.label?(t.openBlock(),t.createBlock(dn,{key:1,label:"Gallery Label",value:e.label},null,8,["value"])):t.createCommentVNode("",!0)])])])):t.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])]))}}),[["__scopeId","data-v-ac931980"]]),UA={key:0},WA=["value","name"],HA={key:1,class:"flex flex-col gap-1"},qA={class:"text-xs font-medium text-neutral-500 dark:text-neutral-400"},GA=["src"],KA={key:1,class:"text-sm text-neutral-400 italic"},XA={key:2,class:"text-sm text-neutral-800 dark:text-neutral-100 font-medium"},YA={key:3,class:"text-xs text-neutral-400 italic"},fn=t.defineComponent({__name:"DynamicFormField",props:{field:{},modelValue:{default:null},formData:{default:()=>({})},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},options:{default:()=>[]},error:{default:null},dynamicLabels:{default:null},dynamicLength:{default:null},baseUrl:{default:void 0},viewOnly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:o}){let n=t.ref("en");try{n=kt.useI18n().locale}catch{}const r=e,a=o,s=t.ref(r.modelValue);t.watch(()=>r.modelValue,b=>{s.value=b});const i={DCodeTextField:Qo,DCodeAutoComplete:lr,DCodeDatePicker:ta,DCodeTextarea:cn,DCodeTextArea:cn,DCodeCheckbox:ao,DCodeSwitch:sa,DCodeOtpInput:ra,DCodeImageField:na,DCodeSlider:aa,DCodeRadio:ai,DCodeRadioCustom:si,DCodeDynamicUploadList:Ks,DCodeMultiSelect:ri,DCodeCurrencyField:Gs,DCodePermissionMenu:li,DCodeTreePermissions:ci,DCodeCardCheckboxList:qs,DCodeBeforeAfter:ns,DCodeListLabels:rs,DCodeStaticLabel:dn,DCodeStaticImage:di},l=t.computed(()=>{const b=r.field.component;return i[b]||null}),c=t.computed(()=>{var g;const b=((g=r.field.component)==null?void 0:g.toLowerCase())||"";return b.includes("image")||b.includes("upload")}),d=t.computed(()=>{var g;const b=((g=r.field.component)==null?void 0:g.toLowerCase())||"";return b.includes("switch")||b.includes("checkbox")}),f=t.computed(()=>{var E,B;const b=r.field.props||r.field.propsFieldGlobal||{},g=((E=r.dynamicLabels)==null?void 0:E.labelID)||b.labelID,_=((B=r.dynamicLabels)==null?void 0:B.labelEN)||b.labelEN;return n.value==="id"?g||_||r.field.model:_||g||r.field.model}),u=t.computed(()=>{const b=r.modelValue;return b==null||b===""?null:Array.isArray(b)?b.map(g=>typeof g=="object"&&g!==null?g.label||g.name||g.code||g.value||JSON.stringify(g):String(g)).join(", "):typeof b=="object"?b.label||b.name||b.code||b.value||b.id||JSON.stringify(b):String(b)}),h=(b,g)=>{const _={label:"",placeholder:""},E=(g==null?void 0:g.labelID)||b.labelID,B=(g==null?void 0:g.labelEN)||b.labelEN;(E||B)&&(_.label=n.value==="id"?E:B);const A=(g==null?void 0:g.placeholderID)||b.placeholderID,C=(g==null?void 0:g.placeholderEN)||b.placeholderEN;return(A||C)&&(_.placeholder=n.value==="id"?A:C),_},m=(b,g)=>{const _=b.endpoint||{};if(!_.apiUrl)return{};const E={};let B=!0;if(Array.isArray(_.keyParam)&&_.keyParam.length>0&&_.keyParam.forEach(C=>{const x=g?g[C]:null;x!=null&&x!==""?E[C]=x:B=!1}),!B)return{};let A=_.apiUrl;if(r.baseUrl&&typeof A=="string"&&!A.startsWith("http")){const C=r.baseUrl.replace(/\/$/,""),x=A.startsWith("/")?A:`/${A}`;A=`${C}${x}`}return{endpoint:{apiUrl:A,apiMethod:_.apiMethod||"GET"},...Object.keys(E).length?{apiParams:E}:{}}},p=t.computed(()=>{var B,A,C;const b=r.field.props||r.field.propsFieldGlobal||{},g={},_=h(b,r.dynamicLabels);if(_.label&&(g.label=_.label),_.placeholder&&(g.placeholder=_.placeholder),g.required=r.required!==void 0?r.required:b.required??!1,g.readonly=r.readonly!==void 0?r.readonly:b.readonly??!1,["disabled","readonly","clearable","icon","returnObject","itemTitle","itemValue","maxValue","minValue","sizeFile","typeFile","treeData","menuList","enableParentControl","showIcons","dataBefore","dataAfter","range","autoRangeDays","disablePast","maxDaysAhead","displayFormat","modelType","placement","prependInner","selectLabel","cancelLabel","tone","skeleton"].forEach(x=>{b[x]!==void 0&&b[x]!==null&&(g[x]=b[x])}),g.minLength=((B=r.dynamicLength)==null?void 0:B.minLength)??b.minLength,g.maxLength=((A=r.dynamicLength)==null?void 0:A.maxLength)??b.maxLength,b.valueType&&(g.type=b.valueType),r.error&&(g.error=r.error),Object.assign(g,m(b,r.formData)),(C=b.endpointReference)!=null&&C.apiUrl){let x=b.endpointReference.apiUrl;if(r.baseUrl&&typeof x=="string"&&!x.startsWith("http")){const w=r.baseUrl.replace(/\/$/,""),D=x.startsWith("/")?x:`/${x}`;x=`${w}${D}`}g.endpointReference={...b.endpointReference,apiUrl:x}}return r.options&&r.options.length>0&&(g.items=r.options,g.options=r.options,r.field.component!=="DCodeDynamicUploadList"&&(delete g.endpoint,delete g.apiParams,delete g.apiUrl)),r.baseUrl&&(g.baseUrl=r.baseUrl),g}),y=b=>{s.value=b,a("update:modelValue",b)};return(b,g)=>e.field.isHidden?(t.openBlock(),t.createElementBlock("div",UA,[t.createElementVNode("input",{type:"hidden",value:s.value,name:e.field.model},null,8,WA)])):e.viewOnly?(t.openBlock(),t.createElementBlock("div",HA,[t.createElementVNode("span",qA,t.toDisplayString(f.value),1),c.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[u.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:u.value,class:"h-16 w-16 rounded-md object-cover border border-neutral-200",alt:""},null,8,GA)):(t.openBlock(),t.createElementBlock("span",KA,"-"))],64)):d.value?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(["inline-flex items-center gap-1 text-sm font-medium",u.value?"text-green-600 dark:text-green-400":"text-neutral-400"])},t.toDisplayString(u.value?"✓ Ya":"✗ Tidak"),3)):(t.openBlock(),t.createElementBlock("span",XA,t.toDisplayString(u.value||"-"),1))])):l.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),t.mergeProps({key:2},p.value,{modelValue:s.value,"onUpdate:modelValue":[g[0]||(g[0]=_=>s.value=_),y]}),null,16,["modelValue"])):(t.openBlock(),t.createElementBlock("div",YA," Unknown field: "+t.toDisplayString(e.field.component),1))}}),JA=t.defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,a=Xe.useVModel(n,"modelValue",r,{passive:!0,defaultValue:n.defaultValue});return(s,i)=>t.withDirectives((t.openBlock(),t.createElementBlock("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>t.isRef(a)?a.value=l:null),class:t.normalizeClass(t.unref(Ve)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n.class))},null,2)),[[t.vModelText,t.unref(a)]])}}),QA=t.defineComponent({__name:"Pagination",props:{page:{},defaultPage:{},itemsPerPage:{},total:{},siblingCount:{},disabled:{type:Boolean},showEdges:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:page"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=xe.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(xe.PaginationRoot),t.mergeProps({"data-slot":"pagination"},t.unref(s),{class:n.class}),{default:t.withCtx(c=>[t.renderSlot(i.$slots,"default",t.normalizeProps(t.guardReactiveProps(c)))]),_:3},16,["class"]))}}),ZA=t.defineComponent({__name:"PaginationContent",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(xe.PaginationList),t.mergeProps({"data-slot":"pagination-content"},t.unref(n),{class:t.unref(Ve)("flex flex-row items-center gap-1",o.class)}),{default:t.withCtx(s=>[t.renderSlot(r.$slots,"default",t.normalizeProps(t.guardReactiveProps(s)))]),_:3},16,["class"]))}}),e5=t.defineComponent({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(xe.PaginationEllipsis),t.mergeProps({"data-slot":"pagination-ellipsis"},t.unref(n),{class:t.unref(Ve)("flex size-9 items-center justify-center",o.class)}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default",{},()=>[t.createVNode(t.unref(ne.MoreHorizontal),{class:"size-4"}),a[0]||(a[0]=t.createElementVNode("span",{class:"sr-only"},"More pages",-1))])]),_:3},16,["class"]))}}),t5=t.defineComponent({__name:"PaginationFirst",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=xe.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(xe.PaginationFirst),t.mergeProps({"data-slot":"pagination-first",class:t.unref(Ve)(t.unref(qo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronLeftIcon)),s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"First",-1))])]),_:3},16,["class"]))}}),o5=t.defineComponent({__name:"PaginationItem",props:{value:{},asChild:{type:Boolean},as:{},size:{default:"icon"},class:{type:[Boolean,null,String,Object,Array]},isActive:{type:Boolean}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size","isActive");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(xe.PaginationListItem),t.mergeProps({"data-slot":"pagination-item"},t.unref(n),{class:t.unref(Ve)(t.unref(qo)({variant:"ghost",size:e.size}),e.isActive?"bg-[#0056a1] dark:bg-[#003d75] text-white hover:bg-[#0056a1]/90 dark:hover:bg-[#003d75]/90 hover:text-white":"",o.class)}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),n5=t.defineComponent({__name:"PaginationLast",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=xe.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(xe.PaginationLast),t.mergeProps({"data-slot":"pagination-last",class:t.unref(Ve)(t.unref(qo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"Last",-1)),t.createVNode(t.unref(ne.ChevronRightIcon))])]),_:3},16,["class"]))}}),r5=t.defineComponent({__name:"PaginationNext",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=xe.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(xe.PaginationNext),t.mergeProps({"data-slot":"pagination-next",class:t.unref(Ve)(t.unref(qo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"Next",-1)),t.createVNode(t.unref(ne.ChevronRightIcon))])]),_:3},16,["class"]))}}),a5=t.defineComponent({__name:"PaginationPrevious",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=xe.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(xe.PaginationPrev),t.mergeProps({"data-slot":"pagination-previous",class:t.unref(Ve)(t.unref(qo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronLeftIcon)),s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"Previous",-1))])]),_:3},16,["class"]))}}),s5=t.defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:o}){const n=e,r=o,a=xe.useForwardPropsEmits(n,r);return(s,i)=>(t.openBlock(),t.createBlock(t.unref(xe.SelectRoot),t.normalizeProps(t.guardReactiveProps(t.unref(a))),{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:3},16))}}),i5=t.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=xe.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(xe.SelectPortal),null,{default:t.withCtx(()=>[t.createVNode(t.unref(xe.SelectContent),t.mergeProps({...t.unref(s),...i.$attrs},{class:t.unref(Ve)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:t.withCtx(()=>[t.createVNode(t.unref(f5)),t.createVNode(t.unref(xe.SelectViewport),{class:t.normalizeClass(t.unref(Ve)("p-1",e.position==="popper"&&"h-[--reka-select-trigger-height] w-full min-w-[--reka-select-trigger-width]"))},{default:t.withCtx(()=>[t.renderSlot(i.$slots,"default")]),_:3},8,["class"]),t.createVNode(t.unref(d5))]),_:3},16,["class"])]),_:3}))}}),l5={class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},c5=t.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=xe.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(xe.SelectItem),t.mergeProps(t.unref(r),{class:t.unref(Ve)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o.class)}),{default:t.withCtx(()=>[t.createElementVNode("span",l5,[t.createVNode(t.unref(xe.SelectItemIndicator),null,{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Check),{class:"h-4 w-4"})]),_:1})]),t.createVNode(t.unref(xe.SelectItemText),null,{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),d5=t.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=xe.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(xe.SelectScrollDownButton),t.mergeProps(t.unref(r),{class:t.unref(Ve)("flex cursor-default items-center justify-center py-1",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronDown))])]),_:3},16,["class"]))}}),f5=t.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=xe.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(xe.SelectScrollUpButton),t.mergeProps(t.unref(r),{class:t.unref(Ve)("flex cursor-default items-center justify-center py-1",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronUp))])]),_:3},16,["class"]))}}),u5=t.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=xe.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(xe.SelectTrigger),t.mergeProps(t.unref(r),{class:t.unref(Ve)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default"),t.createVNode(t.unref(xe.SelectIcon),{"as-child":""},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronDown),{class:"w-4 h-4 opacity-50 shrink-0"})]),_:1})]),_:3},16,["class"]))}}),h5=t.defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(xe.SelectValue),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),Yn={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},un={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},ct={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},m5={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},p5={dangerouslyHTMLString:!1,multiple:!0,position:Yn.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},g5={rtl:!1,newestOnTop:!1,toastClassName:""},Rf={...p5,...g5};ct.DEFAULT;var Le=(e=>(e[e.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",e[e.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",e.CSS_NAMESPACE="Toastify",e))(Le||{}),fi=(e=>(e.ENTRANCE_ANIMATION_END="d",e))(fi||{});const b5={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},y5={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},x5={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},k5={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},If="Toastify--animate Toastify__none-enter";function Ff(e,o=!1){var n;let r=b5;if(!e||typeof e=="string")switch(e){case"flip":r=k5;break;case"zoom":r=x5;break;case"slide":r=y5;break}else r=e;if(o)r.enter=If;else if(r.enter===If){const a=(n=r.exit.split("__")[1])==null?void 0:n.split("-")[0];r.enter=`Toastify--animate Toastify__${a}-enter`}return r}function w5(e){return e.containerId||String(e.position)}const la="will-unmount";function C5(e=Yn.TOP_RIGHT){return!!document.querySelector(`.${Le.CSS_NAMESPACE}__toast-container--${e}`)}function _5(e=Yn.TOP_RIGHT){return`${Le.CSS_NAMESPACE}__toast-container--${e}`}function E5(e,o,n=!1){const r=[`${Le.CSS_NAMESPACE}__toast-container`,`${Le.CSS_NAMESPACE}__toast-container--${e}`,n?`${Le.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return mn(o)?o({position:e,rtl:n,defaultClassName:r}):`${r} ${o||""}`}function B5(e){var o;const{position:n,containerClassName:r,rtl:a=!1,style:s={}}=e,i=Le.CSS_NAMESPACE,l=_5(n),c=document.querySelector(`.${i}`),d=document.querySelector(`.${l}`),f=!!d&&!((o=d.className)!=null&&o.includes(la)),u=c||document.createElement("div"),h=document.createElement("div");h.className=E5(n,r,a),h.dataset.testid=`${Le.CSS_NAMESPACE}__toast-container--${n}`,h.id=w5(e);for(const m in s)if(Object.prototype.hasOwnProperty.call(s,m)){const p=s[m];h.style[m]=p}return c||(u.className=Le.CSS_NAMESPACE,document.body.appendChild(u)),f||u.appendChild(h),h}function ui(e){var o,n,r;const a=typeof e=="string"?e:((o=e.currentTarget)==null?void 0:o.id)||((n=e.target)==null?void 0:n.id),s=document.getElementById(a);s&&s.removeEventListener("animationend",ui,!1);try{Jn[a].unmount(),(r=document.getElementById(a))==null||r.remove(),delete Jn[a],delete ot[a]}catch{}}const Jn=t.reactive({});function S5(e,o){const n=document.getElementById(String(o));n&&(Jn[n.id]=e)}function hi(e,o=!0){const n=String(e);if(!Jn[n])return;const r=document.getElementById(n);r&&r.classList.add(la),o?(v5(e),r&&r.addEventListener("animationend",ui,!1)):ui(n),Bt.items=Bt.items.filter(a=>a.containerId!==e)}function A5(e){for(const o in Jn)hi(o,e);Bt.items=[]}function zf(e,o){const n=document.getElementById(e.toastId);if(n){let r=e;r={...r,...Ff(r.transition)};const a=r.appendPosition?`${r.exit}--${r.position}`:r.exit;n.className+=` ${a}`,o&&o(n)}}function v5(e){for(const o in ot)if(o===e)for(const n of ot[o]||[])zf(n)}function D5(e){const o=hn().find(n=>n.toastId===e);return o==null?void 0:o.containerId}function mi(e){return document.getElementById(e)}function N5(e){const o=mi(e.containerId);return o&&o.classList.contains(la)}function $f(e){var o;const n=t.isVNode(e.content)?t.toRaw(e.content.props):null;return n??t.toRaw((o=e.data)!=null?o:{})}function V5(e){return e?Bt.items.filter(o=>o.containerId===e).length>0:Bt.items.length>0}function M5(){if(Bt.items.length>0){const e=Bt.items.shift();ca(e==null?void 0:e.toastContent,e==null?void 0:e.toastProps)}}const ot=t.reactive({}),Bt=t.reactive({items:[]});function hn(){const e=t.toRaw(ot);return Object.values(e).reduce((o,n)=>[...o,...n],[])}function T5(e){return hn().find(o=>o.toastId===e)}function ca(e,o={}){if(N5(o)){const n=mi(o.containerId);n&&n.addEventListener("animationend",pi.bind(null,e,o),!1)}else pi(e,o)}function pi(e,o={}){const n=mi(o.containerId);n&&n.removeEventListener("animationend",pi.bind(null,e,o),!1);const r=ot[o.containerId]||[],a=r.length>0;if(!a&&!C5(o.position)){const s=B5(o),i=t.createApp(nv,o);o.useHandler&&o.useHandler(i),i.mount(s),S5(i,s.id)}a&&!o.updateId&&(o.position=r[0].position),t.nextTick(()=>{o.updateId?gt.update(o):gt.add(e,o)})}const gt={add(e,o){const{containerId:n=""}=o;n&&(ot[n]=ot[n]||[],ot[n].find(r=>r.toastId===o.toastId)||setTimeout(()=>{var r,a;o.newestOnTop?(r=ot[n])==null||r.unshift(o):(a=ot[n])==null||a.push(o),o.onOpen&&o.onOpen($f(o))},o.delay||0))},remove(e){if(e){const o=D5(e);if(o){const n=ot[o];let r=n.find(a=>a.toastId===e);ot[o]=n.filter(a=>a.toastId!==e),!ot[o].length&&!V5(o)&&hi(o,!1),M5(),t.nextTick(()=>{r!=null&&r.onClose&&(r.onClose($f(r)),r=void 0)})}}},update(e={}){const{containerId:o=""}=e;if(o&&e.updateId){ot[o]=ot[o]||[];const n=ot[o].find(s=>s.toastId===e.toastId),r=(n==null?void 0:n.position)!==e.position||(n==null?void 0:n.transition)!==e.transition,a={...e,disabledEnterTransition:!r,updateId:void 0};gt.dismissForce(e==null?void 0:e.toastId),setTimeout(()=>{Ie(a.content,a)},e.delay||0)}},clear(e,o=!0){e?hi(e,o):A5(o)},dismissCallback(e){var o;const n=(o=e.currentTarget)==null?void 0:o.id,r=document.getElementById(n);r&&(r.removeEventListener("animationend",gt.dismissCallback,!1),setTimeout(()=>{gt.remove(n)}))},dismiss(e){if(e){const o=hn();for(const n of o)if(n.toastId===e){zf(n,r=>{r.addEventListener("animationend",gt.dismissCallback,!1)});break}}},dismissForce(e){if(e){const o=hn();for(const n of o)if(n.toastId===e){const r=document.getElementById(e);r&&(r.remove(),r.removeEventListener("animationend",gt.dismissCallback,!1),gt.remove(e));break}}}},P5=t.reactive({useHandler:void 0}),jf=t.reactive({}),da=t.reactive({});function Uf(){return Math.random().toString(36).substring(2,9)}function O5(e){return typeof e=="number"&&!isNaN(e)}function gi(e){return typeof e=="string"}function mn(e){return typeof e=="function"}function fa(...e){return t.mergeProps(...e)}function ua(e){return typeof e=="object"&&(!!(e!=null&&e.render)||!!(e!=null&&e.setup)||typeof(e==null?void 0:e.type)=="object")}function L5(e={}){jf[`${Le.CSS_NAMESPACE}-default-options`]=e}function Wf(){return jf[`${Le.CSS_NAMESPACE}-default-options`]||Rf}function R5(){const e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||e?"dark":"light"}var ha=(e=>(e[e.Enter=0]="Enter",e[e.Exit=1]="Exit",e))(ha||{});const Hf={containerId:{type:[String,Number],required:!1,default:""},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:Yn.TOP_LEFT},bodyClassName:{type:String,required:!1,default:""},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:"bounce"},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:""},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:"alert"},theme:{type:String,required:!1,default:un.AUTO},content:{type:[String,Object,Function],required:!1,default:""},toastId:{type:[String,Number],required:!1,default:""},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:ct.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:""},updateId:{type:[String,Number],required:!1,default:""},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},I5={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:ct.DEFAULT},theme:{type:String,required:!1,default:un.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:""},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},F5=t.defineComponent({name:"ProgressBar",props:I5,setup(e,{attrs:o}){const n=t.ref(),r=t.computed(()=>e.hide?"true":"false"),a=t.computed(()=>({...o.style||{},animationDuration:`${e.autoClose===!0?5e3:e.autoClose}ms`,animationPlayState:e.isRunning?"running":"paused",opacity:e.hide||e.autoClose===!1?0:1,transform:e.controlledProgress?`scaleX(${e.progress})`:"none"})),s=t.computed(()=>[`${Le.CSS_NAMESPACE}__progress-bar`,e.controlledProgress?`${Le.CSS_NAMESPACE}__progress-bar--controlled`:`${Le.CSS_NAMESPACE}__progress-bar--animated`,`${Le.CSS_NAMESPACE}__progress-bar-theme--${e.theme}`,`${Le.CSS_NAMESPACE}__progress-bar--${e.type}`,e.rtl?`${Le.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(" ")),i=t.computed(()=>`${s.value} ${(o==null?void 0:o.class)||""}`),l=()=>{n.value&&(n.value.onanimationend=null,n.value.ontransitionend=null)},c=()=>{e.isIn&&e.closeToast&&e.autoClose!==!1&&(e.closeToast(),l())},d=t.computed(()=>e.controlledProgress?null:c),f=t.computed(()=>e.controlledProgress?c:null);return t.watchEffect(()=>{n.value&&(l(),n.value.onanimationend=d.value,n.value.ontransitionend=f.value)}),()=>t.createVNode("div",{ref:n,role:"progressbar","aria-hidden":r.value,"aria-label":"notification timer",class:i.value,style:a.value},null)}}),z5=t.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:un.AUTO},type:{type:String,required:!1,default:un.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(e){return()=>t.createVNode("button",{class:`${Le.CSS_NAMESPACE}__close-button ${Le.CSS_NAMESPACE}__close-button--${e.theme}`,type:"button",onClick:o=>{o.stopPropagation(),e.closeToast&&e.closeToast(o)},"aria-label":e.ariaLabel},[t.createVNode("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},[t.createVNode("path",{"fill-rule":"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"},null)])])}}),ma=({theme:e,type:o,path:n,...r})=>t.createVNode("svg",t.mergeProps({viewBox:"0 0 24 24",width:"100%",height:"100%",style:{fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${o})`}},r),[t.createVNode("path",{d:n},null)]);function $5(e){return t.createVNode(ma,t.mergeProps(e,{path:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}),null)}function j5(e){return t.createVNode(ma,t.mergeProps(e,{path:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}),null)}function U5(e){return t.createVNode(ma,t.mergeProps(e,{path:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}),null)}function W5(e){return t.createVNode(ma,t.mergeProps(e,{path:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}),null)}function H5(){return t.createVNode("div",{class:`${Le.CSS_NAMESPACE}__spinner`},null)}const pa={info:j5,warning:$5,success:U5,error:W5,spinner:H5},q5=e=>e in pa;function G5({theme:e,type:o,isLoading:n,icon:r}){let a;const s=!!n||o==="loading",i={theme:e,type:o};if(s&&(r===void 0||typeof r=="boolean"))return pa.spinner();if(r!==!1){if(ua(r))a=t.toRaw(r);else if(mn(r)){const l=r;i.type=s?"loading":o,a=l(i),a=!a&&s?pa.spinner():a}else t.isVNode(r)?a=t.cloneVNode(r,i):gi(r)||O5(r)?a=r:q5(o)&&(a=pa[o](i));return a}}const K5=()=>{};function X5(e,o,n=Le.COLLAPSE_DURATION){const{scrollHeight:r,style:a}=e,s=n;requestAnimationFrame(()=>{a.minHeight="initial",a.height=r+"px",a.transition=`all ${s}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(o,s)})})}function Y5(e){const o=t.ref(!1),n=t.ref(!1),r=t.ref(!1),a=t.ref(ha.Enter),s=t.reactive({...e,appendPosition:e.appendPosition||!1,collapse:typeof e.collapse>"u"?!0:e.collapse,collapseDuration:e.collapseDuration||Le.COLLAPSE_DURATION}),i=s.done||K5,l=t.computed(()=>s.appendPosition?`${s.enter}--${s.position}`:s.enter),c=t.computed(()=>s.appendPosition?`${s.exit}--${s.position}`:s.exit),d=t.computed(()=>e.pauseOnHover?{onMouseenter:b,onMouseleave:y}:{});function f(){const _=l.value.split(" ");h().addEventListener(fi.ENTRANCE_ANIMATION_END,y,{once:!0});const E=A=>{const C=h();A.target===C&&(C.dispatchEvent(new Event(fi.ENTRANCE_ANIMATION_END)),C.removeEventListener("animationend",E),C.removeEventListener("animationcancel",E),a.value===ha.Enter&&A.type!=="animationcancel"&&C.classList.remove(..._))},B=()=>{const A=h();A.classList.add(..._),A.addEventListener("animationend",E),A.addEventListener("animationcancel",E)};e.pauseOnFocusLoss&&m(),B()}function u(){if(!h())return;const _=()=>{const B=h();B.removeEventListener("animationend",_),s.collapse?X5(B,i,s.collapseDuration):i()},E=()=>{const B=h();a.value=ha.Exit,B&&(B.className+=` ${c.value}`,B.addEventListener("animationend",_))};n.value||(r.value?_():setTimeout(E))}function h(){return e.toastRef.value}function m(){document.hasFocus()||b(),window.addEventListener("focus",y),window.addEventListener("blur",b)}function p(){window.removeEventListener("focus",y),window.removeEventListener("blur",b)}function y(){(!e.loading.value||e.isLoading===void 0)&&(o.value=!0)}function b(){o.value=!1}function g(_){_&&(_.stopPropagation(),_.preventDefault()),n.value=!1}return t.watchEffect(u),t.watchEffect(()=>{const _=hn();n.value=_.findIndex(E=>E.toastId===s.toastId)>-1}),t.watchEffect(()=>{e.isLoading!==void 0&&(e.loading.value?b():y())}),t.onMounted(f),t.onUnmounted(()=>{e.pauseOnFocusLoss&&p()}),{isIn:n,isRunning:o,hideToast:g,eventHandlers:d}}function J5(e){if(!e||typeof e!="object"||Array.isArray(e)||e.__v_isVNode)return!1;const o=e;return["title","content"].some(n=>n in o)}const Q5=t.defineComponent({name:"ToastItem",inheritAttrs:!1,props:Hf,setup(e){const o=t.ref(),n=t.computed(()=>!!e.isLoading),r=t.computed(()=>e.progress!==void 0&&e.progress!==null),a=t.computed(()=>G5(e)),s=t.computed(()=>[`${Le.CSS_NAMESPACE}__toast`,`${Le.CSS_NAMESPACE}__toast-theme--${e.theme}`,`${Le.CSS_NAMESPACE}__toast--${e.type}`,e.rtl?`${Le.CSS_NAMESPACE}__toast--rtl`:void 0,e.toastClassName||""].filter(Boolean).join(" ")),{isRunning:i,isIn:l,hideToast:c,eventHandlers:d}=Y5({toastRef:o,loading:n,done:()=>{gt.remove(e.toastId)},...Ff(e.transition,e.disabledEnterTransition),...e});function f(){const u=e.content;if(J5(u)){const h=[];return u.title!==void 0&&h.push(t.createVNode("div",{"data-testid":"toast-text-title",class:`${Le.CSS_NAMESPACE}__toast-text-title`},[u.title])),u.content!==void 0&&h.push(t.createVNode("div",{"data-testid":"toast-text-content",class:`${Le.CSS_NAMESPACE}__toast-text-content`},[u.content])),t.createVNode("div",{"data-testid":"toast-text-content-wrapper",class:`${Le.CSS_NAMESPACE}__toast-text`},[h])}return ua(u)?t.h(t.toRaw(u),{toastProps:t.toRaw(e),closeToast:c,data:e.data,...e.expandCustomProps?e.contentProps:{contentProps:e.contentProps||{}}}):mn(u)?u({toastProps:t.toRaw(e),closeToast:c,data:e.data}):e.dangerouslyHTMLString?t.h("div",{innerHTML:u}):u}return()=>t.createVNode("div",t.mergeProps({id:e.toastId,class:s.value,style:e.toastStyle||{},ref:o,"data-testid":`toast-item-${e.toastId}`,onClick:u=>{e.closeOnClick&&c(),e.onClick&&e.onClick(u)}},d.value),[t.createVNode("div",{role:e.role,"data-testid":"toast-body",class:`${Le.CSS_NAMESPACE}__toast-body ${e.bodyClassName||""}`},[a.value!=null&&t.createVNode("div",{"data-testid":`toast-icon-${e.type}`,class:[`${Le.CSS_NAMESPACE}__toast-icon`,e.isLoading?"":`${Le.CSS_NAMESPACE}--animate-icon ${Le.CSS_NAMESPACE}__zoom-enter`].join(" ")},[ua(a.value)?t.h(t.toRaw(a.value),{theme:e.theme,type:e.type}):mn(a.value)?a.value({theme:e.theme,type:e.type}):a.value]),t.createVNode("div",{"data-testid":"toast-content"},[f()])]),(e.closeButton===void 0||e.closeButton===!0)&&t.createVNode(z5,{theme:e.theme,closeToast:u=>{u.stopPropagation(),u.preventDefault(),c()}},null),ua(e.closeButton)?t.h(t.toRaw(e.closeButton),{closeToast:c,type:e.type,theme:e.theme}):mn(e.closeButton)?e.closeButton({closeToast:c,type:e.type,theme:e.theme}):null,t.createVNode(F5,{className:e.progressClassName,style:e.progressStyle,rtl:e.rtl,theme:e.theme,isIn:l.value,type:e.type,hide:e.hideProgressBar,isRunning:i.value,autoClose:e.autoClose,controlledProgress:r.value,progress:e.progress,closeToast:e.isLoading?void 0:c},null)])}}),ga="vue3-toastify:url-change";let ba=0,Qn;function Z5(){if(!(typeof window>"u")&&da.lastUrl!==window.location.href){da.lastUrl=window.location.href;const e=n=>typeof n.clearOnUrlChange=="boolean"?n.clearOnUrlChange:Wf().clearOnUrlChange!==!1,o=Object.values(ot).reduce((n,r)=>(Array.isArray(r)&&n.push(...r),n),[]);for(const n of o)n.toastId&&e(n)&>.dismiss(n.toastId);Bt.items=Bt.items.filter(n=>!e(n.toastProps))}}function ev(){const{history:e}=window,o=e.pushState,n=e.replaceState;return e.pushState=function(...r){const a=o.apply(this,r);return window.dispatchEvent(new Event(ga)),a},e.replaceState=function(...r){const a=n.apply(this,r);return window.dispatchEvent(new Event(ga)),a},()=>{e.pushState=o,e.replaceState=n}}function tv(){if(typeof window>"u"||Qn)return;const e=ev(),o=()=>Z5();window.addEventListener(ga,o),window.addEventListener("popstate",o),window.addEventListener("hashchange",o),Qn=()=>{e(),window.removeEventListener(ga,o),window.removeEventListener("popstate",o),window.removeEventListener("hashchange",o),Qn=void 0}}function ov(){Qn&&(Qn(),da.lastUrl="")}const nv=t.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:Hf,setup(e){const o=t.computed(()=>e.containerId),n=t.computed(()=>ot[o.value]||[]),r=t.computed(()=>n.value.filter(a=>a.position===e.position));return t.onMounted(()=>{typeof window<"u"&&(ba+=1,tv())}),t.onUnmounted(()=>{typeof window<"u"&&ba>0&&(ba-=1,ba===0&&ov())}),()=>t.createVNode(t.Fragment,null,[r.value.map(a=>{const{toastId:s=""}=a;return t.createVNode(Q5,t.mergeProps({key:s},a),null)})])}});let bi=!1;const qf={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function Gf(){const e=[];return hn().forEach(o=>{const n=document.getElementById(o.containerId);n&&!n.classList.contains(la)&&e.push(o)}),e}function rv(e){const o=Gf().length,n=e??0;return n>0&&o+Bt.items.length>=n}function av(e){rv(e.limit)&&!e.updateId&&Bt.items.push({toastId:e.toastId,containerId:e.containerId,toastContent:e.content,toastProps:e})}function ko(e,o,n={}){if(bi)return;n=fa(Wf(),{type:o},t.toRaw(n)),(!n.toastId||typeof n.toastId!="string"&&typeof n.toastId!="number")&&(n.toastId=Uf()),n={...n,...n.type==="loading"?qf:{},content:e,containerId:n.containerId||String(n.position)};const r=Number(n==null?void 0:n.progress);return!isNaN(r)&&r<0&&(n.progress=0),r>1&&(n.progress=1),n.theme==="auto"&&(n.theme=R5()),av(n),da.lastUrl=window.location.href,n.multiple?Bt.items.length?n.updateId&&ca(e,n):ca(e,n):(bi=!0,Ie.clearAll(void 0,!1),setTimeout(()=>{ca(e,n)},0),setTimeout(()=>{bi=!1},390)),n.toastId}const Ie=(e,o)=>ko(e,ct.DEFAULT,o);Ie.info=(e,o)=>ko(e,ct.DEFAULT,{...o,type:ct.INFO}),Ie.error=(e,o)=>ko(e,ct.DEFAULT,{...o,type:ct.ERROR}),Ie.warning=(e,o)=>ko(e,ct.DEFAULT,{...o,type:ct.WARNING}),Ie.warn=Ie.warning,Ie.success=(e,o)=>ko(e,ct.DEFAULT,{...o,type:ct.SUCCESS}),Ie.loading=(e,o)=>ko(e,ct.DEFAULT,fa(o,qf)),Ie.dark=(e,o)=>ko(e,ct.DEFAULT,fa(o,{theme:un.DARK})),Ie.remove=e=>{e?gt.dismiss(e):gt.clear()},Ie.clearAll=(e,o)=>{t.nextTick(()=>{gt.clear(e,o)})},Ie.isActive=e=>{let o=!1;return o=Gf().findIndex(n=>n.toastId===e)>-1,o},Ie.update=(e,o={})=>{setTimeout(()=>{const n=T5(e);if(n){const r=t.toRaw(n),{content:a}=r,s={...r,...o,toastId:o.toastId||e,updateId:Uf()},i=s.render||a;delete s.render,ko(i,s.type,s)}},0)},Ie.done=e=>{Ie.update(e,{isLoading:!1,progress:1})},Ie.promise=sv;function sv(e,{pending:o,error:n,success:r},a){var s,i,l;let c;const d={...a||{},autoClose:!1};o&&(c=gi(o)?Ie.loading(o,d):Ie.loading(o.render,{...d,...o}));const f={autoClose:(s=a==null?void 0:a.autoClose)!=null?s:!0,closeOnClick:(i=a==null?void 0:a.closeOnClick)!=null?i:!0,closeButton:(l=a==null?void 0:a.autoClose)!=null?l:null,isLoading:void 0,draggable:null,delay:100},u=(m,p,y)=>{if(p==null){Ie.remove(c);return}const b={type:m,...f,...a,data:y},g=gi(p)?{render:p}:p;return c?Ie.update(c,{...b,...g,isLoading:!1}):Ie(g.render,{...b,...g,isLoading:!1}),y},h=mn(e)?e():e;return h.then(m=>{u("success",r,m)}).catch(m=>{u("error",n,m)}),h}Ie.POSITION=Yn,Ie.THEME=un,Ie.TYPE=ct,Ie.TRANSITIONS=m5;const iv={install(e,o={}){P5.useHandler=o.useHandler||(()=>{}),lv(o)}};typeof window<"u"&&(window.Vue3Toastify=iv);function lv(e={}){const o=fa(Rf,e);L5(o)}const cv={v:"4.8.0",meta:{g:"LottieFiles AE ",a:"",k:"",d:"",tc:""},fr:25,ip:0,op:273,w:500,h:500,nm:"not_found",ddd:0,assets:JSON.parse('[{"id":"image_0","w":175,"h":173,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK8AAACtCAYAAADGWi9+AAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAYj0lEQVR4nO2dXVMb2ZnH/+cg1BIIkABjPF7bxFvZnamaqYHUrh1XqjbMxc7YV4Mucj3kEwzfIOwnCLnei+BP0PgmME5twWQry8DWFrh2qpKt3aRgXB4DtngRWKIlcc5eSGLUp7ul7qPWS7fO78rdWK1G+vP0c57zvAAKhUKhUCgUCoVCoVAoFAqFQqEIMqTTN9Au9Ofb0+B8CgzTICRJCZ8GAHAkOfBxnZeeEYJdAGAMewD2ALIHXO0hFttNfzJz2up7V9gTSvHqq5tTQN8sCKYp4dOc4+ctfLt9DuwCfAOUbqQ/fbDbwvdS1BAa8epfbc2Bk1kCPgfgXgdv5YwDG+BkBbH+FWWZW0egxauvbs4CdJ4QzAEY6fT92MGBZ0rIrSFw4tXXd5IwjHkCsgCPFjYej6E/EkF/fx80LQpKKQBgIB5zfI1hFHDFGAAgn78EAOTyBkrFEoqlkpe3P+McK+gjS8q18IfAiLfsx9JFt1ZW06IYiGvQotGyaPsjvt8TYwyXRgH5/CVyeeNa3I0gBF8zxhbTTx5t+H5TPUTXi7dGtF80+r+JwQEkBuMtE6sbLt7lcHGRRz5/6cYy73OChfRnD1facW9ho2vFq6/vJHFZWGok2ng8hpGhQSQSA9duQLdQFfLFuxxYxfWwQ1liObpSvPraNwsEZBEO7gGlFInBAYyNjnTMwnqBMYaLixwyx2d1rXF5cccW0k8e7bXv7oJLV4lXf749TRlfdto0oJQilRxCKjncdVbWLRfvcjg5Pa/nH59x8MX0458utfO+gkjXiFdf3VokBL+y+1kYRCuSy1/izdsTGEbB9ucVV2JeWWFnOi5efXVzihK64mRtU8khjI0mQyNakWz2op47ccY5WUg/ebDc5tsKBB0Vr766PU8IX4KNbxuPxzAxnoKmRTtwZ+2FMYbM8SlOTs9tf845niIWXVCbHGY6Jl59bXuJgH8pnqeUYmx0BKnkcCduq6MYRgEHRxlbV4IALxhnc8qN+IG2i7e8Q1ZYJsDn4s80LYr3Jm8EIoLQSt68PXaywmecklm1Q1emreLV13eS1Chs2Pm3qeQQboyPtvN2upqLdzkcHGbs4sPKD67QNvE6LcwopZgYT2F4ONGuW3Gkut1bzn/ovPUvFkv4/uCNrRvBOfllrwu4LeLVn29PE8Y3ICzMKKW4c/tm2xZlhlGAYRRQLJWQyxtgjDmGqmrpj0QQ6Y9cJ/XE4zHEahJ7WgljDEdvTpA9v7D8rNcF3HLx6qubU4TQXQjC1bQo7ty+2VIBFIslXLzLIZ83cPEu5/v1q8k/g4MDdTPT/ODgMKMELNBS8Tr5uK0UblWw2fN3rqyqX1S3rFPJoZY9SU5Os3jz9sRyvlcF3DLxtlu4ufwlstl3ttbJCwR4wYEpNJHc3h+JYGx0pCV+fDZ7gYOjjOU8p2Sm16IQrRPv2taKGA5rhXBz+Utkjs885tJiw0sRZbliAwDoLAimCTANF4nwrdrWdhBwz4XRWiJeuw0Iv4VrGAUcvT1pKNpycB8rANvwM+XwhyJPPmcXs66lFZbYzgcmwAumRWd7ZSfOd/FWtnx/W3uOUor7U7d9EW6jrdQK+xxkBfxqqR07UuXc4+IcJXyhXhm931vedgLmwLP044dzvrxBl+OreO0iC36Gw3L5SxweZurlxO5zThY7uXjRn29P44ov1EuiHxsdwdho0pf323/52rIw5Rz/kn7ycNGXN+hifBXvs7WtXdHyTE6M+fK4zByfInN85vTjjotWpFH5Ujwew+TEWNObIYwx7H/32vIH3QsLON/Ea5eP68eWL2MMr16/cfJtuz5xW1/dnKWELtm5E5RSvHfrRtMxYsMoYP/la/H0Ptei02H2f30Rb2UHbaf2nKZFce/OraauWy/LKmglM/VKm/x4OtnFgDnIb9KPHyw0deEuxhfxiu4CpRT37txq6pFoGAW8fHVon5jS5dbWiXplTn74wS9fHVqeUGF2H5pe/utr31hW2M0WRtYR7j6nZDaIwgWA9KcPdpkWneUcT8WfZY7PcHBo3XzwwuTEmCWiQxlfbuqiXUxTlldf30kSo7CHmkdhPB7Dnds3pa/pJNywxTArbsSvxfPNrhNs3YeQbh83Z3kvC5YSnonxlPTlnITLOZ5+/vhhqBYf6cc/XeKc/FI8f3J6jmxWfos7lRxGXFgAEsKX9PUdf2JzXYS0eMsxXXMYqJmkFMYYDo6sydec42n6ycN52fvsZtJPHizbCfjgKNNUFtzYqGVNOILLQugWbk1YXrpoOqK0qQXHq9fWpOswC7eKo4AP7aMsbhiIxzA8ZI5eEIKFsFlfKfE6WV3Z7d/M8alllUyAF2EXbhU7ATs9idzSC9ZX0vJara5stW81K0xgn2nRWakLBpSygM1RCMMoIHMs5+b390dCb309i1df30lW2oxeI2t1GWM4tIaHzjglc2FanLkl/eThPCH4uvbcyek5ci7TPUXsrW8xNEk73hVnGPMQEm9krW7m+NS6Jw++GNaguhtYNDoHwPQoOrSvIm6IvfXli83cXzfhWbyVjuTXJAblWosaRsGS1lhO5wvmBoRfpD+ZOeUE87XniqUSTk6zUtdLJYfEU/f059vTcnfXXXhSXaWiwFRBYPNocsWRtRbrDJyFakEhS/qzhysceFZ7LnN8hmLR0xgBAOUcE0v48oqH4nP2aDLpfO2RbAfyXP7SugcPvhiUJJu2UP5DNrkPdVJC65IaMVtfcc0SVDyJV/ylR4YGpd7ULrrQ6+6CSPrJoz3OYfpMsucXUtY3kRgQT43oX20FXsCuxVv5ZU0+gs2H0hBbq8vJoucL9QKx6BJ8sL7VsnwTLPjW173l5WS29lB2oZbNvhNP7YcxacQP0p/MnNpZX5nIQ2IwbjoOg+vgWn2VyZLXiB+GG4rFkrVgUFnd+thY3zOJxB1b1yHgUQdX4i3XY5mjDGLmkhtskk3OlNWtT/qTmVMOslx77rR+5bQtlFLrd3bFA219XVrevtnaI02LSkUZsudml0H8UhQO8CuT61AslaSSdsSnJaWYbeq+Oow78RKYHi8Dcc3zGxWLNh+48KUo7Ek/ebRHgBe152TaWonxXs7x8+burLO4Ei8l3CReLeo9Z1d0GcpZYyqu6xYGczlPLm94voZdlXKQ/V5X4hX/QmX83bzwYZdbMClcw7np8zKMglTUwer3IrzitfvLlPF3rYs1tuH5Ij1M5Sm1X3tOJtsspvULZ/iU9E11mMaWl5t/ORmra7e4UHN2vcM5NmqP3XbGrCUSMRueIC/aGouXmR8r/RHvVlcUr5izqnAL2ag9ujSKnq9gSdLhCGxyemPxEmL65fr7+zy/iZizW+6Pq/BMH0x5zjLhspgYcajT1bLbaSheS6RBojrYujIme54vooCYpM8Y87xoC9MYXM+/iWy5j5mrPc8XUQAohxhrjy8lrK/o+v3Q+T1YuFiwNe8TWR5vsVjPlvk0DUHTtX2RLpgx5wcNxSv6RH6MbOrF4kq/YNws3nZOPOo2wuMA9QocFr+3V2m5eHv5w1W0lpaLV1xQiAsOhUKWlotXXNlWBvQpFE3TevFaV7bSkyUVilrUgi1oCDuevYwb8Zrqp3o5NNMN+LHjGRYaipcQc2jmSqZnVkh2dLoRf3Y8g0lb3Iaw7Oh0A2JhgB9ZfkHd8WwoXsawV3ssk0Nq/YDprOeLKKpV3CaanaAJBHfH043l3Wv2TSxplCS4pScdhVIfMvwsxmff7v8FARfiNacvyhT+WabTQIlXCqEwQKYQ1jIijDRvnDqFC/Ga0xdLEo3exARoAPfsHoGK+oglO5qlHq0xor/LOAmkvwu4EK9Ya1YslaQSoK2POHMjE0V99PWdpLhYk8nwsz452V4Tt9VR3EYbTH6RTAK0pVEJCXarobZTKMzWHtobhMZYG7/w8FpeAOAwx3plIg6DQotNAnwepsk0LUdoSWppWeqCYtH61AxyFbdLy8s3ao9ku7VYAuohmkzTSioTmExz7xIJ71067WbdNXdnncWdeCndqD2UsbyA1VpQEo7ZCC1H+CO3bRbtAtHoMKGUPmi4Em+latWU4yAzG1ecTMOBj4PcK6tdiOOnZIQL2HxnxPxEDRqut4c5zL0WLi7ynt9M06LW3baQTKZpFXYTmGzGUzXEtrdZNLohfWNdgJe2/qZGb7Kugzj6ihB8oWK+zlBqHpUbj8ekogxiS1RC8HVQt4WruBdvrN8k3mKpJOU6DA8nbDKhzF+Qooy+ujkrxnZlrC5gfVIyoetkEHEt3nJ7efNgOxnXAbB+ARXrOyt1sRBDCF2uPe6PRCQXapeWlltiy9Qg4i0lUnAdLt7lpHJDU8lhi+9LCVVd0mvQ175ZgODr3rw5JnUtcQITIfg6DI29vYm37DpcRx0YY7i48O46UEotvi8HPq58YT2Pvro5RWCekhSPx6S2gxljFn+XsXDMAvEk3spcMJP1lR0pOjycsMk2I4sqdAZQSpchFKpOjKekrmUzcPtMXL8EFe+VFH3EMplGZuEG2H4hI5Tx5V7eNtZXtxbFRdrY6Ih0rdqJMPaKgywHPcpQxbN4058+2BWbQ4sfkFs0LWrrPuCy0JP+r766OUsIflV7rvwZyf0tZ7M20zJDNIFJqoaNMbZYe5zPX0rNRwCAsdGk1X0g+KLX/F/9+fY0IdTyOJ+ckFukAVaXjnM8DcNCrYqUeCuZSKY0yTdvT6RvYnJizBL7JSC/1le356UvGiD09Z0kYXwFgp87OTEm7S5kjk+t4THB5Qs60tXDnMBkGQ2jgKzETFygXET43q0blvOE8N+GXcD6+k6SGoUNCGGx4aEEhocTUtdkjFldOYLfiZ3Vg460eNOfPVwRfd/M8Zl0T4CBeMz2ERlmAVeFK/ZAjsdjmJSM6QJlq2v1dfEj6Qt2KU31bRB932KphMyx/EJ2eDhhWcAB4RSw/nx7mhiFXVG4mhbFbZunkFsMo+C0gP5AX9tWbkOV9JNHG+KW8cnpeVMtocZGkxgesj4uywLeWpa+cBehr27OEsY3ILgKmhbFnds3mxp6cnCUcfwZAf8yTHH05jvmcLYAIde33gfohsmbY7YJKITgi2dfbW0EOQ6sr24tEkLXISzO/BBu5vjUYjj6hOtRzkNjfYkfF9HXvlkgIL+uPZdKDuHG+GhT181mL5z+EM44wXz6s4eB2SnSVzenKKXLdpPW4/EYbt+60ZRwDaOA/ZevTedGhgZw/94kdr79q+k85+xHYQiZ+dKrLP34p0t2GxeyO29VhocTeM/+Sx0hHLq+trUShFxgfe2bBULorp1wh4cSTVtcxhi+f/3Gcn7mo/u4e3vcpnKbhKJ20LdGe4yxeYjuw2EGRYkmJbUkBgdw5/ZN23gnAT4nhO7qq1uL3ehK6KubsytrW3uVp5JlJTo5MdZUVKHKwWHGEtP98P27GBkqp0/ev3fT9DMKMt/0m3YBvrgNVfTV7XlC+G9rz/nhywFl65I5Pq23FX3GOZYQiy51eu9eX92cpZRachSqaFq0qQ2IWjLHp5adtPHRIfzsHz+4Ps7lDfz+D+ZC4bnHD3397juB77+Avrq1LJZpDw8lfLEwQDmx+tDG0tRwxkGWwa+W2unX6es7SVwW5yrFkvec/t/Y6Ih0roKI3ZqgP9KHf/75NPoj5uaGv/u3/0KxdHV9zCmZCfqmhf+Nc2PRBWIUpmvjl9V8Uj8EPBCP4d7dWzg5zTqlY44Q8C9B6JfP1rZeMPBlcL7SCiHr6ztJFAqzYJgjRuGLeqYgHo9hYjzlWydzwyjgyGZL/mcPPrAIFwBGhgfw9rjmqXV11XVullda8ujQVzenCKG7EPy8G+MppJLDvr1PsVhC5vjMkmztwD7n2ADIBvqwK2N19NXNKVA6DYZpSmGpL7OjPxLBzZtjvkwOrWIYBbx8dWjZRZv5sLxAs+OP//knk3g5Z58EuVsO0CLxApUdpHIg3pJsIrtn74RHEV9DgBcgOGUcp+JkyfJ/IMnqDAg3Qq0lHo8hlRyS7rHghJNw79+bxEfv33V8nRKvR+wWcEBrBAyUF3Vn2Qucnp7X84lbRrWTTSo51JJBJ07CvfPeOH7y0f26rxV9XgD/NPf44b/7fpNtpOUrTicB+7mIs8MwCsieXyCXN1o6wagq2EQi7ruVrcVJuJMTKTyc+XHd19pFGwjwgmnR2U5HZpqhLeGSTgm4CmMMufwl8vlLXBpF++4xLtG0KLRoFJrWjwHJBiBeyWYvcPT2xHLPI0MDjgu0Wv6yf4Bv//yd5XzQBdy2WJ+TgP2KA3uFMXbdZ7iemDUtCkop+iMRX4aXeMUujguULe5PPrrfULgA8Ps/vHDs7BlkAbc1UO0k4P5IORm9lwfiiTDGcHCYsd1id+PjVnGyurUEVcBt32VxikIA/ofSgophFPD96ze2i85GUYVacnkDG//xrbhQsyWIAu7IFqH+fHuaMr4sJmIDlSqCibGOPKK7ASc3AagfxxUplq7wx+0/4ezcbLnHRkccrx80AXdsf1tf30nCKCwT4HPxZ9WOOr1khQ2jgIOjjG1kpD/Sh589+OA60aYRTsKtpqnWSTUNlIA7npxhlwtcJR6PYWx0xNfdqW6jUcJRaiSBR//w964WZgDw+ugEO//9V4uroGlR3Ltz6/rYrYDLORuX00D3za/ouHiBaz94BQ4JLcND5dq2sLkSVdHWC9v1R/owOZHC305N1rW83716i5ffvzHnL1RwiujUEzBAvgf4MYAPTWeBF4yTpfSTB8uON9MmukK8QNWNKC4S8C+d/k9YRJzNXiBzfOZ5F3AgrmEgHsVYquxOFUtXyJ6/sxVslUahyPoCdqYb3IuuEW+Veou5KsNDiZZtwbaKci+FbCNLewZO/hWE/wJ10irdkkoOYWw02TCGHlQBd514q1RiwkuwCalV0bQoUiNDSCQG2r7J4ZZc/hLZ7LuGSUOc4yli0YUf/MzCAik3dnH8/Z2QWSvUi3KMDA2gWLqy3ejopIC7VrxANcHb3ZeYGBxAYjDeFUKu5lVcXOQbugac4ynAFu3yjcuulDFPQebrPYlqIYTg7t9MenoqOeVNjI8OYebD+9c1cLm8ge2d/7VEMTol4K4WbxWvligejyExGIemRdsSqSgWS5Vmg4brbvH1RGvHD6v+vimATxGKSXDMA9DE/0spdaz7E/GaqeYUhuuEgAMh3ipuS21E4vEYYlo/IpEINC2KWCVfQYZc/hKMMRhG4TpjzUOSj68lSvV2K90IWDbFslsEHCjx1qI/357GFV8gBHOQ8AuBck5FxEXkoipWWQjB14yR5VaEl2QF3ExuMNAdAg6seGvRv9qaA8NcM0L2G0LwNeN8pVX1c7V4FXCzwq3SaQGHQry1VCzyXKXGbBptEjMBXjCQDRC+gWh0o92LF7cC9ku4VTop4NCJV6QsZkwDfIpSzIIj6Xbl7sA+IdhjnOwCbA+c73bLtmkjAd+cGMXh0bFvwq3SKQGHXrz18DS4MBbbDUKySj0B29GscKt0QsA9Ld6w4lbAfgm3SrsFrMQbUhoJ2G/hVmmngJV4Q0xFwN9A2MholXCrtEvASrwhZ2Vt6xzAdZMMsQlfq2iHgLszm0XhC5UF6bVw+yN9eDDzd215b6fqDw58TI2CL93tlXjDDKUmgYwMD7iuyPCDVgtYiTfMcD5VexiJtD+Jv5UCVuINM5ybmgdmz5sbsyBLqwSsxBtmYjGTeHN5A3/+v1cduZVGApa5phJviEl/MnNazhv+gf/5yyt89+ptR+6nnoBlBhwq8YYetghh0M3Ot3/tOgHLDDhU4g056SeP9jgnC+L5Tgv4wcyPrZEPxhe9XEeJtwdIP3mwzDn5pXi+kwIeiGv48H1zMQwBPvcyV0+Jt0foRgE3O+BQibeH6EYBT06khDNk1u1rlXh7jG4T8K0Jc4iXALNuX6vE24N0k4DHRy2dQF2XbSnx9ijdJGBZlHh7mKALWIm3xwmygJV4FR0V8NvjrHjKvtufDUq8CgCdE/DrI3NBBQc23L5WiVdxTScEfHAkTq7nG25fq8SrMNFOAX/36q215y/nK25fr8SrsNAOARdLV/j2z/umcxx45qWvmxKvwpZWCrhaWWwZbkjJopfrKPEqHKkn4L/sH0hd06kknoP8Jv3pg12Hl9mi+jYoGuI0M3pyIoWP3r9rzQxzwGlGnGwvByVehSucBAyUO/DcvT1ul6eAYukKrw9PHGfEAdjnWnRapgmJEq/CNfUEXGV8dOj637l8wXaCUJVmu+co8So80WhaqVtqR3fJXkOJVyGFvrq1KDMnrjyfgy360ZBbiVchTXU6EwifqySROwl5n4OsgGLZa0ShHkq8Ct+oFE9OmU4GpKO8QqFQKBQKhUKhUCgUCoVCoVAoFAqFa/4fCbut2hEefs8AAAAASUVORK5CYII=","e":1},{"id":"image_1","w":85,"h":85,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFUAAABVCAYAAAA49ahaAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAEE0lEQVR4nO2d/XXaMBTF72OB0AnqThA6Qd0JygalEzQj0A3aCUo3gAnqbEAmKNmATHD7hyTqEuMvycgW73cOJzYY83zzJMuS3pNgJJDMAWT2tQAwb/jKEcDe/RWRYjjruiGxfpjkEkBuX/eBTvsEI/QWQCEix0DnHS8klyS3JI+8DluSK5JNXj8tSGYk11cUsoojyQ3JLLYeXlgxNxGFvMT0xCU5p/HMsbPhFKoFmjozZjHvypHkQ2zdKqHxzm1kgXwoGLBK8G5S0bQvtwDuvK2JywuABxHZ+J5o5vNlmqLzG9MXFDDX8JPkd98T9fZUkhsAn30NGCk7AKu+Dw+9RE1cUMcTgLyPsJ1FJblHuMfKsdNL2E51qvXQWxEUMNdasGN7trWoN1Lkq7iHad20ppWo9i5/i4I6PlinakVjnWrbob89DEqJL23asbWi2rrkgDTaoSF4gblx7esOair+G6igZe5gNKnloqg0PfOfAhqUCvck13UHVBZ/LfaNvABYiMih6sNLnvoAFbSOOwAX+wheeartAvszoEEp8bFqFLfKU9eDm5IO66o3//NU9dJevPLWc09dXc2UdFidv3HuqUfoDaoPb8o9WSdPte1SFbQfq/LO7NIHSidW5Z1T8dei78079zAwA7ToB2LpNlzxz+PYkRS521BRw5G7DQEAkoxmSlq8F5H9zPbsK2HIAFP8s6hmpMUCUFFDcxJ1EdmQlJgDRtTxT3ydDhngOetPecVbQEUdBC3+A6CiDsAMZihaCYjWqQOgooblGTCiph8Uez0OgBG1dgab0okjoJ4amj2gnhqaA6Cd1KExndR25ymqKYngZlg7UbUK8OfRbThRO4W0KJWcNHSiFnHsSIrCbcwAwE6u2sWyJgGeyxEr5cdUrQL6synvlOdSafBEf96VgypOnmqrAPXW7uzOo1R0ero/9dPTreK/rmjQ1Hmsik7RkB8/2oX8qLe2ptJLAQ2j9OH9pWjqyuEU2xJYD2nRxPlRF57eFO9fAPgQ2qKJ8wwT7Huxc79p4G8FEzGs/KMxX1WtqPamNc4Eg3H41iZNc6u8VDZV21dfiybOTkSWzYd1SPZFcovbzVTRKelXF1HnMH2Gt5TsC+iRRa1TWrobFLZVdp9zOk37sf+tHLcxUOg8tPP4Xd+slHOYbsJU27C9M1ICPSeoichRRHKk2Uewg4eggOesPxFZAfiCdB4QvonIchQrWZBckNwPlYX7Chw41shHxl95og/fOfZ8/zQrUUwhPX1BclqBeSRza/jYKDjWot4WGnHHsIbKllMX8xyaVSseeN0b2oGmns+uea1RFvmyF1le5CvksM0j/i3yFWU2Y7SV08rQ3DAymIhutxRdBhvrWcEzzBiaW5LuALMknU4JTZW/U1qiUwiP8oYAAAAASUVORK5CYII=","e":1},{"id":"image_2","w":186,"h":242,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAADyCAYAAAD6Bd/wAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAPn0lEQVR4nO3dXVobR74G8LeqW60vGgkZFA/J2OZ54rkNZwXxDiY7GGYHnrOBISs4mbMCZwPnOCsYZwf2re05Mk6GsYUQSE2jr+6ucyGaMCBA6KtK1Pu7sUBSV7n00vp3qVoNEBERERGRScSiGqrVjp7ETrytlNoWSjw7a/3bRbVP2u1B4QMEPiioD0jw6unWxqtFNT7XoL+t1bellDtKiGdCqW/m2RYtrZ8g8NKJnZdbW2vH82pkLkF//7GxoyCeXw53PptBLuci4zpwHYms50LKhb2pkEa9foQkUegPYvT6ETq9AaIoufiQAMD/OImzu7W19mHW7c80Ze8/NnagsAvgcfo7v5hFseAhn80w1PRvoihB2OmjHfbQ70cX7/px1oGfSfLe1urbwnFepHtw15Xwi1mU/TzDTWPpdAcIwh6CsHf+OwX1vZu4P8yipJk6he/2DnYFxF8BQEqBkp9jwGliUZSgfniCTm8AAFBCvFFxvPOHrerrabY7cRprtaNyLOKX6cxJMe+h+mCFAaeZCDt91A9PkCRq+AuBP3/9aP3FpNubKJUXSxUpBdbXivCL2Un7QDRSkijUD08Qdvrpr378+vH6ziTbunPQz6YMfwaw6roSD9d9ZD13kraJxtJsneKo1Ul/nCjsdwr6xZB7nosvq6ssVWghgrCH+uFJ+uOdwy7HfWCtdlQWjvMCDDlp4BezqD5YSX/807u9g927PH/soMcifimU+sZ1JUNOWlwMu4D46/uPje/Gfe5YQX+3d7ALgW+lFHi47jPkpI1fzP428aHwY6129GSc590a9Le1+nY6T76+VuSBJ2lXfbACb5jD1VjEL8Z5zq1BP6vLUcx7nEIkY1QrxeENgW/HKWFuDPr7j42ddK78woEAkXZZz8VaKT/8QeG/b3v8zXv04QItlPwc63IyTqVUgOtKAPj9P/YOn9/02GuD/v5jYwfAY9eVqJQKs+0h0Yyk2VRQ/3nT464NuoJ4DoB1ORnNL2bP9+pnO+eRRgb9ba2+nS65Lfv5uXSQaFYuTDdee1A6MuhSyp10A6zNyXSrxVx684+12lF51GOuK12+A4BiwZtDt4hmy3VlOq+O2IlH7tWvBP3sk6bHwHDunGgZrP5Wvjwbdf+VoMdOvA0MT2QmWhZexklvPht1/5WgK6W2ASCX40f9tDzyufMd8+NRdfqVoKdfLpRxnct3ERktrdMjRNuX77t2Ht11xl7BS2QERwxnCIUjnly+72qaz0525ipFWjZpua2UenL5vmt325w/p/uE9QlZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysYeWJotxchCLvo9SPE6QVVyWg5z0Uu62KlmINj4GmYRgW9FXRw0AwxiGLdXaE7Oj2/6G0bJT+PjUrRqK9MMSLocaLw66fjC4NFy6wVdBCEXTxc91Ey5NuYtQc9ThQ+/rOJbj/S3RWaoSRR2K+3AcCIsGs/GGXI77f9ehutoHP7A+dMa9APmicMuQU+NQLtx13agh4nCs3Wqa7maYGSROGgGWrtg7agt4IOEk4dWiMIu1qnirUFPQh7upomDZJEaZ1V0xZ0TiXap9sbaGtb+6wL2WMQJdraZtBpYXTOvDDotDCFnL7rYmkLOr9/3T6OxquoaGvZ/+0iqGSJQk7f5Tw1Bj2rq2nSIOM6yGX1La3SGnSTlnHSfG1Uilrb13owulld1dk8LUgh72lfwag16IW8hy/WfZ1doDmTUuCrh1eub7v4fujuQKVUwPqa3rc1mo+M6+DxZsWIU+u0n3gBABuVFeSyGXw2YDknzUbJz+OLdd+IkAOGBB0YHpwW8h5Owi6ax6dcp76EpBTwizmU/RwKeX1TiaMYE3QAcKRAyc+fH7hw4dfykFJqnT68jbk9A4zbK9Dy0n4wSrQIDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZAUjv2Q0PrtuvM5Lai9aLptBIe8t/PvEZzXWjiNRyHnGfqOuUb3q9iI0W6doBR3dXdGm5OexUSnO/UJmp50+mq1TBGFvptvNuA5Kfg6VctGYiwAABgX9cyNAs3WquxvatYIOWkEH62tFbFRW5tLGPMd6EMVoHIVoBV1sVleN+epv7TV6nCjs7R8x5Jc0jkLs19sz3WacKNR+OVzIWA+iGHv7R8a8O2sP+udGwCtbXKMVdGYa9l8/HS/8kjn79bYRr6/WoNtej4+jFXRmUkcfNE+0Be6XT8eIE6Wl7ZS2oMeJwkHzRFfzS+VzI5jq+XGitJaGSaLQPA61tQ9oDPpJ2EWi+a98WQyieKp3vlbQ0T7Wuo/BtAV91tNa990049Vq6y8Pk0Rpfc0Z9CURTlFfm3LNVp0fAGqfdaHxTFp6mHQl7kGUaGubQb/nBgOTgq6vLwz6PZfNZnR34dy8lzXcRFvQpUHrIJbBpCExab1JxtW3X9XWctGQNRDLYpo1I6asN9H5mmsLul/M6mp6KU0zXiaMtZRC6x+ctqCX/LzWmm2ZZFxnqrCW/Lz2UrFSKmhtX+vB6Bfrvs7ml8a04+RIMbclv+PIuA4q5aK29gHNQfeLWZT8vM4uGK9SKsyk9KiUClrGWkqBrx6WtR8Ua59e3KyuMuzXKPn5mb7rLXqspRR4vFkx4vQ6/T3A8AXIuBKNI70r3Ewhz0qNedS1ixrrnOfid9WSESEHDAk6AGxUVlBezeOgGSKwdGWjlAJlP49KuTDXA/V5jnXOc1Ep6ymTbmJM0IHhQctmdRXAKk47fQyiGH2DPsKeFy/jIOtlFrr3uzzW3X6EOJ58LUouO+y/qTNpRgX9IlM+5LBBIe/d+/HWfjBKtAgMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBWO/ZHQQxRgM4nv/jbpexkHGdZA5+1eHacc6vdqcyV9UalTQ40SheRyiFXSNurT3omRcByU/h0q5OPdLocxyrC9eVMAvZlEpFYwLvTFBbwUdfGoEVl4AIDWIYjSOQjRbp9isluZ22cRm6xQHzZO5jHUQ9hCEPRTy3tnVNcz4vnQjavT9ehv79bbVIb8oSRR+/XSMz41g5tver7fxeQE7lNNOH//3yyG6vWiu7YxLe9A/NwK0go7ubhgp3fPOyn69vdCxThKFvf2mEWHXGvQg7KHZOtXZBeM1jkKcdvpTbycIe1p2KEmi8K96a+HtXqY16PN4a76P9uvtqbehc6y7/Wim70yT0Bb0VtCxcmZlEoMoRhD2Jn6+CWPdCrpa29cW9GleOBtNM14mjPUgimdSgk1KW9BDjf/pZTRNSEwIOqD3NdcWdE4l3s2kpUds0DgPosmvYzot7dOLNF+93kB3F87pPE5g0O+5TMaMTyYBzH1Zw00Y9CUhJwyJKR/BA0DW07fiRFvQTVv0Y7riFOOV0xiwi3LZjLa2tQV9XguW7qtpxqu0mp9hTyYjpdC6c9MW9JKfn/jt2DZSCqwUcxM/34Sx9os5O2t0RwpUSgVdzS+VjcrKVCHRPdZSCnyx7mtrH9B8MLpRWWGtfov0RIZpbVRWtNXqm9WS1r05YMCsy1cPy8YcLJkm57n4XbU0s+09+rKy8LHerK4acTymPeiOFHj0ZQUlX/8Bk0kqpQK2fv9gpnvCdKwXETwpBb56WDbmdTViV+pIgc3qKsp+DgczWn+9rAp5DxtrxbmVdM5ZAE87/bmMtTw7HljEea93YUTQU4W8h8d573ylW38Qo9ePjFqvMWsZ10HGlfAyDgp5b2Ef8Fwc6yDsIY6Ticc657mQUiCXzRhRpoxiVNBTw7PhzXjLu+8yrmPF7Jf2Gp1oERh0sgKDTlZg0MkKDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZIVRQW8BQK8fLbgrRNNJbriIwdWgK7y+7UlEJur34+GNBK8u33c16ALHANAfxPPtFdGMDeLrM3sl6ArqNcDShZZLkihEUQIAeLq18ery/Vf36Ge7/R736LREOr0BAEAJ8WbU/VeCnv419PvR+V8Ikek63WHQhVKvRt0/enpR4WcACC2+3ictl/OsiqsHosA1QRdCvASAdtibU7eIZqf3W/XR/vrR+stRjxkZdJnIFwDLF1oOraCb3vzf6x4zMuhbW2vHAH4EgGbrdOYdI5qVJFEIziqPJEl+uO5x1y4BUIl6AQBB2ONenYx1HHSGNxR+/sNW9fV1j7s26E+3Nl6lB6Xcq5OJoijBUWsYdKXU7k2PvXFRV/rkIOydT98QmaJxFA5vKPw86kOii24M+tmT/wYA9eYJ17+QMcJO/3xKMVHJ89sef+syXSdxdgG0oyj57S+ISKMoSlA/PAEAKKjvb6rNU2KcDb+rHTwTUvwdAKoPVuAXs1N1lGhSSaLwz3ob/X4EJcSbp48ebI/zvLFOvHi6tfFKQX0PAPXDE9brpE3jKER/uOCw7cbyu3GfN9YePfV+r/ECwJ+kFNisriLruXfrJdEU6ocnF+fM/2OckiV1p6ADwPsPjVcQ+FZKgfW1IssYmrskUWgchechh8Cfv360/uIu27jzOaOOcr4D8FOSKNQPTy5+/Eo0c2lNPk3Ih0+bUFrGAEAx76H6YAVSTrw5oivCTh/1w/Np7bZK1B9vmy+/zlTJ/Mfe4XMF9V8AwFKGZuVyqaKEeKPieOcuNfllU++C39bq28JxXgilvgGAfDaDtVIe+Vxm2k2TZZJE4TjooBV0L344+TcncXbPFhpObGa1xru9g10B8RcAq8Aw8P5Klnt4ulUUJWiH3X8LuBLiDeLk+aSlymUzLaprtaNyLOMfcFa7A8OSppj3UCx4yGczrOMJwPBkiW4vQjvspfPiqT0I7E5ywHmTuaSuVjsqRzJ6LiB2ADy+eJ/nucg4Ep7nABju+el+i+IEgyhGkij0+zF6g2jUuqmfIPDiujOEpjX33evbWn1bSrmjhHiW1vFEGH4j3CsIvHRi5+W0NfhtFl5HvKsdPJNSbidIygLiCRSeLLoPtHhKDM/OF0K8dmLn9dbW2ge9PSIiIiIiIp3+H/yNcCHjpRNmAAAAAElFTkSuQmCC","e":1},{"id":"image_3","w":216,"h":260,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAEECAYAAABKq/oNAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAeX0lEQVR4nO2dX3Ybx5XGv6puNEAIAkGR4vAokQnO2H41ZwXiDuysIM4GJjnZQJIV2LOCaHZg74DeAfwqKQFgOxoOBRIgBDXxp7tqHtAFNWmA+NdV1Q3c3zl+oAii22R/qFu37ncvQBAEQRAEQRAEQZiC2b4BItu8ql+ecodXpZSnDKwKieq010kmzzl4RwhRc+HWTk72OkZv1BIkMGIh6vV2JUBwCo6ziZAYXqz6fpKxH5mU50KIl5+fHNaSu9N0QQIjfsXr+rsz5rAqJE4hcQqGUwC7017LOYOXc+DlHHDGUMi7v3pNEAoEgUAQCgxHIYaj8P5LmgzsWy74y01b2UhgW0y93q6GTngahXenkrEqk/KLWa8v5F24DofrcBTy7lhUfPlHSAgJvz9CfxDA748ghFTf6krIb1zhfrspQiOBbQEqvOOcn0rI03nhnevwyarkec7kax0osXW6fQShUP/cBcMfP/3k4KWWixqEBLZhqPBOSlllkp0tGt4pEU0L8UzR84d3hSbxgyOdr7K8mpHAMkq93q4GCKpR0mFueBcXUiHvwnXHoV4a6XT76Lzvqy+7UsgvPzt5em7xllaGBJZy7oV31Sjp8GB457ocBc/VHt7pZDgK0Wr7HxMiDH/IYshIAksR0ZnSaSy8qwI4nvbatIV3OhBC4vrmFj1/OP6HDIqMBGaBVcK7uIjSHN7p4PrmFt3eYPxFxkRGAtPM6/q7s3vh3cykQzy8c92PmTxinABptf3xFxkSGQksIe6UDM0J7wBMzpHiKfFVzpS2iVbbn4SLQoj/zEIFCP1Fl+ReeFeVjJ1SeGeOy6sP8PsjAOg6wjlOewqfBPYAy4R3KumgwjuVDieSRQiJi1ZPZRe///T44Cvb9/QQJDD8qiL8FMAp5oR3d6odKLwzynAU4u3l+/EXDL/79JOD7+ze0Wy26qlYtiL8zh7J+5gSJ+wTO4xufnp8ULV8OzPZWIGtWhEer3Yg0osQEr/8X3dcKJzirGLmBXa/IhwLhnfrVoQT9oml7lO7imXmyUpzRThhj5/+9ybVq1gq46BpFeEhwl0GBonIOxR9NFB4t92UH+XHezGJrwC8tH0/97G6gi1r+MtSRThhhiAU+OWiCwBwhHNycrLXsHtHdzH2UR+J6SyWdHgRIgQkwCKdMzlenTalIpzQj3o2hqMQoROeIWWrmFaB1evtiuDia8HwdSjDL1R0Ny2829SKcEI/paKH65vbVIaJWp7mer1dDXn41xDh7wGARcIq5F0UPJfCOyJRYh/KZxZvYyqJ7sGUsAD8Xv1bIe+iVPRQLOQoHU5oo/GvcUli2vZhia1gr5vv/hoi/DOAx8B42S6X8rR3IoxQyLvoDwIECKoAGpZvZ8LaAqvX29XAEd+p7F8h7+LJ7g4JizCKl3PQHwQAxxmAc8u3M2Etgb2uvzsLefg9kyhzzvBkdwelopfUvRHEwqj9fFTNkxpWFtibn1pfQ+LvwPjT43D/ESUtCGuoiEkyVrV6I/dYSWBxcZWKHg72isneFUEsiRLYQ4UKNlh6ySFxEWmEczaJoF7VL1MTJi4lsNf1d2ckLiKtuO74ceYOz57A6vV2lXH2PUDiItJJwRvveKSUVbt38pGFBRay8CWAspdz8GR3R98dEcSKqBWMSXZm904+spDA/tG8+hMYXnDOcLj/iCoyiFQyOXtl06ds2mCuwOr1dkVC/g0AKo8LlIonUkusuOG4Xm9XbN6LYq5aQh5+C6BcyLsol/IGbokgVkeJLECQikTHgwKr19tVRIW7lccFE/dDEGuhBMZ5OjKJDwosqowf20zIp0VkALWFkUhHJnGmwKIY9ncArV5EdpgsBBLpXsFCJ/wKQJmayBBZQqXqH+o4ZpLZIeLYfk2JDSJTuA6fHCNFOQSrPLQH+xIAijs5Q7dCEMmgEh2hE1oPE6cK7HX93RmASQdcgsgSE+uKlOkUWOQKpdWLyCRpMl9OFZi6MbL9E1kkTebLqQJTN0bhIZFFVNY7DebL6StYrIENQWQRtTiofIK1+7B5cSL7jIIQg2GIwTDAYBggFOMuswXPRd5zsFPIIeea32q4LkcQCjCHVY1fPH4fNi9OZAchJPqRiAbDAKNA4HY8jHwq8e+Vih72K0XkPXOPW8Eb90m0bb4kgRG/wu+PEAQhRoGA3x9hMAzGM7hWpOcP0fOH2K8UsV8x44T3PNUEx675kgS2xdwP70aBwGAYaLveVcfHKAhxdPBY2zUUkwQds1uTSALbAuLhXRAI9IfBg+GdTrq9AXKuo30lix0x7dbr7crJyV5H6wVnQALbMOKrUTzUSxNXHR+loqd9T6bmhkXmy3OtF5vBrP/DJoDj4Sikw+aUMoqEcxvtkXSHd0lzef0Bz492tV5DCSwyX55rvdgMpgtMogGG4yAUJDDLpCm8S5Lb/gijINSawo+ZL63tw6YKTDJ5zsBeDIchigWqRzRFfCVKa3iXJD1/iL2yvhaAhbwLvAcg7XWZmiowxlgDEuhnKOTIEvHwLp7J2zZu+yOtAkuD+XL6ChbKBuMMwQZ/eppCnSOp8G7dM6VNItT8e1DmSyEk6vV21cbky6kC++zk6fmbZgtBSAJblG0L77KCGswXmS8bpq8/M08qGfuRSflFfxBQ0W8MlXRQ4d28kiHCLkpgkfnyO9PXn6kcJmUDwBfDUbi1AlMr0WAYUningYKB2sTJ3DBL5svZKxhkjYF9uQ1hYjy8ix/UEnrJe/qPgGKexnQJjDFWgwSGo9Dk/Whl2YpwQh+cM5SK+juWxaKvY+0Xm8JMgTmhUwt5mFmBJV0RTiTLXnnH2JQe1xl7w17X3519dvL03MhF1bVnfePkZK/xptmCEBJBKFLbPsB0RTixPjmXaz3/uo+Xc6yZLx/eZUr8AIYXQZAOgakUOIV32YVzhmeHZaMz5rycA78/stJO+2GBMTQAvLCdqu/2+pGXiBIPWYZzhudHu0adzcBH86UNgT24LDGwGgBrB86jIETzbQcXrR6JK+PsFHI4flYxLi7ArvnyQYEJIWqAnUziYBig+bZD+6mMUyp6+O3RLp4f7VppfgP82nxp8toPfpy4cGshzGcShZD4+eKGsn4ZIudyuK6DYiGHnMuR91wrq9UsCvlxExzT5ssHfwMnJ3udN83WDYBdk+bLf112SVwpZqeQQ8Fz4UZCKniu0aTFKkzCxHFb+HNj1537CokaGF6YMl/6/RFlB1NC3nPvrEZ5z7EW5q1LrF991eh1573AtPmy073Vfg3iLpwz5D13Et6pUG+TsGW+nCsw0+bLnj80cp1tZefeHikL4V0STKIvw+bLuQIToahxzo2YL30KDRPjbmiX7fAuCThnE/Plq/rl6ecnhzUT150rsM9PDmvKfCmE3IpPuyyhwjvVC34Tw7ukUN4w7vAqgHQIDPhovtxmb1gaUOFdznUmmTz6wFscG+bLhdRC5kuz3A/v1NfEetgwXy62ghkyXzpb9mkcD+/UmRKFd/qwYb5c7GNR4Bwcf9Fd0ZGPQp5NPGSOJxrioR5hDhvmy4UE5sJthAjRH+hP1ZeKHrq9gfbr6CJ+jkThXfpQ7bRNmS8X+ssr8yUA7ebL/UoxEwKj8C6buA432q9+8Y9WQ+bLnOtgr7yDdooqOuIrEYV32UaZLyXMTL5cXGAMNRgyX+5XihPnsknSXhFOrI9p8+XCTw8Da0hII9YV5Xz9+eJGm8iyWBFOrE+sZCpdAhNC1BhnxtzNSmRXHX+tcJHCOyJObHuza6Jf/cICs2G+5Jzh6ZNHqJQLuOr46PnDmSn8bagIJ5IhZr6sQnO/+oUFFpkvrUy+zLnOZHC23x9BCInBMJgIicI7YhlMmi+X28FHky9tjpZVq1Kp6Fm5PpF9YiVTVd3XWirfLpk8B0Bzw4hMowQmmf6axKUExhhrADT5ksg2kxVMyi90X2spgYlw3MaNVjAiyyjzJQC8ql9qXcWWEphygSrzJUFkFbWKReZLbSxd8yQZ+xHYrLFGxPahhv9F5kttLC0wJqW1br8EkRSuG7Vxk+xM53WWX8EgG4C9fvUEkQSxfvVVnddZvixejA/maAUjsowp8+XSAnPhNgAYMV8ShE5UouN1/d2ZrmssLbCoOPIGoDCRWI5REMLvj+78ZzMbrcLEyHyp5xor/VTUr344ClMx+ZJIH8rPFwRiMnh+lpjynou9cgHlUsHoPZowX64msMh8aapfPZFe4nOx43Oyl32Pi1YPVx0fzw7LxkyusX716VrBTJoviXQhhMRNr4+eP0x8Cs4oEGi+7eDooGRkNVOpep3my5XiOzX5kvZg28VVx8c/f7nGu+sPWkdMXbR66Pb62t5fcd98qeMaKwlMtbuiFWw7EEKi+baDq45vLClxef0Bo0D/86XS9ZH5MnHWyVA0AUrXbzpqnK/pBkRCSFx1fO3Xmfgax+bLxFldYHJstaYwcbP512XX2iD6bm+gfRWLTb7Usg9bWWBkvtx8ur2+9XG+ugcyxsyXVR3vv3I+lDFWMzn5clsRQk7OkdSZUpycy1Es5LRk3UyEaPPo+UPslXe0vb9u8+XKAhOhaHDOKdGRIPFzJL8/QhCEc8+UbjEOpS6vP2CvvIP9SjGxe1n2PEsHupMqnDO4DkcQCi2TL1cWmJp8KYSkyZdLMoqEcxtVO6iD2nVQSYGeP8Szw8dr935My6xsE/s/1x0LjDv8FAlPvlzryJwmX87nfsmQ7j3NYBig+baD42eVtURmIkW+CCY+uAueqyZfVpN+77VUEZkvSWC4WzK0aHinCyEk3l6+x/Oj3ZUf0DSEhwCMlE3pNF+ut4JBNhjYVu3D4uHdKAgxGIbW0tgPMRgGaHdvE9uT2aJgQGCxfvXVpN97vbuPJl9u6lnYMhXhaeSq42OvvLPSKpZzOdIwQOqRgQazsSa6x/V6u3JystdJ6r3XEpjqV5/1ao4kKsLTyk2vv1Kaexya2R2EqI4gTKAmXwYIEh3Mt5bAon71NwB2dU++TAJ1pqTCOxXqbTKrniOVih7eXX/QcEeL82/RPAIT6Jp8uX6Am1LzpUo0DIZhJsO7pFj1A0QNa7f1AbRX3jHqNdRlvlxfYCkxXyqfUrc3SGXSIYvsV4r45eLG+HXLpTyePnlk9Jq6zJfJCEzata70/CEuWu+3coXSSbGQMz4ve6+8Y1xcwB3z5Ysk33ftmE6G4z6JtgR20XqPt5ddEpcmnj55hHIpr/06paKH42cVK+ICxnswlW1N0ny59gr22cnT8zfNlhXbykXrPbo9u5mutJPEQa0afpjU71pNIy14LvKeE432tT/W18s5iU++TOoUrwnguD8IjFV09PwhiWsBktoXHx08RqmYx7vr3lJHGPlIRCppkuYZ2UpgSU6+TEoNNQDHplYxISQuWu+NXCvrJBnelYoeSsUnk4Y38exsPhrjWyzk7gyezxI6zJeJ/AYkZI2BfWlqH3bT69OeawF2ooc9acZC27wRvjrMl4kcXDHGjE5codBwPpwzHB2UbN9GplDbmyTNl4kITISiAZgTGJ1zzefoYH1P2DaiwsSk+tUnIjDlAlXmS534G17atC5q5drEEM4EE+uKw6pJvF9ytU0SPwDUK9EmO4Ucnh/tGu/xvknEJl9Wk3i/5HbADA0AL0ym6olxxflO1PSG5gSsj+epJjjJmC8TU4IyX+pO1efc9BQUm0adI43PlsYHtdQLJVliky8TSdUnt9QYMl/mXAecs41O08dFFD+oJfQTM1/uJmG+TExgJs2XpaK3Ean6+yVDrutQmJcCkjRfJiawuPlyOArjnwSJUy4VMieweJnQTiFH4V2KUQJLwnyZbDYiMl8GodAqsGIhZ9UM+BD3w7sslgxtO2ofJiHX3ocl+5c3aL78zWEZ//zl2tpeLB7euZGIKLzbDGLmy+q675W8wAyZLzlneH60i58vbrSLLEsV4cT6JGm+TFRgMpQNxs31Scx7Lp4f7eKi1UukfCrn8kmigcK77UWZL4WQqNfb1ZOTvcbK75XgfVkxXyqRtbu3aHdvF17NVKKBwjtiGsobFjrhKdYwXyb+8az61Zus6OCcYb9SxH6leMerpHCi/RKFd8SiKIFJKU8BfLfq+ySuACZlAxb71W+qV4kwS1Lmy8TrjiRkDaDRskS2Scp8mbjATJsvCUIHSZkvExeYEzokMGIjSMJ8mbjAVEpTCElhIpFpJvOb1zBf6vF+RObLYEMmlBDbyaTcb4122noENjZfZn6sEbHdKPNl6gTGwCiTSGSeJMyXWgQmhKBEB5F57psvV3kPLQJz4ZLAiI1Apesj8+XSaBFYZLO+AUhkRLaZhInjfvXL/3yC93IXQ+ZLIvvE52KryaRqwIRyNOwUctgtFYy7wGMlU9WVfj65W7mLZPKcgVmffEmkh/hc7Pjg+Yd/RmAUDNHzh3h3/QH7lSL2yjvGhLau+VKbwBhjDUjcqWontgchJHr+YDIjO6n2DlcdH91eH88Oy0a8epPoa0XzpbYmg2ryJR02bxejIMRF6z3e/HSFi1YP7e5t4r1TRoHAzxc3RmYUcM4mq+Wr+uXSiQ5tAvvs5Ok5QGdh20S310fzbcdIxy8hpLHRwWoV4w6vLvuzWtvkSsZ+BKiiYxvo9vq4aPWMNiEaBQJXHV/7dSbWFbl8lymtAovMl5Sq33B6/hAXrZ6Va7e7txgFep+vSdHvCuZLvSsYmS83njSM8+35Q63vPzkLw/IlU3onKYhxV1Rawczh90fo9vq46vi46vhod2+1zlS76vjW5wToFlis9cXxsj+rNc/pwm2ECElgGoifI8UPamfBOUOp6GG/Uky06c9Nr5/Ye62KiWyi63AEocDr+rszlcBb6Oc03hNOTvYab5qtifkyttQSCyKERP+eiFZJewsh0e0N0O0NJh241sXvj6yvXgCMZRKDUCxtvtR/UifxAxheBAEJbB7xMiE/qnbQ8fBcdXwMhgGODh6vVRGRxtkAuvByzjjUXtIbpl9gUb96mnz5kVEQYjAM76xKpge79/whLq97ODp4bPS6WWVV86X2J56BNSTkVu7DkgrvdNHtDZD3XOyVd2zfylrsGKh1jZVMpUtgQoga4/pHy9rmoYrwNHPV8a1UqSeJiUazse3N7jL96rULTE2+3JQVbJWK8DQjhMRNr7/SKpaWedmmOjkX8i76gwABgioW7FevXWDR5MsmgGPdky+TJB7eBYFItCI8bfT84UoCMxGazaNcyhubNXDPfHm+0M9ou5s4Eg2w9Aosq+FdUqz6wZFzHeQ919oKzjnD4ZOSsevFSqaqi/6MEYEp82UarCvKpzROg4eZDu+SRAi50j5sr1ywUoeoBjCa3DvG+tUvnOgwIrA0mC+FkEvPENsm+sNgJed5uVTATW9gNHxW4jI9HHGygi3Rr97ILlWE4zZutlawwTBA8207FXVzaWWdhMVvDsvGEh7lUh7//tsnViaPrmK+NPJb+fzkcFJVb/oBHwwD/Hxxs1V7qlVYJ1HAOcNvNa4oO4Uc9itFnPx2b+3qk3VZ1nxp7GNATb40OZhPCGlkSHrWSSIbmHMdPD/anVTwr/YePBo4794ZPJ8mCp671ORLYwKzMfny8tqswzarJHWOxDnD0yePUCkXcNXx0fOHU3//PBrpW4hEpAbPZwE3CoWZZGcLvV7nzcSRkDUG9qWpio5REBrpDZF1OGfYLRUSfc+c60xqHEf3jjwKnpvpqpFYv/rqIq83dxRv2HzZ6dr3KWWB/UpR6wOfi1Yn9V+WxQUsb740JjAXbgMw1wCn59PqNY9S0ct8oa8NVKJjkcmXxgQWFUfeAGZ6dFDW8GHynktWlRVRYSLnfG6q3my1poSR8zCdPSg2gb3yDo6fVTIfrtliUtEBWZ33WrMCG5svqU+iJcqlPI6fVfD0ySPbt5JpljFfGj0ON2W+LFg45U8bec+9M5kk69m7NLGM+dLok2jKfKlKWrbhDCzn8sk5UvygltDHMuZLo3+Jz06enr9ptoyk6ouFnPZ+eaZRK5EbCYlWJXssar608VHXBHCsuwlOuVTIrMDuh3c5l6euZGjb8XLOOJcwx3xpXmCR+VJ3mFgqelbNgIugSoZUeJelkqFtZ9HJl8YFZtJ8eXRQQvNtR/t1FmHn3h6Jwrtss6j50rjAGGM1U+bL8WFqyajjNh7epbUinFifRc2XxgUmQtHgnBurSSxHhaxJiyzLFeHE+nDOJv3qX9UvT5Xn8T7GBfb5yWFN9atftQ/EspRLBeQ9F5fXH1aytscTDXSmRChcdyww7vBTAOkQGGDHfJn3XDw/2p2M95nmVbpv+FNfE8Q0YubL6qzXWHl6mJQ1GDZfKpRtQuH3R5QGJ1ZiEfOlnRUMssHAUtHtl/ZNxKrESqaqs15jp/dxZL7c9H71xGYTa6J7XK+3K9NeY0Vgps2XBKELJbIAwdTzMCsCM22+JAhdzDNf2huPEZkv07API4hVmWe+tCewyHw5HJLAiOwyyYLPMF9aExgDawC0ghGbgeQsPUkOYGy+BGgPRmSbeTWJ1gT22cnTc4BWMCLbzCuZsz0DtAlQup7YXGwLjMJEYqOxKjAJSal6ItPMWxysCowxRgIjMs3EmS/xw7TvWxWYCEUDIIER2UXIh1sDWhWYcoEq8yVBZA1VKCGZPJ/2fdtJjsnSSqsYkUVUbxnGxoUT97EvMDZu2kipeiKLqOfWCZ3zad+3LjAJ2QAoVU9kj9gUn+as9tnWBUbmSyKr+LcTgc0chm5dYC5cGmlEZBK1gkkh0yuwk5O9DiLzJSU6iKwQ60rWVHW107AuMAAfJ19SmEhkhE63DwBgYN8+9Lp0CIzMl0SG6PlDtRh0ueAvH3ptugRGISKRcoSQk9VLQn4TbXFmkgqByXCcqieBEWmn2xuo1etnV7gPhodASgSmNom0ByPSTH8QoPN+vHqB4b/mrV5ASgQWQeZLIrUIIdFq++rL7z/95GBmaj5OmgRGmUQitVy0eurZbDrC+XrRn0uNwMh8SaSVVttXz2VXCPHVIqGhIjUCI/MlkUZabR89fwgAkEJ+OWvQ3ixSM/zKCZ1ayEMSGJEKhJC4vP7wMSfA8IeHKjZmkZoVTFUjCyFpH0ZYZTgKcdHqKXF1wfC7Tz85eLnKe6VGYAAm5stJnwOCMEy3N8BFqxffc71YNGM4jXQJjMyXhCX6gwBvL9/j+uZ2XMQr8YMjnONl91z3Sc0eDAAYWE1C/p5CRMIU6vA49qHeZWB/+Y/q/twqjUVIlcCEEDXG0zFalthchJDw+yN0e4P7z9r/OML50zJp+HmkSmAu3FqIcSZRCDm37zdBLEIQCgxHIYbDEH5/NO0D/H8c4fx1lu1/HVL3BL/+6arGpPzicP8RDSgnlqY/CDAchR9FFX1Y30cy9iOXeMkFf5nkinWfVK1gAMCkPAfwhX87IoERM5mIaBiiPwwQBOLh4x2JH8BQA0PNCZ3vdIoqTuoEJoR4yTn/Y6xjD7HFCCExHIXoD4I7q9IsJGM/MikbErLGGKs5oVPTEfotSupCRAB402w1ABwf7BVRKnq2b4cwxH0RzQrvIm4gUZNMnjPGGjKUjVUqLXSTuhUMGPc5kJDfdHsDEtgGEg/vlJAWCO8aDKwmhKi5cGumQrx1SeUKVq+3KyEPmwDKRwelj4OmiUxxP7wLQjGviKAJoKbCOxGKxroHvbZJpcAA4HXz3V8Z2F+8nINnh49t3w4xh4mIAoH+MFgovFNJh7SGd0mQWoHFV7Enuzsol/K2b4nA3TOleDp8JlF4JyEbEDjPUniXBKkVGAD8o3n1Jwn5DecMzw4fw3XSVTq5yajwLr5H2rbwLglSLTDg48FzIe/i6KBk+3Y2komIlgzvGFhDCFHb1PAuCVIvsHq9XQ15+COAcrmUx5PdHdu3lFkme6R71Q6ziM6UarHwrmHzTCmLpF5gAPDmp9bXkPg7ANDZ2Hzi4Z0S0dzwTqIRnSlReJcgmRAYALxptr4F8EeARBbnfni3aMkQhXdmyIzAAOBNs/USwO+B7RPZiuFdQ0LWKLyzR6YEBtwV2abuyRatCI+Ih3cNEYoahXfpIXMCA+6Gi4W8i4O9YiZT+KtWhKvwbtvOlLJIJgUGTBIf/w2gzDlD5XEhtYfR8fAuixXhxOpkVmAA8Kp+ecoc5yWT8gsA8HIOnuzuWK1d3MSKcGJ1Mi0wRVTx8TcAZWAcNpaKntYkyDZVhBOrsxECA8a1iwEP/sTA/gzgMQBwzlAs5FDcyaHguSv1+Fi3IpzCu+1mYwSmiAntawDH8e95OQdezoHr8Jlh5BLZu62pCCdWZ+MEFudV/fKUc/61ZOxM7dNWYssrwonV2WiBxanX25UAwSk4zhhYBRKnU18YCYlKhgiCIAiCIAiCIAgiW/w/zQ1m2VyA5iUAAAAASUVORK5CYII=","e":1},{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"magnify","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":42,"s":[75]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":90,"s":[8]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":121,"s":[32]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":134,"s":[32]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":164,"s":[53]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":183,"s":[53]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":219,"s":[53]},{"t":272,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[333.752,339.42,0],"to":[-26,-25,0],"ti":[-4.333,25,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":42,"s":[177.752,189.42,0],"to":[4.333,-25,0],"ti":[-25.667,-23.333,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":90,"s":[359.752,189.42,0],"to":[25.667,23.333,0],"ti":[4.667,-23.333,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":121,"s":[331.752,329.42,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":134,"s":[331.752,329.42,0],"to":[-28.333,4.667,0],"ti":[28.333,-4.667,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":164,"s":[161.752,357.42,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":183,"s":[161.752,357.42,0],"to":[0,-24.333,0],"ti":[-28.667,3,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":219,"s":[161.752,211.42,0],"to":[28.667,-3,0],"ti":[-28.667,-21.333,0]},{"t":272,"s":[333.752,339.42,0]}],"ix":2},"a":{"a":0,"k":[87.194,86.29,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"glass 2","parent":1,"refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":20,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[68.687,68.686,0],"ix":2},"a":{"a":0,"k":[42.065,42.066,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":2,"nm":"glass","parent":1,"td":1,"refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[68.687,68.686,0],"ix":2},"a":{"a":0,"k":[42.065,42.066,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"paper","tt":1,"refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[250,250,0],"ix":1},"s":{"a":0,"k":[125,125,100],"ix":6}},"ao":0,"w":500,"h":500,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":0,"nm":"paper","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[250,250,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":500,"h":500,"ip":0,"op":750,"st":0,"bm":0}]},{"id":"comp_1","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"paper_1","refId":"image_2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[263.625,231.897,0],"ix":2},"a":{"a":0,"k":[92.771,120.853,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"paper_2","refId":"image_3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[214.478,258.49,0],"ix":2},"a":{"a":0,"k":[107.933,130,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0}]}]'),layers:[{ddd:0,ind:1,ty:0,nm:"not_found 2",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[250,250,0],ix:2},a:{a:0,k:[250,250,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,w:500,h:500,ip:0,op:273,st:0,bm:0}],markers:[]},dv={key:0,class:"inline-block"},yi=lt(t.defineComponent({name:"DCodeBadge",inheritAttrs:!1,__name:"DCodeBadge",props:{text:{default:""},variant:{default:"default"},size:{default:"sm"},icon:{},dot:{type:Boolean,default:!1},pill:{type:Boolean,default:!1},color:{},skeleton:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},class:{}},setup(e){const o=e,n=t.computed(()=>Ao(o.icon,Pt)),r=t.computed(()=>o.visible??!0),a=t.computed(()=>{const u={xs:"px-1.5 py-0.5 text-[10px] gap-1",sm:"px-2.5 py-0.5 text-xs gap-1.5",md:"px-3 py-1 text-sm gap-2",lg:"px-4 py-1.5 text-base gap-2.5"};return u[o.size]||u.sm}),s=t.computed(()=>{const u={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"};return u[o.size]||u.sm}),i=t.computed(()=>{const u={xs:"w-2.5 h-2.5",sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"};return u[o.size]||u.sm}),l=t.computed(()=>{const u={default:"bg-primary text-primary-foreground border-transparent shadow hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground border-transparent hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground border-transparent shadow hover:bg-destructive/80",success:"bg-success-500 text-white border-transparent shadow-sm hover:bg-success-600",warning:"bg-warning-500 text-white border-transparent shadow-sm hover:bg-warning-600",info:"bg-blue-500 text-white border-transparent shadow-sm hover:bg-blue-600",outline:"bg-transparent border-border text-foreground",tonal:"bg-primary/10 text-primary border-transparent hover:bg-primary/20",ghost:"bg-transparent text-muted-foreground border-transparent hover:bg-accent hover:text-accent-foreground",purple:"bg-purple-600 text-white border-transparent shadow-sm hover:bg-purple-700",pink:"bg-pink-600 text-white border-transparent shadow-sm hover:bg-pink-700",dark:"bg-gray-900 text-white border-transparent shadow-sm hover:bg-gray-950",light:"bg-gray-100 text-gray-900 border-gray-200 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700"};return u[o.variant]||u.default}),c=t.computed(()=>({default:"bg-primary-foreground",secondary:"bg-secondary-foreground",destructive:"bg-destructive-foreground",success:"bg-white",warning:"bg-white",info:"bg-white",outline:"bg-primary",tonal:"bg-primary",ghost:"bg-muted-foreground"})[o.variant]||"bg-current"),d=t.computed(()=>{const u={xs:"h-4 w-10",sm:"h-5 w-14",md:"h-6 w-18",lg:"h-7 w-24"};return Ve(u[o.size]||u.sm,"rounded animate-pulse bg-muted")}),f=t.computed(()=>Ve("inline-flex items-center font-semibold border transition-all duration-300 select-none focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",o.pill?"rounded-full":"rounded-md",a.value,l.value,o.class));return(u,h)=>r.value?(t.openBlock(),t.createElementBlock("div",dv,[e.skeleton?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(d.value)},null,2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(f.value)},[e.dot?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["rounded-full animate-pulse",s.value,c.value])},null,2)):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.value),{key:1,class:t.normalizeClass(["flex-shrink-0",i.value]),"stroke-width":"2.5"},null,8,["class"])):t.createCommentVNode("",!0),t.renderSlot(u.$slots,"default",{},()=>[t.createElementVNode("span",null,t.toDisplayString(e.text),1)],!0)],2))])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-1e8e809d"]]);var ya={exports:{}},fv=ya.exports,Kf;function uv(){return Kf||(Kf=1,(function(e,o){(function(n,r){e.exports=r()})(fv,function(){Array.isArray||(Array.isArray=function(s){return Object.prototype.toString.call(s)==="[object Array]"});function n(s){for(var i=[],l=0,c=s.length;l<c;l++)i.indexOf(s[l])===-1&&i.push(s[l]);return i}var r={},a={"==":function(s,i){return s==i},"===":function(s,i){return s===i},"!=":function(s,i){return s!=i},"!==":function(s,i){return s!==i},">":function(s,i){return s>i},">=":function(s,i){return s>=i},"<":function(s,i,l){return l===void 0?s<i:s<i&&i<l},"<=":function(s,i,l){return l===void 0?s<=i:s<=i&&i<=l},"!!":function(s){return r.truthy(s)},"!":function(s){return!r.truthy(s)},"%":function(s,i){return s%i},log:function(s){return console.log(s),s},in:function(s,i){return!i||typeof i.indexOf>"u"?!1:i.indexOf(s)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(s,i,l){if(l<0){var c=String(s).substr(i);return c.substr(0,c.length+l)}return String(s).substr(i,l)},"+":function(){return Array.prototype.reduce.call(arguments,function(s,i){return parseFloat(s,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(s,i){return parseFloat(s,10)*parseFloat(i,10)})},"-":function(s,i){return i===void 0?-s:s-i},"/":function(s,i){return s/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(s,i){return s.concat(i)},[])},var:function(s,i){var l=i===void 0?null:i,c=this;if(typeof s>"u"||s===""||s===null)return c;for(var d=String(s).split("."),f=0;f<d.length;f++)if(c==null||(c=c[d[f]],c===void 0))return l;return c},missing:function(){for(var s=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,l=0;l<i.length;l++){var c=i[l],d=r.apply({var:c},this);(d===null||d==="")&&s.push(c)}return s},missing_some:function(s,i){var l=r.apply({missing:i},this);return i.length-l.length>=s?[]:l}};return r.is_logic=function(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&Object.keys(s).length===1},r.truthy=function(s){return Array.isArray(s)&&s.length===0?!1:!!s},r.get_operator=function(s){return Object.keys(s)[0]},r.get_values=function(s){return s[r.get_operator(s)]},r.apply=function(s,i){if(Array.isArray(s))return s.map(function(b){return r.apply(b,i)});if(!r.is_logic(s))return s;var l=r.get_operator(s),c=s[l],d,f,u,h,m;if(Array.isArray(c)||(c=[c]),l==="if"||l=="?:"){for(d=0;d<c.length-1;d+=2)if(r.truthy(r.apply(c[d],i)))return r.apply(c[d+1],i);return c.length===d+1?r.apply(c[d],i):null}else if(l==="and"){for(d=0;d<c.length;d+=1)if(f=r.apply(c[d],i),!r.truthy(f))return f;return f}else if(l==="or"){for(d=0;d<c.length;d+=1)if(f=r.apply(c[d],i),r.truthy(f))return f;return f}else{if(l==="filter")return h=r.apply(c[0],i),u=c[1],Array.isArray(h)?h.filter(function(b){return r.truthy(r.apply(u,b))}):[];if(l==="map")return h=r.apply(c[0],i),u=c[1],Array.isArray(h)?h.map(function(b){return r.apply(u,b)}):[];if(l==="reduce")return h=r.apply(c[0],i),u=c[1],m=typeof c[2]<"u"?r.apply(c[2],i):null,Array.isArray(h)?h.reduce(function(b,g){return r.apply(u,{current:g,accumulator:b})},m):m;if(l==="all"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!1;for(d=0;d<h.length;d+=1)if(!r.truthy(r.apply(u,h[d])))return!1;return!0}else if(l==="none"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!0;for(d=0;d<h.length;d+=1)if(r.truthy(r.apply(u,h[d])))return!1;return!0}else if(l==="some"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!1;for(d=0;d<h.length;d+=1)if(r.truthy(r.apply(u,h[d])))return!0;return!1}}if(c=c.map(function(b){return r.apply(b,i)}),a.hasOwnProperty(l)&&typeof a[l]=="function")return a[l].apply(i,c);if(l.indexOf(".")>0){var p=String(l).split("."),y=a;for(d=0;d<p.length;d++){if(!y.hasOwnProperty(p[d]))throw new Error("Unrecognized operation "+l+" (failed at "+p.slice(0,d+1).join(".")+")");y=y[p[d]]}return y.apply(i,c)}throw new Error("Unrecognized operation "+l)},r.uses_data=function(s){var i=[];if(r.is_logic(s)){var l=r.get_operator(s),c=s[l];Array.isArray(c)||(c=[c]),l==="var"?i.push(c[0]):c.forEach(function(d){i.push.apply(i,r.uses_data(d))})}return n(i)},r.add_operation=function(s,i){a[s]=i},r.rm_operation=function(s){delete a[s]},r.rule_like=function(s,i){if(i===s||i==="@")return!0;if(i==="number")return typeof s=="number";if(i==="string")return typeof s=="string";if(i==="array")return Array.isArray(s)&&!r.is_logic(s);if(r.is_logic(i)){if(r.is_logic(s)){var l=r.get_operator(i),c=r.get_operator(s);if(l==="@"||l===c)return r.rule_like(r.get_values(s,!1),r.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(s)){if(i.length!==s.length)return!1;for(var d=0;d<i.length;d+=1)if(!r.rule_like(s[d],i[d]))return!1;return!0}else return!1;return!1},r})})(ya)),ya.exports}var hv=uv();const bt=wl(hv),xa=e=>{var o,n,r;return((o=e.propsForm)==null?void 0:o.key)||((n=e.propsTable)==null?void 0:n.key)||((r=e.propsWizard)==null?void 0:r.key)||e.id},pn=(e,o)=>o?o.split(".").reduce((n,r)=>n==null?void 0:n[r],e):void 0,Xf=(e,o,n)=>{if(!o)return;const r=o.split(".");let a=e;for(let s=0;s<r.length-1;s++){const i=r[s];(a[i]===void 0||a[i]===null||typeof a[i]!="object")&&(a[i]={}),a=a[i]}a[r[r.length-1]]=n},jo=e=>{const o=t.toRaw(e);if(Array.isArray(o))return o.map(n=>jo(n));if(o&&typeof o=="object"){const n={};return Object.keys(o).forEach(r=>n[r]=jo(o[r])),n}return o},ka=e=>{if(!e||typeof e!="object")return[];if("var"in e)return[e.var];let o=[];return Object.values(e).forEach(n=>{Array.isArray(n)?n.forEach(r=>{o=o.concat(ka(r))}):typeof n=="object"&&(o=o.concat(ka(n)))}),o},mv=e=>e?[...e].sort((o,n)=>(o.seq||0)-(n.seq||0)):[],Yf=(e,o={})=>(!e||typeof e!="object"||Object.keys(e).forEach(n=>{const r=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&!r._isLogicValue?Yf(r,o):o[n]=r}),o),xi=(e,o)=>{if(!e||typeof e!="string"||e.startsWith("http")||!o)return e;const n=o.replace(/\/$/,""),r=e.startsWith("/")?e:`/${e}`;return`${n}${r}`};function Jf({formData:e,errors:o,fieldMap:n,rawItemsCache:r,activeSchema:a,locale:s}){const i=(S,N)=>{if(N==null||typeof N=="object"&&N._isLogicValue)return N;const V=n.value.get(S);if(!V)return N;const L=V.field,O=r[L.key];if(!O||!Array.isArray(O))return N;const R=(L.props||{}).itemValue||"id",j=O.find(M=>String(M[R])===String(N)||String(M.id)===String(N)||String(M.code)===String(N));return j!=null&&j.code?{id:N,code:j.code,_isLogicValue:!0}:N},l=S=>{const N=(V,L)=>{if(V==null||typeof V=="object"&&V._isLogicValue)return V;if(typeof V=="boolean")return String(V);if(typeof V=="number"||typeof V=="string")return L?i(L,V):V;if(typeof V=="object"&&!Array.isArray(V)){const O=(V==null?void 0:V.id)??(V==null?void 0:V.code)??(V==null?void 0:V.value)??(V==null?void 0:V.key)??V;return L&&(typeof O=="string"||typeof O=="number")?i(L,O):O}return V};return new Proxy(S,{get(V,L){if(typeof L!="string")return V[L];const O=n.value.get(L);if(O){const P=pn(V,O.path);if(P!=null)return N(P,L)}return N(V[L],L)}})},c=t.computed(()=>{const S={};for(const N of Object.keys(e))S[N]=e[N];return S}),d=t.computed(()=>l(c.value)),f=()=>{const S=N=>N&&typeof N=="object"&&N._isLogicValue;bt.add_operation("length",N=>N==null?0:S(N)?Object.keys(N).length:typeof N=="string"?N.length:typeof N=="number"?String(N).length:Array.isArray(N)?N.length:typeof N=="object"?Object.keys(N).length:0),bt.add_operation("==",(N,V)=>N==null?V==null:V==null?N==null:S(N)&&S(V)?String(N.id)===String(V.id)||String(N.code)===String(V.code):S(N)?String(N.code)===String(V)||String(N.id)===String(V):S(V)?String(V.code)===String(N)||String(V.id)===String(N):typeof N=="boolean"&&typeof V=="string"?String(N)===V:typeof V=="boolean"&&typeof N=="string"?String(V)===N:String(N)===String(V)),bt.add_operation("!=",(N,V)=>{const L=O=>O&&typeof O=="object"&&O._isLogicValue;return N==null&&V==null?!1:N==null||V==null?!0:L(N)&&L(V)?String(N.id)!==String(V.id)&&String(N.code)!==String(V.code):L(N)?String(N.code)!==String(V)&&String(N.id)!==String(V):L(V)?String(V.code)!==String(N)&&String(V.id)!==String(N):String(N)!==String(V)})},u=(S,N,V="LOGIC")=>{if(S==null||typeof S=="object"&&Object.keys(S).length===0)return!0;if(typeof S=="boolean")return S;if(typeof S=="object")try{return f(),bt.apply(S,N)}catch(L){return console.error(`[${V}] JsonLogic error:`,L),!1}return!1},h=(S,N,V)=>S==null?null:Array.isArray(S)?S.find(L=>!L.condition||u(L.condition,N))||null:S,m=(S,N)=>{var P;if(S.isHidden)return!0;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.visibleRule;if(L==null)return!0;const O=h(L,V,`VISIBLE-${S.model}`);return O===null?!0:typeof O=="object"?!!u(O,V,`VISIBLE-${S.model}`):!!O},p=(S,N)=>{var P,R,j;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.requiredRule;if(L==null)return((R=S.props)==null?void 0:R.required)||!1;const O=h(L,V,`REQUIRED-${S.model}`);return O===null?((j=S.props)==null?void 0:j.required)||!1:typeof O=="object"?"required"in O?!!O.required:!!u(O,V):!!O},y=(S,N)=>{var P,R,j;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.disabledRule;if(L==null)return((R=S.props)==null?void 0:R.disabled)||!1;const O=h(L,V,`DISABLED-${S.model}`);return O===null?((j=S.props)==null?void 0:j.disabled)||!1:typeof O=="object"?"disabled"in O?!!O.disabled:!!u(O,V):!!O},b=(S,N)=>{var P,R,j;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.disabledRule;return L===!1?!0:L==null?((R=S.props)==null?void 0:R.readonly)||!1:h(L,V,`READONLY-${S.model}`)===!1?!0:((j=S.props)==null?void 0:j.readonly)||!1},g=S=>{var P;const N=S.propsForm||S.propsTable||S.propsWizard||S.props||{};let V=s.value==="id"?N.titleID||S.titleID||S.labelID:N.titleEN||S.titleEN||S.labelEN,L=s.value==="id"?N.descriptionID||S.descriptionID:N.descriptionEN||S.descriptionEN;const O=h((P=S.logic||N.logic)==null?void 0:P.labelingRule,d.value);return O&&(V=s.value==="id"?O.labelID||O.titleID||O.title:O.labelEN||O.titleEN||O.title,L=s.value==="id"?O.descriptionID:O.descriptionEN),{title:V,description:L}},_=(S,N)=>{var R,j;if(!S)return!0;const V=S.propsForm||S.propsTable||S.propsDataTableWizard||S.propsWizard||S.props||{},L=(R=S.logic||V.logic)==null?void 0:R.visibleRule,O=N?l(N):d.value;if(L!=null){const M=h(L,O);return M===null?!0:typeof M=="object"?!!u(M,O,"VISIBLE-SEC"):!!M}if(S.type==="TABLE"&&((j=V.headers)!=null&&j.length))return!0;const P=V.fields||S.fields||[];return P.length===0||P.some(M=>m(M,N))},E=(S,N)=>{var O;const V=N?l(N):d.value;return h((O=S.logic)==null?void 0:O.labelingRule,V,`LABEL-${S.model}`)||null},B=(S,N)=>{var O;const V=N?l(N):d.value;return h((O=S.logic)==null?void 0:O.lengthRule,V,`LENGTH-${S.model}`)||null},A=(S,N)=>{var M;const V=S.props||{},L=r[S.key]||V.items||V.options||[];if(!((M=S.logic)!=null&&M.optionsFilterRule))return L;const O=N?l(N):d.value,P=h(S.logic.optionsFilterRule,O,`FILTER-${S.model}`);if(!(P!=null&&P.values))return L;const R=new Set((P.values||[]).map(String)),j=V.itemValue||"id";return L.filter(I=>I==null?!1:typeof I!="object"?R.has(String(I)):[j,"code","id","value","key"].some(K=>{const H=I[K];return H!=null&&R.has(String(H))}))},C=S=>{var V;return(((V=S.propsWizard)==null?void 0:V.propsSteps)||[]).filter(L=>_(L)).map((L,O)=>{var j;let P=[];if(Array.isArray(L.sectionsWizard))P=L.sectionsWizard;else if(L.sectionsWizard&&typeof L.sectionsWizard=="object"){const M=L.sectionsWizard;let I=M.type;I||(M.propsDataTableWizard||M.isDataTable||M.propsTable?I="TABLE":M.fields?I="FORM":I="UNKNOWN"),P=[{type:I,...M}]}const R=g(L);return{key:L.key||`step-${O}`,title:R.title,description:R.description,icon:L.icon||void 0,sections:P,actions:((j=L.propsComponent)==null?void 0:j.actionComponent)||L.actionComponent||[]}})},x=()=>{var S;if((S=a.value)!=null&&S.sections)for(let N=0;N<3;N++){let V=!1;if(a.value.sections.forEach(L=>{var O;(((O=L.propsForm)==null?void 0:O.fields)||L.fields||[]).forEach(P=>{var j;const R=(j=P.logic)==null?void 0:j.calculateRule;if(R&&typeof R=="object"){const M=Object.keys(R)[0],I=u(R[M],d.value,`CALC-${M}`);I!==void 0&&e[M]!==I&&(e[M]=I,V=!0)}})}),!V)break}},w=S=>{if(!m(S)||!p(S))return!1;const N=e[S.model];return Array.isArray(N)?N.length===0:N==null||N===""},D=S=>S.sections.flatMap(V=>V.fields||[]).some(w),k=S=>{var V;return(((V=S.propsForm)==null?void 0:V.fields)||S.fields||[]).some(w)?!0:S.type==="WIZARD"?C(S).some(D):!1},v=t.computed(()=>{var S;return(S=a.value)!=null&&S.sections?Object.keys(o).length>0?!0:a.value.sections.some(k):!1});return{normalizedData:d,getNormalizedData:l,evaluateLogic:u,resolveActiveRule:h,resolveValueIdentifier:i,getFilteredItems:A,isFieldVisible:m,isFieldRequired:p,isFieldDisabled:y,isFieldReadonly:b,resolveSectionLabels:g,isSectionVisible:_,resolveFieldLabels:E,resolveFieldLength:B,getWizardTabs:C,applyCalculations:x,isSubmitDisabled:v,resolveSectionGridClass:S=>{switch(S){case"FULL":return"grid-cols-1";case"HALF":return"grid-cols-1 md:grid-cols-2";case"THIRD":return"grid-cols-1 md:grid-cols-3";case"QUARTED":return"grid-cols-1 md:grid-cols-4";case"TWO-THIRD":return"grid-cols-2 md:grid-cols-3";case"THREE-QUARTER":return"grid-cols-3 md:grid-cols-4";default:return"grid-cols-1"}},resolveFieldColumnClass:(S,N="")=>{var L;const V=(L=S.props)==null?void 0:L.colSpan;return V==="FULL"?"col-span-1 md:col-span-full":V==="HALF"?"col-span-1 md:col-span-1":"col-span-1"}}}const pv={class:"dcode-card animate-slide-up"},gv={class:"px-4 py-2 bg-primary-700 dark:bg-primary-900 border-b border-primary-500/30 dark:border-primary-900/50 rounded-t-xl relative z-30"},bv={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between items-start gap-4"},yv={key:0,class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 flex-1 xl:max-w-[15vw] md:max-w-[20vw] max-w-[30vw]"},xv={class:"relative w-full sm:w-64"},kv={key:0,class:"relative"},wv={class:"flex flex-col h-full"},Cv={key:0,class:"flex-1 overflow-y-auto py-4"},_v={class:"grid grid-cols-1 gap-4 px-1"},Ev={key:0,class:"sticky bottom-0 left-0 right-0 bg-transparent border-t border-neutral-200 dark:border-neutral-700 pt-4 flex gap-2"},Bv={class:"flex justify-end gap-2 w-full"},Sv={key:0,class:"font-medium text-sm text-neutral-600 dark:text-neutral-400"},Av={class:"overflow-auto custom-scrollbar relative max-h-[calc(100vh-17rem)]"},vv={class:"dcode-table w-full"},Dv={class:"bg-primary-700 dark:bg-primary-900 sticky top-0 z-20 shadow-sm"},Nv=["onClick"],Vv={key:0,class:"flex items-center justify-center w-full"},Mv={key:0,class:"px-3 py-2 text-xs font-medium text-white dark:text-neutral-100 uppercase tracking-wider"},Tv={class:"bg-white dark:bg-zinc-900 divide-y divide-neutral-200 dark:divide-neutral-700"},Pv={key:0,class:"px-3 py-0.5"},Ov={key:1},Lv=["colspan"],Rv={class:"flex flex-col items-center gap-2"},Iv={class:"text-base font-medium text-neutral-700 dark:text-neutral-300"},Fv={class:"text-sm text-neutral-500 dark:text-neutral-400 mt-1"},zv={class:"hover:bg-zinc-50 dark:hover:bg-zinc-800/50 transition-colors duration-150"},$v={key:0,class:"flex items-center justify-center"},jv={key:0,class:"px-3 py-0.5 !text-center"},Uv={key:0,class:"flex items-center justify-center gap-1.5"},Wv={key:0,class:"bg-zinc-50/50 dark:bg-zinc-800/30"},Hv=["colspan"],qv={key:0,class:"px-4 py-3 bg-zinc-50/50 dark:bg-zinc-800/30 border-t border-neutral-200 dark:border-neutral-700 flex flex-col sm:flex-row items-center justify-between gap-4 w-full"},Gv={class:"flex items-center gap-4"},Kv={class:"text-xs text-neutral-500 dark:text-neutral-400 font-medium"},Xv={class:"text-neutral-900 dark:text-neutral-100 font-medium"},Yv={class:"text-neutral-900 dark:text-neutral-100 font-medium"},Jv={class:"text-neutral-900 dark:text-neutral-100 font-medium"},Qv={class:"flex-shrink-0"},Zv={class:"space-y-4"},eD={class:"text-gray-600 dark:text-gray-400"},tD={class:"grid grid-cols-1 gap-4 py-4 px-1 relative"},oD={key:0,class:"absolute inset-0 z-10 bg-white/50 dark:bg-neutral-900/50 flex items-center justify-center backdrop-blur-[1px]"},nD={class:"flex flex-col items-center gap-2"},rD={class:"text-xs font-medium text-neutral-500"},aD={key:1,class:"mb-2 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-100 dark:border-amber-900/30 rounded-lg flex items-center gap-3"},sD={class:"p-1.5 bg-amber-100 dark:bg-amber-900/40 rounded-md text-amber-600 dark:text-amber-400"},iD={class:"flex flex-col gap-0.5"},lD={class:"text-[10px] font-bold uppercase tracking-wider text-amber-500/70 dark:text-amber-400/50"},cD={class:"text-xs text-amber-700 dark:text-amber-300 leading-relaxed font-medium transition-all"},dD={class:"flex items-end gap-2"},gn=t.defineComponent({name:"DataTable",__name:"DataTable",props:{columns:{default:()=>[]},data:{default:()=>[]},perPage:{default:10},loading:{type:Boolean,default:!1},hasActions:{type:Boolean,default:!1},nested:{type:Boolean,default:!1},apiModule:{},apiAction:{default:"list"},apiMethod:{},apiUrl:{},permissionBase:{},apiParams:{default:()=>({})},configKey:{},tableConfig:{},dynamicColumns:{type:Boolean,default:!1},searchApiEndpoint:{},enableQuickSearch:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},ignorePermissions:{type:Boolean,default:!1},userPermissions:{default:null},permissionChecker:{type:Function,default:void 0},permissions:{default:void 0},checkPermission:{type:Function,default:void 0},menuPermissions:{default:()=>[]},dummyMode:{type:Boolean,default:!1},baseUrl:{default:void 0}},emits:["update:search","update:sort","update:page","create","export","action","update:selection","navigate"],setup(e,{expose:o,emit:n}){var pu,gu,bu,yu,xu,ku;bt.add_operation("length",T=>T==null?0:typeof T=="string"||Array.isArray(T)?T.length:typeof T=="number"?String(T).length:typeof T=="object"?Object.keys(T).length:0),bt.add_operation("==",(T,F)=>T!==null&&typeof T=="object"&&"_isLogicValue"in T?T.id==F||T.code==F:F!==null&&typeof F=="object"&&"_isLogicValue"in F?F.id==T||F.code==T:T==F),bt.add_operation("!=",(T,F)=>T!==null&&typeof T=="object"&&"_isLogicValue"in T?!(T.id==F||T.code==F):F!==null&&typeof F=="object"&&"_isLogicValue"in F?!(F.id==T||F.code==T):T!=F);const r=e,a=n,s=t.getCurrentInstance(),{apiUrl:i}=Qe(),{locale:l}=kt.useI18n();let c={query:{},params:{},path:""};try{const T=wo.useRoute();T?c=T:(bu=(gu=(pu=s==null?void 0:s.appContext)==null?void 0:pu.config)==null?void 0:gu.globalProperties)!=null&&bu.$route&&(c=s.appContext.config.globalProperties.$route)}catch{console.warn("useRoute not available, using fallback")}let d={back:()=>console.warn("Router back() not available"),push:T=>{console.warn("Router push() logic called from fallback:",T),typeof T=="string"&&T.startsWith("/")&&(window.location.href=T)}};try{const T=wo.useRouter();T?d=T:(ku=(xu=(yu=s==null?void 0:s.appContext)==null?void 0:yu.config)==null?void 0:xu.globalProperties)!=null&&ku.$router&&(d=s.appContext.config.globalProperties.$router)}catch{console.warn("useRouter not available, using fallback")}const f=t.ref(""),u=t.ref(1),h=t.ref(r.perPage),m=t.ref({key:"",direction:"asc"}),p=t.ref([]),y=t.ref(!1),b=t.ref(0),g=t.ref({}),_=t.ref([]),E=t.ref(null),B=t.ref(!0),A=t.ref([]),C=t.ref([]),x=t.ref([]),w=t.ref(!1),D=t.ref(!1),k=t.reactive({}),v=t.reactive({}),S=t.reactive({}),N=t.ref(null),V=t.ref(null),L=t.ref(null),O=t.computed(()=>V.value?V.value.fieldActionCustom||V.value.fieldActionGlobal||V.value.field||[]:[]),P=t.computed(()=>{const T=new Map;return O.value.forEach(F=>{F.model&&T.set(F.model,{field:F,path:F.model})}),T}),R=t.computed(()=>({sections:[{fields:O.value}]})),j=t.computed(()=>l.value),{isFieldVisible:M,isFieldRequired:I,isFieldDisabled:K,isFieldReadonly:H,resolveFieldLabels:W,resolveFieldLength:Z,getFilteredItems:te}=Jf({formData:k,errors:v,fieldMap:P,rawItemsCache:S,activeSchema:R,locale:j}),ie=t.ref([]),Ae=t.computed(()=>{if(Ut.value.length===0)return!1;const T=Ut.value.map(F=>{const Y=Fe.value.find(U=>U.type==="CHECKBOX"),z=(Y==null?void 0:Y.keyCheckbox)||"id";return F[z]}).filter(F=>F!=null);return T.length===0?!1:T.every(F=>ie.value.includes(F))}),ke=t.computed(()=>{if(Ut.value.length===0)return!1;const T=Fe.value.find(U=>U.type==="CHECKBOX"),F=(T==null?void 0:T.keyCheckbox)||"id",Y=Ut.value.map(U=>U[F]).filter(U=>U!=null),z=Y.filter(U=>ie.value.includes(U)).length;return z>0&&z<Y.length}),J=T=>{const F=Fe.value.find(U=>U.type==="CHECKBOX"),Y=(F==null?void 0:F.keyCheckbox)||"id",z=T[Y];return z!==void 0&&ie.value.includes(z)},$=T=>{const F=Fe.value.find(U=>U.type==="CHECKBOX"),Y=(F==null?void 0:F.keyCheckbox)||"id",z=Ut.value.map(U=>U[Y]).filter(U=>U!=null);if(T){const U=new Set([...ie.value,...z]);ie.value=Array.from(U)}else ie.value=ie.value.filter(U=>!z.includes(U))},X=(T,F)=>{const Y=Fe.value.find(Q=>Q.type==="CHECKBOX"),z=(Y==null?void 0:Y.keyCheckbox)||"id",U=T[z];U!=null&&(F?ie.value.includes(U)||ie.value.push(U):ie.value=ie.value.filter(Q=>Q!==U))};t.watch(ie,T=>{var Y;a("update:selection",T);const F=Ae.value||T.length>1;(Y=C.value)!=null&&Y.length&&C.value.forEach(z=>{var U;(U=z.fieldActionGlobal)!=null&&U.length&&z.fieldActionGlobal.forEach(Q=>{var Ce,ze;const fe=z.endpoint||((Ce=z.propsActionGlobal)==null?void 0:Ce.endpointPropAction)||z.propsActionGlobal,we=(ze=fe==null?void 0:fe.keyParam)==null?void 0:ze[0];(we&&Q.model===we||!we&&/^(id|ids|idAuditTrail)/i.test(Q.model))&&F&&Q.model&&(k[Q.model]=T)})})},{deep:!0});const re=T=>Array.from({length:T}).map((F,Y)=>{const z={id:Y+1,no:Y+1};return Fe.value.forEach(U=>{U.key!=="no"&&U.key!=="action"&&U.type!=="ACTION"&&U.type!=="action"&&(U.type==="CHECKBOX"?z[U.keyCheckbox||"id"]=Y+1:U.type==="BADGE"||U.type==="badge"||U.condition?z[U.key]=U.condition&&U.condition.length>0?U.condition[0].value:"Active":z[U.key]=`Data ${U.label} ${Y+1}`)}),z}),me=T=>T&&typeof T=="string"&&T.trim()?T:void 0,De=t.computed(()=>{var T,F,Y,z;return me((F=(T=E.value)==null?void 0:T.endpoint)==null?void 0:F.apiModule)||me((z=(Y=E.value)==null?void 0:Y.endpointGlobal)==null?void 0:z.apiModule)||r.apiModule}),Ee=t.computed(()=>{var T,F,Y,z;return me((F=(T=E.value)==null?void 0:T.endpoint)==null?void 0:F.apiAction)||me((z=(Y=E.value)==null?void 0:Y.endpointGlobal)==null?void 0:z.apiAction)||r.apiAction}),We=t.computed(()=>{var T,F,Y,z;return me((F=(T=E.value)==null?void 0:T.endpoint)==null?void 0:F.apiMethod)||me((z=(Y=E.value)==null?void 0:Y.endpointGlobal)==null?void 0:z.apiMethod)||r.apiMethod||"POST"}),Te=t.computed(()=>{var T,F,Y,z;return me((F=(T=E.value)==null?void 0:T.endpoint)==null?void 0:F.apiUrl)||me((z=(Y=E.value)==null?void 0:Y.endpointGlobal)==null?void 0:z.apiUrl)||r.apiUrl}),he=t.computed(()=>r.permissionBase||""),Oe=t.computed(()=>!x.value||x.value.length===0?[]:[...x.value].sort((T,F)=>(T.seq||0)-(F.seq||0))),Pe=T=>{var Q,fe,we;const F=(T==null?void 0:T.column)||((Q=T==null?void 0:T.props)==null?void 0:Q.column)||((fe=T==null?void 0:T.propsFieldGlobal)==null?void 0:fe.column)||((we=T==null?void 0:T.propsFieldCustom)==null?void 0:we.column);if(!F)return"col-span-1";const Y=F.toLowerCase(),U={full:"col-span-1 md:col-span-2",half:"col-span-1",third:"col-span-1","two-thirds":"col-span-1 md:col-span-2",two_thirds:"col-span-1 md:col-span-2"}[Y]||"col-span-1";return console.log(`[DEBUG] getColumnClass for ${T==null?void 0:T.model}: type=${F}, returned=${U}`),U},Be=()=>{let T=null;if(r.tableConfig&&(T=r.tableConfig),T){E.value=T,A.value=[],C.value=[],T.headers&&(_.value=T.headers.map(z=>{var fe,we,_e,Ce,ze,Ne,Re,yt,Wt,Ea;if(z.key==="action"||((fe=z.custom)==null?void 0:fe.type)==="ACTION"||((we=z.custom)==null?void 0:we.type)==="action"){const xt=((_e=z.custom)==null?void 0:_e.actionCustom)||((Ce=z.custom)==null?void 0:Ce.action);if(xt){const iN=xt.map(St=>{const Ye=St.propsActionCustom||St.props||{},Ba=St.propCustomMessage||{};return{permission:St.permission,label:l.value==="id"?Ye.labelID:Ye.labelEN,tooltip:l.value==="id"?Ye.tooltipID||Ye.labelID:Ye.tooltipEN||Ye.labelEN,icon:Ye.icon,variant:Ye.variant||"ghost",bgColor:Ye.bgColor,action:Ye.actionType||Ye.key,route:Ye.route,path:Ye.path,endpoint:Ye.endpointPropAction,requiredCondition:St.requiredCondition||!1,propCustomCondition:St.propCustomCondition||[],fieldMapping:St.fieldMapping||Ye.fieldMapping||null,openDialog:St.openDialog||!1,fieldActionCustom:(St.fieldActionCustom||[]).map(Sa=>{const vi=Sa.propsFieldCustom||Sa.propsFieldGlobal||Sa.props||{};return{...Sa,props:{...vi,endpoint:vi.endpointComponent||vi.endpoint}}}),condition:St.visibleRule||St.propCustomCondition||Ye.visibleRule||Ye.propCustomCondition||null,requireConfirm:St.requireConfirm||Ye.requireConfirm||!1,confirmTitle:l.value==="id"?Ba.titleID||Ye.confirmTitleID||"Konfirmasi":Ba.titleEN||Ye.confirmTitleEN||"Confirm",confirmMessage:l.value==="id"?Ba.messageID||Ye.confirmMessageID||"Apakah Anda yakin?":Ba.messageEN||Ye.confirmMessageEN||"Are you sure?"}});A.value.push(...iN)}return null}let U;const Q=((ze=z.custom)==null?void 0:ze.conditionBadge)||((Ne=z.custom)==null?void 0:Ne.condition);return(((Re=z.custom)==null?void 0:Re.type)==="BADGE"||((yt=z.custom)==null?void 0:yt.type)==="badge")&&Q&&(U=Q.map(xt=>({value:xt.value,label:l.value==="id"?xt.labelID:xt.labelEN,labelID:xt.labelID,labelEN:xt.labelEN,color:xt.color||xt.bgColor,variant:xt.variant,logic:xt.logic||xt.conditionRule||null}))),{key:z.key,label:l.value==="id"?z.labelID:z.labelEN,width:z.width,align:z.align,sortable:!0,type:(Wt=z.custom)==null?void 0:Wt.type,condition:U,keyCheckbox:(Ea=z.custom)==null?void 0:Ea.keyCheckbox}}).filter(z=>z!==null));const F=T.filters||T.filter;F&&Array.isArray(F)&&(x.value=F.map(z=>({...z,props:z.propsFilters||z.props||{}})),x.value.forEach(z=>{g.value[z.model]=""}));const Y=T.actionTableGlobal||T.actionGlobal||T.action;console.log("[DEBUG] loadConfig rawActions:",Y),Y&&Array.isArray(Y)?(C.value=Y.map(z=>{const U=z.propsActionGlobal||z.props||{},Q=z.propCustomMessage||{};return{key:U.key,permission:z.permission,label:l.value==="id"?U.labelID||"Action":U.labelEN||"Action",tooltip:l.value==="id"?U.tooltipID||U.labelID:U.tooltipEN||U.labelEN,icon:U.icon,variant:U.variant||"default",bgColor:U.bgColor,textColor:U.textColor,route:U.route,path:U.path,endpoint:U.endpointPropAction||z.endpoint,fieldMapping:z.fieldMapping||U.fieldMapping||null,visibleRule:z.visibleRule||U.visibleRule||z.propCustomCondition||U.propCustomCondition||null,openDialog:z.openDialog||!1,requireConfirm:z.requireConfirm||U.requireConfirm||!1,confirmTitle:l.value==="id"?Q.titleID||U.confirmTitleID||"Konfirmasi":Q.titleEN||U.confirmTitleEN||"Confirm",confirmMessage:l.value==="id"?Q.messageID||U.confirmMessageID||"Apakah Anda yakin?":Q.messageEN||U.confirmMessageEN||"Are you sure?",fieldActionGlobal:(z.fieldActionGlobal||z.fieldActionCustom||z.field||[]).map(fe=>{const we=fe.propsFieldGlobal||fe.props||{};return{...fe,props:{...we,endpoint:we.endpointComponent||we.endpoint}}})}}),console.log("[DEBUG] loadConfig headerActions set:",C.value)):console.log("[DEBUG] loadConfig no rawActions found"),T.pagination!==void 0&&(B.value=T.pagination)}};t.watch(()=>r.tableConfig,()=>{Be()},{deep:!0,immediate:!0});const Fe=t.computed(()=>r.dynamicColumns||r.configKey||r.tableConfig?_.value:r.columns||[]),q=t.computed(()=>r.hasActions||A.value.length>0),se=t.computed(()=>r.dummyMode?!1:De.value||Te.value?y.value:r.loading),de=t.computed(()=>!!De.value||!!Te.value),oe=t.computed(()=>[]),le=T=>{if(console.log("[DEBUG] hasAction called:",{actionCode:T,permissionChecker:!!r.permissionChecker,effectivePath:he.value}),r.menuPermissions&&r.menuPermissions.length>0){const F=c.path,Y=r.menuPermissions.find(z=>F.startsWith(z.path));if(Y&&Y.actions){const z=Y.actions.find(U=>U.code===T.toUpperCase());return z?z.checked:!1}return!1}if(r.permissionChecker){const F=r.permissionChecker(he.value,T);return console.log("[DEBUG] permissionChecker result:",F),F}return oe.value.some(F=>F.code===T)},G=(T,F)=>{if(T.condition)try{return bt.apply(T.condition,F)}catch(fe){return console.warn("Row action jsonLogic error:",fe),!1}if(!T.visibilityCondition)return!0;const{field:Y,operator:z,value:U}=T.visibilityCondition,Q=nt(F,Y);switch(z){case"equals":return Q===U;case"notEquals":return Q!==U;case"in":return Array.isArray(U)&&U.includes(Q);case"notIn":return Array.isArray(U)&&!U.includes(Q);case"greaterThan":return Q>U;case"lessThan":return Q<U;case"contains":return String(Q).includes(String(U));default:return!0}},ee=t.computed(()=>{if(console.log("[DEBUG] visibleHeaderActions:",{headerActions:C.value,ignorePermissions:r.ignorePermissions}),C.value.length===0)return C.value;const T=C.value.filter(F=>{if(F.visibleRule)try{const z=Ut.value[0]||{};if(!bt.apply(F.visibleRule,z))return!1}catch(z){console.warn("Header action visibility logic error:",z)}if(r.ignorePermissions||r.dummyMode)return!0;if(!F.permission)return console.log("[DEBUG] Action no permission, showing:",F.label),!0;if(r.checkPermission){const z=r.checkPermission(F.permission);return console.log("[DEBUG] Parent checkPermission result:",z),z}if(r.permissions){const z=r.permissions.includes(F.permission);return console.log("[DEBUG] Parent permissions check result:",z),z}const Y=le(F.permission);return console.log("[DEBUG] Internal permission check:",{label:F.label,permission:F.permission,hasPerm:Y}),Y});return console.log("[DEBUG] Filtered header actions:",T.length),T}),ae=t.computed(()=>A.value.length===0?A.value:A.value.filter(T=>r.ignorePermissions||r.dummyMode||!T.permission?!0:r.checkPermission?r.checkPermission(T.permission):r.permissions?r.permissions.includes(T.permission):le(T.permission))),ye=T=>ae.value.filter(F=>G(F,T)),Ge=(T,F)=>{var U,Q;if(T.requiredCondition&&((U=T.propCustomCondition)==null?void 0:U.length)>0){const fe=nt(F,"status"),we=T.propCustomCondition.find(_e=>_e.value===fe);if(we)return we.bgColor||T.bgColor||"primary"}if(!T.dynamicColor||!T.colorCondition)return T.bgColor||"primary";const Y=nt(F,T.colorCondition.field),z=(Q=T.colorCondition.conditions)==null?void 0:Q.find(fe=>fe.value===Y);return(z==null?void 0:z.bgColor)||T.bgColor||"primary"},Tt=T=>{const F=(T||"left").toLowerCase();return F==="center"?"justify-center":F==="right"?"justify-end":"justify-start"},nu={ToggleLeft:ne.ToggleLeft,SquarePen:ne.SquarePen,Trash2:ne.Trash2,Eye:ne.Eye,CheckCircle:ne.CheckCircle,Plus:ne.Plus,Download:ne.Download,RefreshCw:ne.RefreshCw,Search:ne.Search,SlidersHorizontal:ne.SlidersHorizontal},ru=T=>T&&(Ao(T,Pt)||nu[T])||null,Ut=t.computed(()=>r.dummyMode?Fe.value.length>0?re(5):[]:de.value?p.value.map((T,F)=>({...T,no:(u.value-1)*h.value+F+1})):lu.value),bn=t.computed(()=>r.dummyMode?5:de.value?b.value:Ca.value.length),au=t.computed(()=>bn.value===0?0:(u.value-1)*h.value+1),su=t.computed(()=>{const T=u.value*h.value;return T>bn.value?bn.value:T}),nt=(T,F)=>{if(!(!T||!F))return F in T?T[F]:F.split(".").reduce((Y,z)=>Y&&Y[z],T)},Ca=t.computed(()=>{if(de.value)return[];if(!f.value)return r.data;const T=f.value.toLowerCase();return r.data.filter(F=>Fe.value.some(Y=>{const z=nt(F,Y.key);return z==null?!1:String(z).toLowerCase().includes(T)}))}),iu=t.computed(()=>de.value?[]:m.value.key?[...Ca.value].sort((F,Y)=>{const z=nt(F,m.value.key),U=nt(Y,m.value.key);if(z===U)return 0;let Q=0;return typeof z=="number"&&typeof U=="number"?Q=z-U:Q=String(z).localeCompare(String(U)),m.value.direction==="asc"?Q:-Q}):Ca.value),lu=t.computed(()=>{if(de.value)return[];const T=(u.value-1)*h.value,F=T+h.value;return iu.value.slice(T,F).map((Y,z)=>({...Y,no:T+z+1}))}),_i=t.computed(()=>de.value?Object.values(g.value).some(T=>!!T):!!f.value),cu=[10,25,50,100],Ei=()=>{de.value&&(g.value={...g.value,keyword:f.value},u.value=1,dt())};let Zn;const GD=()=>{r.enableQuickSearch&&(clearTimeout(Zn),Zn=setTimeout(()=>{Ei()},500))};let Bi;const KD=()=>{clearTimeout(Bi),Bi=setTimeout(()=>{de.value&&dt()},1e3)};t.watch(f,()=>{r.enableQuickSearch&&de.value&&GD()});const dt=async()=>{if(!r.dummyMode&&de.value&&!(!De.value&&!Te.value))try{y.value=!0;const T={page:u.value,perPage:h.value,...g.value,...r.apiParams};f.value&&(T.keyword=f.value),Object.keys(T).forEach(Y=>{(T[Y]===""||T[Y]===null||T[Y]===void 0)&&delete T[Y]});let F;if(De.value)F=await i(De.value,Ee.value,T);else if(Te.value){let Y=Te.value;if(r.baseUrl&&typeof Y=="string"&&!Y.startsWith("http")){const z=r.baseUrl.replace(/\/$/,""),U=Y.startsWith("/")?Y:`/${Y}`;Y=`${z}${U}`}F=await i(Y,We.value,T)}XD(F)}catch(T){console.error("DataTable fetch error",T),y.value=!1}},XD=T=>{console.log("DataTable handleResponseData:",T),T&&(r.dynamicColumns&&T.columns&&Array.isArray(T.columns)&&(_.value=T.columns.map(F=>({key:F.key||F.field||F.name,label:F.label||F.header||F.name,width:F.width,align:F.align||"LEFT",sortable:F.sortable!==!1,type:F.type,condition:F.condition,format:F.format}))),T.data&&Array.isArray(T.data)?(p.value=T.data,T.totalData?b.value=T.totalData:T.maxPage?b.value=T.maxPage*h.value:b.value=T.data.length*(T.maxPage||1)):Array.isArray(T)?(p.value=T,b.value=T.length):T.users?(p.value=T.users,b.value=T.users.length):T.items&&Array.isArray(T.items)?(p.value=T.items,b.value=T.total||T.totalItems||T.items.length):T.list&&Array.isArray(T.list)?(p.value=T.list,b.value=T.total||T.list.length):T.rows&&Array.isArray(T.rows)?(p.value=T.rows,b.value=T.count||T.total||T.rows.length):T.result&&Array.isArray(T.result)?(p.value=T.result,b.value=T.total||T.count||T.result.length):(console.warn("DataTable: Unknown response format",T),p.value=[],b.value=0)),y.value=!1};t.onUnmounted(()=>{clearTimeout(Zn),clearTimeout(Bi)});const Si=()=>{Object.keys(g.value).forEach(T=>{g.value[T]=""}),f.value="",u.value=1,dt()},YD=()=>{u.value=1,dt()},Ai=(T,F)=>{const Y=nt(T,F.key);let z={variant:"secondary",class:"",label:Y};if(F.condition){const U=F.condition.find(Q=>{if(Q.logic||typeof Q.value=="object"&&Q.value!==null)try{const we=Q.logic||Q.value;return bt.apply(we,T)}catch(we){return console.warn("Badge logic error:",we),!1}const fe=(we,_e)=>we==null||_e===void 0||_e===null?!1:typeof we=="string"&&typeof _e=="string"?we.toLowerCase().trim()===_e.toLowerCase().trim():we==_e;if(fe(Q.value,Y)||typeof Y=="object"&&Y!==null&&(fe(Q.value,Y.code)||fe(Q.value,Y.id)))return!0;if(F.key.includes(".")){const _e=F.key.split(".").slice(0,-1).join("."),Ce=nt(T,_e);if(Ce&&typeof Ce=="object"&&(fe(Q.value,Ce.code)||fe(Q.value,Ce.id)))return!0}return!1});if(U){U.variant&&(z.variant=U.variant);const fe=(l.value||"en")==="id"?U.labelID:U.labelEN;if(z.label=fe||U.label||(typeof Y=="object"?Y.name||Y.code:Y),U.color||U.bgColor){const we=(U.color||U.bgColor||"").toLowerCase(),_e=z.variant==="outline",Ce={success:"bg-green-500 hover:bg-green-600 border-transparent text-white shadow",warning:"bg-yellow-500 hover:bg-yellow-600 border-transparent text-white shadow",info:"bg-blue-500 hover:bg-blue-600 border-transparent text-white shadow",primary:"bg-primary-600 hover:bg-primary-700 border-transparent text-white shadow",secondary:"bg-neutral-500 hover:bg-neutral-600 border-transparent text-white shadow",danger:"bg-red-500 hover:bg-red-600 border-transparent text-white shadow",destructive:"bg-red-500 hover:bg-red-600 border-transparent text-white shadow"},ze={success:"text-green-600 border-green-600 hover:bg-green-50",warning:"text-yellow-600 border-yellow-600 hover:bg-yellow-50",info:"text-blue-600 border-blue-600 hover:bg-blue-50",danger:"text-red-600 border-red-600 hover:bg-red-50",destructive:"text-red-600 border-red-600 hover:bg-red-50",primary:"text-primary-600 border-primary-600 hover:bg-primary-50",secondary:"text-neutral-600 border-neutral-600 hover:bg-zinc-50"},Ne={danger:"destructive",destructive:"destructive",secondary:"secondary",primary:"default",success:"success",warning:"warning",info:"info"};_e?ze[we]&&(z.class=ze[we]):Ne[we]?z.variant=Ne[we]:Ce[we]&&(z.class=Ce[we])}}else z.label=typeof Y=="object"?(Y==null?void 0:Y.name)||(Y==null?void 0:Y.code)||"-":Y}else z.label=typeof Y=="object"?(Y==null?void 0:Y.name)||(Y==null?void 0:Y.code)||"-":Y;return z},JD=T=>{m.value.key===T?m.value.direction=m.value.direction==="asc"?"desc":"asc":(m.value.key=T,m.value.direction="asc"),a("update:sort",m.value)},du=T=>{T!==u.value&&(u.value=T,de.value&&dt(),a("update:page",T))},QD=T=>{h.value=T,u.value=1,de.value&&dt()},ZD=T=>{const F=Math.random()*15+75;if(T.width){const Y=parseInt(String(T.width));return Y<100?`${Math.floor(Y*(Math.random()*.2+.7))}px`:`${F}%`}return`${F}%`},fu=()=>{f.value="",g.value={},u.value=1,dt()},uu=T=>{var F;if(console.log("[DEBUG] handleHeaderAction called:",T),T.requireConfirm){N.value={button:T,row:null},w.value=!0;return}if(T.route&&!r.dummyMode){if(T.path){const Y=T.route.startsWith("/")?T.route:"/"+T.route;sessionStorage.setItem(`layout_${Y}`,T.path)}d==null||d.push(T.route)}else if(T.openDialog||r.dummyMode&&T.route){V.value=T,L.value=null,Object.keys(k).forEach(z=>delete k[z]);const Y=T.fieldActionGlobal||T.fieldActionCustom||T.field||[];Y.length&&Y.forEach(z=>{var fe;const U=T.endpoint||((fe=T.propsActionGlobal)==null?void 0:fe.endpointPropAction)||T.propsActionGlobal,Q=U!=null&&U.keyParam&&U.keyParam.length>0?U.keyParam[0]:null;Q&&z.model===Q||!Q&&/^(id|ids|idAuditTrail)/i.test(z.model)?k[z.model]=ie.value:k[z.model]||(k[z.model]="")}),D.value=!0}else a("action",{action:((F=T.propsActionCustom)==null?void 0:F.key)||T.key||"create",row:null,selection:ie.value})},hu=async(T,F)=>{var Y,z,U,Q;if(T.requireConfirm){N.value={button:T,row:F},w.value=!0;return}if(T.openDialog){V.value=T,L.value=F,Object.keys(k).forEach(Ce=>delete k[Ce]),D.value=!0;const fe=Fe.value.find(Ce=>Ce.type==="CHECKBOX"),we=(fe==null?void 0:fe.keyCheckbox)||"id";T.fieldActionCustom&&T.fieldActionCustom.forEach(Ce=>{/^(id|ids|idAuditTrail)/i.test(Ce.model)?k[Ce.model]=[F[we]]:T.action==="showToken"&&Ce.model==="token"?k[Ce.model]=F.token!==void 0?F.token:"":F[Ce.model]!==void 0?k[Ce.model]=F[Ce.model]:k[Ce.model]=""});const _e=T.endpoint||((Y=T.propsActionGlobal)==null?void 0:Y.endpointPropAction)||((z=T.propsActionCustom)==null?void 0:z.endpointPropAction)||((U=T.props)==null?void 0:U.endpointPropAction);if(((Q=_e==null?void 0:_e.apiMethod)==null?void 0:Q.toUpperCase())==="GET"&&_e.apiUrl){y.value=!0;const{apiUrl:Ce}=Qe(),ze={};_e.keyParam&&Array.isArray(_e.keyParam)&&_e.keyParam.forEach((Ne,Re)=>{const yt=_e.model&&Re===0?_e.model:Ne;F[Ne]!==void 0&&(ze[yt]=F[Ne])}),Object.keys(ze).length===0&&F.id&&(ze.id=F.id),Ce(_e.apiUrl,"GET",ze).then(Ne=>{let Re=Ne;if(Ne&&Ne.data!==void 0?Re=Ne.data:Ne&&Ne.result!==void 0&&(Re=Ne.result),Re!=null){if(typeof Re=="string")Object.prototype.hasOwnProperty.call(k,"token")&&(k.token=Re);else if(typeof Re=="object"&&(Re.item&&(Re=Re.item),Array.isArray(Re)&&(Re=Re[0]||{}),Object.keys(Re).forEach(yt=>{k[yt]=Re[yt]}),!k.token)){const yt=Object.keys(Re).find(Wt=>Wt.toLowerCase().includes("token"));if(yt)k.token=Re[yt];else{const Wt=Object.values(Re).filter(Ea=>typeof Ea=="string");Wt.length===1&&(k.token=Wt[0])}}}}).catch(Ne=>{console.error("Fetch Data Failed",Ne)}).finally(()=>{y.value=!1});return}return}eN(T,F)},eN=(T,F)=>{if(T.route){if(T.path){const U=T.route.startsWith("/")?T.route:"/"+T.route;sessionStorage.setItem(`layout_${U}`,T.path)}let Y=T.route;Y.includes(":")?Y=Y.replaceAll(/:([a-zA-Z0-9_]+)/g,(U,Q)=>(F?F[Q]||F.id:null)||Q):F&&F.id&&(Y=`${Y.replace(/\/$/,"")}/${F.id}`);const z={};T.path&&(z.code=T.path),d==null||d.push({path:Y,query:z})}else if(T.endpoint&&T.endpoint.apiUrl){y.value=!0;const{apiUrl:Y}=Qe(),z=T.endpoint.apiUrl,U=T.endpoint.apiMethod||"POST",Q={},fe=T.fieldMapping;if(fe&&typeof fe=="object"){const{locale:we}=kt.useI18n(),_e=we.value||"en",Ce=[];if(Object.entries(fe).forEach(([ze,Ne])=>{if(typeof Ne=="string"){const Re=nt(F,ze);Re!==void 0?Q[Ne]=Re:(console.warn(`[MAPPING-DEBUG] No matching source found for '${ze}'`),Ce.push(ze))}}),Ce.length>0){const ze=_e==="id"?"Masalah Sinkronisasi Data":"Data Synchronization Issue",Ne=_e==="id"?`Terdapat ketidaksesuaian skema pada field: ${Ce.join(", ")}. Harap hubungi tim pengembang.`:`Schema mismatch detected in fields: ${Ce.join(", ")}. Please contact the development team.`;Ie.warning(`${ze}: ${Ne}`,{autoClose:5e3,position:"top-right"})}}if(Object.keys(Q).length===0){const we=T.endpoint;F&&we.model&&we.keyParam&&Array.isArray(we.keyParam)?we.keyParam.forEach(_e=>{const Ce=nt(F,_e);Ce!==void 0&&(Q[we.model]=Ce)}):F&&F.id&&(Q.id=F.id)}Y(z,U,Q).then(()=>{dt(),a("action",{action:T.action||"success",row:F})}).catch(we=>{console.error("Action Failed",we)}).finally(()=>{y.value=!1})}else a("action",{action:T.action,row:F})},tN=()=>{if(N.value){const{button:T,row:F}=N.value;mu(),F===null?uu({...T,requireConfirm:!1}):hu({...T,requireConfirm:!1},F)}},oN=()=>{var T,F,Y;if(V.value){const z=V.value,U=z.endpoint||((T=z.propsActionGlobal)==null?void 0:T.endpointPropAction)||z.propsActionGlobal;let Q=(U==null?void 0:U.model)||(U!=null&&U.keyParam&&U.keyParam.length>0?U.keyParam[0]:null);if(!Q){const Ce=(z.fieldActionGlobal||z.fieldActionCustom||z.field||[]).find(ze=>/^(id|ids|idAuditTrail)/i.test(ze.model));Q=Ce?Ce.model:"ids"}let fe=null,we=!1;if(L.value){const _e=Fe.value.find(Ne=>Ne.type==="CHECKBOX"),Ce=(_e==null?void 0:_e.keyCheckbox)||"id",ze=L.value[Ce];if(U!=null&&U.apiUrl){fe={...k};const Ne=z.fieldMapping;Ne&&typeof Ne=="object"&&Object.entries(Ne).forEach(([Re,yt])=>{if(typeof yt=="string"){const Wt=nt(L.value,Re);Wt!==void 0&&(fe[yt]=Wt)}}),fe[Q]||(fe[Q]=U!=null&&U.model?ze:[ze]),we=!0}}else U!=null&&U.apiUrl&&(fe={...k},fe[Q]||(fe[Q]=ie.value||[]),we=!0);if(we&&fe&&(U!=null&&U.apiUrl)){if(((F=U==null?void 0:U.apiMethod)==null?void 0:F.toUpperCase())==="GET"){D.value=!1,L.value||(ie.value=[]);return}const{apiUrl:_e}=Qe(),Ce=U.apiUrl,ze=U.apiMethod||"POST";_e(Ce,ze,fe).then(()=>{D.value=!1,L.value||(ie.value=[]),dt(),a("action",{action:"success",row:null})}).catch(Ne=>{console.error("Action Failed",Ne)})}else if(L.value){const _e=Fe.value.find(Re=>Re.type==="CHECKBOX"),Ce=(_e==null?void 0:_e.keyCheckbox)||"id",ze=L.value[Ce],Ne={...k};Ne[Q]||(Ne[Q]=[ze]),a("action",{action:V.value.action,row:Ne}),D.value=!1}else{const _e={...k};_e[Q]||(_e[Q]=ie.value);const Ce={action:((Y=V.value.propsActionGlobal)==null?void 0:Y.key)||V.value.key,row:_e,selection:ie.value};a("action",Ce),D.value=!1}}},nN=T=>{const F=k[T];F&&ep(String(F)).then(()=>{Ie.success("Berhasil disalin!",{autoClose:2e3,theme:"dark",pauseOnHover:!1})}).catch(Y=>{console.error("Failed to copy",Y)})},mu=()=>{w.value=!1,N.value=null},rN=t.computed(()=>N.value?N.value.button.confirmTitle||"Confirm":""),aN=t.computed(()=>N.value?N.value.button.confirmMessage||"Confirm":"");o({fetchData:dt,filters:g,resetFilters:Si,handleRefresh:fu});const _a=t.ref(""),sN=T=>{if(!T)return"";const F=T.endpoint||T.endpointGlobal||{};return JSON.stringify({url:F.apiUrl||T.apiUrl,module:F.apiModule||T.apiModule,action:F.apiAction||T.apiAction,method:F.apiMethod||T.apiMethod,params:T.apiParams,socket:F.socket||T.socketEndpoint,socketParams:T.socketParams})};return t.watch(()=>r.tableConfig,()=>{if(r.tableConfig){Be();const T=sN(r.tableConfig);T!==_a.value&&(!_a.value&&de.value?(_a.value=T,dt()):(_a.value=T,de.value&&KD()))}},{deep:!0,immediate:!0}),t.watch(()=>r.apiModule,()=>{de.value&&dt()}),t.watch(()=>r.apiParams,()=>{de.value&&dt()},{deep:!0}),t.watch(()=>C.value,T=>{console.log("[DEBUG] headerActions changed:",T.length,"items");const F=ee.value;console.log("[DEBUG] visibleHeaderActions evaluated:",F.length,"items")},{deep:!0}),t.onMounted(()=>{Be(),de.value&&(r.tableConfig||(y.value=!0,dt()))}),(T,F)=>{var Y;return t.openBlock(),t.createElementBlock("div",pv,[t.createElementVNode("div",gv,[t.createElementVNode("div",bv,[e.nested?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",yv,[t.createElementVNode("div",xv,[t.createVNode(t.unref(ne.Search),{class:"absolute left-2.5 top-2.5 h-4 w-4 text-neutral-500 dark:text-neutral-400"}),t.createVNode(t.unref(JA),{modelValue:f.value,"onUpdate:modelValue":F[0]||(F[0]=z=>f.value=z),placeholder:"Search...",style:{"padding-left":"2.25rem !important"},class:"h-9 bg-white/95 dark:bg-zinc-800/95 border-white/30 dark:border-neutral-700/50 text-neutral-900 dark:text-neutral-100 placeholder:text-neutral-500 dark:placeholder:text-neutral-400",onKeyup:t.withKeys(Ei,["enter"])},null,8,["modelValue"])]),x.value.length>0?(t.openBlock(),t.createElementBlock("div",kv,[t.createVNode(SA,null,{trigger:t.withCtx(()=>[t.createVNode(He,{variant:"secondary",icon:"SlidersHorizontal",tooltip:"Advance Search",class:"gap-2 h-9 w-full sm:w-auto justify-center bg-white/95 dark:bg-zinc-800/95 text-neutral-700 dark:text-neutral-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 border border-white/30 dark:border-neutral-700/50 shadow-sm backdrop-blur-sm text-xs font-medium"})]),footer:t.withCtx(()=>[t.createElementVNode("div",Bv,[t.renderSlot(T.$slots,"filter-footer",{fetch:dt,reset:Si})])]),default:t.withCtx(()=>[F[9]||(F[9]=t.createElementVNode("hr",{class:"border-neutral-200 dark:border-neutral-700"},null,-1)),t.createElementVNode("div",wv,[t.renderSlot(T.$slots,"filter-form",{filters:g.value},()=>[x.value.length>0?(t.openBlock(),t.createElementBlock("div",Cv,[t.createElementVNode("div",_v,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Oe.value,(z,U)=>(t.openBlock(),t.createElementBlock("div",{key:U,class:t.normalizeClass(Pe(z))},[t.createVNode(DA,{field:z,modelValue:g.value[z.model],"onUpdate:modelValue":Q=>g.value[z.model]=Q},null,8,["field","modelValue","onUpdate:modelValue"])],2))),128))])])):t.createCommentVNode("",!0)]),x.value.length>0?(t.openBlock(),t.createElementBlock("div",Ev,[t.createVNode(He,{variant:"outline",text:"Reset",tooltip:"Reset",rounded:"md",icon:"RefreshCw",onClick:Si,disabled:se.value},null,8,["disabled"]),t.createVNode(He,{onClick:YD,disabled:se.value,rounded:"md",text:"Search",tooltip:"Search",icon:"Search"},null,8,["disabled"])])):t.createCommentVNode("",!0)])]),_:3})])):t.createCommentVNode("",!0)])),t.createElementVNode("div",{class:t.normalizeClass(["flex items-center gap-2 flex-wrap",{"w-full justify-between":e.nested}])},[e.nested?(t.openBlock(),t.createElementBlock("span",Sv)):t.createCommentVNode("",!0),e.nested?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(He,{key:1,variant:"secondary",icon:"RefreshCw",text:"Refresh",tooltip:"Refresh",class:"gap-2 h-9 bg-white/95 dark:bg-zinc-800/95 text-neutral-700 dark:text-neutral-300 hover:bg-white dark:hover:bg-zinc-800 border border-white/30 dark:border-neutral-700/50 shadow-sm backdrop-blur-sm text-xs font-medium",onClick:fu,disabled:se.value},{icon:t.withCtx(()=>[t.createVNode(t.unref(ne.RefreshCw),{class:t.normalizeClass(["w-3.5 h-3.5",{"animate-spin":se.value}])},null,8,["class"])]),_:1},8,["disabled"])),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ee.value,(z,U)=>(t.openBlock(),t.createBlock(He,{key:U,icon:z.icon,text:z.label,tooltip:z.tooltip,variant:z.variant,"bg-color":z.bgColor,"text-color":z.textColor,class:"gap-2 h-9 shadow-lg shadow-primary-500/20 border-none text-xs font-medium",onClick:Q=>uu(z)},null,8,["icon","text","tooltip","variant","bg-color","text-color","onClick"]))),128)),t.renderSlot(T.$slots,"header-actions")],2)])]),t.createElementVNode("div",Av,[t.createElementVNode("table",vv,[t.createElementVNode("thead",Dv,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Fe.value,z=>(t.openBlock(),t.createElementBlock("th",{key:z.key,class:t.normalizeClass([z.align?`text-${z.align.toLowerCase()}`:"text-left",z.sortable?"cursor-pointer select-none":"","px-3 py-2 text-xs font-black text-white dark:text-neutral-100 uppercase tracking-wider transition-colors duration-150"]),style:t.normalizeStyle(z.width?{width:z.width}:{}),onClick:U=>z.sortable&&JD(z.key)},[z.type==="CHECKBOX"?(t.openBlock(),t.createElementBlock("div",Vv,[t.createVNode(ao,{"model-value":Ae.value,indeterminate:ke.value,"onUpdate:modelValue":F[1]||(F[1]=U=>$(!!U)),onClick:F[2]||(F[2]=t.withModifiers(()=>{},["stop"]))},null,8,["model-value","indeterminate"])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["flex items-center gap-2 w-full",Tt(z.align)])},[t.createElementVNode("span",null,t.toDisplayString(z.label),1)],2))],14,Nv))),128)),q.value?(t.openBlock(),t.createElementBlock("th",Mv,[...F[10]||(F[10]=[t.createElementVNode("div",{class:"flex items-center justify-center w-full"}," Actions ",-1)])])):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",Tv,[se.value?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(h.value,z=>(t.openBlock(),t.createElementBlock("tr",{key:`skeleton-${z}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Fe.value,U=>{var Q,fe;return t.openBlock(),t.createElementBlock("td",{key:U.key,class:t.normalizeClass([U.align?`text-${U.align.toLowerCase()}`:"text-left","px-3 py-0.5"])},[t.createElementVNode("div",{class:t.normalizeClass(["bg-gradient-to-r from-neutral-200 via-neutral-300 to-neutral-200 dark:from-neutral-700 dark:via-neutral-600 dark:to-neutral-700 animate-shimmer",[["badge","BADGE"].includes(U.type??"")||U.condition?"h-5 rounded-full w-20":"h-4 rounded-md",((Q=U.align)==null?void 0:Q.toLowerCase())==="center"?"mx-auto":"",((fe=U.align)==null?void 0:fe.toLowerCase())==="right"?"ml-auto":""]]),style:t.normalizeStyle({width:["badge","BADGE"].includes(U.type??"")||U.condition?void 0:ZD(U),backgroundSize:"200% 100%"})},null,6)],2)}),128)),e.hasActions?(t.openBlock(),t.createElementBlock("td",Pv,[...F[11]||(F[11]=[t.createElementVNode("div",{class:"flex items-center justify-center gap-1.5"},[t.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse"}),t.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse delay-75"}),t.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse delay-150"})],-1)])])):t.createCommentVNode("",!0)]))),128)):Ut.value.length===0?(t.openBlock(),t.createElementBlock("tr",Ov,[t.createElementVNode("td",{colspan:Fe.value.length+(q.value?1:0),class:"text-center py-16"},[t.createElementVNode("div",Rv,[t.createVNode(t.unref(Bu.Vue3Lottie),{animationData:t.unref(cv),height:200,width:200},null,8,["animationData"]),t.createElementVNode("div",null,[t.createElementVNode("p",Iv,t.toDisplayString(_i.value?"No search results":"No data"),1),t.createElementVNode("p",Fv,t.toDisplayString(_i.value?"Try changing keywords":"No data added"),1)])])],8,Lv)])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(Ut.value,(z,U)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:U},[t.createElementVNode("tr",zv,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Fe.value,Q=>(t.openBlock(),t.createElementBlock("td",{key:Q.key,class:t.normalizeClass([Q.align?`text-${Q.align.toLowerCase()}`:"text-left","px-3 py-0.5 text-sm text-neutral-900 dark:text-neutral-100"])},[t.renderSlot(T.$slots,`cell-${Q.key}`,{row:z,value:nt(z,Q.key)},()=>[Q.type==="CHECKBOX"?(t.openBlock(),t.createElementBlock("div",$v,[t.createVNode(ao,{"model-value":J(z),"onUpdate:modelValue":fe=>X(z,!!fe),onClick:F[3]||(F[3]=t.withModifiers(()=>{},["stop"]))},null,8,["model-value","onUpdate:modelValue"])])):Q.type==="badge"||Q.type==="BADGE"||Q.condition?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["flex items-center gap-1.5 flex-wrap md:flex-nowrap",[Q.align?`justify-${Q.align.toLowerCase()}`:"justify-start"]])},[t.createVNode(yi,{variant:Ai(z,Q).variant,class:t.normalizeClass([Ai(z,Q).class,"whitespace-nowrap truncate max-w-[150px] inline-block"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(Ai(z,Q).label),1)]),_:2},1032,["variant","class"])],2)):Q.key==="no"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString((u.value-1)*h.value+U+1),1)],64)):Q.type==="date"||Q.type==="DATE"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createTextVNode(t.toDisplayString(nt(z,Q.key)?t.unref(Qm)(nt(z,Q.key),"long"):"-"),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createTextVNode(t.toDisplayString(Q.format?Q.format(nt(z,Q.key)):nt(z,Q.key)),1)],64))])],2))),128)),q.value?(t.openBlock(),t.createElementBlock("td",jv,[t.renderSlot(T.$slots,"actions",{row:z,buttons:ye(z),getButtonColor:Ge,getIconComponent:ru},()=>[ye(z).length>0?(t.openBlock(),t.createElementBlock("div",Uv,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ye(z),(Q,fe)=>(t.openBlock(),t.createElementBlock("div",{key:fe,class:"group relative"},[t.createVNode(He,{tooltip:Q.tooltip||Q.label,icon:Q.icon,text:Q.icon?"":Q.label||(t.unref(l)==="id"?"Aksi":"Action"),size:Q.icon?"icon":"sm",rounded:Q.rounded||"sm",borderStyle:Q.borderStyle||"none",variant:Q.variant||"ghost","bg-color":Ge(Q,z),onClick:we=>hu(Q,z)},null,8,["tooltip","icon","text","size","rounded","borderStyle","variant","bg-color","onClick"])]))),128))])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),T.$slots["expanded-row"]?(t.openBlock(),t.createElementBlock("tr",Wv,[t.createElementVNode("td",{colspan:Fe.value.length+(q.value?1:0),class:"px-0 py-0"},[t.renderSlot(T.$slots,"expanded-row",{row:z,index:U})],8,Hv)])):t.createCommentVNode("",!0)],64))),128))])])]),!se.value&&Ut.value.length>0&&e.showPagination&&B.value?(t.openBlock(),t.createElementBlock("div",qv,[t.createElementVNode("div",Gv,[t.createVNode(t.unref(s5),{"model-value":String(h.value),"onUpdate:modelValue":F[4]||(F[4]=z=>QD(Number(z)))},{default:t.withCtx(()=>[t.createVNode(t.unref(u5),{class:"h-8 w-[70px] bg-white dark:bg-zinc-800 border-neutral-200 dark:border-neutral-700"},{default:t.withCtx(()=>[t.createVNode(t.unref(h5),{placeholder:String(h.value)},null,8,["placeholder"])]),_:1}),t.createVNode(t.unref(i5),null,{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(cu,z=>t.createVNode(t.unref(c5),{key:z,value:String(z)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(z),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"]),F[16]||(F[16]=t.createElementVNode("div",{class:"h-5 w-px bg-zinc-300 dark:bg-zinc-600"},null,-1)),t.createElementVNode("span",Kv,[F[12]||(F[12]=t.createTextVNode(" Showing ",-1)),t.createElementVNode("span",Xv,t.toDisplayString(au.value),1),F[13]||(F[13]=t.createTextVNode(" to ",-1)),t.createElementVNode("span",Yv,t.toDisplayString(su.value),1),F[14]||(F[14]=t.createTextVNode(" of ",-1)),t.createElementVNode("span",Jv,t.toDisplayString(bn.value),1),F[15]||(F[15]=t.createTextVNode(" items ",-1))])]),t.createElementVNode("div",Qv,[t.createVNode(t.unref(QA),{total:bn.value,"items-per-page":h.value,"sibling-count":1,"show-edges":"",page:u.value,"onUpdate:page":du,class:"scale-90 origin-right"},{default:t.withCtx(()=>[t.createVNode(t.unref(ZA),{class:"flex items-center gap-1"},{default:t.withCtx(({items:z})=>[t.createVNode(t.unref(t5),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:opacity-50 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronsLeft),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(a5),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronLeft),{class:"h-4 w-4"})]),_:1}),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z,(U,Q)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[U.type==="page"?(t.openBlock(),t.createBlock(t.unref(o5),{key:Q,value:U.value,"as-child":""},{default:t.withCtx(()=>[t.createVNode(t.unref(Nt),{class:"w-8 h-8 p-0 text-sm",variant:U.value===u.value?"default":"outline",disabled:U.value===u.value,onClick:fe=>du(U.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(U.value),1)]),_:2},1032,["variant","disabled","onClick"])]),_:2},1032,["value"])):(t.openBlock(),t.createBlock(t.unref(e5),{key:U.type,index:Q},null,8,["index"]))],64))),256)),t.createVNode(t.unref(r5),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronRight),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(n5),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronsRight),{class:"h-4 w-4"})]),_:1})]),_:1})]),_:1},8,["total","items-per-page","page"])])])):t.createCommentVNode("",!0),t.createVNode(so,{modelValue:w.value,"onUpdate:modelValue":F[5]||(F[5]=z=>w.value=z),title:rN.value,icon:"AlertCircle","max-width":450,persistent:!1},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",onClick:mu,text:"Cancel"}),t.createVNode(He,{variant:"default",onClick:tN,text:"Yes"})]),default:t.withCtx(()=>[t.createElementVNode("div",Zv,[t.createElementVNode("p",eD,t.toDisplayString(aN.value),1)])]),_:1},8,["modelValue","title"]),t.createVNode(so,{modelValue:D.value,"onUpdate:modelValue":F[8]||(F[8]=z=>D.value=z),title:((Y=V.value)==null?void 0:Y.label)||"Action",icon:"AlertCircle","max-width":450},{actions:t.withCtx(()=>{var z;return[t.createVNode(He,{variant:"outline",onClick:F[6]||(F[6]=U=>D.value=!1),text:"Cancel"}),e.dummyMode&&((z=V.value)!=null&&z.route)?(t.openBlock(),t.createBlock(He,{key:1,variant:"default",onClick:F[7]||(F[7]=U=>D.value=!1),text:t.unref(l)==="id"?"Tutup":"Close"},null,8,["text"])):(t.openBlock(),t.createBlock(He,{key:0,variant:"default",onClick:oN,text:"Save"}))]}),default:t.withCtx(()=>{var z,U,Q;return[t.createElementVNode("div",tD,[y.value?(t.openBlock(),t.createElementBlock("div",oD,[t.createElementVNode("div",nD,[F[17]||(F[17]=t.createElementVNode("div",{class:"w-8 h-8 border-4 border-primary border-t-transparent rounded-full animate-spin"},null,-1)),t.createElementVNode("span",rD,t.toDisplayString(t.unref(l)==="id"?"Memuat data...":"Loading data..."),1)])])):t.createCommentVNode("",!0),e.dummyMode&&((z=V.value)!=null&&z.route)?(t.openBlock(),t.createElementBlock("div",aD,[t.createElementVNode("div",sD,[t.createVNode(t.unref(ne.Search),{class:"w-4 h-4"})]),t.createElementVNode("div",iD,[t.createElementVNode("span",lD,t.toDisplayString(t.unref(l)==="id"?"Info Navigasi":"Navigation Info"),1),t.createElementVNode("p",cD,t.toDisplayString(t.unref(l)==="id"?`Aksi ini akan mengarah ke rute: ${V.value.route}`:`This action will navigate to: ${V.value.route}`),1)])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(((U=V.value)==null?void 0:U.fieldActionCustom)||((Q=V.value)==null?void 0:Q.fieldActionGlobal)||[],(fe,we)=>{var _e,Ce,ze,Ne;return t.openBlock(),t.createElementBlock(t.Fragment,{key:we},[!fe.isHidden&&t.unref(M)(fe)&&!(e.dummyMode&&((_e=V.value)!=null&&_e.route))?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(Pe(fe))},[t.createElementVNode("div",dD,[t.createVNode(fn,{class:"flex-1 w-full",field:fe,"model-value":k[fe.model],"form-data":k,required:t.unref(I)(fe),disabled:t.unref(K)(fe),readonly:t.unref(H)(fe),options:t.unref(te)(fe),"dynamic-labels":t.unref(W)(fe),"dynamic-length":t.unref(Z)(fe),"onUpdate:modelValue":Re=>k[fe.model]=Re},null,8,["field","model-value","form-data","required","disabled","readonly","options","dynamic-labels","dynamic-length","onUpdate:modelValue"]),fe.isCopyable||(Ce=fe.props)!=null&&Ce.isCopyable||((ze=V.value)==null?void 0:ze.action)==="showToken"||((Ne=V.value)==null?void 0:Ne.action)==="copyToken"?(t.openBlock(),t.createBlock(He,{key:0,icon:"Copy",variant:"outline",class:"h-10 w-10 p-0 flex-shrink-0",tooltip:"Salin",onClick:Re=>nN(fe.model)},null,8,["onClick"])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)],64)}),128))])]}),_:1},8,["modelValue","title"])])}}});function fD(){const e=t.reactive({}),o=t.reactive({}),n=t.reactive({}),r=t.reactive({}),a=t.reactive({}),s=t.ref(!1),i=t.ref(null),l=t.reactive({}),c=t.reactive({visible:!1,title:"",message:"",action:null});return{formData:e,errors:o,fieldErrors:n,wizardState:r,inlineState:a,isSubmitting:s,internalSchema:i,rawItemsCache:l,confirmDialog:c}}function uD({formData:e,locale:o,errors:n,fieldMap:r,activeSchema:a,isSectionVisible:s,isFieldVisible:i,isFieldRequired:l,resolveFieldLength:c}){const d=(u,h,m)=>{const p=u.props||u.propsFieldGlobal||{},y=h==null?"":String(h).trim();if(l(u,m)&&y==="")return o.value==="id"?"Wajib diisi":"Required";if(y==="")return null;const b=c==null?void 0:c(u,m),g=Number((b==null?void 0:b.minLength)??p.minLength),_=Number((b==null?void 0:b.maxLength)??p.maxLength);if(!Number.isNaN(g)&&g>0&&y.length<g)return o.value==="id"?`Minimal ${g} karakter`:`Minimum ${g} characters`;if(!Number.isNaN(_)&&_>0&&y.length>_)return o.value==="id"?`Maksimal ${_} karakter`:`Maximum ${_} characters`;if(p.regex)try{if(!new RegExp(p.regex).test(y))return p.regexMessage||(o.value==="id"?"Format tidak valid":"Invalid format")}catch{console.warn(`[DynamicForm] Invalid validation regex for field ${u.model}:`,p.regex)}return null};return{validateField:d,validateAll:()=>{var h,m;let u=!0;return(m=(h=a.value)==null?void 0:h.sections)==null||m.forEach(p=>{var y;s(p)&&(((y=p.propsForm)==null?void 0:y.fields)||p.fields||[]).forEach(b=>{if(b.model&&i(b)){const g=r.value.get(b.model),_=g?pn(e,g.path):e[b.model],E=d(b,_);E&&(n[b.model]=E,u=!1)}})}),u}}}function hD({formData:e,activeSchema:o,isSectionVisible:n,isFieldVisible:r,getWizardTabs:a}){const s=()=>{var u;const d=[],f=h=>{h==null||h.forEach(m=>{var y;if(m.type==="TABLE"||m.propsTable){const b=m.propsTable||m;b.modelDatatable&&d.push({key:b.modelDatatable,subFields:(b.headers||[]).map(g=>g.key)})}(((y=m.propsForm)==null?void 0:y.fields)||m.fields||[]).forEach(b=>{var _,E;const g=["DCodeDynamicUploadList","DCodeUploadList","DCodeDataTable","DCodeDynamicFormList"].includes(b.component);if(b.model&&((_=b.props)!=null&&_.multiple||((E=b.props)==null?void 0:E.valueType)==="array"||g)){const B=b.component.includes("Upload")?["id","filename","document","typeDocument","idDocumentType"]:["id"];d.push({key:b.model,subFields:B})}}),m.type==="WIZARD"&&a(m).forEach(b=>f(b.sections))})};return f((u=o.value)==null?void 0:u.sections),d};return{getCleanPayload:()=>{var u;if(!((u=o.value)!=null&&u.sections))return{...e};const d={},f=new Set;return o.value.sections.forEach(h=>{var b,g;if(!n(h))return;const p=xa(h),y=(_,E)=>{if(_.model&&r(_)){const B=pn(e,E?`${E}.${_.model}`:_.model)??e[_.model];d[_.model]=jo(B)??null,f.add(_.model)}};if((((b=h.propsForm)==null?void 0:b.fields)||h.fields||[]).forEach(_=>{var E;return y(_,p||((E=h.propsForm)==null?void 0:E.key))}),h.type==="WIZARD"&&a(h).forEach(_=>_.sections.forEach(E=>(E.fields||[]).forEach(B=>y(B,_.key)))),(g=h.propsTable)!=null&&g.modelDatatable){const _=h.propsTable.modelDatatable;d[_]=jo(e[_]||[]),f.add(_)}}),["id","_id"].forEach(h=>{e[h]!==void 0&&!f.has(h)&&(d[h]=jo(e[h]))}),d},applyFieldMapping:(d,f)=>{const u={},h=m=>m&&typeof m=="object"?m._isLogicValue?m.id:m.id??m.code??m.value??m:m;return Object.entries(f).forEach(([m,p])=>{if(typeof p=="string"){const y=d[m]??pn(e,m)??e[m];y!==void 0&&(u[p]=h(y))}else if(Array.isArray(p)&&p[0]){const y=p[0],b=Object.keys(y);let g=d[m]??pn(e,m)??e[m];if(!Array.isArray(g)||g.length===0){const _=s().find(E=>b.some(B=>E.subFields.includes(B)));if(_){const E=d[_.key]??pn(e,_.key)??e[_.key];Array.isArray(E)&&E.length>0&&(g=E)}}Array.isArray(g)&&(console.log(`[DynamicForm][MAPPING-SOURCE] ${m}:`,jo(g)),u[m]=g.map((_,E)=>{const B={},A=jo(_);return Object.entries(y).forEach(([C,x])=>{const w=A[C]??A[x]??_[C]??_[x]??null;B[x]=h(w)}),B}))}}),console.log("[DynamicForm][MAPPING-RESULT]",u),u},handleResponseMapping:(d,f)=>{const u=(d==null?void 0:d.data)!==void 0?d.data:d,h=Array.isArray(u)?u[0]:u;h&&Object.entries(f).forEach(([m,p])=>{const y=h[p]??h[m];y!==void 0&&Xf(e,m,y)})},getFormArrayModels:s}}function mD({state:e,props:o,emit:n,apiUrl:r,router:a,locale:s,mapping:i,validation:l,fieldMap:c,activeSchema:d,resolvedBaseUrl:f}){const u=_=>o.dummyMode||!_.permission||(o.isEditMode?_.permission!=="CREATE":_.permission!=="UPDATE"),h=_=>{var E,B,A,C;_.requireConfirm?(e.confirmDialog.title=s.value==="id"?((E=_.propCustomMessage)==null?void 0:E.titleID)||"Konfirmasi":((B=_.propCustomMessage)==null?void 0:B.titleEN)||"Confirm",e.confirmDialog.message=s.value==="id"?((A=_.propCustomMessage)==null?void 0:A.messageID)||"Lanjutkan?":((C=_.propCustomMessage)==null?void 0:C.messageEN)||"Continue?",e.confirmDialog.action=_,e.confirmDialog.visible=!0):p(_)},m=()=>{e.confirmDialog.visible=!1,e.confirmDialog.action&&p(e.confirmDialog.action)},p=async _=>{var C,x;const E=_.propsActionGlobal||_.props||{},B=i.applyFieldMapping(i.getCleanPayload(),E.fieldMapping||_.fieldMapping||{});n("action",_,B);const A=E.endpointPropAction||_.endpointPropAction||E.endpoint||_.endpoint;if((E.type==="SUBMIT"||E.type==="ACTION")&&(A!=null&&A.apiUrl)){const w=Ie.loading(s.value==="id"?"Memproses...":"Processing..."),D=xi(A.apiUrl,f.value);try{const k=await r(D,A.apiMethod||"POST",B);console.log("[DynamicForm][ACTIONS] API Response:",k);const v=(k==null?void 0:k.status)===!0||(k==null?void 0:k.success)===!0||(k==null?void 0:k.code)===200||(k==null?void 0:k.code)==="00"||(k==null?void 0:k.status)==="SUCCESS",S=(k==null?void 0:k.message)||(v?s.value==="id"?"Sukses":"Success":s.value==="id"?"Gagal":"Failed");if(Ie.update(w,{render:S,type:v?"success":"error",isLoading:!1,autoClose:v?3e3:5e3}),v){if((E.fieldMapping||_.fieldMapping)&&i.handleResponseMapping(k,E.fieldMapping||_.fieldMapping),n("success",k),console.log("[DynamicForm][ACTIONS] Router Instance:",a?"FOUND":"NOT FOUND"),a){const N=V=>{const L=V.startsWith("/")?V:"/"+V;console.log("[DynamicForm][ACTIONS] Navigating to:",L),a.push(L).catch(O=>{console.error("[DynamicForm][ACTIONS] Router Push Failed:",O)})};if(E.routeBack)N(E.routeBack);else{const V=a.currentRoute.value.path,L=V.split("/").filter(Boolean);console.log("[DynamicForm][ACTIONS] No routeBack, fallback to parent. Current path:",V),L.length>1?(L.pop(),N("/"+L.join("/"))):N("/")}}}else n("error",k)}catch(k){const v=((x=(C=k.response)==null?void 0:C.data)==null?void 0:x.message)||k.message||(s.value==="id"?"Terjadi kesalahan":"An error occurred");Ie.update(w,{render:`Gagal: ${v}`,type:"error",isLoading:!1,autoClose:5e3}),n("error",k)}}else E.type==="SUBMIT"&&n("submit",B);E.keyRedirect&&E.route&&a&&a.push(E.route)};return{isActionVisible:u,handleGlobalButtonClick:h,confirmAction:m,performAction:p,handleSubmit:async()=>{var _,E;if(l.validateAll()){e.isSubmitting.value=!0;try{const B=i.getCleanPayload(),A=(((_=d.value)==null?void 0:_.actions)||[]).find(x=>{var w;return x.type==="SUBMIT"||x.key==="SUBMIT"||((w=x.propsActionGlobal)==null?void 0:w.type)==="SUBMIT"}),C=(A==null?void 0:A.fieldMapping)||((E=A==null?void 0:A.propsActionGlobal)==null?void 0:E.fieldMapping);n("submit",C?i.applyFieldMapping(B,C):B)}finally{e.isSubmitting.value=!1}}},handleCancel:()=>n("cancel"),handleFieldUpdate:(_,E,B)=>{var C;e.formData[_]=E;const A=(C=c.value.get(_))==null?void 0:C.field;if(A){const x=l.validateField(A,E);x?e.errors[_]=x:delete e.errors[_]}}}}function pD({formData:e,validation:o,locale:n,emit:r,mapping:a}){const s=t.ref(!1),i=t.ref(""),l=t.ref("Plus"),c=t.ref([]),d=t.reactive({}),f=t.reactive({}),u=t.ref(""),h=t.ref(null),m=t.ref(!1),p=t.ref(null),y=t.ref(!1),b=k=>{var v;return!(k!=null&&k.apiUrl)&&!((v=k==null?void 0:k.endpointTable)!=null&&v.apiUrl)},g=k=>{if(!k)return!1;const v=(k.key||"").toLowerCase(),S=(k.permission||"").toUpperCase();return v==="detail"||v.includes("view")||S==="VIEW"},_=k=>Array.isArray(e[k.modelDatatable])?e[k.modelDatatable]:[],E=k=>{var S,N;if((S=k.fields)!=null&&S.length)return k.fields;const v=(k.actionTableGlobal||[]).find(V=>V.permission==="CREATE"||(V.key||"").toLowerCase().includes("add"));return(N=v==null?void 0:v.fieldActionGlobal)!=null&&N.length?v.fieldActionGlobal:(k.headers||[]).filter(V=>V.key&&V.key!=="no").map(V=>({key:V.key,model:V.key,component:"DCodeTextField"}))},B=(k,v)=>{p.value={propsTable:k,row:v},y.value=!0},A=()=>{if(!p.value)return;const{propsTable:k,row:v}=p.value;y.value=!1;const S=e[k.modelDatatable];if(Array.isArray(S)){const N=S.indexOf(v);if(N!==-1)S.splice(N,1);else{const V=JSON.stringify(v,(O,P)=>["no","_index"].includes(O)?void 0:P),L=S.findIndex(O=>JSON.stringify(O,(P,R)=>["no","_index"].includes(P)?void 0:R)===V);L!==-1&&S.splice(L,1)}r("update:model",a.getCleanPayload())}},C=(k,v)=>{d[k]=v;const S=c.value.find(N=>N.model===k);if(S){const N=o.validateField(S,v);N?f[k]=N:delete f[k]}},x=(k,v,S)=>{u.value=k.modelDatatable||"",m.value=g(v),h.value=null,i.value=n.value==="id"?v.labelID||"Tambah Data":v.labelEN||"Add Data",l.value=v.icon||"Plus";const N=E(k);c.value=N,Object.keys(d).forEach(V=>delete d[V]),Object.keys(f).forEach(V=>delete f[V]),N.forEach(V=>d[V.model]=S?S[V.model]??null:null),s.value=!0};return{tableDialogOpen:s,tableDialogTitle:i,tableDialogIcon:l,tableDialogFields:c,tableRowFormData:d,tableRowErrors:f,activeTableKey:u,editingRowIndex:h,tableDialogViewOnly:m,confirmDeletePending:p,confirmDeleteOpen:y,isTemporaryTable:b,isActionViewOnly:g,tableRows:_,resolveTableFields:E,confirmTableDelete:B,executeTableDelete:A,handleTableRowUpdate:C,openTableRowDialog:x,handleDataTableAction:(k,v)=>{const{action:S,row:N}=v;if(/delete|trash/i.test(S)){const R=e[k.modelDatatable];if(Array.isArray(R)){const j=R.indexOf(N);if(j!==-1)R.splice(j,1);else{const M=JSON.stringify(N,(K,H)=>["no","_index"].includes(K)?void 0:H),I=R.findIndex(K=>JSON.stringify(K,(H,W)=>["no","_index"].includes(H)?void 0:W)===M);I!==-1&&R.splice(I,1)}}return}if(/detail|view/i.test(S)){x(k,{key:"detail",permission:"VIEW"},N);return}const V=k.modelDatatable||"";u.value=V,m.value=!1,i.value=n.value==="id"?"Ubah Data":"Edit Data",l.value="SquarePen";const L=e[V];let O=Array.isArray(L)?L.indexOf(N):-1;if(O===-1&&Array.isArray(L)){const R=JSON.stringify(N,(j,M)=>["no","_index"].includes(j)?void 0:M);O=L.findIndex(j=>JSON.stringify(j,(M,I)=>["no","_index"].includes(M)?void 0:I)===R)}h.value=O!==-1?O:null;const P=E(k);c.value=P,Object.keys(d).forEach(R=>delete d[R]),P.forEach(R=>d[R.model]=N[R.model]??null),s.value=!0},saveTableRow:()=>{let k=!0;if(c.value.forEach(S=>{const N=o.validateField(S,d[S.model]);N&&(f[S.model]=N,k=!1)}),!k)return;const v=u.value;v&&(e[v]=e[v]||[],h.value!==null?e[v].splice(h.value,1,{...d}):e[v].push({...d}),s.value=!1,r("update:model",a.getCleanPayload()))}}}function gD(e){const{state:o,props:n,emit:r,logic:a,mapping:s,activeSchema:i,fieldMap:l,prefetchFieldItems:c}=e;let d="";const f=new Map,u=new Map,h=(m,p)=>{var A;const y=(A=i.value)==null?void 0:A.sections;if(!y)return;a.applyCalculations();const b=a.getNormalizedData(m),g=(C,x,w,D)=>{const k=C.model,v=a.isFieldVisible(C,w)&&x,S=f.get(k),N=o.formData[k];return f.set(k,v),D&&S===!0&&v===!1&&N!=null&&(console.log(`[DynamicForm][DEBUG][RESET-VISIBLE] ${k} became hidden. Clearing value:`,N),o.formData[k]=Array.isArray(N)?[]:null),v},_=(C,x,w,D)=>{var P,R,j,M,I,K;const k=C.model,v=C.logic,S=Array.isArray((R=(P=C.props)==null?void 0:P.endpoint)==null?void 0:R.keyParam)||Array.isArray((M=(j=C.props)==null?void 0:j.endpointReference)==null?void 0:M.keyParam);if(!v&&!S)return;const N={};let V=!1;["lengthRule","optionsFilterRule","visibleRule","disabledRule"].forEach(H=>{const W=v==null?void 0:v[H];if(!W)return;const Z=a.resolveActiveRule(W,w,`${H}-${k}`),te=JSON.stringify(Z);N[H]=te;const ie=u.get(k);(ie==null?void 0:ie[H])!==void 0&&ie[H]!==te&&(V=!0,console.log(`[DynamicForm][DEBUG][CONTEXT-CHANGE] ${k} rule ${H} changed while tracking.`))});const O=((I=C.props)==null?void 0:I.endpoint)||((K=C.props)==null?void 0:K.endpointReference);Array.isArray(O==null?void 0:O.keyParam)&&O.keyParam.forEach(H=>{const W=w[H],Z=JSON.stringify(W);N[`kp-${H}`]=Z;const te=u.get(k);(te==null?void 0:te[`kp-${H}`])!==void 0&&te[`kp-${H}`]!==Z&&(V=!0,console.log(`[DynamicForm][DEBUG][CASCADE] ${k} dependency ${H} changed while tracking.`),D&&x&&c(C,!0))}),D&&V&&o.formData[k]!=null&&(console.log(`[DynamicForm][DEBUG][RESET-LOGIC] Context changed for ${k}. Clearing value.`),o.formData[k]=Array.isArray(o.formData[k])?[]:null),u.set(k,N)},E=(C,x,w)=>{var k;if(C.type!=="WIZARD")return;(((k=C.propsWizard)==null?void 0:k.propsSteps)||[]).forEach(v=>{const N=a.isSectionVisible(v,w)&&x;Array.isArray(v.sectionsWizard)?B(v.sectionsWizard,N):v.sectionsWizard&&B([v.sectionsWizard],N)})},B=(C,x=!0)=>{var w;for(const D of C){const v=a.isSectionVisible(D,m)&&x,S=((w=D.propsForm)==null?void 0:w.fields)||D.fields||[];for(const N of S){if(!N.model)continue;const V=g(N,v,m,p);_(N,V,b,p)}E(D,v,m)}};B(y,!0)};return t.watch(()=>i.value,m=>{var y,b,g,_,E;if(!(m!=null&&m.sections))return;const p=B=>{if(!B)return;const A=["visibleRule","requiredRule","disabledRule","optionsFilterRule","lengthRule","calculateRule"];for(const C of A){const x=B[C];if(Array.isArray(x))for(const w of x)w.condition&&ka(w.condition);else x&&ka(x)}};for(const B of m.sections){if(p(B.logic||((y=B.propsForm)==null?void 0:y.logic)),B.type==="WIZARD")for(const C of((b=B.propsWizard)==null?void 0:b.propsSteps)||[])p(C.logic);const A=((g=B.propsForm)==null?void 0:g.fields)||B.fields||[];for(const C of A)p(C.logic),(_=C.logic)!=null&&_.optionsFilterRule&&c(C);if(B.type==="TABLE"&&((E=B.propsTable)!=null&&E.modelDatatable)&&(o.formData[B.propsTable.modelDatatable]=o.formData[B.propsTable.modelDatatable]||[]),B.type==="WIZARD"){const C=xa(B);o.wizardState[C]===void 0&&(o.wizardState[C]=0)}}h(o.formData,!1)},{immediate:!0}),t.watch(o.formData,m=>{h(m,!0);const p=s.getCleanPayload()||{},y=JSON.stringify(p);y!==d&&(console.log("[DynamicForm][DEBUG][EMIT] Sending updated model to parent:",p),d=y,r("update:model",p))},{deep:!0}),t.watch(()=>n.model,m=>{m&&Object.keys(m).length>0&&JSON.stringify(m)!==d&&Object.entries(m).forEach(([y,b])=>{if(f.get(y)===!1)return;if(b==null&&f.get(y)===!0){const E=o.formData[y];if(E!=null)return}const g=l.value.get(y),_=(g==null?void 0:g.path)||y;Xf(o.formData,_,b)})},{immediate:!0,deep:!0}),{lastEmittedPayload:()=>d}}bt.add_operation("length",e=>e==null?0:typeof e=="string"||Array.isArray(e)?e.length:typeof e=="number"?String(e).length:typeof e=="object"?Object.keys(e).length:0),bt.add_operation("==",(e,o)=>{const n=r=>r&&typeof r=="object"&&r._isLogicValue;return e==null?o==null:o==null?e==null:n(e)&&n(o)?String(e.id)===String(o.id)||String(e.code)===String(o.code):n(e)?String(e.code)===String(o)||String(e.id)===String(o):n(o)?String(o.code)===String(e)||String(o.id)===String(e):typeof e=="boolean"&&typeof o=="string"?String(e)===o:typeof o=="boolean"&&typeof e=="string"?String(o)===e:String(e)===String(o)}),bt.add_operation("!=",(e,o)=>{const n=r=>r&&typeof r=="object"&&r._isLogicValue;return e==null&&o==null?!1:e==null||o===null||o===void 0?!0:n(e)&&n(o)?!(String(e.id)===String(o.id)||String(e.code)===String(o.code)):n(e)?!(String(e.code)===String(o)||String(e.id)===String(o)):n(o)?!(String(o.code)===String(e)||String(o.id)===String(e)):String(e)!==String(o)});function bD(e,o){const{t:n,locale:r}=kt.useI18n(),a=t.computed(()=>r.value),{apiUrl:s}=Qe(),i=e.router||wo.useRouter(),l=fD(),c=t.computed(()=>e.schema||l.internalSchema.value),d=t.computed(()=>{var B;if((B=e.selectedTokenCore)!=null&&B.address)return e.selectedTokenCore.address;if(e.baseUrl)return e.baseUrl}),f=(B,A,C)=>{A.model&&B.set(A.model,{field:A,path:A.model})},u=(B,A)=>{A.key||A.id;const C=Array.isArray(A.sectionsWizard)?A.sectionsWizard:[A.sectionsWizard].filter(Boolean);for(const x of C)if(x.fields)for(const w of x.fields)f(B,w)},h=t.computed(()=>{var C,x,w;const B=new Map,A=(C=c.value)==null?void 0:C.sections;if(!A)return B;for(const D of A){const k=D.propsForm||D.propsTable||D.props||{};xa(D);const v=k.fields||D.fields||[];for(const S of v)f(B,S);if(((x=D.type)==null?void 0:x.toUpperCase())==="WIZARD"&&((w=D.propsWizard)!=null&&w.propsSteps))for(const S of D.propsWizard.propsSteps)u(B,S)}return B}),m=Jf({formData:l.formData,errors:l.errors,fieldMap:h,rawItemsCache:l.rawItemsCache,activeSchema:c,locale:a});t.watch(()=>c.value,B=>{if(B!=null&&B.payload){console.log("[DynamicForm][DEBUG] Initializing flat state from schema payload...");const A=Yf(B.payload);Object.keys(A).forEach(C=>{(l.formData[C]===void 0||l.formData[C]===null)&&(l.formData[C]=A[C])})}},{immediate:!0});const p=uD({formData:l.formData,locale:a,errors:l.errors,fieldMap:h,activeSchema:c,isSectionVisible:m.isSectionVisible,isFieldVisible:m.isFieldVisible,isFieldRequired:m.isFieldRequired,resolveFieldLength:m.resolveFieldLength}),y=hD({formData:l.formData,activeSchema:c,isSectionVisible:m.isSectionVisible,isFieldVisible:m.isFieldVisible,getWizardTabs:m.getWizardTabs}),b=mD({state:l,props:e,emit:o,apiUrl:s,router:i,locale:a,mapping:y,validation:p,fieldMap:h,activeSchema:c,resolvedBaseUrl:d}),g=pD({formData:l.formData,validation:p,locale:a,emit:o,mapping:y}),_=async(B,A=!1)=>{const C=B.props||{},x=C.endpointReference||C.endpoint;if(x!=null&&x.apiUrl&&!(!A&&l.rawItemsCache[B.key]))try{const w=xi(x.apiUrl,d.value),D={page:1,perPage:100};if(Array.isArray(x.keyParam)){let N=!1;if(x.keyParam.forEach(V=>{const L=m.getNormalizedData(l.formData)[V];L==null||L===""?N=!0:D[V]=L&&typeof L=="object"&&L._isLogicValue?L.id:L}),N){l.rawItemsCache[B.key]=[];return}}const k=await s(w,x.apiMethod||"GET",D),v=(k==null?void 0:k.data)||k;let S=[];Array.isArray(v)?S=v:v&&(S=[v]),l.rawItemsCache[B.key]=S}catch(w){console.error(`[prefetchFieldItems] Error fetching items for ${B.key}:`,w),l.rawItemsCache[B.key]=[]}};gD({state:l,props:e,emit:o,logic:m,mapping:y,fieldMap:h,activeSchema:c,prefetchFieldItems:_});const E=t.computed(()=>{const B={},A=c.value;return A!=null&&A.sections&&A.sections.forEach(C=>{var w,D,k;(((w=C.propsForm)==null?void 0:w.fields)||((D=C.propsTable)==null?void 0:D.fields)||((k=C.props)==null?void 0:k.fields)||[]).forEach(v=>{var S,N,V,L,O,P,R,j,M,I,K;if(v.component==="DCodeRadioCustom"){const H=((S=v.props)==null?void 0:S.name)||"default-group";B[H]||(B[H]=[]);let W=((V=(N=v.props)==null?void 0:N.endpoint)==null?void 0:V.apiUrl)||((L=v.props)==null?void 0:L.apiUrl);W=xi(W,d.value),B[H].push({key:v.key,value:(O=v.props)==null?void 0:O.value,label:((P=v.props)==null?void 0:P.labelID)||((R=v.props)==null?void 0:R.labelEN)||v.key,model:v.model||v.key,apiUrl:W,apiMethod:((M=(j=v.props)==null?void 0:j.endpoint)==null?void 0:M.apiMethod)||((I=v.props)==null?void 0:I.apiMethod),icon:(K=v.props)==null?void 0:K.icon,name:H})}})}),B});return{t:n,locale:a,i18nLocale:r,apiUrl:s,router:i,isSubmitting:l.isSubmitting,internalSchema:l.internalSchema,activeSchema:c,resolvedBaseUrl:d,radioGroups:E,confirmDialog:l.confirmDialog,fieldMap:h,rawItemsCache:l.rawItemsCache,formData:l.formData,errors:l.errors,fieldErrors:l.fieldErrors,inlineState:l.inlineState,wizardState:l.wizardState,getSectionKey:xa,sortedFields:mv,prefetchFieldItems:_,...m,...y,...b,...g}}const yD={class:"flex items-center gap-2"},xD=t.defineComponent({__name:"DynamicFormSection",props:{section:{},sIdx:{}},setup(e){const o=t.computed(()=>{var k,v;switch((v=(k=e.section)==null?void 0:k.propsForm)==null?void 0:v.layoutColumns){case"FULL":return"grid-cols-1";case"HALF":return"grid-cols-1 md:grid-cols-2";case"THIRD":return"grid-cols-1 md:grid-cols-3";case"QUARTED":return"grid-cols-1 md:grid-cols-4";case"TWO-THIRD":return"grid-cols-2 md:grid-cols-3";case"THREE-QUARTER":return"grid-cols-3 md:grid-cols-4";default:return"grid-cols-1"}}),n=t.inject("dynamicFormContext",{}),r=t.computed(()=>{var v,S,N;const D=(N=(S=(v=e.section)==null?void 0:v.propsForm)==null?void 0:S.actionSection)==null?void 0:N.some(V=>s==null?void 0:s(V)),k=e.sIdx===0;return D||k}),{resolveSectionLabels:a,isActionVisible:s,handleGlobalButtonClick:i,locale:l,t:c,handleCancel:d,sortedFields:f,isFieldVisible:u,getDeepValue:h,formData:m,getSectionKey:p,isFieldRequired:y,isFieldDisabled:b,isFieldReadonly:g,getFilteredItems:_,errors:E,resolveFieldLabels:B,resolveFieldLength:A,resolvedBaseUrl:C,handleFieldUpdate:x}=n,w=D=>typeof f!="function"?[]:f(D||[]);return(D,k)=>{var v;return t.openBlock(),t.createBlock(Go,{title:(v=t.unref(a)(e.section))==null?void 0:v.title,border:!0,padding:"",class:"overflow-hidden"},t.createSlots({default:t.withCtx(()=>{var S,N;return[t.createElementVNode("div",{class:t.normalizeClass(["p-4 grid gap-4",o.value])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w((N=(S=e.section)==null?void 0:S.propsForm)==null?void 0:N.fields),V=>{var L,O,P,R,j,M,I,K,H;return t.openBlock(),t.createElementBlock(t.Fragment,{key:V==null?void 0:V.key},[(L=t.unref(u))!=null&&L(V)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(o.value)},[t.createVNode(fn,{field:V,"model-value":(O=t.unref(m))==null?void 0:O[V.model],"form-data":t.unref(m),required:(P=t.unref(y))==null?void 0:P(V),disabled:(R=t.unref(b))==null?void 0:R(V),readonly:(j=t.unref(g))==null?void 0:j(V),options:(M=t.unref(_))==null?void 0:M(V),error:(I=t.unref(E))==null?void 0:I[V.model],"dynamic-labels":(K=t.unref(B))==null?void 0:K(V),"dynamic-length":(H=t.unref(A))==null?void 0:H(V),"base-url":t.unref(C),"onUpdate:modelValue":W=>t.unref(x)(V.model,W)},null,8,["field","model-value","form-data","required","disabled","readonly","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])],2)):t.createCommentVNode("",!0)],64)}),128))],2)]}),_:2},[r.value?{name:"actions",fn:t.withCtx(()=>{var S,N,V,L;return[t.createElementVNode("div",yD,[(V=(N=(S=e.section)==null?void 0:S.propsForm)==null?void 0:N.actionSection)!=null&&V.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.section.propsForm.actionSection,(O,P)=>{var R,j,M,I,K,H,W,Z;return t.openBlock(),t.createElementBlock(t.Fragment,{key:P},[(R=t.unref(s))!=null&&R(O)?(t.openBlock(),t.createBlock(He,{key:0,icon:O.icon||((j=O.propsActionGlobal)==null?void 0:j.icon),text:t.unref(l)==="id"?O.labelID||((M=O.propsActionGlobal)==null?void 0:M.labelID):O.labelEN||((I=O.propsActionGlobal)==null?void 0:I.labelEN),"bg-color":((H=O.bgColor||((K=O.propsActionGlobal)==null?void 0:K.bgColor))==null?void 0:H.toLowerCase())||"primary",variant:((Z=O.variant||((W=O.propsActionGlobal)==null?void 0:W.variant))==null?void 0:Z.toLowerCase())||"outline",size:"sm",onClick:te=>{var ie;return(ie=t.unref(i))==null?void 0:ie(O)}},null,8,["icon","text","bg-color","variant","onClick"])):t.createCommentVNode("",!0)],64)}),128)):t.createCommentVNode("",!0),e.sIdx===0?(t.openBlock(),t.createBlock(He,{key:1,size:"sm",icon:"List",text:(L=t.unref(c))==null?void 0:L("common.back"),variant:"outline",onClick:k[0]||(k[0]=O=>{var P;return(P=t.unref(d))==null?void 0:P()})},null,8,["text"])):t.createCommentVNode("",!0)])]}),key:"0"}:void 0]),1032,["title"])}}}),kD=t.defineComponent({__name:"DynamicTableSection",props:{section:{},dummyMode:{type:Boolean}},setup(e){const o=t.inject("dynamicFormContext"),{tableRows:n,isTemporaryTable:r,handleDataTableAction:a,resolvedBaseUrl:s}=o;return(i,l)=>(t.openBlock(),t.createBlock(Go,{border:!0,padding:"",class:"overflow-hidden"},{default:t.withCtx(()=>[t.createVNode(gn,{"table-config":e.section.propsTable,data:t.unref(n)(e.section.propsTable),nested:!0,"show-pagination":e.section.propsTable.pagination??!0,"has-actions":t.unref(r)(e.section.propsTable),"base-url":t.unref(s),"dummy-mode":e.dummyMode,onAction:l[0]||(l[0]=c=>t.unref(a)(e.section.propsTable,c))},null,8,["table-config","data","show-pagination","has-actions","base-url","dummy-mode"])]),_:1}))}}),wD={class:"w-full"},CD={class:"space-y-6 mt-4"},_D={key:2,class:"p-4 border border-dashed border-neutral-300 rounded-lg text-xs text-neutral-400"},ED=t.defineComponent({__name:"DynamicWizardSection",props:{section:{},dummyMode:{type:Boolean}},setup(e){const o=t.inject("dynamicFormContext"),{getWizardTabs:n,wizardState:r,getSectionKey:a,isSubmitting:s,isSectionVisible:i,sortedFields:l,isFieldVisible:c,formData:d,isFieldRequired:f,isFieldDisabled:u,getFilteredItems:h,errors:m,resolveFieldLabels:p,resolveFieldLength:y,resolvedBaseUrl:b,handleFieldUpdate:g,tableRows:_,handleDataTableAction:E,resolveSectionGridClass:B,resolveFieldColumnClass:A}=o;return(C,x)=>{var w;return t.openBlock(),t.createElementBlock("div",wD,[t.createVNode(ii,{tabs:t.unref(n)(e.section),modelValue:t.unref(r)[t.unref(a)(e.section)],"onUpdate:modelValue":x[0]||(x[0]=D=>t.unref(r)[t.unref(a)(e.section)]=D),"is-vertical":e.section.propsWizard.isVertical,"is-wizard":e.section.propsWizard.isWizard,"type-wizard":((w=e.section.propsWizard.typeWizard)==null?void 0:w.toLowerCase())||"icon",loading:t.unref(s)},t.createSlots({_:2},[t.renderList(t.unref(n)(e.section),D=>({name:`tab-${D.key}`,fn:t.withCtx(()=>[t.createElementVNode("div",CD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.sections,(k,v)=>{var S,N;return t.openBlock(),t.createElementBlock(t.Fragment,{key:v},[t.unref(i)(k)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[((S=k.type)==null?void 0:S.toUpperCase())==="FORM"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["grid gap-4",t.unref(B)(k.layoutColumns)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(l)(k.fields),V=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:V.key},[t.unref(c)(V)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(A)(V,k.layoutColumns))},[t.createVNode(fn,{field:V,"model-value":t.unref(d)[V.model],"form-data":t.unref(d),required:t.unref(f)(V),disabled:t.unref(u)(V),options:t.unref(h)(V),error:t.unref(m)[V.model],"dynamic-labels":t.unref(p)(V),"dynamic-length":t.unref(y)(V),"base-url":t.unref(b),"onUpdate:modelValue":L=>t.unref(g)(V.model,L)},null,8,["field","model-value","form-data","required","disabled","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])],2)):t.createCommentVNode("",!0)],64))),128))],2)):((N=k.type)==null?void 0:N.toUpperCase())==="TABLE"||k.isDataTable?(t.openBlock(),t.createBlock(Go,{key:1,border:!0,padding:"",class:"overflow-hidden"},{default:t.withCtx(()=>{var V;return[t.createVNode(gn,{"dummy-mode":e.dummyMode,"table-config":k.propsDataTableWizard||k.propsTable,data:t.unref(_)(k.propsDataTableWizard||k.propsTable),nested:!0,"show-pagination":((V=k.propsDataTableWizard||k.propsTable)==null?void 0:V.pagination)??!0,onAction:L=>t.unref(E)(k.propsDataTableWizard||k.propsTable,L)},null,8,["dummy-mode","table-config","data","show-pagination","onAction"])]}),_:2},1024)):(t.openBlock(),t.createElementBlock("div",_D," Unknown section type: "+t.toDisplayString(k.type),1))],64)):t.createCommentVNode("",!0)],64)}),128))])])}))]),1032,["tabs","modelValue","is-vertical","is-wizard","type-wizard","loading"])])}}}),BD={class:"py-2 text-sm text-neutral-600 dark:text-neutral-400"},SD={key:0,class:"grid grid-cols-1 md:grid-cols-2 gap-4 py-2"},AD={class:"py-2 text-sm text-neutral-600 dark:text-neutral-400"},vD=t.defineComponent({__name:"DynamicFormDialogs",setup(e){const o=t.inject("dynamicFormContext"),{confirmDialog:n,t:r,confirmAction:a,tableDialogOpen:s,tableDialogTitle:i,tableDialogIcon:l,tableDialogFields:c,isFieldVisible:d,tableRowFormData:f,tableDialogViewOnly:u,isFieldRequired:h,isFieldDisabled:m,getFilteredItems:p,tableRowErrors:y,resolveFieldLabels:b,resolveFieldLength:g,resolvedBaseUrl:_,handleTableRowUpdate:E,locale:B,saveTableRow:A,confirmDeleteOpen:C,executeTableDelete:x}=o;return(w,D)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(so,{modelValue:t.unref(n).visible,"onUpdate:modelValue":D[1]||(D[1]=k=>t.unref(n).visible=k),title:t.unref(n).title,icon:"AlertTriangle","max-width":450},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",text:t.unref(r)("common.cancel"),onClick:D[0]||(D[0]=k=>t.unref(n).visible=!1)},null,8,["text"]),t.createVNode(He,{text:t.unref(r)("common.confirm"),onClick:t.unref(a)},null,8,["text","onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",BD,t.toDisplayString(t.unref(n).message),1)]),_:1},8,["modelValue","title"]),t.createVNode(so,{modelValue:t.unref(s),"onUpdate:modelValue":D[3]||(D[3]=k=>t.isRef(s)?s.value=k:null),title:t.unref(i),icon:t.unref(l),"max-width":700},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",text:t.unref(u)?t.unref(B)==="id"?"Tutup":"Close":t.unref(B)==="id"?"Batal":"Cancel",onClick:D[2]||(D[2]=k=>s.value=!1)},null,8,["text"]),t.unref(u)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(He,{key:0,text:"Save",onClick:t.unref(A)},null,8,["onClick"]))]),default:t.withCtx(()=>[t.unref(c).length?(t.openBlock(),t.createElementBlock("div",SD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),k=>(t.openBlock(),t.createElementBlock("div",{key:k.key,class:t.normalizeClass(k.column==="FULL"?"md:col-span-2":"col-span-1")},[t.unref(d)(k,t.unref(f))?(t.openBlock(),t.createBlock(fn,{key:0,field:k,"model-value":t.unref(f)[k.model],"form-data":t.unref(f),required:t.unref(u)?!1:t.unref(h)(k,t.unref(f)),disabled:t.unref(u)||t.unref(m)(k,t.unref(f)),"view-only":t.unref(u),options:t.unref(p)(k,t.unref(f)),error:t.unref(u)?void 0:t.unref(y)[k.model],"dynamic-labels":t.unref(b)(k,t.unref(f)),"dynamic-length":t.unref(g)(k,t.unref(f)),"base-url":t.unref(_),"onUpdate:modelValue":v=>t.unref(E)(k.model,v)},null,8,["field","model-value","form-data","required","disabled","view-only","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])):t.createCommentVNode("",!0)],2))),128))])):t.createCommentVNode("",!0)]),_:1},8,["modelValue","title","icon"]),t.createVNode(so,{modelValue:t.unref(C),"onUpdate:modelValue":D[5]||(D[5]=k=>t.isRef(C)?C.value=k:null),title:t.unref(B)==="id"?"Konfirmasi Hapus":"Confirm Delete",icon:"Trash2","max-width":440},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",text:t.unref(B)==="id"?"Batal":"Cancel",onClick:D[4]||(D[4]=k=>C.value=!1)},null,8,["text"]),t.createVNode(He,{variant:"default","bg-color":"danger",icon:"Trash2",text:t.unref(B)==="id"?"Hapus":"Delete",onClick:t.unref(x)},null,8,["text","onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",AD,t.toDisplayString(t.unref(B)==="id"?"Apakah Anda yakin ingin menghapus data ini? Tindakan ini tidak dapat dibatalkan.":"Are you sure you want to delete this row? This action cannot be undone."),1)]),_:1},8,["modelValue","title"])]))}}),DD={class:"w-full space-y-6"},ki=t.defineComponent({__name:"DynamicForm",props:{schema:{},model:{default:()=>({})},isEditMode:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},baseUrl:{default:void 0},selectedTokenCore:{default:null},dummyMode:{type:Boolean,default:!1},router:{default:null}},emits:["submit","cancel","action","update:model","success","error"],setup(e,{emit:o}){const n=e,a=bD(n,o);t.provide("dynamicFormContext",a);const{activeSchema:s,isSectionVisible:i,inlineState:l,isActionVisible:c,locale:d,isSubmitting:f,isSubmitDisabled:u,handleGlobalButtonClick:h,handleSubmit:m}=a;return(p,y)=>{var b,g,_,E,B,A;return t.openBlock(),t.createElementBlock("div",DD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((b=t.unref(s))==null?void 0:b.sections,(C,x)=>{var w,D,k;return t.openBlock(),t.createElementBlock(t.Fragment,{key:x},[((w=C.type)==null?void 0:w.toUpperCase())==="FORM"&&C.propsForm&&t.unref(i)(C)?(t.openBlock(),t.createBlock(xD,{key:0,"dummy-mode":n.dummyMode,section:C,sIdx:Number(x)},null,8,["dummy-mode","section","sIdx"])):((D=C.type)==null?void 0:D.toUpperCase())==="TABLE"&&C.propsTable&&t.unref(i)(C)?(t.openBlock(),t.createBlock(kD,{key:1,"dummy-mode":n.dummyMode,section:C},null,8,["dummy-mode","section"])):((k=C.type)==null?void 0:k.toUpperCase())==="WIZARD"&&C.propsWizard&&t.unref(i)(C)?(t.openBlock(),t.createBlock(ED,{key:2,"dummy-mode":n.dummyMode,section:C},null,8,["dummy-mode","section"])):t.createCommentVNode("",!0)],64)}),128)),(g=t.unref(l))!=null&&g.global?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(((E=(_=t.unref(s))==null?void 0:_.ui)==null?void 0:E.actionsClass)||"flex items-center gap-2 flex-wrap pt-4 border-t border-neutral-100 dark:border-neutral-800")},[(A=(B=t.unref(s))==null?void 0:B.actionGlobal)!=null&&A.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(s).actionGlobal,(C,x)=>{var w,D,k;return t.openBlock(),t.createElementBlock(t.Fragment,{key:x},[C.propsActionGlobal&&t.unref(c)(C)?(t.openBlock(),t.createBlock(He,{key:0,icon:C.propsActionGlobal.icon,text:t.unref(d)==="id"?C.propsActionGlobal.labelID:C.propsActionGlobal.labelEN,"bg-color":((w=C.propsActionGlobal.bgColor)==null?void 0:w.toLowerCase())||"primary",variant:((D=C.propsActionGlobal.variant)==null?void 0:D.toLowerCase())||"default",loading:t.unref(f),disabled:t.unref(u)&&(C.permission==="CREATE"||C.permission==="UPDATE"||((k=C.propsActionGlobal)==null?void 0:k.key)==="submit"),onClick:v=>t.unref(h)(C)},null,8,["icon","text","bg-color","variant","loading","disabled","onClick"])):t.createCommentVNode("",!0)],64)}),128)):t.createCommentVNode("",!0)],2)),t.createVNode(vD)])}}}),ND={"aria-label":"Breadcrumb"},VD={class:"flex flex-wrap items-center text-sm md:text-base"},MD={class:"truncate max-w-[100px] sm:max-w-[150px] md:max-w-none"},Qf=t.defineComponent({__name:"Breadcrumb",props:{items:{},showHomeIcon:{type:Boolean,default:!0},iconSize:{default:18},separatorSize:{default:16},separatorType:{default:"chevron"},strokeWidth:{default:2}},setup(e){const o=e,n=ne.Home,r=o.separatorType==="slash"?ne.Slash:ne.ChevronRight;return(a,s)=>(t.openBlock(),t.createElementBlock("nav",ND,[t.createElementVNode("ol",VD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(i,l)=>(t.openBlock(),t.createElementBlock("li",{key:l,class:"flex items-center"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.to?"router-link":"span"),{to:i.to,class:t.normalizeClass(["inline-flex items-center gap-1.5 transition-all duration-200 rounded-lg font-medium",i.to?"text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 hover:bg-primary-50 dark:hover:bg-primary-900/20 cursor-pointer":"dark:text-gray-100 bg-primary-50 dark:bg-primary-900/30 text-primary-700"])},{default:t.withCtx(()=>[i.icon||l===0&&e.showHomeIcon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.icon||t.unref(n)),{key:0,size:e.iconSize,class:t.normalizeClass(["flex-shrink-0",i.to?"text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-400":"text-primary-600 dark:text-primary-400",i.iconClass||""]),"stroke-width":e.strokeWidth},null,8,["size","class","stroke-width"])):t.createCommentVNode("",!0),t.createElementVNode("span",MD,t.toDisplayString(i.label),1)]),_:2},1032,["to","class"])),l<e.items.length-1?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(r)),{key:0,size:e.separatorSize,class:"mx-1.5 text-gray-300 dark:text-gray-700 flex-shrink-0"},null,8,["size"])):t.createCommentVNode("",!0)]))),128))])]))}});function Zf(){return{setPageTitle:n=>{typeof document<"u"&&(document.title=n||document.title),typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:page-title",{detail:{title:n},bubbles:!0,composed:!0}))},setBreadcrumb:n=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:breadcrumb",{detail:{items:n},bubbles:!0,composed:!0}))}}}const TD={class:"w-full space-y-6 animate-pulse"},PD={class:"p-4 grid grid-cols-1 md:grid-cols-2 gap-4"},OD=t.defineComponent({__name:"AutoLayoutSkeleton",setup(e){return(o,n)=>(t.openBlock(),t.createElementBlock("div",TD,[n[2]||(n[2]=t.createElementVNode("div",{class:"h-6 w-48 bg-neutral-200 dark:bg-neutral-700 rounded-md"},null,-1)),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(2,r=>t.createElementVNode("div",{key:r,class:"rounded-xl border border-neutral-200 dark:border-neutral-700 overflow-hidden"},[n[1]||(n[1]=t.createElementVNode("div",{class:"px-4 py-3 bg-neutral-200 dark:bg-neutral-700"},[t.createElementVNode("div",{class:"h-4 w-32 bg-neutral-300 dark:bg-neutral-600 rounded"})],-1)),t.createElementVNode("div",PD,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(6,a=>t.createElementVNode("div",{key:a,class:t.normalizeClass(a>4?"md:col-span-2":"col-span-1")},[...n[0]||(n[0]=[t.createElementVNode("div",{class:"h-3 w-24 bg-neutral-200 dark:bg-neutral-700 rounded mb-2"},null,-1),t.createElementVNode("div",{class:"h-10 w-full bg-neutral-200 dark:bg-neutral-700 rounded-lg"},null,-1)])],2)),64))])])),64)),n[3]||(n[3]=t.createElementVNode("div",{class:"flex items-center gap-2"},[t.createElementVNode("div",{class:"h-9 w-24 bg-neutral-300 dark:bg-neutral-600 rounded-lg"}),t.createElementVNode("div",{class:"h-9 w-20 bg-neutral-200 dark:bg-neutral-700 rounded-lg"})],-1))]))}}),LD={class:"w-full"},RD={class:"relative mx-auto min-h-[37.5rem]"},ID={key:"content",class:"w-full"},FD={class:"mb-6"},zD={class:"text-neutral-500 dark:text-neutral-400"},$D={key:"skeleton",class:"w-full"},jD={key:"error",class:"flex items-center justify-center p-20 text-red-500 w-full"},wi=lt(t.defineComponent({name:"AutoLayoutForm",__name:"AutoLayoutForm",props:{layoutCode:{},isEditMode:{type:Boolean},model:{},selectedTokenCore:{},router:{}},emits:["submit-success","cancel","action-success","update:model"],setup(e,{emit:o}){var S,N,V,L,O,P,R,j;const n=e,r=o,a=(N=(S=t.getCurrentInstance())==null?void 0:S.appContext)==null?void 0:N.app;a&&!a._context.provides[Symbol.for("vue-router-route-location")]&&a.provide(Symbol.for("vue-router-route-location"),{query:{},params:{},path:""});let s={query:{},params:{},path:""};try{const M=wo.useRoute();if(M&&Object.keys(M).length>0)s=M;else{const I=t.getCurrentInstance();(O=(L=(V=I==null?void 0:I.appContext)==null?void 0:V.config)==null?void 0:L.globalProperties)!=null&&O.$route&&(s=I.appContext.config.globalProperties.$route)}}catch{console.warn("useRoute not available, using fallback")}let i={back:()=>{typeof window<"u"&&window.history&&window.history.length>1&&window.history.back()},push:M=>{typeof window<"u"&&(typeof M=="string"?window.location.href=M:M&&M.path&&(window.location.href=M.path))},__isFallback:!0};try{const M=n.router||wo.useRouter();if(M)i=M;else{const I=t.getCurrentInstance();(j=(R=(P=I==null?void 0:I.appContext)==null?void 0:P.config)==null?void 0:R.globalProperties)!=null&&j.$router&&(i=I.appContext.config.globalProperties.$router)}}catch{console.warn("useRouter not available, using fallback")}const{apiUrl:l,DCodeApi:c}=Qe();let d;try{d=kt.useI18n().locale}catch{d=t.ref("en")}const{setPageTitle:f}=Zf(),u=t.computed(()=>n.isEditMode!==void 0?n.isEditMode:s.params&&"id"in s.params?!0:s.path?/\/edit\/[^\/]+$/.test(s.path):!1);t.watchEffect(()=>{console.log("isEditModeisEditMode",u.value)});const h=t.computed(()=>{if(s.params&&"id"in s.params)return s.params.id;if(!s.path)return null;const M=s.path.match(/\/edit\/([^\/]+)$/);return M?M[1]:null}),m=t.ref({}),p=t.ref(null),y=t.ref(!0),b=t.ref(!1),g="https://dcodedynamic.skyworx.co.id/api/auto-layout/form/form-dynamic?code=",_="https://dcodedynamic.skyworx.co.id/api/auto-layout/datatable/form-dynamic?code=",E=t.ref(n.layoutCode),B=t.computed(()=>{var K;if(!p.value)return"";const M=((K=d==null?void 0:d.value)==null?void 0:K.toLowerCase())||"en";return(M==="en"||M.startsWith("en-")?p.value.titleEN:p.value.titleID)||p.value.title||n.layoutCode});t.watch(B,M=>{M&&f(M)},{immediate:!0});const A=(M,I="")=>{const K={};return!M||typeof M!="object"||Object.keys(M).forEach(H=>{const W=M[H],Z=I?`${I}.${H}`:H;W&&typeof W=="object"&&!Array.isArray(W)&&!(W instanceof Date)&&Object.assign(K,A(W,Z)),K[Z]=W}),K},C=M=>{var W;if(!M||typeof M!="string"||M.startsWith("http"))return M;const I=(W=n.selectedTokenCore)==null?void 0:W.address;if(!I)return M;const K=I.replace(/\/$/,""),H=M.startsWith("/")?M:`/${M}`;return`${K}${H}`},x=async()=>{var M,I,K,H,W,Z;y.value=!0;try{let te=n.layoutCode;s&&s.query&&typeof s.query=="object"&&"code"in s.query&&(te=s.query.code||n.layoutCode);const ie="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJDQkFTIiwiaWF0IjoxNzcyNDU5MzQ0LCJkYXRlIjoiMDIwMzIwMjYiLCJjb2RlIjoidGVzdGVyIiwidXJsRm9ybSI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvZm9ybSIsInVybEFjdGlvbiI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvYWN0aW9uIiwidXJsRGF0YXRhYmxlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9kYXRhdGFibGUiLCJ1cmxQYXRoIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9wYXRoIiwidXJsUmVmZXJhbmNlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9yZWZlcmVuY2UifQ.JGIUTL0GEAp34zanY6dqLKg7jOLHwKzataY271JStsE",Ae=ie?{Authorization:`Bearer ${ie}`}:{},ke=C(`${g}${te}`);let J=await l(ke,"GET",null,Ae);if(!J.status||!J.data||Array.isArray(J.data)&&J.data.length===0)try{const $=C(`${_}${te}`),X=await l($,"GET",null,Ae);if(X.status){const re=Array.isArray(X.data)?X.data[0]:X.data;re&&re.code&&(te=re.code,E.value=te,J=await l(C(`${g}${te}`),"GET",null,Ae))}}catch($){console.warn("Failed to resolve layout code via datatable",$)}if(J.status){p.value=Array.isArray(J.data)?J.data[0]:J.data;const $={};if((M=p.value)!=null&&M.sections&&p.value.sections.forEach(X=>{((X.propsForm||X.props||{}).fields||X.fields||[]).forEach(De=>{var We;const Ee=De.model||((We=De.props)==null?void 0:We.model)||De.key;Ee&&($[Ee]=null)})}),m.value=$,y.value=!1,u.value&&h.value){b.value=!0;try{const X=(H=(K=(I=p.value.sections)==null?void 0:I[0])==null?void 0:K.propsForm)==null?void 0:H.endpointForm,re=p.value.endpointForm,me=X||re;if(me!=null&&me.apiUrl){const De=me.apiUrl,Ee=me.apiMethod||"GET",We=me.keyParam||[],Te={};We.length>0?We.forEach(Oe=>{Te[Oe]=h.value}):Te.id=h.value;const he=await c(C(De),Ee,Te);if(console.log(`[AutoLayoutForm] API Result for ${De}:`,he),he.status){let Oe=Array.isArray(he.data)?he.data[0]:he.data;he.payload&&(Oe={...Oe,...he.payload}),console.log("[AutoLayoutForm] Successfully fetched record:",Oe);const Pe=A(Oe);m.value={...m.value,...Oe,...Pe},console.log("[AutoLayoutForm] Updated initialData:",m.value)}else console.warn("[AutoLayoutForm] Record API returned status: false",he)}else if((W=p.value.endpointGlobal)!=null&&W.apiUrl){const De=p.value.endpointGlobal.apiUrl,Ee=p.value.endpointGlobal.apiMethod||"GET",We={id:h.value},Te=await c(C(De),Ee,We);if(Te.status){const he=Array.isArray(Te.data)?Te.data[0]:Te.data,Oe=A(he);m.value={...m.value,...he,...Oe}}}else{const De=((Z=p.value.endpoint)==null?void 0:Z.detailUrl)||`/api/${E.value}/detail/${h.value}`,Ee=await l(C(De),"GET");if(Ee.status){let We=Array.isArray(Ee.data)?Ee.data[0]:Ee.data;if(Ee.payload){const Oe={...Ee.payload};if(Object.keys(Oe).forEach(Pe=>{We[Pe]!==void 0&&We[Pe]!==null&&(Oe[Pe]=We[Pe])}),!("id"in Oe)&&We.id){const Pe=Object.keys(Oe).find(Be=>Be.startsWith("id")&&Be.length>2&&!Oe[Be]);Pe&&(Oe[Pe]=We.id)}We=Oe}const Te={...We};Object.keys(m.value).forEach(Oe=>{if(Te[Oe]===void 0||Te[Oe]===null){if(Oe.toLowerCase().startsWith("id")&&Oe.length>2){const Be=Oe.substring(2).toLowerCase(),Fe=Array.isArray(Ee.data)?Ee.data[0]:Ee.data,q=Object.keys(Fe).find(se=>se.toLowerCase()===Be);q&&Fe[q]&&typeof Fe[q]=="object"&&"id"in Fe[q]&&(Te[Oe]=Fe[q].id)}if(Oe==="idSupervisor"){const Be=Array.isArray(Ee.data)?Ee.data[0]:Ee.data;Be.supervisorId&&(Te[Oe]=Be.supervisorId)}}});const he=A(Te);m.value={...m.value,...Te,...he}}}}catch(X){console.error("Failed to fetch record data:",X)}finally{b.value=!1}}}}catch(te){console.error("Failed to load form layout:",te),y.value=!1}},w=M=>{const I=Object.keys(m.value||{}).filter(H=>m.value[H]!==null&&m.value[H]!==void 0),K=Object.keys(M||{}).filter(H=>M[H]!==null&&M[H]!==void 0);if(I.length>3&&K.length<I.length/2){console.warn('[AutoLayoutForm] Circuit breaker triggered: Ignoring likely erroneous "empty" update from child.',{currentCount:I.length,incomingCount:K.length,data:M});return}console.log("[AutoLayoutForm] Allowing model update:",M),m.value=M,r("update:model",M)},D=async M=>{var I,K,H;try{const W=(H=(K=(I=p.value.sections)==null?void 0:I[0])==null?void 0:K.propsForm)==null?void 0:H.endpointForm,Z=p.value.endpointGlobal||p.value.endpoint,te=(W==null?void 0:W.submitUrl)||(Z==null?void 0:Z.submitUrl)||`/api/generic/${n.layoutCode}`,ie=(W==null?void 0:W.submitMethod)||(Z==null?void 0:Z.submitMethod)||(u.value?"PUT":"POST"),Ae=Object.values(M).some(J=>J instanceof File||J instanceof Blob);let ke;Ae?(ke=new FormData,Object.keys(M).forEach(J=>{const $=M[J];$!=null&&(Array.isArray($)?$.forEach(X=>ke.append(`${J}[]`,X)):ke.append(J,$))})):(ke={...M},u.value&&h.value&&!ke.id&&(ke.id=h.value)),await l(C(te),ie,ke),r("submit-success",ke),i.back()}catch(W){console.error("Submit failed:",W)}},k=async(M,I,K)=>{if(M==="cancel"){v();return}const H=I.endpointPropAction||I.propsActionGlobal&&I.propsActionGlobal.endpointPropAction;if(H)try{y.value=!0;const W=K?{...K}:{...m.value};u.value&&I.model&&h.value&&(W[I.model]=h.value);const Z=H.apiUrl,te=H.apiMethod||"POST";(await c(C(Z),te,W)).status&&(r("action-success",M,I,W),i.back())}catch(W){console.error("Action failed:",W)}finally{y.value=!1}},v=()=>{r("cancel"),i.back()};return t.onMounted(()=>{x()}),t.watch(()=>n.model,M=>{M&&Object.keys(M).length>0&&(m.value={...m.value,...M})},{immediate:!0,deep:!0}),t.onUnmounted(()=>{f("")}),(M,I)=>(t.openBlock(),t.createElementBlock("div",LD,[t.createElementVNode("div",RD,[t.createVNode(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[!y.value&&p.value?(t.openBlock(),t.createElementBlock("div",ID,[t.createElementVNode("div",FD,[t.createElementVNode("p",zD,t.toDisplayString(p.value.description),1)]),t.createVNode(ki,{schema:p.value,model:m.value,"is-edit-mode":u.value,loading:b.value,"selected-token-core":n.selectedTokenCore,router:t.unref(i),"onUpdate:model":I[0]||(I[0]=K=>w(K)),onSubmit:D,onCancel:v,onAction:k,class:"w-full"},null,8,["schema","model","is-edit-mode","loading","selected-token-core","router"])])):y.value?(t.openBlock(),t.createElementBlock("div",$D,[t.createVNode(OD)])):(t.openBlock(),t.createElementBlock("div",jD," Failed to load form configuration for "+t.toDisplayString(n.layoutCode),1))]),_:1})])]))}}),[["__scopeId","data-v-fa0a05fb"]]),UD={class:"h-full flex flex-col"},WD={key:1,class:"flex-1 flex items-center justify-center"},HD={key:2,class:"flex-1 flex items-center justify-center text-red-500"},Ci=t.defineComponent({name:"AutoLayoutDatatable",__name:"AutoLayoutDatatable",props:{layoutCode:{},userPermissions:{},permissionBase:{},checkPermission:{type:Function}},emits:["action","navigate"],setup(e,{emit:o}){var A,C,x,w,D,k;const n=e,r=o,a=t.getCurrentInstance(),{apiUrl:s}=Qe();let i={query:{},params:{},path:""};try{const v=wo.useRoute();v?i=v:(x=(C=(A=a==null?void 0:a.appContext)==null?void 0:A.config)==null?void 0:C.globalProperties)!=null&&x.$route&&(i=a.appContext.config.globalProperties.$route)}catch{console.warn("useRoute not available, using fallback")}let l={back:()=>{typeof window<"u"&&window.history&&window.history.length>1&&window.history.back()},push:v=>{typeof window<"u"&&(typeof v=="string"?window.location.href=v:v&&v.path&&(window.location.href=v.path))}};try{const v=wo.useRouter();v?l=v:(k=(D=(w=a==null?void 0:a.appContext)==null?void 0:w.config)==null?void 0:D.globalProperties)!=null&&k.$router&&(l=a.appContext.config.globalProperties.$router)}catch{console.warn("useRouter not available, using fallback")}const c=t.inject("hasActionAccess",()=>!1),d=t.inject("userPermissions",null),f=t.ref(null),u=t.ref(!0),h=t.ref(null),m="https://dcodedynamic.skyworx.co.id/api/auto-layout/datatable/form-dynamic?code=",p=t.computed(()=>`${m}${n.layoutCode}`),{setPageTitle:y}=Zf();let b;try{b=kt.useI18n().locale}catch{b=t.ref("en")}const g=()=>{if(f.value){const S=(b.value==="id"?f.value.titleID:f.value.titleEN)||f.value.title||"Datatable";y(S)}};t.watch(b,()=>{g()});const _=async()=>{u.value=!0;try{const v="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJDQkFTIiwiaWF0IjoxNzcyNDU5MzQ0LCJkYXRlIjoiMDIwMzIwMjYiLCJjb2RlIjoidGVzdGVyIiwidXJsRm9ybSI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvZm9ybSIsInVybEFjdGlvbiI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvYWN0aW9uIiwidXJsRGF0YXRhYmxlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9kYXRhdGFibGUiLCJ1cmxQYXRoIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9wYXRoIiwidXJsUmVmZXJhbmNlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9yZWZlcmVuY2UifQ.JGIUTL0GEAp34zanY6dqLKg7jOLHwKzataY271JStsE",S=v?{Authorization:`Bearer ${v}`}:{},N=await s(p.value,"GET",null,S);N.status&&(f.value=Array.isArray(N.data)?N.data[0]:N.data,console.log("[DEBUG] AutoLayoutDatatable config loaded:",f.value),g())}catch(v){console.error("Gagal Menampilkan Datatable:",v)}finally{u.value=!1}},E=v=>{v.action==="add"&&console.log("[AutoLayoutDatatable] Add action triggered"),console.log("Aksi:",v.action,v)},B=v=>{console.log("[DEBUG] AutoLayoutDatatable handleNavigate:",v);let S=v.route;const N=v.path;if(!S&&N){const L=((i==null?void 0:i.path)||"").split("/");L.length>=2&&(S=`/${L[1]}/create`)}if(S||N){const V={...v.query||{},code:N||void 0};Object.keys(V).forEach(L=>V[L]===void 0&&delete V[L]),console.log("[DEBUG] Emitting navigate to parent:",{route:S,query:V}),r("navigate",{route:S||"/form",query:V}),l&&!l.__isFallback&&l.push({path:S||"/form",query:V})}else console.warn("[DEBUG] No route or path provided for navigation")};return t.onMounted(()=>{_()}),(v,S)=>(t.openBlock(),t.createElementBlock("div",UD,[!u.value&&f.value?(t.openBlock(),t.createBlock(gn,{key:0,ref_key:"dtRef",ref:h,"api-url":p.value,"api-method":"GET","table-config":f.value,"permission-base":n.permissionBase||"","dummy-mode":["datatable-create","datatable-edit"].includes(n.layoutCode),"user-permissions":n.userPermissions||t.unref(d),"permission-checker":t.unref(c),checkPermission:n.checkPermission,onAction:E,onNavigate:B},{"header-actions":t.withCtx(()=>[...S[0]||(S[0]=[])]),_:1},8,["api-url","table-config","permission-base","dummy-mode","user-permissions","permission-checker","checkPermission"])):u.value?(t.openBlock(),t.createElementBlock("div",WD,[...S[1]||(S[1]=[t.createElementVNode("i",{class:"mdi mdi-loading mdi-spin text-4xl text-primary-600"},null,-1)])])):(t.openBlock(),t.createElementBlock("div",HD," Failed to load configuration for "+t.toDisplayString(n.layoutCode),1))]))}}),eu=t.defineCustomElement(wi),tu=t.defineCustomElement(Ci);typeof customElements<"u"&&(customElements.get("micro-dynamic-form")||customElements.define("micro-dynamic-form",eu),customElements.get("micro-dynamic-datatable")||customElements.define("micro-dynamic-datatable",tu));const qD=[lr,Qi,He,Go,ns,rs,_f,ao,qs,Gs,ta,so,Af,oa,vf,ei,Ks,Df,oi,na,ni,$o,ri,ra,Nf,Vf,ai,si,aa,sa,Qo,cn,Of,Lf,ii,li,ci,yi,dn,di,gn,wi,Ci,ki,Qf,fn],ou={install(e,o={}){o&&Object.keys(o).length>0&&Ni(o),qD.forEach(n=>{n.name&&e.component(n.name,n)})}};ce.AutoLayoutDatatable=Ci,ce.AutoLayoutForm=wi,ce.Breadcrumb=Qf,ce.DCodeAutoComplete=lr,ce.DCodeBadge=yi,ce.DCodeBeforeAfter=ns,ce.DCodeButton=He,ce.DCodeCard=Go,ce.DCodeCardCheckboxList=qs,ce.DCodeChart=_f,ce.DCodeCheckbox=ao,ce.DCodeCurrencyField=Gs,ce.DCodeDatePicker=ta,ce.DCodeDialog=so,ce.DCodeDialogCloseBtn=Af,ce.DCodeDropzone=oa,ce.DCodeDynamicUploadList=Ks,ce.DCodeFileField=vf,ce.DCodeFileResult=ei,ce.DCodeIconDropdown=Df,ce.DCodeImageCropperDialog=oi,ce.DCodeImageField=na,ce.DCodeImageResult=ni,ce.DCodeInfiniteAutoComplete=Qi,ce.DCodeLabel=$o,ce.DCodeListLabels=rs,ce.DCodeMultiSelect=ri,ce.DCodeOtpInput=ra,ce.DCodePermissionMenu=li,ce.DCodeProgress=Nf,ce.DCodeProgressBar=Vf,ce.DCodeRadio=ai,ce.DCodeRadioCustom=si,ce.DCodeSlider=aa,ce.DCodeStaticImage=di,ce.DCodeStaticLabel=dn,ce.DCodeSwitch=sa,ce.DCodeTextField=Qo,ce.DCodeTextarea=cn,ce.DCodeTimelineWithIcons=Of,ce.DCodeTreePermissions=ci,ce.DCodeUploadFile=Lf,ce.DCodeWizard=ii,ce.DataTable=gn,ce.DataTableComponent=gn,ce.DynamicForm=ki,ce.DynamicFormField=fn,ce.DynamicUI=ou,ce.MicroDynamicDatatable=tu,ce.MicroDynamicForm=eu,ce.cn=Ve,ce.default=ou,ce.setApiConfig=Ni,Object.defineProperties(ce,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
112
|
+
`});return(A,C)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-2 w-full",e.unref(n).class]),"aria-busy":!1},[d.value?(e.openBlock(),e.createBlock(e.unref(Jn),{key:0,for:c.value,class:"text-sm font-medium"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",wE,"*")):e.createCommentVNode("",!0)]),_:1},8,["for"])):e.createCommentVNode("",!0),e.createElementVNode("div",CE,[t.showValue?(e.openBlock(),e.createElementBlock("div",_E,[e.createElementVNode("span",EE,e.toDisplayString(a.valuePrefix)+e.toDisplayString(t.min)+e.toDisplayString(a.valueSuffix),1),e.createElementVNode("span",BE,e.toDisplayString(m.value),1),e.createElementVNode("span",SE,e.toDisplayString(a.valuePrefix)+e.toDisplayString(t.max)+e.toDisplayString(a.valueSuffix),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",AE,[e.createElementVNode("div",{class:e.normalizeClass(["absolute top-1/2 -translate-y-1/2 w-full h-full bg-gray-200 rounded-lg pointer-events-none",[t.size==="sm"?"h-2":t.size==="md"?"h-2.5":"h-3"]])},[e.createElementVNode("div",{class:e.normalizeClass(["absolute top-0 left-0 h-full rounded-lg transition-all",[t.color==="blue"?"bg-blue-500":t.color==="green"?"bg-green-500":t.color==="red"?"bg-red-500":t.color==="yellow"?"bg-yellow-500":t.color==="purple"?"bg-purple-500":"bg-gray-500"]]),style:e.normalizeStyle({width:`${p.value}%`})},null,6)],2),e.createElementVNode("input",{id:c.value,ref_key:"sliderRef",ref:s,type:"range",value:t.modelValue,min:t.min,max:t.max,step:t.step,disabled:t.disabled,placeholder:t.placeholder,class:e.normalizeClass(u.value),onInput:y,onChange:b,onMousedown:g,onMouseup:_,onTouchstart:g,onTouchend:_},null,42,vE)]),t.marks.length>0?(e.openBlock(),e.createElementBlock("div",DE,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.marks,x=>(e.openBlock(),e.createElementBlock("div",{key:x.value,class:"absolute flex flex-col items-center",style:e.normalizeStyle({left:`${E(x.value)}%`,transform:"translateX(-50%)"})},[C[0]||(C[0]=e.createElementVNode("div",{class:"w-1 h-2 bg-gray-400 rounded-full"},null,-1)),e.createElementVNode("span",NE,e.toDisplayString(x.label),1)],4))),128))])):e.createCommentVNode("",!0)]),l.value?(e.openBlock(),e.createElementBlock("div",VE,[C[1]||(C[1]=e.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.error),1)])):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("style"),{key:2},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.value),1)]),_:1})):e.createCommentVNode("",!0)],2)),[[e.vShow,f.value]])}}),TE={key:0,class:"ml-1 text-destructive"},PE={class:"inline-flex items-center gap-3"},OE=["id","name","aria-checked","aria-label","disabled"],LE={key:0,class:"absolute inset-0 flex items-center justify-center"},RE={class:"relative z-10 flex items-center gap-2"},IE=["id","name","aria-checked","aria-label","disabled"],FE={key:0,class:"absolute inset-0 flex items-center justify-center"},zE={name:"DCodeSwitch"},ca=e.defineComponent({...zE,props:{modelValue:{type:Boolean,default:!1},label:{default:""},title:{default:"Title"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},size:{default:"medium"},color:{default:"primary"},loading:{type:Boolean,default:!1},labelPosition:{default:"right"},id:{},name:{},required:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!1},tooltipActiveText:{default:"Aktif"},tooltipInactiveText:{default:"Tidak Aktif"}},emits:["update:modelValue","change"],setup(t,{emit:o}){const n=t,r=o,a=e.computed({get:()=>n.modelValue,set:u=>{!n.disabled&&!n.loading&&(r("update:modelValue",u),r("change",u))}}),s=e.computed(()=>{switch(n.size){case"small":return"w-9 h-5";case"large":return"w-14 h-7";default:return"w-11 h-6"}}),i=e.computed(()=>{switch(n.size){case"small":return"w-4 h-4";case"large":return"w-6 h-6";default:return"w-5 h-5"}}),l=e.computed(()=>{switch(n.size){case"small":return"translate-x-4";case"large":return"translate-x-7";default:return"translate-x-5"}}),c=e.computed(()=>{if(n.disabled)return"bg-gray-300";if(n.readonly)return a.value?"bg-blue-400 opacity-80":"bg-gray-200 opacity-80";if(!a.value)return"bg-gray-200";switch(n.color){case"success":return"bg-green-500";case"warning":return"bg-yellow-500";case"danger":return"bg-red-500";default:return"bg-blue-500"}}),d=()=>{n.disabled||n.readonly||n.loading||(a.value=!a.value)},f=e.computed(()=>a.value?n.tooltipActiveText:n.tooltipInactiveText);return(u,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid gap-3",n.disabled?"cursor-not-allowed":""])},[t.title?(e.openBlock(),e.createBlock(Jn,{key:0,class:"text-sm font-medium"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",TE,"*")):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",PE,[e.createVNode(e.unref(Il),null,{default:e.withCtx(()=>[t.showTooltip?(e.openBlock(),e.createBlock(e.unref(Ll),{key:0,"delay-duration":200},{default:e.withCtx(()=>[e.createVNode(e.unref(Fl),{"as-child":""},{default:e.withCtx(()=>[e.createElementVNode("button",{type:"button",id:t.id,name:t.name,"aria-checked":a.value?"true":"false","aria-label":t.label||"Toggle switch",disabled:t.disabled||t.loading,class:e.normalizeClass([s.value,c.value,"relative inline-flex items-center rounded-full transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","hover:scale-105 active:scale-95",{"cursor-not-allowed opacity-50":t.disabled,"cursor-wait":t.loading,"cursor-default opacity-80":t.readonly&&!t.loading,"cursor-pointer":!t.disabled&&!t.loading&&!t.readonly}]),onClick:d},[e.createElementVNode("span",{class:e.normalizeClass([i.value,a.value?l.value:"translate-x-0.5","inline-block transform rounded-full bg-white shadow-lg transition-all duration-300 ease-in-out","hover:shadow-xl flex items-center justify-center"])},[t.loading?(e.openBlock(),e.createElementBlock("span",LE,[...h[0]||(h[0]=[e.createElementVNode("svg",{class:"animate-spin h-3 w-3 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"scale-0 rotate-90 opacity-0","enter-to-class":"scale-100 rotate-0 opacity-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"scale-100 rotate-0 opacity-100","leave-to-class":"scale-0 -rotate-90 opacity-0"},{default:e.withCtx(()=>[a.value&&!t.loading?(e.openBlock(),e.createBlock(e.unref(ne.Check),{key:0,class:e.normalizeClass([t.size==="small"?"w-2.5 h-2.5":t.size==="large"?"w-4 h-4":"w-3 h-3","text-green-600 stroke-[3]"])},null,8,["class"])):!a.value&&!t.loading?(e.openBlock(),e.createBlock(e.unref(ne.X),{key:1,class:e.normalizeClass([t.size==="small"?"w-2.5 h-2.5":t.size==="large"?"w-4 h-4":"w-3 h-3","text-gray-400 stroke-[3]"])},null,8,["class"])):e.createCommentVNode("",!0)]),_:1})],2)],10,OE)]),_:1}),e.createVNode(e.unref(Rl),{side:"top","side-offset":8,class:e.normalizeClass(["animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0",[a.value?"bg-green-600 dark:bg-green-500 text-white":"bg-gray-700 dark:bg-gray-600 text-white"]])},{default:e.withCtx(()=>[e.createElementVNode("span",RE,[e.createElementVNode("span",{class:e.normalizeClass(["inline-block w-2 h-2 rounded-full animate-pulse",a.value?"bg-green-200":"bg-gray-300"])},null,2),e.createTextVNode(" "+e.toDisplayString(f.value),1)])]),_:1},8,["class"])]),_:1})):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",id:t.id,name:t.name,"aria-checked":a.value?"true":"false","aria-label":t.label||"Toggle switch",disabled:t.disabled||t.loading,class:e.normalizeClass([s.value,c.value,"relative inline-flex items-center rounded-full transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","hover:scale-105 active:scale-95",{"cursor-not-allowed opacity-50":t.disabled,"cursor-wait":t.loading,"cursor-default opacity-80":t.readonly&&!t.loading,"cursor-pointer":!t.disabled&&!t.loading&&!t.readonly}]),onClick:d},[e.createElementVNode("span",{class:e.normalizeClass([i.value,a.value?l.value:"translate-x-0.5","inline-block transform rounded-full bg-white shadow-lg transition-all duration-300 ease-in-out","hover:shadow-xl flex items-center justify-center"])},[t.loading?(e.openBlock(),e.createElementBlock("span",FE,[...h[1]||(h[1]=[e.createElementVNode("svg",{class:"animate-spin h-3 w-3 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"scale-0 rotate-90 opacity-0","enter-to-class":"scale-100 rotate-0 opacity-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"scale-100 rotate-0 opacity-100","leave-to-class":"scale-0 -rotate-90 opacity-0"},{default:e.withCtx(()=>[a.value&&!t.loading?(e.openBlock(),e.createBlock(e.unref(ne.Check),{key:0,class:e.normalizeClass([t.size==="small"?"w-2.5 h-2.5":t.size==="large"?"w-4 h-4":"w-3 h-3","text-green-600 stroke-[3]"])},null,8,["class"])):!a.value&&!t.loading?(e.openBlock(),e.createBlock(e.unref(ne.X),{key:1,class:e.normalizeClass([t.size==="small"?"w-2.5 h-2.5":t.size==="large"?"w-4 h-4":"w-3 h-3","text-gray-400 stroke-[3]"])},null,8,["class"])):e.createCommentVNode("",!0)]),_:1})],2)],10,IE))]),_:1})])],2))}}),$E=["aria-busy"],jE={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},UE=["for"],WE={key:0,class:"ml-1 text-destructive"},HE={class:"relative w-full group"},qE=["id","value"],GE={key:0,class:"absolute top-1 right-2"},KE={key:1,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},XE={key:1,class:"text-xs text-destructive"},un=e.defineComponent({name:"DCodeTextarea",inheritAttrs:!1,__name:"DCodeTextarea",props:{modelValue:{},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},error:{default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","clear"],setup(t,{emit:o}){const n=e.useAttrs(),r=o,a=t,s=e.computed(()=>n.label),i=e.computed(()=>a.visible??!0),l=Math.random().toString(36).slice(2,7),c=e.computed(()=>`app-textarea-${n.id||s.value||"field"}-${l}`),d=e.computed(()=>{const Q=n.required,$=n["aria-required"];return Q===""||Q===!0||Q==="true"||($==="true"||$===!0)}),f=e.computed(()=>{const{label:Q,class:$,id:Y,required:ae,"aria-required":ye,...Pe}=n,Ee={...Pe};return a.disabled&&(Ee.disabled=!0),a.readonly&&(Ee.readonly=!0),Ee}),u=e.computed(()=>{const Q=n.maxlength;let $=Number.NaN;return typeof Q=="number"?$=Q:typeof Q=="string"&&($=Number.parseInt(Q,10)),Number.isFinite($)&&$>0?$:-1}),h=Q=>u.value>0?Q.slice(0,u.value):Q,m=e.computed(()=>{const Q=a.modelValue;return Q==null||String(Q).length===0}),p=e.computed(()=>a.clearable?a.hideClearWhenEmpty?!m.value:!0:!1),y=e.ref(String(a.modelValue??""));e.watch(()=>a.modelValue,Q=>{const $=String(Q??"");$!==y.value&&(y.value=$)});const b=e.ref(!1),g=e.ref(!1),_=Q=>Q.split(/(\s+)/).map($=>{if($.trim()==="")return $;const Y=$.toLowerCase();return Y.charAt(0).toUpperCase()+Y.slice(1)}).join(""),E=Q=>{const $=Q.toLowerCase(),Y=$.search(new RegExp("\\p{L}","u"));return Y<0?$:$.slice(0,Y)+$.charAt(Y).toUpperCase()+$.slice(Y+1)},B=Q=>{switch(a.textCase){case"uppercase":return Q.toUpperCase();case"lowercase":return Q.toLowerCase();case"titlecase":return _(Q);case"sentencecase":return E(Q);case"none":default:return Q}},A=e.computed(()=>{switch(a.textCase){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}}),C=Q=>{if(!Q)return null;const $=Array.isArray(Q)?Q.join(""):Q;return $?new Set($):null},x=e.computed(()=>C(a.allowChars)),w=(Q,$)=>(Q.lastIndex=0,Q.test($)),D=Q=>{if(Q===`
|
|
113
|
+
`)return a.valueType!=="number";if(a.valueType==="free")return!0;const $=Q===" ",Y=/\d/.test(Q),ae=new RegExp("\\p{L}","u").test(Q),ye=new RegExp("\\p{N}","u").test(Q);return a.valueType==="number"?Y:a.valueType==="letter"?ae||a.allowSpaces&&$:a.valueType==="letternumber"?ae||ye||a.allowSpaces&&$:!0},k=Q=>{let $="";for(const Y of Q){const ae=!!x.value&&x.value.has(Y);a.pattern&&!ae&&!w(a.pattern,Y)||!ae&&!D(Y)||($+=Y)}return $},v=Q=>{const $=k(Q),Y=a.applyTextCaseToValue?B($):$;return h(Y)};let S=null;const N=Q=>{if(Q==="")return null;if(a.valueType==="number"&&a.returnNumber){const $=Q.replaceAll(`
|
|
114
|
+
`,""),Y=Number($);return Number.isFinite(Y)?Y:null}return Q},V=Q=>{y.value=Q,r("update:modelValue",N(Q))},L=(Q,$)=>{const Y=h($);g.value=!0,Q.value=Y,V(Y),queueMicrotask(()=>g.value=!1)},O=(Q,$)=>{const Y=Q.selectionStart??Q.value.length,ae=Q.selectionEnd??Q.value.length;if(u.value>0){const ye=Q.value.length-(ae-Y),Pe=u.value-ye;if(Pe<=0)return;$=$.slice(0,Pe)}Q.setRangeText($,Y,ae,"end"),L(Q,v(Q.value))},P=Q=>{var ae;if(!S||b.value||g.value||!((ae=Q.inputType)!=null&&ae.startsWith("insert")))return;const $=Q.data;if($==null)return;const Y=v($);Y!==$&&(Q.preventDefault(),Y.length>0&&O(S,Y))},R=Q=>{var ae;if(!S||b.value||g.value)return;const $=((ae=Q.clipboardData)==null?void 0:ae.getData("text"))??"",Y=v($);Y!==$&&(Q.preventDefault(),Y.length>0&&O(S,Y))},j=async Q=>{if(!S||b.value||g.value)return;const $=Q.target,Y=$.value??"",ae=v(Y);if(ae===Y){const ye=$.selectionStart??ae.length,Pe=$.selectionEnd??ae.length;L($,ae),await e.nextTick();try{$.setSelectionRange(ye,Pe)}catch{}V(ae)}else{const ye=$.selectionStart??ae.length,Pe=$.selectionEnd??ae.length;L($,ae),await e.nextTick();try{$.setSelectionRange(ye,Pe)}catch{}}},T=()=>b.value=!0,I=()=>{if(b.value=!1,!S)return;const Q=S.value??"",$=v(Q);$===Q?V($):L(S,$)};e.onMounted(()=>{if(S=document.getElementById(c.value),!S)return;S.addEventListener("beforeinput",P),S.addEventListener("paste",R),S.addEventListener("input",j),S.addEventListener("compositionstart",T),S.addEventListener("compositionend",I);const Q=S.value??"",$=v(Q);$===Q?V($):L(S,$)}),e.onBeforeUnmount(()=>{S&&(S.removeEventListener("beforeinput",P),S.removeEventListener("paste",R),S.removeEventListener("input",j),S.removeEventListener("compositionstart",T),S.removeEventListener("compositionend",I),S=null)});const X=()=>{y.value="",S&&(S.value=""),r("update:modelValue",null),r("clear")},H=e.computed(()=>y.value.length),W=e.computed(()=>a.showCharCount?u.value>0:!1),Z=e.computed(()=>W.value&&H.value>0),oe=e.computed(()=>`${H.value} / ${u.value}`),ge=e.computed(()=>!!a.error),Ne=e.computed(()=>{const Q=n.rows,$=typeof Q=="number"?Q:Number.parseInt(String(Q??""),10);return Number.isFinite($)&&$>0?$:3}),we=e.computed(()=>({height:`${Ne.value*24+16}px`}));return(Q,$)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-1 w-full",[e.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value?(e.openBlock(),e.createElementBlock("div",jE)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse",style:e.normalizeStyle(we.value)},null,4)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.value?(e.openBlock(),e.createElementBlock("label",{key:0,for:c.value,class:"text-sm font-medium"},[e.createTextVNode(e.toDisplayString(s.value)+" ",1),d.value?(e.openBlock(),e.createElementBlock("span",WE,"*")):e.createCommentVNode("",!0)],8,UE)):e.createCommentVNode("",!0),e.createElementVNode("div",HE,[e.createElementVNode("textarea",e.mergeProps({id:c.value,value:y.value},f.value,{style:`text-transform: ${A.value}; padding-right: ${p.value?"2.5rem":"0.75rem"} !important; padding-left: 0.75rem !important;`,class:["flex min-h-[120px] w-full rounded-lg border py-2 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600 text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 readonly:bg-neutral-50/50 dark:readonly:bg-neutral-900/30",ge.value?"border-destructive focus-visible:ring-destructive focus:ring-destructive":""]}),null,16,qE),p.value?(e.openBlock(),e.createElementBlock("div",GE,[e.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground text-sm leading-none","aria-label":"Clear textarea",onClick:X}," ✕ ")])):e.createCommentVNode("",!0),Z.value&&!ge.value?(e.openBlock(),e.createElementBlock("p",KE,e.toDisplayString(oe.value),1)):e.createCommentVNode("",!0)]),ge.value?(e.openBlock(),e.createElementBlock("p",XE,e.toDisplayString(a.error),1)):e.createCommentVNode("",!0)],64))],10,$E)),[[e.vShow,i.value]])}}),zf=e.defineComponent({__name:"Avatar",props:{class:{type:[Boolean,null,String,Object,Array]},size:{default:"sm"},shape:{default:"circle"}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(_e.AvatarRoot),{class:e.normalizeClass(e.unref(Me)(e.unref(YE)({size:t.size,shape:t.shape}),o.class))},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["class"]))}}),$f=e.defineComponent({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(_e.AvatarFallback),e.normalizeProps(e.guardReactiveProps(o)),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16))}}),jf=e.defineComponent({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(_e.AvatarImage),e.mergeProps(o,{class:"h-full w-full object-cover"}),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16))}}),YE=gr("inline-flex items-center justify-center font-normal text-foreground select-none shrink-0 bg-secondary overflow-hidden",{variants:{size:{sm:"h-10 w-10 text-xs",base:"h-16 w-16 text-2xl",lg:"h-32 w-32 text-5xl"},shape:{circle:"rounded-full",square:"rounded-md"}}}),da=e.defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class");return(r,a)=>(e.openBlock(),e.createBlock(e.unref(_e.Separator),e.mergeProps(e.unref(n),{class:e.unref(Me)("shrink-0 bg-border",o.orientation==="horizontal"?"h-px w-full":"w-px h-full",o.class)}),null,16,["class"]))}}),JE={class:"bg-card text-card-foreground"},QE={class:"pb-6 px-3"},ZE={key:0,class:"flex justify-center p-8"},eB={key:1,class:"p-8 text-center text-red-500"},tB={key:2,class:"relative"},oB={class:"space-y-6"},nB={class:"rounded-xl border bg-card text-card-foreground shadow"},rB={class:"p-4"},aB={class:"flex items-center justify-between gap-3"},sB={class:"font-medium"},iB={class:"text-xs text-muted-foreground"},lB={class:"mt-1 text-sm text-muted-foreground"},cB={class:"text-foreground"},dB={class:"text-foreground"},fB={class:"mt-1 text-xs text-muted-foreground"},uB={key:0,class:"mt-3 flex items-center gap-2 text-sm"},hB={class:"flex items-center justify-between gap-3"},mB={class:"font-medium"},pB={class:"text-xs text-muted-foreground"},gB={class:"mt-2 text-sm text-muted-foreground"},bB={class:"flex flex-wrap items-center justify-between gap-3"},yB={class:"flex items-center gap-3"},xB={class:"leading-tight"},kB={class:"text-sm font-medium"},wB={class:"text-xs text-muted-foreground"},CB={class:"flex items-center gap-2"},_B={key:2,class:"flex flex-col gap-3 sm:flex-row sm:items-start"},EB={class:"h-16 w-16 shrink-0 rounded-lg bg-muted flex items-center justify-center"},BB=["src"],SB={class:"flex-1"},AB={class:"flex items-center justify-between gap-3"},vB={class:"font-medium"},DB={class:"text-xs text-muted-foreground"},NB={class:"mt-1 text-sm text-muted-foreground"},VB={class:"text-left sm:text-center"},MB={class:"text-xs text-muted-foreground"},TB={class:"text-left sm:text-center"},PB={class:"text-xs text-muted-foreground"},OB={class:"text-left sm:text-center"},LB={class:"text-xs text-muted-foreground"},RB={class:"flex items-center justify-between gap-3"},IB={class:"font-medium"},FB={class:"text-xs text-muted-foreground"},zB={class:"mt-2 text-sm text-muted-foreground"},$B={class:"mt-3 flex items-center gap-3"},jB={class:"text-sm font-medium"},UB={class:"flex items-start justify-between gap-3"},WB={class:"font-medium"},HB={class:"mt-3 grid gap-2 text-sm"},qB={class:"flex items-center justify-between gap-3"},GB={class:"flex items-center gap-2 text-muted-foreground"},KB={class:"font-medium"},XB={class:"flex items-center justify-between gap-3"},YB={class:"flex items-center gap-2 text-muted-foreground"},JB={class:"font-medium"},QB={class:"flex items-center justify-between gap-3"},ZB={class:"flex items-center gap-2 text-muted-foreground"},eS={class:"font-medium"},tS={class:"flex items-center justify-between"},oS={class:"flex items-center gap-2"},nS={class:"flex items-start justify-between gap-3"},rS={class:"flex items-center gap-2"},aS={class:"font-medium"},sS={class:"mt-2 text-sm text-muted-foreground"},iS={key:0,class:"mt-1 text-sm text-muted-foreground"},lS={class:"flex flex-wrap items-center justify-between gap-3"},cS={class:"flex items-center gap-2"},dS={class:"text-xs text-muted-foreground"},Uf=e.defineComponent({name:"DCodeTimelineWithIcons",__name:"DCodeTimelineWithIcons",props:{items:{},apiUrl:{},apiMethod:{}},setup(t){const n=Ke.useBreakpoints(Ke.breakpointsTailwind).smaller("md");e.ref(!1);const r=t,a=e.ref(!1),s=e.ref(null),i=e.ref([]),l=e.computed(()=>i.value.length>0?i.value:r.items&&r.items.length>0?r.items:[]),c=async()=>{if(r.apiUrl){a.value=!0,s.value=null;try{const u=await fetch(r.apiUrl,{method:r.apiMethod||"GET",headers:{"Content-Type":"application/json"}});if(!u.ok)throw new Error(`Error: ${u.status} ${u.statusText}`);const h=await u.json();Array.isArray(h)?i.value=h:h.data&&Array.isArray(h.data)?i.value=h.data:h.items&&Array.isArray(h.items)?i.value=h.items:i.value=[]}catch(u){console.error("Failed to fetch timeline items:",u),s.value=u.message||"Failed to fetch data"}finally{a.value=!1}}};e.onMounted(()=>{r.apiUrl&&c()}),e.watch(()=>r.apiUrl,()=>{r.apiUrl?c():i.value=[]});const d=u=>{switch(u){case"flight":return{Icon:ne.PlaneIcon,Circle:"bg-primary/10 text-primary border-primary/30"};case"interview":return{Icon:ne.ClockIcon,Circle:"bg-emerald-500/10 text-emerald-600 border-emerald-500/30"};case"product":return{Icon:ne.ShoppingCartIcon,Circle:"bg-amber-500/10 text-amber-600 border-amber-500/30"};case"design":return{Icon:ne.PencilIcon,Circle:"bg-sky-500/10 text-sky-600 border-sky-500/30"};case"server":return{Icon:ne.ServerIcon,Circle:"bg-rose-500/10 text-rose-600 border-rose-500/30"};case"location":return{Icon:ne.MapPinIcon,Circle:"bg-emerald-500/10 text-emerald-600 border-emerald-500/30"};default:return{Icon:ne.Circle,Circle:"bg-primary/10 text-primary border-primary/30"}}},f=u=>u.split(" ").filter(Boolean).slice(0,2).map(h=>{var m;return(m=h[0])==null?void 0:m.toUpperCase()}).join("");return(u,h)=>{const m=e.resolveComponent("ShoppingCart"),p=e.resolveComponent("DCodeBadge"),y=e.resolveComponent("RefreshCcw"),b=e.resolveComponent("MapPin");return e.openBlock(),e.createElementBlock("div",JE,[h[8]||(h[8]=e.createElementVNode("div",{class:"flex flex-col space-y-1.5 py-6 px-3"},[e.createElementVNode("h3",{class:"leading-none tracking-tight text-lg font-medium"},"Timeline With Icons")],-1)),e.createElementVNode("div",QE,[a.value?(e.openBlock(),e.createElementBlock("div",ZE,[...h[0]||(h[0]=[e.createElementVNode("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"},null,-1)])])):s.value?(e.openBlock(),e.createElementBlock("div",eB,e.toDisplayString(s.value),1)):(e.openBlock(),e.createElementBlock("div",tB,[h[7]||(h[7]=e.createElementVNode("div",{class:"absolute left-4 top-0 h-full w-px bg-border"},null,-1)),e.createElementVNode("div",oB,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(g,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,class:"relative pl-14"},[e.createElementVNode("div",{class:e.normalizeClass(["absolute left-0 top-2 flex h-8 w-8 items-center justify-center rounded-full border",d(g.type).Circle])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(g.type).Icon),{class:"h-4 w-4"}))],2),e.createElementVNode("div",nB,[e.createElementVNode("div",rB,[g.type==="flight"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",aB,[e.createElementVNode("p",sB,e.toDisplayString(g.title),1),e.createElementVNode("p",iB,e.toDisplayString(g.meta),1)]),e.createElementVNode("p",lB,[e.createElementVNode("span",cB,e.toDisplayString(g.from),1),e.createVNode(e.unref(ne.ArrowRight),{class:"mx-2 inline h-4 w-4"}),e.createElementVNode("span",dB,e.toDisplayString(g.to),1)]),e.createElementVNode("p",fB,e.toDisplayString(g.time),1),g.fileName?(e.openBlock(),e.createElementBlock("div",uB,[e.createVNode(e.unref(ne.FileText),{class:"h-4 w-4 text-muted-foreground"}),e.createElementVNode("span",null,e.toDisplayString(g.fileName),1)])):e.createCommentVNode("",!0)],64)):g.type==="interview"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",hB,[e.createElementVNode("p",mB,e.toDisplayString(g.title),1),e.createElementVNode("p",pB,e.toDisplayString(g.meta),1)]),e.createElementVNode("p",gB,e.toDisplayString(g.desc),1),e.createVNode(e.unref(da),{class:"my-4"}),e.createElementVNode("div",bB,[e.createElementVNode("div",yB,[e.createVNode(e.unref(zf),{class:"h-10 w-10"},{default:e.withCtx(()=>[g.avatarUrl?(e.openBlock(),e.createBlock(e.unref(jf),{key:0,src:g.avatarUrl},null,8,["src"])):e.createCommentVNode("",!0),e.createVNode(e.unref($f),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f(g.personName??"")),1)]),_:2},1024)]),_:2},1024),e.createElementVNode("div",xB,[e.createElementVNode("p",kB,e.toDisplayString(g.personName),1),e.createElementVNode("p",wB,e.toDisplayString(g.personRole),1)])]),e.createElementVNode("div",CB,[e.createVNode(e.unref(Tt),{size:"icon",variant:"ghost"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.MessageSquare),{class:"h-4 w-4"})]),_:1}),e.createVNode(e.unref(Tt),{size:"icon",variant:"ghost"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.Phone),{class:"h-4 w-4"})]),_:1})])])],64)):g.type==="product"?(e.openBlock(),e.createElementBlock("div",_B,[e.createElementVNode("div",EB,[g.imgUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:g.imgUrl,class:"h-full w-full rounded-lg object-cover",alt:"product"},null,8,BB)):(e.openBlock(),e.createBlock(m,{key:1,class:"h-5 w-5 text-muted-foreground"}))]),e.createElementVNode("div",SB,[e.createElementVNode("div",AB,[e.createElementVNode("p",vB,e.toDisplayString(g.title),1),e.createElementVNode("p",DB,e.toDisplayString(g.meta),1)]),e.createElementVNode("p",NB,e.toDisplayString(g.desc),1),e.createElementVNode("div",{class:e.normalizeClass(["mt-4 grid gap-3",e.unref(n)?"grid-cols-1":"grid-cols-3"])},[e.createElementVNode("div",VB,[h[1]||(h[1]=e.createElementVNode("p",{class:"text-sm font-medium"},"Customer",-1)),e.createElementVNode("p",MB,e.toDisplayString(g.customer),1)]),e.createElementVNode("div",TB,[h[2]||(h[2]=e.createElementVNode("p",{class:"text-sm font-medium"},"Price",-1)),e.createElementVNode("p",PB,e.toDisplayString(g.price),1)]),e.createElementVNode("div",OB,[h[3]||(h[3]=e.createElementVNode("p",{class:"text-sm font-medium"},"Quantity",-1)),e.createElementVNode("p",LB,e.toDisplayString(g.qty),1)])],2)])])):g.type==="design"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",RB,[e.createElementVNode("p",IB,e.toDisplayString(g.title),1),e.createElementVNode("p",FB,e.toDisplayString(g.meta),1)]),e.createElementVNode("p",zB,e.toDisplayString(g.desc),1),e.createElementVNode("div",$B,[e.createVNode(e.unref(zf),{class:"h-10 w-10"},{default:e.withCtx(()=>[g.avatarUrl?(e.openBlock(),e.createBlock(e.unref(jf),{key:0,src:g.avatarUrl},null,8,["src"])):e.createCommentVNode("",!0),e.createVNode(e.unref($f),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f(g.personName??"")),1)]),_:2},1024)]),_:2},1024),e.createElementVNode("p",jB,e.toDisplayString(g.personName),1)])],64)):g.type==="server"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",UB,[e.createElementVNode("p",WB,e.toDisplayString(g.title),1),e.createVNode(p,{variant:"destructive",class:"h-6"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.chipText??""),1)]),_:2},1024)]),e.createElementVNode("div",HB,[e.createElementVNode("div",qB,[e.createElementVNode("div",GB,[e.createVNode(e.unref(ne.Globe),{class:"h-4 w-4"}),h[4]||(h[4]=e.createElementVNode("span",null,"IP Address",-1))]),e.createElementVNode("span",KB,e.toDisplayString(g.ip),1)]),e.createElementVNode("div",XB,[e.createElementVNode("div",YB,[e.createVNode(e.unref(ne.Cpu),{class:"h-4 w-4"}),h[5]||(h[5]=e.createElementVNode("span",null,"CPU",-1))]),e.createElementVNode("span",JB,e.toDisplayString(g.cpu),1)]),e.createElementVNode("div",QB,[e.createElementVNode("div",ZB,[e.createVNode(e.unref(ne.CpuIcon),{class:"h-4 w-4"}),h[6]||(h[6]=e.createElementVNode("span",null,"Memory",-1))]),e.createElementVNode("span",eS,e.toDisplayString(g.memory),1)])]),e.createVNode(e.unref(da),{class:"my-4"}),e.createElementVNode("div",tS,[e.createElementVNode("div",oS,[e.createVNode(e.unref(Tt),{size:"icon",variant:"ghost"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.Share2),{class:"h-4 w-4"})]),_:1}),e.createVNode(e.unref(Tt),{size:"icon",variant:"ghost"},{default:e.withCtx(()=>[e.createVNode(y,{class:"h-4 w-4"})]),_:1})])])],64)):g.type==="location"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("div",nS,[e.createElementVNode("div",rS,[e.createVNode(b,{class:"h-4 w-4 text-muted-foreground"}),e.createElementVNode("p",aS,e.toDisplayString(g.title),1)]),e.createVNode(p,{variant:"destructive",class:"h-6"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.chipText),1)]),_:2},1024)]),e.createElementVNode("p",sS,e.toDisplayString(g.desc1),1),g.desc2?(e.openBlock(),e.createElementBlock("p",iS,e.toDisplayString(g.desc2),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(da),{class:"my-4"}),e.createElementVNode("div",lS,[e.createElementVNode("div",cS,[e.createVNode(e.unref(Tt),{size:"icon",variant:"ghost"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.Link),{class:"h-4 w-4"})]),_:1}),e.createVNode(e.unref(Tt),{size:"icon",variant:"ghost"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.MessageSquare),{class:"h-4 w-4"})]),_:1}),e.createVNode(e.unref(Tt),{size:"icon",variant:"ghost"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.User),{class:"h-4 w-4"})]),_:1})]),e.createElementVNode("p",dS,"Due date: "+e.toDisplayString(g.due),1)])],64)):e.createCommentVNode("",!0)])])]))),128))])]))])])}}}),fS={class:"dcode-upload-file"},uS={class:"border-2 border-dashed border-gray-300 dark:border-gray-700 rounded-lg p-6 flex flex-col items-center justify-center text-center hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors cursor-pointer"},hS={key:0,class:"text-xs text-gray-500 mt-1"},mS=["accept"],pS={key:1,class:"text-xs text-red-600 mt-1"},Wf=e.defineComponent({name:"DCodeUploadFile",__name:"DCodeUploadFile",props:{label:{},accept:{},errorMessage:{},modelValue:{}},emits:["update:modelValue"],setup(t,{emit:o}){const n=o,r=a=>{var i;const s=(i=a.target.files)==null?void 0:i[0];s&&n("update:modelValue",s)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",fS,[t.label?(e.openBlock(),e.createBlock(Uo,{key:0,label:t.label},null,8,["label"])):e.createCommentVNode("",!0),e.createElementVNode("div",uS,[e.createVNode(e.unref(ne.UploadCloud),{class:"w-8 h-8 text-gray-400 mb-2"}),s[0]||(s[0]=e.createElementVNode("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[e.createElementVNode("span",{class:"font-medium text-primary-600"},"Click to upload"),e.createTextVNode(" or drag and drop ")],-1)),t.accept?(e.openBlock(),e.createElementBlock("p",hS,e.toDisplayString(t.accept),1)):e.createCommentVNode("",!0),e.createElementVNode("input",{type:"file",class:"hidden",onChange:r,accept:t.accept},null,40,mS)]),t.errorMessage?(e.openBlock(),e.createElementBlock("p",pS,e.toDisplayString(t.errorMessage),1)):e.createCommentVNode("",!0)]))}}),gS=["onClick"],bS={key:1,class:"mr-2 text-xs font-bold shrink-0 opacity-50"},yS={class:"font-semibold text-sm whitespace-normal text-center leading-tight"},xS={key:1},kS={key:0,class:"text-white"},wS={key:1},CS={key:2},_S=["disabled","onClick"],ES={key:1,class:"mr-2 text-sm font-bold opacity-70"},BS={class:"whitespace-normal text-sm text-center leading-tight"},SS={class:"flex flex-col flex-1 min-w-0"},AS={class:"rounded-lg border bg-muted/30 px-4 py-3 text-sm text-muted-foreground flex items-center gap-2"},vS={class:"text-sm text-muted-foreground"},DS={class:"px-1"},NS=["disabled"],VS=["type"],MS=["disabled"],di=dt(e.defineComponent({name:"DCodeWizard",__name:"DCodeWizard",props:{tabs:{},modelValue:{},defaultTab:{default:0},allowTabClick:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},cache:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!0},apiOptions:{type:[Object,Function],default:void 0},isVertical:{type:Boolean,default:!1},isWizard:{type:Boolean,default:!1},typeWizard:{default:"icon"},showNavigation:{type:Boolean,default:!0},submitText:{default:"Simpan"},loading:{type:Boolean,default:!1},isSubmit:{type:Boolean,default:!1}},emits:["update:modelValue","change","loaded","error"],setup(t,{emit:o}){const n=t,r=o,a=Ye(),s=a==null?void 0:a.DCodeApi;typeof s!="function"&&console.error("[DCodeWizardTabs] useApi() must expose DCodeApi()");const i=e.ref(n.defaultTab),l=e.computed({get(){var x;if(typeof n.modelValue=="string"){const w=(x=n.tabs)==null?void 0:x.findIndex(D=>D.key===n.modelValue);if(w!==void 0&&w>=0)return w}return(typeof n.modelValue=="number"?n.modelValue:void 0)??i.value},set(x){var w;if(i.value=x,typeof n.modelValue=="string"){const D=(w=n.tabs)==null?void 0:w[x];D?r("update:modelValue",D.key):r("update:modelValue",x)}else r("update:modelValue",x)}}),c=e.computed(()=>{var x;return((x=n.tabs)==null?void 0:x.length)??0}),d=e.computed(()=>{var x;return(x=n.tabs)==null?void 0:x[l.value]});function f(x){return c.value<=0?0:Math.min(Math.max(x,0),c.value-1)}function u(x){return x?typeof x=="string"?Do(x,Lt):x:null}const h=e.reactive({});function m(x){return h[x.key]||(h[x.key]={loaded:!1,loading:!1,data:null,error:null}),h[x.key]}function p(){if(n.apiOptions)return typeof n.apiOptions=="function"?n.apiOptions():n.apiOptions}function y(x){const w=x.endpoint||{};return{apiModule:x.apiModule||w.apiModule,apiAction:x.apiAction||w.apiAction,apiUrl:w.apiUrl,apiMethod:w.apiMethod||"GET",apiParams:x.apiParams}}function b(x){if(n.isWizard||!n.allowTabClick||n.disabled)return!1;const w=n.tabs[x];return!(!w||w.disabled)}async function g(x){if(typeof x.tab.fetchData=="function"){const V=await x.tab.fetchData(),L=(V==null?void 0:V.data)??V;return(L==null?void 0:L.data)??L}const w=y(x.tab);if(!(w.apiModule&&w.apiAction||w.apiUrl))return null;if(typeof s!="function")throw new Error("DCodeApi is not available");const k=p();let v;if(w.apiUrl)v=await s("","",k,{_url:w.apiUrl,_method:w.apiMethod,_data:w.apiParams??void 0});else{const V={...k,...w.apiParams};v=await s(w.apiModule,w.apiAction,V)}const S=(v==null?void 0:v.data)??v;return(S==null?void 0:S.data)??S}async function _(x,{force:w=!1}={}){const D=f(x),k=n.tabs[D];if(!k)return;const v=m(k);if(!(n.cache&&v.loaded&&!w)&&!v.loading){v.loading=!0,v.error=null;try{const S=await g({tabIndex:D,tab:k});v.data=S,v.loaded=!0,r("loaded",{tabIndex:D,tab:k,data:S})}catch(S){const N=typeof(S==null?void 0:S.message)=="string"&&S.message||typeof S=="string"&&S||"Failed to load tab data.";v.error=N,r("error",{tabIndex:D,tab:k,message:N})}finally{v.loading=!1}}}function E(x){const w=f(x);b(w)&&w!==l.value&&(l.value=w)}function B(x=l.value){return _(x,{force:!0})}function A(){const x=f(l.value-1);x!==l.value&&(l.value=x)}function C(){const x=f(l.value+1);x!==l.value&&(l.value=x)}return e.watch(()=>n.tabs,x=>{for(const w of x??[])m(w)},{immediate:!0}),e.watch(()=>l.value,async x=>{var D;const w=(D=n.tabs)==null?void 0:D[x];w&&r("change",{tabIndex:x,tab:w}),await _(x)},{immediate:!0}),e.watch(()=>n.autoFetchOnMount,async x=>{x&&await _(l.value)},{immediate:!0}),(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full rounded-lg border bg-card text-card-foreground shadow-sm",{"flex flex-row":t.isVertical}])},[e.createElementVNode("div",{class:e.normalizeClass(["flex flex-col space-y-1.5 p-6",{"w-64 border-r pr-0":t.isVertical,"pb-2":t.isWizard&&!t.isVertical}])},[e.createElementVNode("div",{class:e.normalizeClass({"mt-4":!t.isVertical||t.isWizard})},[t.isWizard?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["w-full relative flex overflow-visible rounded-lg",t.isVertical?"flex-col gap-2":""])},[t.isVertical?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.tabs,(D,k)=>(e.openBlock(),e.createElementBlock("div",{key:D.key,class:"relative z-10 box-border flex items-center gap-3 w-full pb-6 last:pb-0"},[e.createElementVNode("div",{class:e.normalizeClass(["w-8 h-8 rounded-full flex shrink-0 items-center justify-center font-bold text-sm border-2 transition-all bg-card",[k<l.value?"border-[#2563eb] bg-[#2563eb] text-white dark:border-[#1e3a8a] dark:bg-[#1e3a8a]":k===l.value?"border-[#2563eb] text-[#2563eb] shadow-[0_0_0_2px_rgba(37,99,235,0.2)] dark:border-[#1e3a8a] dark:text-[#3b82f6] dark:shadow-[0_0_0_2px_rgba(30,58,138,0.2)]":"border-[#e2e8f0] text-[#94a3b8] dark:border-[#3f3f46] dark:text-[#71717a]"]])},[t.typeWizard==="icon"&&D.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(D.icon)),{key:0,class:"w-4 h-4"})):t.typeWizard==="number"||!D.icon&&t.typeWizard!=="none"?(e.openBlock(),e.createElementBlock("span",xS,[k<l.value?(e.openBlock(),e.createElementBlock("span",kS,"✓")):(e.openBlock(),e.createElementBlock("span",wS,e.toDisplayString(k+1),1))])):(e.openBlock(),e.createElementBlock("span",CS))],2),e.createElementVNode("span",{class:e.normalizeClass(["text-xs font-semibold whitespace-normal px-2 py-1 rounded transition-colors text-left",k===l.value?"text-[#2563eb] dark:text-[#3b82f6]":"text-[#64748b] dark:text-[#a1a1aa]"])},e.toDisplayString(D.title),3)]))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.tabs,(D,k)=>(e.openBlock(),e.createElementBlock("div",{key:D.key,onClick:v=>E(k),style:e.normalizeStyle({zIndex:t.tabs.length-k}),class:"relative flex-1 group"},[e.createElementVNode("div",{class:e.normalizeClass(["relative flex items-center justify-center min-h-[3rem] h-auto py-2 px-2 cursor-pointer transition-colors w-full",[k>0?"pl-8":"",k===l.value?"bg-[#2563eb] text-white dark:bg-[#1e3a8a]":k<l.value?"bg-[#eff6ff] text-[#2563eb] hover:bg-[#dbeafe] dark:bg-[#191d2c] dark:text-[#3b82f6] dark:hover:bg-[#1e263d]":"bg-[#f8fafc] text-[#64748b] hover:bg-[#f1f5f9] hover:text-[#334155] dark:bg-[#18181b] dark:text-[#a1a1aa] dark:hover:bg-[#27272a] dark:hover:text-[#d4d4d8]"]])},[t.typeWizard==="icon"&&D.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(D.icon)),{key:0,class:"w-4 h-4 mr-2 shrink-0"})):t.typeWizard==="number"?(e.openBlock(),e.createElementBlock("span",bS,e.toDisplayString(k+1),1)):e.createCommentVNode("",!0),e.createElementVNode("span",yS,e.toDisplayString(D.title),1)],2),k<t.tabs.length-1?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["absolute top-0 -right-[15.5px] w-[16px] h-full transition-colors block z-10",[k===l.value?"fill-[#2563eb] text-[#2563eb] dark:fill-[#1e3a8a] dark:text-[#1e3a8a]":k<l.value?"fill-[#eff6ff] text-[#eff6ff] group-hover:fill-[#dbeafe] group-hover:text-[#dbeafe] dark:fill-[#191d2c] dark:text-[#191d2c] dark:group-hover:fill-[#1e263d] dark:group-hover:text-[#1e263d]":"fill-[#f8fafc] text-[#f8fafc] group-hover:fill-[#f1f5f9] group-hover:text-[#f1f5f9] dark:fill-[#18181b] dark:text-[#18181b] dark:group-hover:fill-[#27272a] dark:group-hover:text-[#27272a]"]]),preserveAspectRatio:"none",viewBox:"0 0 16 48"},[...w[0]||(w[0]=[e.createElementVNode("polygon",{points:"0,0 16,24 0,48"},null,-1)])],2)):e.createCommentVNode("",!0)],12,gS))),128))],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["flex w-full",t.isVertical?"flex-col gap-1":"flex-wrap border-b border-separate"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabs,(D,k)=>(e.openBlock(),e.createElementBlock("button",{key:D.key,type:"button",disabled:!b(k),onClick:v=>E(k),class:e.normalizeClass(["relative min-h-[3rem] h-auto py-2 flex items-center justify-center gap-2 px-4 transition-all rounded-none focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 border-[#e2e8f0] dark:border-[#3f3f46]",e.unref(Me)("border-b border-r",!t.isVertical&&k===t.tabs.length-1&&"border-r-0",k===l.value?"bg-[#2563eb]/[0.08] text-[#2563eb] font-semibold dark:bg-[#191d2c] dark:text-[#3b82f6]":"bg-transparent text-[#64748b] hover:bg-[#f1f5f9] hover:text-[#334155] dark:text-[#a1a1aa] dark:hover:bg-[#27272a] dark:hover:text-[#f4f4f5]",!b(k)&&"opacity-60 cursor-not-allowed",t.isVertical?"w-full justify-start border-r-0":"flex-1")])},[t.typeWizard==="icon"&&D.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(D.icon)),{key:0,class:"h-4 w-4 shrink-0"})):t.typeWizard==="number"?(e.openBlock(),e.createElementBlock("span",ES,e.toDisplayString(k+1),1)):e.createCommentVNode("",!0),e.createElementVNode("span",BS,e.toDisplayString(D.title),1)],10,_S))),128))],2))],2)],2),t.isVertical?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(da),{key:0})),e.createElementVNode("div",SS,[e.createElementVNode("div",{class:e.normalizeClass(["p-6 flex-1 min-w-0",{"pl-6":t.isVertical}])},[e.createVNode(e.Transition,{name:"wizard-fade",mode:"out-in"},{default:e.withCtx(()=>{var D,k,v,S;return[(e.openBlock(),e.createElementBlock("div",{key:((D=d.value)==null?void 0:D.key)||l.value,class:"w-full"},[d.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(k=h[d.value.key])!=null&&k.loading?e.renderSlot(x.$slots,"loading",{key:0,tab:d.value,tabIndex:l.value},()=>[e.createElementVNode("div",AS,[e.createVNode(e.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),w[1]||(w[1]=e.createTextVNode(" Loading... ",-1))])],!0):e.renderSlot(x.$slots,`tab-${d.value.key}`,{key:1,tab:d.value,tabIndex:l.value,data:(v=h[d.value.key])==null?void 0:v.data,loaded:(S=h[d.value.key])==null?void 0:S.loaded,reload:B},()=>[e.createElementVNode("div",vS,[w[2]||(w[2]=e.createTextVNode(" Slot ",-1)),e.createElementVNode("code",DS,"tab-"+e.toDisplayString(d.value.key),1),w[3]||(w[3]=e.createTextVNode(" belum dibuat. ",-1))])],!0)],64)):e.createCommentVNode("",!0)]))]}),_:3})],2),t.isWizard||t.showNavigation?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex items-center justify-between p-6 pt-0",{"pl-6":t.isVertical}])},[e.createElementVNode("button",{type:"button",onClick:A,disabled:l.value<=0,class:"relative inline-flex items-center justify-center gap-2 px-5 py-2.5 text-sm font-medium transition-all duration-300 rounded-lg bg-[#ffffff] border border-[#e2e8f0] text-[#334155] shadow-sm hover:bg-[#f8fafc] hover:text-[#0f172a] hover:-translate-y-0.5 hover:shadow disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#ffffff] disabled:hover:text-[#334155] disabled:hover:translate-y-0 disabled:active:scale-100 dark:bg-[#18181b] dark:border-[#27272a] dark:text-[#d4d4d8] dark:hover:bg-[#27272a] dark:hover:border-[#3f3f46] dark:disabled:hover:bg-[#18181b] dark:disabled:hover:text-[#d4d4d8] focus:outline-none focus:ring-2 focus:ring-[#e2e8f0] focus:ring-offset-2 active:scale-95"}," Sebelumnya ",8,NS),l.value<c.value-1?(e.openBlock(),e.createElementBlock("button",{key:0,type:t.isSubmit?"submit":"button",onClick:C,class:"relative inline-flex items-center justify-center gap-2 px-6 py-2.5 text-sm font-medium text-[#ffffff] transition-all duration-300 rounded-lg shadow-md bg-[#2563eb] hover:bg-[#1d4ed8] hover:shadow-lg hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#2563eb] disabled:hover:translate-y-0 disabled:active:scale-100 focus:outline-none focus:ring-2 focus:ring-[#2563eb] focus:ring-offset-2 active:scale-95"}," Selanjutnya ",8,VS)):(e.openBlock(),e.createElementBlock("button",{key:1,type:"submit",disabled:t.loading,class:"relative inline-flex items-center justify-center gap-2 px-6 py-2.5 text-sm font-medium text-[#ffffff] transition-all duration-300 rounded-lg shadow-md bg-[#2563eb] hover:bg-[#1d4ed8] hover:shadow-lg hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#2563eb] disabled:hover:translate-y-0 disabled:active:scale-100 dark:bg-[#1e3a8a] dark:hover:bg-[#1e40af] focus:outline-none focus:ring-2 focus:ring-[#2563eb] focus:ring-offset-2 active:scale-95"},[t.loading?(e.openBlock(),e.createBlock(e.unref(ne.Loader2),{key:0,class:"w-4 h-4 mr-2 animate-spin"})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.submitText),1)],8,MS))],2)):e.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-3330e7b3"]]),TS={class:"permission-menu w-full space-y-4"},PS={class:"bg-neutral-50/50 dark:bg-neutral-900/30 border-b border-neutral-200/60 dark:border-neutral-700/30 text-neutral-900 dark:text-neutral-100 p-4"},OS={class:"flex items-center justify-between"},LS={class:"flex items-center gap-3 flex-1"},RS=["onClick"],IS={key:1,class:"w-7"},FS={key:2,class:"flex-shrink-0"},zS={class:"text-lg font-semibold flex-1"},$S={key:0,class:"p-4 bg-gray-50 dark:bg-zinc-900/50 border-b border-gray-200 dark:border-neutral-700"},jS={class:"text-xs font-semibold text-gray-600 dark:text-neutral-400 uppercase tracking-wide mb-3"},US={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2 w-full"},WS=["checked","disabled","onChange"],HS={class:"text-sm font-medium text-gray-700 dark:text-neutral-300 group-hover:text-blue-700 dark:group-hover:text-primary-400"},qS={key:0,class:"p-4 space-y-3 bg-gray-50 dark:bg-zinc-900/30"},GS={class:"text-sm font-semibold text-gray-700 dark:text-neutral-300 mb-3 flex items-center gap-2"},KS={class:"bg-neutral-50 dark:bg-neutral-900/30 border-b border-neutral-200/60 dark:border-neutral-700/30 text-neutral-900 dark:text-neutral-100 p-3"},XS={class:"flex items-center justify-between"},YS={class:"flex items-center gap-3 flex-1"},JS={key:0,class:"flex-shrink-0"},QS={class:"text-base font-semibold flex-1"},ZS={key:1,class:"text-xs bg-white/20 px-2 py-1 rounded font-mono hidden sm:inline-block"},eA={class:"flex items-center gap-2 px-2.5 py-1 bg-white/20 hover:bg-white/30 rounded-lg cursor-pointer transition-colors"},tA=["checked","onChange"],oA={class:"text-xs font-medium"},nA={key:0,class:"p-3"},rA={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2 w-full"},aA=["checked","disabled","onChange"],sA={class:"text-xs font-medium text-gray-700 dark:text-neutral-300 group-hover:text-pink-700 dark:group-hover:text-pink-400"},fi=dt(e.defineComponent({__name:"DCodePermissionMenu",props:{menuList:{default:()=>[]},enableParentControl:{type:Boolean,default:!1},showIcons:{type:Boolean,default:!0},modelValue:{default:()=>[]},treeData:{default:()=>[]}},emits:["permission-change","menu-check","update:modelValue"],setup(t,{expose:o,emit:n}){const{t:r}=_t.useI18n(),a=t,s=n,i=e.computed(()=>a.menuList&&a.menuList.length>0?a.menuList:a.treeData||[]),l=e.ref(new Map),c=e.ref(new Set),d=(k=!0)=>{(S=>{S.forEach(N=>{N.permission.forEach(V=>{const L=`${N.id}-${V.id}-parent`,O=V.code==="VIEW"||V.name.toUpperCase()==="VIEW";l.value.has(L)||l.value.set(L,O||(k?N.checked??!1:!1))}),N.detail&&N.detail.length>0&&N.detail.forEach(V=>{V.permission.forEach(L=>{const O=`${V.id}-${L.id}-child`,P=L.code==="VIEW"||L.name.toUpperCase()==="VIEW";l.value.has(O)||l.value.set(O,P||(k?V.checked??!1:!1))})})})})(i.value)},f=()=>{console.log("[DCodePermissionMenu] initializeFromModelValue called. modelValue:",a.modelValue),l.value.clear(),d(!1),a.modelValue&&a.modelValue.length>0&&a.modelValue.forEach(k=>{const v=k.menuId,S=k.actionsIds;i.value.forEach(N=>{N.id===v&&S.forEach(V=>{const L=`${v}-${V}-parent`;l.value.set(L,!0)}),N.detail&&N.detail.length>0&&N.detail.forEach(V=>{V.id===v&&S.forEach(L=>{const O=`${v}-${L}-child`;l.value.set(O,!0)})})})})};f(),e.watch(()=>a.modelValue,()=>{f()},{deep:!0}),e.watch(()=>i.value.length,(k,v)=>{v===0&&k>0&&f()});const u=k=>k.detail&&k.detail.length>0,h=k=>{c.value.has(k)?c.value.delete(k):c.value.add(k)},m=k=>c.value.has(k),p=(k,v,S=!1)=>{const N=`${k}-${v}-${S?"child":"parent"}`;return l.value.get(N)??!1},y=()=>{const k=C();s("update:modelValue",k.permissions)},b=(k,v,S,N=!1)=>{const V=S.target.checked,L=`${k}-${v}-${N?"child":"parent"}`;l.value.set(L,V),s("permission-change",k,v,V,!N),y()},g=k=>k.permission.filter(_),_=k=>k.code==="VIEW"||k.name.toUpperCase()==="VIEW",E=(k,v,S)=>{const N=S.target.checked;v.permission.forEach(V=>{if(_(V)){const O=`${v.id}-${V.id}-child`;l.value.set(O,!0);return}const L=`${v.id}-${V.id}-child`;l.value.set(L,N)}),l.value=new Map(l.value),s("menu-check",v.id,N),y()},B=(k,v=!1)=>{const S=v?k.permission:g(k);return!S||S.length===0?!1:S.every(N=>{const V=`${k.id}-${N.id}-${v?"child":"parent"}`;return l.value.get(V)??!1})},A=()=>{const k={};return i.value.forEach(v=>{var S;k[v.id]={name:v.name,parentPermissions:v.permission.map(N=>({id:N.id,name:N.name,checked:p(v.id,N.id,!1)})),children:((S=v.detail)==null?void 0:S.map(N=>({id:N.id,name:N.name,permissions:N.permission.map(V=>({id:V.id,name:V.name,checked:p(N.id,V.id,!0)}))})))||[]}}),k},C=()=>{const k=[],v=(S,N=!1)=>{const V=[];S.permission.forEach(L=>{const O=`${S.id}-${L.id}-${N?"child":"parent"}`;(l.value.get(O)??!1)&&V.push(L.id)}),V.length>0&&k.push({menuId:S.id,actionsIds:V})};return i.value.forEach(S=>{v(S,!1),S.detail&&S.detail.length>0&&S.detail.forEach(N=>{v(N,!0)})}),{permissions:k}};return o({getCurrentStates:A,getPermissionsForDatabase:C,getAllPermissionsWithStatus:()=>{const k=[],v=(S,N=!1)=>{const V=S.permission.map(O=>{const P=`${S.id}-${O.id}-${N?"child":"parent"}`,R=l.value.get(P)??!1;return{id:O.id,name:O.name,checked:R}}),L=V.filter(O=>O.checked).map(O=>O.id);k.push({menuId:S.id,menuName:S.name,actionsIds:L,actions:V})};return i.value.forEach(S=>{v(S,!1),S.detail&&S.detail.length>0&&S.detail.forEach(N=>{v(N,!0)})}),{permissions:k}},permissionStates:l,expandAll:()=>{i.value.forEach(k=>{u(k)&&c.value.add(k.id)})},collapseAll:()=>{c.value.clear()}}),(k,v)=>(e.openBlock(),e.createElementBlock("div",TS,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,S=>(e.openBlock(),e.createElementBlock("div",{key:S.id,class:e.normalizeClass(["dcode-card overflow-hidden",{"border-l-4 border-l-blue-500":u(S)}])},[e.createElementVNode("div",PS,[e.createElementVNode("div",OS,[e.createElementVNode("div",LS,[u(S)?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:N=>h(S.id),type:"button",class:"p-1 hover:bg-white/20 rounded-lg transition-colors"},[m(S.id)?(e.openBlock(),e.createBlock(e.unref(ne.ChevronDown),{key:0,class:"w-5 h-5"})):(e.openBlock(),e.createBlock(e.unref(ne.ChevronRight),{key:1,class:"w-5 h-5"}))],8,RS)):(e.openBlock(),e.createElementBlock("div",IS)),t.showIcons&&S.icon?(e.openBlock(),e.createElementBlock("span",FS,[e.createElementVNode("i",{class:e.normalizeClass([S.icon,"text-2xl"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("h3",zS,e.toDisplayString(S.name),1)])])]),S.permission&&S.permission.length>0&&!u(S)?(e.openBlock(),e.createElementBlock("div",$S,[e.createElementVNode("h4",jS,e.toDisplayString(e.unref(r)("common.permissions"))+": ",1),e.createElementVNode("div",US,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g(S),N=>(e.openBlock(),e.createElementBlock("label",{key:N.id,class:"flex items-center gap-2 px-3 py-2 bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700/50 rounded-lg cursor-pointer hover:border-blue-400 dark:hover:border-primary-500 hover:bg-blue-50 dark:hover:bg-neutral-900/50 transition-all group"},[e.createElementVNode("input",{type:"checkbox",checked:_(N)||p(S.id,N.id,!1),disabled:_(N),onChange:V=>b(S.id,N.id,V,!1),class:e.normalizeClass(["w-4 h-4 text-blue-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-blue-500 dark:focus:ring-blue-600",_(N)?"cursor-not-allowed opacity-75":"cursor-pointer"])},null,42,WS),e.createElementVNode("span",HS,e.toDisplayString(N.name),1)]))),128))])])):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"opacity-100 max-h-[5000px]","leave-active-class":"transition-all duration-300 ease-in","leave-from-class":"opacity-100 max-h-[5000px]","leave-to-class":"opacity-0 max-h-0"},{default:e.withCtx(()=>[u(S)&&m(S.id)?(e.openBlock(),e.createElementBlock("div",qS,[e.createElementVNode("h4",GS,[v[0]||(v[0]=e.createElementVNode("span",{class:"w-1 h-4 bg-blue-500 rounded"},null,-1)),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("common.subMenus")),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.detail,N=>(e.openBlock(),e.createElementBlock("div",{key:N.id,class:"bg-white dark:bg-neutral-800 rounded-lg border border-gray-200 dark:border-neutral-700/50 overflow-hidden shadow-sm hover:shadow transition-shadow"},[e.createElementVNode("div",KS,[e.createElementVNode("div",XS,[e.createElementVNode("div",YS,[t.showIcons&&N.icon?(e.openBlock(),e.createElementBlock("span",JS,[e.createElementVNode("i",{class:e.normalizeClass([N.icon,"text-xl"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("h5",QS,e.toDisplayString(N.name),1),N.path?(e.openBlock(),e.createElementBlock("span",ZS,e.toDisplayString(N.path),1)):e.createCommentVNode("",!0),e.createElementVNode("label",eA,[e.createElementVNode("input",{type:"checkbox",checked:B(N,!0),onChange:V=>E(S,N,V),class:"w-3.5 h-3.5 text-pink-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-pink-500 dark:focus:ring-pink-600 cursor-pointer"},null,40,tA),e.createElementVNode("span",oA,e.toDisplayString(e.unref(r)("common.selectAll")),1)])])])]),N.permission&&N.permission.length>0?(e.openBlock(),e.createElementBlock("div",nA,[e.createElementVNode("div",rA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.permission,V=>(e.openBlock(),e.createElementBlock("label",{key:V.id,class:"flex items-center gap-2 px-2.5 py-1.5 bg-gray-50 dark:bg-zinc-900/50 border border-gray-200 dark:border-neutral-700 rounded-md cursor-pointer hover:border-pink-400 dark:hover:border-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/20 transition-all group"},[e.createElementVNode("input",{type:"checkbox",checked:_(V)||p(N.id,V.id,!0),disabled:_(V),onChange:L=>b(N.id,V.id,L,!0),class:e.normalizeClass(["w-3.5 h-3.5 text-pink-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-pink-500 dark:focus:ring-pink-600",_(V)?"cursor-not-allowed opacity-75":"cursor-pointer"])},null,42,aA),e.createElementVNode("span",sA,e.toDisplayString(V.name),1)]))),128))])])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0)]),_:2},1024)],2))),128))]))}}),[["__scopeId","data-v-40ddf81d"]]),iA={class:"space-y-4"},lA={key:0,class:"block text-sm font-medium text-neutral-700 dark:text-neutral-300 mb-2"},cA={key:0,class:"text-danger-500"},dA={key:1,class:"flex items-center justify-center p-8 bg-white dark:bg-gray-800 rounded-lg shadow"},fA={class:"text-neutral-600 dark:text-neutral-400"},uA={key:2,class:"p-6 bg-white dark:bg-gray-800 rounded-lg shadow text-center"},hA={class:"text-neutral-500 dark:text-neutral-400"},mA={key:3,class:"space-y-3"},pA={class:"flex items-center justify-between p-4 bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700"},gA={class:"flex items-center gap-3"},bA={class:"font-medium text-gray-900 dark:text-gray-100 text-base"},yA={class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},xA={class:"flex items-center gap-2 text-sm font-medium"},kA={class:"px-2.5 py-1 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-700 dark:text-primary-300"},wA={class:"p-4"},CA={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3"},_A={class:"ml-2 flex-1 min-w-0"},EA=["for"],BA={key:0,class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5 line-clamp-2"},SA={key:4,class:"mt-1 text-xs text-danger-600"},ui=e.defineComponent({__name:"DCodeTreePermissions",props:{modelValue:{},label:{},required:{type:Boolean},disabled:{type:Boolean},error:{},treeData:{}},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,r=o,{t:a}=_t.useI18n(),s=e.ref(!0),i=e.ref([]),l=e.ref({}),c=e.ref([]),d=e.ref({}),f=g=>{if(console.log(g),!g)return[];if(Array.isArray(g)&&g.length>0&&g[0].module&&Array.isArray(g[0].permissions))return g.map(_=>({menuId:_.menuId,module:_.module,label:_.label||_.module,permissions:_.permissions}));if(Array.isArray(g)&&g.length>0&&g[0].key){const _={};return g.forEach(E=>{const B=E.key,A=B&&B.includes(".")?B.split(".")[0]:"other";_[A]||(_[A]={menuId:0,module:A,label:A,permissions:[]}),_[A].permissions.push({id:E.id,key:E.key,label:E.label,description:E.description})}),Object.values(_)}if(Array.isArray(g)&&g.length>0&&g[0].id&&g[0].name&&Array.isArray(g[0].permission)){const _=[],E=(B,A="")=>{const C=A?`${A}.${B.name}`:B.name,x=C.toLowerCase().replace(/\s+/g,"_"),w=[];if(B.detail&&Array.isArray(B.detail)&&B.detail.forEach(D=>{w.push(D.id)}),B.permission&&B.permission.length>0){const D=B.permission.map(k=>({id:k.id,key:`${x}.${k.name.toLowerCase().replace(/\s+/g,"_")}`,label:`${k.name} ${B.name}`,description:`Permission to ${k.name.toLowerCase()} ${B.name.toLowerCase()}`}));_.push({menuId:B.id,module:x,label:B.name,permissions:D,subMenuIds:w.length>0?w:void 0})}B.detail&&Array.isArray(B.detail)&&B.detail.forEach(D=>{E(D,C)})};return g.forEach(B=>E(B)),_}return g.data?f(g.data):[]},u=async()=>{s.value=!0;try{let g;n.treeData&&n.treeData.length>0?g=n.treeData:g=[];const _=f(g);i.value=_;const E={},B=[],A={};_.forEach(x=>{x.permissions.forEach(w=>{const D=typeof w.id=="string"?parseInt(w.id):w.id;A[D]=x.menuId})});const C=new Set;n.modelValue&&Array.isArray(n.modelValue)&&n.modelValue.forEach(x=>{B.push(x.menuId),x.actionsIds&&Array.isArray(x.actionsIds)&&x.actionsIds.forEach(w=>C.add(w))}),_.forEach(x=>x.permissions.forEach(w=>{const D=typeof w.id=="string"?parseInt(w.id):w.id;E[D]=C.has(D)})),l.value=E,c.value=B,d.value=A}catch{i.value=[]}finally{s.value=!1}},h=g=>g.permissions.filter(_=>{const E=typeof _.id=="string"?parseInt(_.id):_.id;return l.value[E]}).length,m=g=>g.permissions.every(_=>{const E=typeof _.id=="string"?parseInt(_.id):_.id;return l.value[E]}),p=g=>{const _=h(g);return _>0&&_<g.permissions.length},y=e.ref(!1),b=(g,_)=>{y.value=!0,g.permissions.map(A=>typeof A.id=="string"?parseInt(A.id):A.id),g.permissions.forEach(A=>{const C=typeof A.id=="string"?parseInt(A.id):A.id;l.value[C]=_});let E=n.modelValue?[...n.modelValue]:[],B=[g.menuId];g.subMenuIds&&g.subMenuIds.length>0&&(B=[...B,...g.subMenuIds],g.subMenuIds.forEach(A=>{const C=i.value.find(x=>x.menuId===A);C&&C.permissions.forEach(x=>{const w=typeof x.id=="string"?parseInt(x.id):x.id;l.value[w]=_})})),_?B.forEach(A=>{const C=i.value.find(x=>x.menuId===A);if(C){const x=C.permissions.map(D=>typeof D.id=="string"?parseInt(D.id):D.id),w=E.findIndex(D=>D.menuId===A);w!==-1?E[w]={menuId:A,actionsIds:x}:E.push({menuId:A,actionsIds:x})}}):E=E.filter(A=>!B.includes(A.menuId)),c.value=E.map(A=>A.menuId),console.log("Full Result:",JSON.stringify(E,null,2)),r("update:modelValue",E),setTimeout(()=>{y.value=!1},100)};return e.watch(()=>n.modelValue,g=>{if(!g)return;const _=new Set,E=[];g.forEach(B=>{E.push(B.menuId),B.actionsIds&&Array.isArray(B.actionsIds)&&B.actionsIds.forEach(A=>_.add(A))}),Object.keys(l.value).forEach(B=>{const A=parseInt(B);l.value[A]=_.has(A)}),c.value=E}),e.watch(()=>n.treeData,g=>{g&&g.length>0&&u()},{deep:!0}),e.watch(l,(g,_)=>{if(y.value)return;if(Object.keys(g).map(B=>parseInt(B)).filter(B=>g[B]!==(_==null?void 0:_[B])).length>0){let B=n.modelValue?[...n.modelValue]:[];const A={};Object.keys(g).forEach(C=>{const x=parseInt(C);if(g[x]){const w=d.value[x];console.log(`Permission ${x} belongs to Menu ${w}`),w!==void 0&&(A[w]||(A[w]=[]),A[w].push(x))}}),Object.keys(A).forEach(C=>{const x=parseInt(C),w=A[x],D=B.findIndex(k=>k.menuId===x);D!==-1?B[D]={menuId:x,actionsIds:w}:B.push({menuId:x,actionsIds:w})}),B=B.filter(C=>A[C.menuId]&&A[C.menuId].length>0),c.value=B.map(C=>C.menuId),console.log("Result:",JSON.stringify(B,null,2)),r("update:modelValue",B)}},{deep:!0}),e.onMounted(u),(g,_)=>(e.openBlock(),e.createElementBlock("div",iA,[t.label?(e.openBlock(),e.createElementBlock("label",lA,[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",cA,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",dA,[e.createVNode(e.unref(ne.Loader2),{class:"animate-spin text-primary-600 mr-2",size:24}),e.createElementVNode("span",fA,e.toDisplayString(e.unref(a)("common.loadingPermissions")),1)])):i.value.length===0?(e.openBlock(),e.createElementBlock("div",uA,[e.createElementVNode("p",hA,e.toDisplayString(e.unref(a)("common.noPermissions")),1)])):(e.openBlock(),e.createElementBlock("div",mA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,E=>(e.openBlock(),e.createElementBlock("div",{key:E.module,class:"bg-white dark:bg-neutral-800 rounded-lg border border-neutral-200/60 dark:border-neutral-700/50 shadow-sm hover:shadow-md transition-shadow"},[e.createElementVNode("div",pA,[e.createElementVNode("div",gA,[e.createVNode(so,{modelValue:m(E),indeterminate:p(E),"onUpdate:modelValue":B=>b(E,!!B),disabled:t.disabled},null,8,["modelValue","indeterminate","onUpdate:modelValue","disabled"]),e.createElementVNode("div",null,[e.createElementVNode("div",bA,e.toDisplayString(E.label||E.module),1),e.createElementVNode("div",yA,e.toDisplayString(h(E))+" "+e.toDisplayString(e.unref(a)("common.from"))+" "+e.toDisplayString(E.permissions.length)+" "+e.toDisplayString(e.unref(a)("common.selected")),1)])]),e.createElementVNode("div",xA,[e.createElementVNode("div",kA,e.toDisplayString(h(E))+"/"+e.toDisplayString(E.permissions.length),1)])]),e.createElementVNode("div",wA,[e.createElementVNode("div",CA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.permissions,B=>(e.openBlock(),e.createElementBlock("div",{key:B.id,class:"flex items-start p-2 rounded hover:bg-gray-50 dark:hover:bg-gray-750 transition-colors"},[e.createVNode(so,{modelValue:l.value[typeof B.id=="string"?parseInt(B.id):B.id],"onUpdate:modelValue":A=>l.value[typeof B.id=="string"?parseInt(B.id):B.id]=A,disabled:t.disabled,class:"flex-shrink-0"},null,8,["modelValue","onUpdate:modelValue","disabled"]),e.createElementVNode("div",_A,[e.createElementVNode("label",{for:`perm-${B.id}`,class:"text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer block"},e.toDisplayString(B.label||B.key),9,EA),B.description?(e.openBlock(),e.createElementBlock("p",BA,e.toDisplayString(B.description),1)):e.createCommentVNode("",!0)])]))),128))])])]))),128))])),t.error?(e.openBlock(),e.createElementBlock("p",SA,e.toDisplayString(t.error),1)):e.createCommentVNode("",!0)]))}}),AA={key:0,class:"fixed inset-0 z-[100] flex justify-end"},vA={key:0,class:"relative w-full max-w-sm h-full bg-white dark:bg-slate-900 shadow-2xl flex flex-col border-l border-gray-200 dark:border-gray-800"},DA={class:"px-6 py-4 border-b border-gray-100 dark:border-gray-800 flex items-center justify-between"},NA={class:"text-lg font-semibold text-gray-900 dark:text-gray-100"},VA={key:0,class:"text-sm text-gray-500 dark:text-gray-400 mt-1"},MA={class:"flex-1 overflow-y-auto p-6 scrollbar-thin scrollbar-thumb-gray-200 dark:scrollbar-thumb-gray-800"},TA={class:"px-6 py-4 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-slate-900/50"},PA=e.defineComponent({__name:"DataFilterSheet",props:{title:{default:"Filter Data"},description:{default:"Masukan parameter pencarian untuk memfilter data."}},setup(t,{expose:o}){const n=e.ref(!1),r=()=>{n.value=!0,document.body.style.overflow="hidden"},a=()=>{n.value=!1,document.body.style.overflow=""};return o({open:r,close:a}),(s,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{onClick:r},[e.renderSlot(s.$slots,"trigger",{},()=>[e.createVNode(We,{variant:"outline",class:"gap-2",icon:"Search",text:"Pencarian"})])]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[n.value?(e.openBlock(),e.createElementBlock("div",AA,[e.createVNode(e.Transition,{appear:"","enter-active-class":"transition-opacity duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:a})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{appear:"","enter-active-class":"transition-transform duration-300 ease-out","enter-from-class":"translate-x-full","enter-to-class":"translate-x-0","leave-active-class":"transition-transform duration-200 ease-in","leave-from-class":"translate-x-0","leave-to-class":"translate-x-full"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createElementBlock("div",vA,[e.createElementVNode("div",DA,[e.createElementVNode("div",null,[e.createElementVNode("h3",NA,e.toDisplayString(t.title),1),t.description?(e.openBlock(),e.createElementBlock("p",VA,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)]),e.createVNode(We,{variant:"ghost",size:"icon",onClick:a,icon:"X",class:"text-gray-400 hover:text-gray-600"})]),e.createElementVNode("div",MA,[e.renderSlot(s.$slots,"default")]),e.createElementVNode("div",TA,[e.renderSlot(s.$slots,"footer")])])):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)]))]))}}),OA={key:0},LA=["value","name"],RA=e.defineComponent({__name:"DynamicFilterField",props:{field:{},modelValue:{},disabled:{type:Boolean},required:{type:Boolean},readonly:{type:Boolean},options:{},dynamicLabels:{},dynamicLength:{}},emits:["update:modelValue"],setup(t,{emit:o}){const{locale:n}=_t.useI18n(),r=t,a=o,s=e.ref(r.modelValue);e.watch(()=>r.modelValue,f=>{s.value=f});const i={DCodeTextField:tn,DCodeAutoComplete:fr,DCodeDatePicker:ra,DCodeTextarea:un,DCodeTextArea:un,DCodeCheckbox:so,DCodeSwitch:ca,DCodeOtpInput:ia,DCodeImageField:sa,DCodeSlider:la},l=e.computed(()=>{const f=r.field.component;return i[f]||null}),c=e.computed(()=>{var h,m,p,y;const f=r.field.props,u={};return(f.labelID||f.labelEN)&&(u.label=n.value==="id"?f.labelID:f.labelEN),(f.placeholderID||f.placeholderEN)&&(u.placeholder=n.value==="id"?f.placeholderID:f.placeholderEN),(r.required!==void 0||f.required!==void 0)&&(u.required=r.required!==void 0?r.required:f.required),(r.disabled!==void 0||f.disabled!==void 0)&&(u.disabled=r.disabled!==void 0?r.disabled:f.disabled),(r.readonly!==void 0||f.readonly!==void 0)&&(u.readonly=r.readonly!==void 0?r.readonly:f.readonly),f.valueType&&(u.type=f.valueType),(((h=r.dynamicLength)==null?void 0:h.minLength)!==void 0||f.minLength!==void 0)&&(u.minlength=((m=r.dynamicLength)==null?void 0:m.minLength)??f.minLength),(((p=r.dynamicLength)==null?void 0:p.maxLength)!==void 0||f.maxLength!==void 0)&&(u.maxlength=((y=r.dynamicLength)==null?void 0:y.maxLength)??f.maxLength),f.min!==void 0&&(u.min=f.min),f.max!==void 0&&(u.max=f.max),(r.options||f.options)&&(u.options=r.options||f.options),f.endpoint&&(u.endpoint=f.endpoint),f.itemTitle&&(u.itemTitle=f.itemTitle),f.itemValue&&(u.itemValue=f.itemValue),f.returnObject!==void 0&&(u.returnObject=f.returnObject),f.clearable!==void 0&&(u.clearable=f.clearable),Object.keys(f).forEach(b=>{!["labelID","labelEN","placeholderID","placeholderEN"].includes(b)&&!u.hasOwnProperty(b)&&(u[b]=f[b])}),r.dynamicLabels&&((r.dynamicLabels.labelID||r.dynamicLabels.labelEN)&&(u.label=n.value==="id"?r.dynamicLabels.labelID:r.dynamicLabels.labelEN),(r.dynamicLabels.placeholderID||r.dynamicLabels.placeholderEN)&&(u.placeholder=n.value==="id"?r.dynamicLabels.placeholderID:r.dynamicLabels.placeholderEN)),u}),d=f=>{s.value=f,a("update:modelValue",f)};return(f,u)=>t.field.isHidden?(e.openBlock(),e.createElementBlock("div",OA,[e.createElementVNode("input",{type:"hidden",value:s.value,name:t.field.model},null,8,LA)])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),e.mergeProps({key:1},c.value,{modelValue:s.value,"onUpdate:modelValue":[u[0]||(u[0]=h=>s.value=h),d]}),null,16,["modelValue"]))}}),IA={class:"flex items-center gap-2 shrink-0"},FA={class:"flex-1 text-right overflow-hidden"},zA=["title"],hn=dt(e.defineComponent({name:"DCodeStaticLabel",__name:"DCodeStaticLabel",props:{label:{},value:{},icon:{},color:{}},setup(t){const o=t,n=e.computed(()=>{const a=o.color||"secondary",s={primary:"border-blue-200 text-blue-700",success:"border-green-200 text-green-700",warning:"border-yellow-200 text-yellow-700",danger:"border-red-200 text-red-700",info:"border-cyan-200 text-cyan-700",secondary:"border-slate-200 text-slate-700 dark:border-slate-700/50",dark:"border-b border-gray-300 text-gray-900 dark:text-gray-100"};return s[a]||s.secondary}),r=a=>a==null||a===""?"-":typeof a=="boolean"?a?"Yes":"No":String(a);return(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-row justify-between items-center gap-4 py-3 px-0 border-b transition-all duration-300 rounded-none bg-transparent",n.value])},[e.createElementVNode("div",IA,[e.createVNode(Uo,{label:t.label,icon:t.icon,class:"text-xs font-semibold text-neutral-500 dark:text-neutral-400 uppercase tracking-wider"},null,8,["label","icon"])]),e.createElementVNode("div",FA,[e.renderSlot(a.$slots,"value",{},()=>[e.createElementVNode("span",{class:"text-sm font-medium truncate block",title:r(t.value)},e.toDisplayString(r(t.value)),9,zA)],!0)])],2))}}),[["__scopeId","data-v-dd90fa7f"]]),$A={class:"space-y-2 group"},jA=["onClick"],UA=["src","alt"],WA={key:0,class:"absolute inset-0 bg-black/0 group-hover/item:bg-black/20 flex items-center justify-center opacity-0 group-hover/item:opacity-100 transition-all duration-300"},HA={class:"bg-white/90 dark:bg-neutral-800/90 p-1.5 rounded-full shadow-sm"},qA={key:0,class:"flex flex-col h-full"},GA={class:"flex flex-col items-center justify-center p-8 bg-neutral-50 dark:bg-neutral-950/50"},KA=["src","alt"],XA={class:"px-8 py-4 bg-white dark:bg-neutral-900 border-t border-neutral-200 dark:border-neutral-700/50"},YA={class:"flex flex-col space-y-0.5"},hi=dt(e.defineComponent({name:"DCodeStaticImage",__name:"DCodeStaticImage",props:{items:{},alt:{default:"Image"},label:{},aspectRatio:{default:"16/9"},width:{},height:{},fit:{default:"cover"},rounded:{type:Boolean,default:!1},allowPreview:{type:Boolean,default:!0},columns:{default:3},gap:{default:"0.5rem"}},setup(t){const o=t,n=e.computed(()=>Array.isArray(o.items)?o.items.map(d=>typeof d=="string"?{src:d,alt:o.alt}:{...d,alt:d.alt||o.alt}):[]),r=e.ref(null),a=e.ref(!1),s=d=>{o.allowPreview&&(r.value=d,a.value=!0)},i=()=>{r.value=null,a.value=!1},l=e.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${o.columns}, minmax(0, 1fr))`,gap:o.gap,width:o.width||"100%"})),c=e.computed(()=>["w-full h-full transition-all duration-500",o.rounded?"rounded-xl":"rounded-none",o.fit==="cover"?"object-cover":o.fit==="contain"?"object-contain":o.fit==="fill"?"object-fill":"object-none"].join(" "));return e.onMounted(()=>{window.addEventListener("keydown",d=>{r.value!==null&&d.key==="Escape"&&i()})}),(d,f)=>(e.openBlock(),e.createElementBlock("div",$A,[e.createElementVNode("div",{style:e.normalizeStyle(l.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(u,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"flex flex-col space-y-1 group/item"},[e.createElementVNode("div",{class:e.normalizeClass(["relative overflow-hidden bg-neutral-100 dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 transition-all duration-300 transform hover:scale-[1.02] hover:z-10",[t.rounded?"rounded-xl":"rounded-none",t.allowPreview?"cursor-zoom-in":""]]),style:e.normalizeStyle({aspectRatio:t.aspectRatio}),onClick:m=>s(h)},[e.createElementVNode("img",{src:u.src,alt:u.alt,class:e.normalizeClass(c.value),loading:"lazy"},null,10,UA),t.allowPreview?(e.openBlock(),e.createElementBlock("div",WA,[e.createElementVNode("div",HA,[e.createVNode(e.unref(ne.Maximize2),{class:"w-3.5 h-3.5 text-neutral-700 dark:text-neutral-200"})])])):e.createCommentVNode("",!0)],14,jA)]))),128))],4),e.createVNode(io,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=u=>a.value=u),title:(r.value!==null?n.value[r.value].label:null)||t.label||"Preview Image","max-width":"1200",persistent:!1,onClose:i},{"header-append":e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"p-2 hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-full text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-200 transition-colors",onClick:i},[e.createVNode(e.unref(ne.X),{class:"w-5 h-5"})])]),actions:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"px-5 py-2 text-sm font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-700 dark:text-neutral-200 rounded-md hover:bg-neutral-200 dark:hover:bg-neutral-700 transition-colors",onClick:i}," Close Preview ")]),default:e.withCtx(()=>[r.value!==null?(e.openBlock(),e.createElementBlock("div",qA,[e.createElementVNode("div",GA,[e.createElementVNode("img",{src:n.value[r.value].src,alt:n.value[r.value].alt||t.alt,class:"max-w-full max-h-[60vh] object-contain shadow-2xl rounded-sm border border-neutral-200 dark:border-white/10"},null,8,KA)]),e.createElementVNode("div",XA,[e.createElementVNode("div",YA,[e.createVNode(hn,{label:"File Name",value:n.value[r.value].src.split("/").pop()||"Untitled"},null,8,["value"]),n.value[r.value].label?(e.openBlock(),e.createBlock(hn,{key:0,label:"Item Label",value:n.value[r.value].label},null,8,["value"])):e.createCommentVNode("",!0),t.label?(e.openBlock(),e.createBlock(hn,{key:1,label:"Gallery Label",value:t.label},null,8,["value"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])]))}}),[["__scopeId","data-v-ac931980"]]),JA={key:0},QA=["value","name"],ZA={key:1,class:"flex flex-col gap-1"},e5={class:"text-xs font-medium text-neutral-500 dark:text-neutral-400"},t5=["src"],o5={key:1,class:"text-sm text-neutral-400 italic"},n5={key:2,class:"text-sm text-neutral-800 dark:text-neutral-100 font-medium"},r5={key:3,class:"text-xs text-neutral-400 italic"},mn=e.defineComponent({__name:"DynamicFormField",props:{field:{},modelValue:{default:null},formData:{default:()=>({})},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},options:{default:()=>[]},error:{default:null},dynamicLabels:{default:null},dynamicLength:{default:null},baseUrl:{default:void 0},viewOnly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:o}){let n=e.ref("en");try{n=_t.useI18n().locale}catch{}const r=t,a=o,s=e.ref(r.modelValue);e.watch(()=>r.modelValue,b=>{s.value=b});const i={DCodeTextField:tn,DCodeAutoComplete:fr,DCodeDatePicker:ra,DCodeTextarea:un,DCodeTextArea:un,DCodeCheckbox:so,DCodeSwitch:ca,DCodeOtpInput:ia,DCodeImageField:sa,DCodeSlider:la,DCodeRadio:li,DCodeRadioCustom:ci,DCodeDynamicUploadList:Js,DCodeMultiSelect:ii,DCodeCurrencyField:Ys,DCodePermissionMenu:fi,DCodeTreePermissions:ui,DCodeCardCheckboxList:Xs,DCodeBeforeAfter:ss,DCodeListLabels:is,DCodeStaticLabel:hn,DCodeStaticImage:hi},l=e.computed(()=>{const b=r.field.component;return i[b]||null}),c=e.computed(()=>{var g;const b=((g=r.field.component)==null?void 0:g.toLowerCase())||"";return b.includes("image")||b.includes("upload")}),d=e.computed(()=>{var g;const b=((g=r.field.component)==null?void 0:g.toLowerCase())||"";return b.includes("switch")||b.includes("checkbox")}),f=e.computed(()=>{var E,B;const b=r.field.props||r.field.propsFieldGlobal||{},g=((E=r.dynamicLabels)==null?void 0:E.labelID)||b.labelID,_=((B=r.dynamicLabels)==null?void 0:B.labelEN)||b.labelEN;return n.value==="id"?g||_||r.field.model:_||g||r.field.model}),u=e.computed(()=>{const b=r.modelValue;return b==null||b===""?null:Array.isArray(b)?b.map(g=>typeof g=="object"&&g!==null?g.label||g.name||g.code||g.value||JSON.stringify(g):String(g)).join(", "):typeof b=="object"?b.label||b.name||b.code||b.value||b.id||JSON.stringify(b):String(b)}),h=(b,g)=>{const _={label:"",placeholder:""},E=(g==null?void 0:g.labelID)||b.labelID,B=(g==null?void 0:g.labelEN)||b.labelEN;(E||B)&&(_.label=n.value==="id"?E:B);const A=(g==null?void 0:g.placeholderID)||b.placeholderID,C=(g==null?void 0:g.placeholderEN)||b.placeholderEN;return(A||C)&&(_.placeholder=n.value==="id"?A:C),_},m=(b,g)=>{const _=b.endpoint||{};if(!_.apiUrl)return{};const E={};let B=!0;if(Array.isArray(_.keyParam)&&_.keyParam.length>0&&_.keyParam.forEach(C=>{const x=g?g[C]:null;x!=null&&x!==""?E[C]=x:B=!1}),!B)return{};let A=_.apiUrl;if(r.baseUrl&&typeof A=="string"&&!A.startsWith("http")){const C=r.baseUrl.replace(/\/$/,""),x=A.startsWith("/")?A:`/${A}`;A=`${C}${x}`}return{endpoint:{apiUrl:A,apiMethod:_.apiMethod||"GET"},...Object.keys(E).length?{apiParams:E}:{}}},p=e.computed(()=>{var B,A,C;const b=r.field.props||r.field.propsFieldGlobal||{},g={},_=h(b,r.dynamicLabels);if(_.label&&(g.label=_.label),_.placeholder&&(g.placeholder=_.placeholder),g.required=r.required!==void 0?r.required:b.required??!1,g.readonly=r.readonly!==void 0?r.readonly:b.readonly??!1,["disabled","readonly","clearable","icon","returnObject","itemTitle","itemValue","maxValue","minValue","sizeFile","typeFile","treeData","menuList","enableParentControl","showIcons","dataBefore","dataAfter","range","autoRangeDays","disablePast","maxDaysAhead","displayFormat","modelType","placement","prependInner","selectLabel","cancelLabel","tone","skeleton"].forEach(x=>{b[x]!==void 0&&b[x]!==null&&(g[x]=b[x])}),g.minLength=((B=r.dynamicLength)==null?void 0:B.minLength)??b.minLength,g.maxLength=((A=r.dynamicLength)==null?void 0:A.maxLength)??b.maxLength,b.valueType&&(g.type=b.valueType),r.error&&(g.error=r.error),Object.assign(g,m(b,r.formData)),(C=b.endpointReference)!=null&&C.apiUrl){let x=b.endpointReference.apiUrl;if(r.baseUrl&&typeof x=="string"&&!x.startsWith("http")){const w=r.baseUrl.replace(/\/$/,""),D=x.startsWith("/")?x:`/${x}`;x=`${w}${D}`}g.endpointReference={...b.endpointReference,apiUrl:x}}return r.options&&r.options.length>0&&(g.items=r.options,g.options=r.options,r.field.component!=="DCodeDynamicUploadList"&&(delete g.endpoint,delete g.apiParams,delete g.apiUrl)),r.baseUrl&&(g.baseUrl=r.baseUrl),g}),y=b=>{s.value=b,a("update:modelValue",b)};return(b,g)=>t.field.isHidden?(e.openBlock(),e.createElementBlock("div",JA,[e.createElementVNode("input",{type:"hidden",value:s.value,name:t.field.model},null,8,QA)])):t.viewOnly?(e.openBlock(),e.createElementBlock("div",ZA,[e.createElementVNode("span",e5,e.toDisplayString(f.value),1),c.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:u.value,class:"h-16 w-16 rounded-md object-cover border border-neutral-200",alt:""},null,8,t5)):(e.openBlock(),e.createElementBlock("span",o5,"-"))],64)):d.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["inline-flex items-center gap-1 text-sm font-medium",u.value?"text-green-600 dark:text-green-400":"text-neutral-400"])},e.toDisplayString(u.value?"✓ Ya":"✗ Tidak"),3)):(e.openBlock(),e.createElementBlock("span",n5,e.toDisplayString(u.value||"-"),1))])):l.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),e.mergeProps({key:2},p.value,{modelValue:s.value,"onUpdate:modelValue":[g[0]||(g[0]=_=>s.value=_),y]}),null,16,["modelValue"])):(e.openBlock(),e.createElementBlock("div",r5," Unknown field: "+e.toDisplayString(t.field.component),1))}}),a5=e.defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,r=o,a=Ke.useVModel(n,"modelValue",r,{passive:!0,defaultValue:n.defaultValue});return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>e.isRef(a)?a.value=l:null),class:e.normalizeClass(e.unref(Me)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n.class))},null,2)),[[e.vModelText,e.unref(a)]])}}),s5=e.defineComponent({__name:"Pagination",props:{page:{},defaultPage:{},itemsPerPage:{},total:{},siblingCount:{},disabled:{type:Boolean},showEdges:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:page"],setup(t,{emit:o}){const n=t,r=o,a=Ke.reactiveOmit(n,"class"),s=_e.useForwardPropsEmits(a,r);return(i,l)=>(e.openBlock(),e.createBlock(e.unref(_e.PaginationRoot),e.mergeProps({"data-slot":"pagination"},e.unref(s),{class:n.class}),{default:e.withCtx(c=>[e.renderSlot(i.$slots,"default",e.normalizeProps(e.guardReactiveProps(c)))]),_:3},16,["class"]))}}),i5=e.defineComponent({__name:"PaginationContent",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class");return(r,a)=>(e.openBlock(),e.createBlock(e.unref(_e.PaginationList),e.mergeProps({"data-slot":"pagination-content"},e.unref(n),{class:e.unref(Me)("flex flex-row items-center gap-1",o.class)}),{default:e.withCtx(s=>[e.renderSlot(r.$slots,"default",e.normalizeProps(e.guardReactiveProps(s)))]),_:3},16,["class"]))}}),l5=e.defineComponent({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class");return(r,a)=>(e.openBlock(),e.createBlock(e.unref(_e.PaginationEllipsis),e.mergeProps({"data-slot":"pagination-ellipsis"},e.unref(n),{class:e.unref(Me)("flex size-9 items-center justify-center",o.class)}),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{},()=>[e.createVNode(e.unref(ne.MoreHorizontal),{class:"size-4"}),a[0]||(a[0]=e.createElementVNode("span",{class:"sr-only"},"More pages",-1))])]),_:3},16,["class"]))}}),c5=e.defineComponent({__name:"PaginationFirst",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class","size"),r=_e.useForwardProps(n);return(a,s)=>(e.openBlock(),e.createBlock(e.unref(_e.PaginationFirst),e.mergeProps({"data-slot":"pagination-first",class:e.unref(Me)(e.unref(Xo)({variant:"ghost",size:t.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},e.unref(r)),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createVNode(e.unref(ne.ChevronLeftIcon)),s[0]||(s[0]=e.createElementVNode("span",{class:"hidden sm:block"},"First",-1))])]),_:3},16,["class"]))}}),d5=e.defineComponent({__name:"PaginationItem",props:{value:{},asChild:{type:Boolean},as:{},size:{default:"icon"},class:{type:[Boolean,null,String,Object,Array]},isActive:{type:Boolean}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class","size","isActive");return(r,a)=>(e.openBlock(),e.createBlock(e.unref(_e.PaginationListItem),e.mergeProps({"data-slot":"pagination-item"},e.unref(n),{class:e.unref(Me)(e.unref(Xo)({variant:"ghost",size:t.size}),t.isActive?"bg-[#0056a1] dark:bg-[#003d75] text-white hover:bg-[#0056a1]/90 dark:hover:bg-[#003d75]/90 hover:text-white":"",o.class)}),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),f5=e.defineComponent({__name:"PaginationLast",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class","size"),r=_e.useForwardProps(n);return(a,s)=>(e.openBlock(),e.createBlock(e.unref(_e.PaginationLast),e.mergeProps({"data-slot":"pagination-last",class:e.unref(Me)(e.unref(Xo)({variant:"ghost",size:t.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},e.unref(r)),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[s[0]||(s[0]=e.createElementVNode("span",{class:"hidden sm:block"},"Last",-1)),e.createVNode(e.unref(ne.ChevronRightIcon))])]),_:3},16,["class"]))}}),u5=e.defineComponent({__name:"PaginationNext",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class","size"),r=_e.useForwardProps(n);return(a,s)=>(e.openBlock(),e.createBlock(e.unref(_e.PaginationNext),e.mergeProps({"data-slot":"pagination-next",class:e.unref(Me)(e.unref(Xo)({variant:"ghost",size:t.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},e.unref(r)),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[s[0]||(s[0]=e.createElementVNode("span",{class:"hidden sm:block"},"Next",-1)),e.createVNode(e.unref(ne.ChevronRightIcon))])]),_:3},16,["class"]))}}),h5=e.defineComponent({__name:"PaginationPrevious",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class","size"),r=_e.useForwardProps(n);return(a,s)=>(e.openBlock(),e.createBlock(e.unref(_e.PaginationPrev),e.mergeProps({"data-slot":"pagination-previous",class:e.unref(Me)(e.unref(Xo)({variant:"ghost",size:t.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},e.unref(r)),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createVNode(e.unref(ne.ChevronLeftIcon)),s[0]||(s[0]=e.createElementVNode("span",{class:"hidden sm:block"},"Previous",-1))])]),_:3},16,["class"]))}}),m5=e.defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:o}){const n=t,r=o,a=_e.useForwardPropsEmits(n,r);return(s,i)=>(e.openBlock(),e.createBlock(e.unref(_e.SelectRoot),e.normalizeProps(e.guardReactiveProps(e.unref(a))),{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},16))}}),p5=e.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:o}){const n=t,r=o,a=Ke.reactiveOmit(n,"class"),s=_e.useForwardPropsEmits(a,r);return(i,l)=>(e.openBlock(),e.createBlock(e.unref(_e.SelectPortal),null,{default:e.withCtx(()=>[e.createVNode(e.unref(_e.SelectContent),e.mergeProps({...e.unref(s),...i.$attrs},{class:e.unref(Me)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:e.withCtx(()=>[e.createVNode(e.unref(x5)),e.createVNode(e.unref(_e.SelectViewport),{class:e.normalizeClass(e.unref(Me)("p-1",t.position==="popper"&&"h-[--reka-select-trigger-height] w-full min-w-[--reka-select-trigger-width]"))},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default")]),_:3},8,["class"]),e.createVNode(e.unref(y5))]),_:3},16,["class"])]),_:3}))}}),g5={class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},b5=e.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(e.openBlock(),e.createBlock(e.unref(_e.SelectItem),e.mergeProps(e.unref(r),{class:e.unref(Me)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o.class)}),{default:e.withCtx(()=>[e.createElementVNode("span",g5,[e.createVNode(e.unref(_e.SelectItemIndicator),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ne.Check),{class:"h-4 w-4"})]),_:1})]),e.createVNode(e.unref(_e.SelectItemText),null,{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),y5=e.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(e.openBlock(),e.createBlock(e.unref(_e.SelectScrollDownButton),e.mergeProps(e.unref(r),{class:e.unref(Me)("flex cursor-default items-center justify-center py-1",o.class)}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createVNode(e.unref(ne.ChevronDown))])]),_:3},16,["class"]))}}),x5=e.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(e.openBlock(),e.createBlock(e.unref(_e.SelectScrollUpButton),e.mergeProps(e.unref(r),{class:e.unref(Me)("flex cursor-default items-center justify-center py-1",o.class)}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createVNode(e.unref(ne.ChevronUp))])]),_:3},16,["class"]))}}),k5=e.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const o=t,n=Ke.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(e.openBlock(),e.createBlock(e.unref(_e.SelectTrigger),e.mergeProps(e.unref(r),{class:e.unref(Me)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",o.class)}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default"),e.createVNode(e.unref(_e.SelectIcon),{"as-child":""},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.ChevronDown),{class:"w-4 h-4 opacity-50 shrink-0"})]),_:1})]),_:3},16,["class"]))}}),w5=e.defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(t){const o=t;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(_e.SelectValue),e.normalizeProps(e.guardReactiveProps(o)),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16))}}),Qn={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},pn={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},ft={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},C5={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},_5={dangerouslyHTMLString:!1,multiple:!0,position:Qn.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},E5={rtl:!1,newestOnTop:!1,toastClassName:""},Hf={..._5,...E5};ft.DEFAULT;var Re=(t=>(t[t.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",t[t.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",t.CSS_NAMESPACE="Toastify",t))(Re||{}),mi=(t=>(t.ENTRANCE_ANIMATION_END="d",t))(mi||{});const B5={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},S5={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},A5={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},v5={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},qf="Toastify--animate Toastify__none-enter";function Gf(t,o=!1){var n;let r=B5;if(!t||typeof t=="string")switch(t){case"flip":r=v5;break;case"zoom":r=A5;break;case"slide":r=S5;break}else r=t;if(o)r.enter=qf;else if(r.enter===qf){const a=(n=r.exit.split("__")[1])==null?void 0:n.split("-")[0];r.enter=`Toastify--animate Toastify__${a}-enter`}return r}function D5(t){return t.containerId||String(t.position)}const fa="will-unmount";function N5(t=Qn.TOP_RIGHT){return!!document.querySelector(`.${Re.CSS_NAMESPACE}__toast-container--${t}`)}function V5(t=Qn.TOP_RIGHT){return`${Re.CSS_NAMESPACE}__toast-container--${t}`}function M5(t,o,n=!1){const r=[`${Re.CSS_NAMESPACE}__toast-container`,`${Re.CSS_NAMESPACE}__toast-container--${t}`,n?`${Re.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return bn(o)?o({position:t,rtl:n,defaultClassName:r}):`${r} ${o||""}`}function T5(t){var o;const{position:n,containerClassName:r,rtl:a=!1,style:s={}}=t,i=Re.CSS_NAMESPACE,l=V5(n),c=document.querySelector(`.${i}`),d=document.querySelector(`.${l}`),f=!!d&&!((o=d.className)!=null&&o.includes(fa)),u=c||document.createElement("div"),h=document.createElement("div");h.className=M5(n,r,a),h.dataset.testid=`${Re.CSS_NAMESPACE}__toast-container--${n}`,h.id=D5(t);for(const m in s)if(Object.prototype.hasOwnProperty.call(s,m)){const p=s[m];h.style[m]=p}return c||(u.className=Re.CSS_NAMESPACE,document.body.appendChild(u)),f||u.appendChild(h),h}function pi(t){var o,n,r;const a=typeof t=="string"?t:((o=t.currentTarget)==null?void 0:o.id)||((n=t.target)==null?void 0:n.id),s=document.getElementById(a);s&&s.removeEventListener("animationend",pi,!1);try{Zn[a].unmount(),(r=document.getElementById(a))==null||r.remove(),delete Zn[a],delete tt[a]}catch{}}const Zn=e.reactive({});function P5(t,o){const n=document.getElementById(String(o));n&&(Zn[n.id]=t)}function gi(t,o=!0){const n=String(t);if(!Zn[n])return;const r=document.getElementById(n);r&&r.classList.add(fa),o?(L5(t),r&&r.addEventListener("animationend",pi,!1)):pi(n),vt.items=vt.items.filter(a=>a.containerId!==t)}function O5(t){for(const o in Zn)gi(o,t);vt.items=[]}function Kf(t,o){const n=document.getElementById(t.toastId);if(n){let r=t;r={...r,...Gf(r.transition)};const a=r.appendPosition?`${r.exit}--${r.position}`:r.exit;n.className+=` ${a}`,o&&o(n)}}function L5(t){for(const o in tt)if(o===t)for(const n of tt[o]||[])Kf(n)}function R5(t){const o=gn().find(n=>n.toastId===t);return o==null?void 0:o.containerId}function bi(t){return document.getElementById(t)}function I5(t){const o=bi(t.containerId);return o&&o.classList.contains(fa)}function Xf(t){var o;const n=e.isVNode(t.content)?e.toRaw(t.content.props):null;return n??e.toRaw((o=t.data)!=null?o:{})}function F5(t){return t?vt.items.filter(o=>o.containerId===t).length>0:vt.items.length>0}function z5(){if(vt.items.length>0){const t=vt.items.shift();ua(t==null?void 0:t.toastContent,t==null?void 0:t.toastProps)}}const tt=e.reactive({}),vt=e.reactive({items:[]});function gn(){const t=e.toRaw(tt);return Object.values(t).reduce((o,n)=>[...o,...n],[])}function $5(t){return gn().find(o=>o.toastId===t)}function ua(t,o={}){if(I5(o)){const n=bi(o.containerId);n&&n.addEventListener("animationend",yi.bind(null,t,o),!1)}else yi(t,o)}function yi(t,o={}){const n=bi(o.containerId);n&&n.removeEventListener("animationend",yi.bind(null,t,o),!1);const r=tt[o.containerId]||[],a=r.length>0;if(!a&&!N5(o.position)){const s=T5(o),i=e.createApp(fv,o);o.useHandler&&o.useHandler(i),i.mount(s),P5(i,s.id)}a&&!o.updateId&&(o.position=r[0].position),e.nextTick(()=>{o.updateId?yt.update(o):yt.add(t,o)})}const yt={add(t,o){const{containerId:n=""}=o;n&&(tt[n]=tt[n]||[],tt[n].find(r=>r.toastId===o.toastId)||setTimeout(()=>{var r,a;o.newestOnTop?(r=tt[n])==null||r.unshift(o):(a=tt[n])==null||a.push(o),o.onOpen&&o.onOpen(Xf(o))},o.delay||0))},remove(t){if(t){const o=R5(t);if(o){const n=tt[o];let r=n.find(a=>a.toastId===t);tt[o]=n.filter(a=>a.toastId!==t),!tt[o].length&&!F5(o)&&gi(o,!1),z5(),e.nextTick(()=>{r!=null&&r.onClose&&(r.onClose(Xf(r)),r=void 0)})}}},update(t={}){const{containerId:o=""}=t;if(o&&t.updateId){tt[o]=tt[o]||[];const n=tt[o].find(s=>s.toastId===t.toastId),r=(n==null?void 0:n.position)!==t.position||(n==null?void 0:n.transition)!==t.transition,a={...t,disabledEnterTransition:!r,updateId:void 0};yt.dismissForce(t==null?void 0:t.toastId),setTimeout(()=>{Fe(a.content,a)},t.delay||0)}},clear(t,o=!0){t?gi(t,o):O5(o)},dismissCallback(t){var o;const n=(o=t.currentTarget)==null?void 0:o.id,r=document.getElementById(n);r&&(r.removeEventListener("animationend",yt.dismissCallback,!1),setTimeout(()=>{yt.remove(n)}))},dismiss(t){if(t){const o=gn();for(const n of o)if(n.toastId===t){Kf(n,r=>{r.addEventListener("animationend",yt.dismissCallback,!1)});break}}},dismissForce(t){if(t){const o=gn();for(const n of o)if(n.toastId===t){const r=document.getElementById(t);r&&(r.remove(),r.removeEventListener("animationend",yt.dismissCallback,!1),yt.remove(t));break}}}},j5=e.reactive({useHandler:void 0}),Yf=e.reactive({}),ha=e.reactive({});function Jf(){return Math.random().toString(36).substring(2,9)}function U5(t){return typeof t=="number"&&!isNaN(t)}function xi(t){return typeof t=="string"}function bn(t){return typeof t=="function"}function ma(...t){return e.mergeProps(...t)}function pa(t){return typeof t=="object"&&(!!(t!=null&&t.render)||!!(t!=null&&t.setup)||typeof(t==null?void 0:t.type)=="object")}function W5(t={}){Yf[`${Re.CSS_NAMESPACE}-default-options`]=t}function Qf(){return Yf[`${Re.CSS_NAMESPACE}-default-options`]||Hf}function H5(){const t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||t?"dark":"light"}var ga=(t=>(t[t.Enter=0]="Enter",t[t.Exit=1]="Exit",t))(ga||{});const Zf={containerId:{type:[String,Number],required:!1,default:""},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:Qn.TOP_LEFT},bodyClassName:{type:String,required:!1,default:""},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:"bounce"},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:""},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:"alert"},theme:{type:String,required:!1,default:pn.AUTO},content:{type:[String,Object,Function],required:!1,default:""},toastId:{type:[String,Number],required:!1,default:""},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:ft.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:""},updateId:{type:[String,Number],required:!1,default:""},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},q5={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:ft.DEFAULT},theme:{type:String,required:!1,default:pn.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:""},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},G5=e.defineComponent({name:"ProgressBar",props:q5,setup(t,{attrs:o}){const n=e.ref(),r=e.computed(()=>t.hide?"true":"false"),a=e.computed(()=>({...o.style||{},animationDuration:`${t.autoClose===!0?5e3:t.autoClose}ms`,animationPlayState:t.isRunning?"running":"paused",opacity:t.hide||t.autoClose===!1?0:1,transform:t.controlledProgress?`scaleX(${t.progress})`:"none"})),s=e.computed(()=>[`${Re.CSS_NAMESPACE}__progress-bar`,t.controlledProgress?`${Re.CSS_NAMESPACE}__progress-bar--controlled`:`${Re.CSS_NAMESPACE}__progress-bar--animated`,`${Re.CSS_NAMESPACE}__progress-bar-theme--${t.theme}`,`${Re.CSS_NAMESPACE}__progress-bar--${t.type}`,t.rtl?`${Re.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(" ")),i=e.computed(()=>`${s.value} ${(o==null?void 0:o.class)||""}`),l=()=>{n.value&&(n.value.onanimationend=null,n.value.ontransitionend=null)},c=()=>{t.isIn&&t.closeToast&&t.autoClose!==!1&&(t.closeToast(),l())},d=e.computed(()=>t.controlledProgress?null:c),f=e.computed(()=>t.controlledProgress?c:null);return e.watchEffect(()=>{n.value&&(l(),n.value.onanimationend=d.value,n.value.ontransitionend=f.value)}),()=>e.createVNode("div",{ref:n,role:"progressbar","aria-hidden":r.value,"aria-label":"notification timer",class:i.value,style:a.value},null)}}),K5=e.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:pn.AUTO},type:{type:String,required:!1,default:pn.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(t){return()=>e.createVNode("button",{class:`${Re.CSS_NAMESPACE}__close-button ${Re.CSS_NAMESPACE}__close-button--${t.theme}`,type:"button",onClick:o=>{o.stopPropagation(),t.closeToast&&t.closeToast(o)},"aria-label":t.ariaLabel},[e.createVNode("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},[e.createVNode("path",{"fill-rule":"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"},null)])])}}),ba=({theme:t,type:o,path:n,...r})=>e.createVNode("svg",e.mergeProps({viewBox:"0 0 24 24",width:"100%",height:"100%",style:{fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${o})`}},r),[e.createVNode("path",{d:n},null)]);function X5(t){return e.createVNode(ba,e.mergeProps(t,{path:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}),null)}function Y5(t){return e.createVNode(ba,e.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}),null)}function J5(t){return e.createVNode(ba,e.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}),null)}function Q5(t){return e.createVNode(ba,e.mergeProps(t,{path:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}),null)}function Z5(){return e.createVNode("div",{class:`${Re.CSS_NAMESPACE}__spinner`},null)}const ya={info:Y5,warning:X5,success:J5,error:Q5,spinner:Z5},ev=t=>t in ya;function tv({theme:t,type:o,isLoading:n,icon:r}){let a;const s=!!n||o==="loading",i={theme:t,type:o};if(s&&(r===void 0||typeof r=="boolean"))return ya.spinner();if(r!==!1){if(pa(r))a=e.toRaw(r);else if(bn(r)){const l=r;i.type=s?"loading":o,a=l(i),a=!a&&s?ya.spinner():a}else e.isVNode(r)?a=e.cloneVNode(r,i):xi(r)||U5(r)?a=r:ev(o)&&(a=ya[o](i));return a}}const ov=()=>{};function nv(t,o,n=Re.COLLAPSE_DURATION){const{scrollHeight:r,style:a}=t,s=n;requestAnimationFrame(()=>{a.minHeight="initial",a.height=r+"px",a.transition=`all ${s}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(o,s)})})}function rv(t){const o=e.ref(!1),n=e.ref(!1),r=e.ref(!1),a=e.ref(ga.Enter),s=e.reactive({...t,appendPosition:t.appendPosition||!1,collapse:typeof t.collapse>"u"?!0:t.collapse,collapseDuration:t.collapseDuration||Re.COLLAPSE_DURATION}),i=s.done||ov,l=e.computed(()=>s.appendPosition?`${s.enter}--${s.position}`:s.enter),c=e.computed(()=>s.appendPosition?`${s.exit}--${s.position}`:s.exit),d=e.computed(()=>t.pauseOnHover?{onMouseenter:b,onMouseleave:y}:{});function f(){const _=l.value.split(" ");h().addEventListener(mi.ENTRANCE_ANIMATION_END,y,{once:!0});const E=A=>{const C=h();A.target===C&&(C.dispatchEvent(new Event(mi.ENTRANCE_ANIMATION_END)),C.removeEventListener("animationend",E),C.removeEventListener("animationcancel",E),a.value===ga.Enter&&A.type!=="animationcancel"&&C.classList.remove(..._))},B=()=>{const A=h();A.classList.add(..._),A.addEventListener("animationend",E),A.addEventListener("animationcancel",E)};t.pauseOnFocusLoss&&m(),B()}function u(){if(!h())return;const _=()=>{const B=h();B.removeEventListener("animationend",_),s.collapse?nv(B,i,s.collapseDuration):i()},E=()=>{const B=h();a.value=ga.Exit,B&&(B.className+=` ${c.value}`,B.addEventListener("animationend",_))};n.value||(r.value?_():setTimeout(E))}function h(){return t.toastRef.value}function m(){document.hasFocus()||b(),window.addEventListener("focus",y),window.addEventListener("blur",b)}function p(){window.removeEventListener("focus",y),window.removeEventListener("blur",b)}function y(){(!t.loading.value||t.isLoading===void 0)&&(o.value=!0)}function b(){o.value=!1}function g(_){_&&(_.stopPropagation(),_.preventDefault()),n.value=!1}return e.watchEffect(u),e.watchEffect(()=>{const _=gn();n.value=_.findIndex(E=>E.toastId===s.toastId)>-1}),e.watchEffect(()=>{t.isLoading!==void 0&&(t.loading.value?b():y())}),e.onMounted(f),e.onUnmounted(()=>{t.pauseOnFocusLoss&&p()}),{isIn:n,isRunning:o,hideToast:g,eventHandlers:d}}function av(t){if(!t||typeof t!="object"||Array.isArray(t)||t.__v_isVNode)return!1;const o=t;return["title","content"].some(n=>n in o)}const sv=e.defineComponent({name:"ToastItem",inheritAttrs:!1,props:Zf,setup(t){const o=e.ref(),n=e.computed(()=>!!t.isLoading),r=e.computed(()=>t.progress!==void 0&&t.progress!==null),a=e.computed(()=>tv(t)),s=e.computed(()=>[`${Re.CSS_NAMESPACE}__toast`,`${Re.CSS_NAMESPACE}__toast-theme--${t.theme}`,`${Re.CSS_NAMESPACE}__toast--${t.type}`,t.rtl?`${Re.CSS_NAMESPACE}__toast--rtl`:void 0,t.toastClassName||""].filter(Boolean).join(" ")),{isRunning:i,isIn:l,hideToast:c,eventHandlers:d}=rv({toastRef:o,loading:n,done:()=>{yt.remove(t.toastId)},...Gf(t.transition,t.disabledEnterTransition),...t});function f(){const u=t.content;if(av(u)){const h=[];return u.title!==void 0&&h.push(e.createVNode("div",{"data-testid":"toast-text-title",class:`${Re.CSS_NAMESPACE}__toast-text-title`},[u.title])),u.content!==void 0&&h.push(e.createVNode("div",{"data-testid":"toast-text-content",class:`${Re.CSS_NAMESPACE}__toast-text-content`},[u.content])),e.createVNode("div",{"data-testid":"toast-text-content-wrapper",class:`${Re.CSS_NAMESPACE}__toast-text`},[h])}return pa(u)?e.h(e.toRaw(u),{toastProps:e.toRaw(t),closeToast:c,data:t.data,...t.expandCustomProps?t.contentProps:{contentProps:t.contentProps||{}}}):bn(u)?u({toastProps:e.toRaw(t),closeToast:c,data:t.data}):t.dangerouslyHTMLString?e.h("div",{innerHTML:u}):u}return()=>e.createVNode("div",e.mergeProps({id:t.toastId,class:s.value,style:t.toastStyle||{},ref:o,"data-testid":`toast-item-${t.toastId}`,onClick:u=>{t.closeOnClick&&c(),t.onClick&&t.onClick(u)}},d.value),[e.createVNode("div",{role:t.role,"data-testid":"toast-body",class:`${Re.CSS_NAMESPACE}__toast-body ${t.bodyClassName||""}`},[a.value!=null&&e.createVNode("div",{"data-testid":`toast-icon-${t.type}`,class:[`${Re.CSS_NAMESPACE}__toast-icon`,t.isLoading?"":`${Re.CSS_NAMESPACE}--animate-icon ${Re.CSS_NAMESPACE}__zoom-enter`].join(" ")},[pa(a.value)?e.h(e.toRaw(a.value),{theme:t.theme,type:t.type}):bn(a.value)?a.value({theme:t.theme,type:t.type}):a.value]),e.createVNode("div",{"data-testid":"toast-content"},[f()])]),(t.closeButton===void 0||t.closeButton===!0)&&e.createVNode(K5,{theme:t.theme,closeToast:u=>{u.stopPropagation(),u.preventDefault(),c()}},null),pa(t.closeButton)?e.h(e.toRaw(t.closeButton),{closeToast:c,type:t.type,theme:t.theme}):bn(t.closeButton)?t.closeButton({closeToast:c,type:t.type,theme:t.theme}):null,e.createVNode(G5,{className:t.progressClassName,style:t.progressStyle,rtl:t.rtl,theme:t.theme,isIn:l.value,type:t.type,hide:t.hideProgressBar,isRunning:i.value,autoClose:t.autoClose,controlledProgress:r.value,progress:t.progress,closeToast:t.isLoading?void 0:c},null)])}}),xa="vue3-toastify:url-change";let ka=0,er;function iv(){if(!(typeof window>"u")&&ha.lastUrl!==window.location.href){ha.lastUrl=window.location.href;const t=n=>typeof n.clearOnUrlChange=="boolean"?n.clearOnUrlChange:Qf().clearOnUrlChange!==!1,o=Object.values(tt).reduce((n,r)=>(Array.isArray(r)&&n.push(...r),n),[]);for(const n of o)n.toastId&&t(n)&&yt.dismiss(n.toastId);vt.items=vt.items.filter(n=>!t(n.toastProps))}}function lv(){const{history:t}=window,o=t.pushState,n=t.replaceState;return t.pushState=function(...r){const a=o.apply(this,r);return window.dispatchEvent(new Event(xa)),a},t.replaceState=function(...r){const a=n.apply(this,r);return window.dispatchEvent(new Event(xa)),a},()=>{t.pushState=o,t.replaceState=n}}function cv(){if(typeof window>"u"||er)return;const t=lv(),o=()=>iv();window.addEventListener(xa,o),window.addEventListener("popstate",o),window.addEventListener("hashchange",o),er=()=>{t(),window.removeEventListener(xa,o),window.removeEventListener("popstate",o),window.removeEventListener("hashchange",o),er=void 0}}function dv(){er&&(er(),ha.lastUrl="")}const fv=e.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:Zf,setup(t){const o=e.computed(()=>t.containerId),n=e.computed(()=>tt[o.value]||[]),r=e.computed(()=>n.value.filter(a=>a.position===t.position));return e.onMounted(()=>{typeof window<"u"&&(ka+=1,cv())}),e.onUnmounted(()=>{typeof window<"u"&&ka>0&&(ka-=1,ka===0&&dv())}),()=>e.createVNode(e.Fragment,null,[r.value.map(a=>{const{toastId:s=""}=a;return e.createVNode(sv,e.mergeProps({key:s},a),null)})])}});let ki=!1;const eu={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function tu(){const t=[];return gn().forEach(o=>{const n=document.getElementById(o.containerId);n&&!n.classList.contains(fa)&&t.push(o)}),t}function uv(t){const o=tu().length,n=t??0;return n>0&&o+vt.items.length>=n}function hv(t){uv(t.limit)&&!t.updateId&&vt.items.push({toastId:t.toastId,containerId:t.containerId,toastContent:t.content,toastProps:t})}function Co(t,o,n={}){if(ki)return;n=ma(Qf(),{type:o},e.toRaw(n)),(!n.toastId||typeof n.toastId!="string"&&typeof n.toastId!="number")&&(n.toastId=Jf()),n={...n,...n.type==="loading"?eu:{},content:t,containerId:n.containerId||String(n.position)};const r=Number(n==null?void 0:n.progress);return!isNaN(r)&&r<0&&(n.progress=0),r>1&&(n.progress=1),n.theme==="auto"&&(n.theme=H5()),hv(n),ha.lastUrl=window.location.href,n.multiple?vt.items.length?n.updateId&&ua(t,n):ua(t,n):(ki=!0,Fe.clearAll(void 0,!1),setTimeout(()=>{ua(t,n)},0),setTimeout(()=>{ki=!1},390)),n.toastId}const Fe=(t,o)=>Co(t,ft.DEFAULT,o);Fe.info=(t,o)=>Co(t,ft.DEFAULT,{...o,type:ft.INFO}),Fe.error=(t,o)=>Co(t,ft.DEFAULT,{...o,type:ft.ERROR}),Fe.warning=(t,o)=>Co(t,ft.DEFAULT,{...o,type:ft.WARNING}),Fe.warn=Fe.warning,Fe.success=(t,o)=>Co(t,ft.DEFAULT,{...o,type:ft.SUCCESS}),Fe.loading=(t,o)=>Co(t,ft.DEFAULT,ma(o,eu)),Fe.dark=(t,o)=>Co(t,ft.DEFAULT,ma(o,{theme:pn.DARK})),Fe.remove=t=>{t?yt.dismiss(t):yt.clear()},Fe.clearAll=(t,o)=>{e.nextTick(()=>{yt.clear(t,o)})},Fe.isActive=t=>{let o=!1;return o=tu().findIndex(n=>n.toastId===t)>-1,o},Fe.update=(t,o={})=>{setTimeout(()=>{const n=$5(t);if(n){const r=e.toRaw(n),{content:a}=r,s={...r,...o,toastId:o.toastId||t,updateId:Jf()},i=s.render||a;delete s.render,Co(i,s.type,s)}},0)},Fe.done=t=>{Fe.update(t,{isLoading:!1,progress:1})},Fe.promise=mv;function mv(t,{pending:o,error:n,success:r},a){var s,i,l;let c;const d={...a||{},autoClose:!1};o&&(c=xi(o)?Fe.loading(o,d):Fe.loading(o.render,{...d,...o}));const f={autoClose:(s=a==null?void 0:a.autoClose)!=null?s:!0,closeOnClick:(i=a==null?void 0:a.closeOnClick)!=null?i:!0,closeButton:(l=a==null?void 0:a.autoClose)!=null?l:null,isLoading:void 0,draggable:null,delay:100},u=(m,p,y)=>{if(p==null){Fe.remove(c);return}const b={type:m,...f,...a,data:y},g=xi(p)?{render:p}:p;return c?Fe.update(c,{...b,...g,isLoading:!1}):Fe(g.render,{...b,...g,isLoading:!1}),y},h=bn(t)?t():t;return h.then(m=>{u("success",r,m)}).catch(m=>{u("error",n,m)}),h}Fe.POSITION=Qn,Fe.THEME=pn,Fe.TYPE=ft,Fe.TRANSITIONS=C5;const pv={install(t,o={}){j5.useHandler=o.useHandler||(()=>{}),gv(o)}};typeof window<"u"&&(window.Vue3Toastify=pv);function gv(t={}){const o=ma(Hf,t);W5(o)}const bv={v:"4.8.0",meta:{g:"LottieFiles AE ",a:"",k:"",d:"",tc:""},fr:25,ip:0,op:273,w:500,h:500,nm:"not_found",ddd:0,assets:JSON.parse('[{"id":"image_0","w":175,"h":173,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK8AAACtCAYAAADGWi9+AAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAYj0lEQVR4nO2dXVMb2ZnH/+cg1BIIkABjPF7bxFvZnamaqYHUrh1XqjbMxc7YV4Mucj3kEwzfIOwnCLnei+BP0PgmME5twWQry8DWFrh2qpKt3aRgXB4DtngRWKIlcc5eSGLUp7ul7qPWS7fO78rdWK1G+vP0c57zvAAKhUKhUCgUCoVCoVAoFAqFQqEIMqTTN9Au9Ofb0+B8CgzTICRJCZ8GAHAkOfBxnZeeEYJdAGAMewD2ALIHXO0hFttNfzJz2up7V9gTSvHqq5tTQN8sCKYp4dOc4+ctfLt9DuwCfAOUbqQ/fbDbwvdS1BAa8epfbc2Bk1kCPgfgXgdv5YwDG+BkBbH+FWWZW0egxauvbs4CdJ4QzAEY6fT92MGBZ0rIrSFw4tXXd5IwjHkCsgCPFjYej6E/EkF/fx80LQpKKQBgIB5zfI1hFHDFGAAgn78EAOTyBkrFEoqlkpe3P+McK+gjS8q18IfAiLfsx9JFt1ZW06IYiGvQotGyaPsjvt8TYwyXRgH5/CVyeeNa3I0gBF8zxhbTTx5t+H5TPUTXi7dGtF80+r+JwQEkBuMtE6sbLt7lcHGRRz5/6cYy73OChfRnD1facW9ho2vFq6/vJHFZWGok2ng8hpGhQSQSA9duQLdQFfLFuxxYxfWwQ1liObpSvPraNwsEZBEO7gGlFInBAYyNjnTMwnqBMYaLixwyx2d1rXF5cccW0k8e7bXv7oJLV4lXf749TRlfdto0oJQilRxCKjncdVbWLRfvcjg5Pa/nH59x8MX0458utfO+gkjXiFdf3VokBL+y+1kYRCuSy1/izdsTGEbB9ucVV2JeWWFnOi5efXVzihK64mRtU8khjI0mQyNakWz2op47ccY5WUg/ebDc5tsKBB0Vr766PU8IX4KNbxuPxzAxnoKmRTtwZ+2FMYbM8SlOTs9tf845niIWXVCbHGY6Jl59bXuJgH8pnqeUYmx0BKnkcCduq6MYRgEHRxlbV4IALxhnc8qN+IG2i7e8Q1ZYJsDn4s80LYr3Jm8EIoLQSt68PXaywmecklm1Q1emreLV13eS1Chs2Pm3qeQQboyPtvN2upqLdzkcHGbs4sPKD67QNvE6LcwopZgYT2F4ONGuW3Gkut1bzn/ovPUvFkv4/uCNrRvBOfllrwu4LeLVn29PE8Y3ICzMKKW4c/tm2xZlhlGAYRRQLJWQyxtgjDmGqmrpj0QQ6Y9cJ/XE4zHEahJ7WgljDEdvTpA9v7D8rNcF3HLx6qubU4TQXQjC1bQo7ty+2VIBFIslXLzLIZ83cPEu5/v1q8k/g4MDdTPT/ODgMKMELNBS8Tr5uK0UblWw2fN3rqyqX1S3rFPJoZY9SU5Os3jz9sRyvlcF3DLxtlu4ufwlstl3ttbJCwR4wYEpNJHc3h+JYGx0pCV+fDZ7gYOjjOU8p2Sm16IQrRPv2taKGA5rhXBz+Utkjs885tJiw0sRZbliAwDoLAimCTANF4nwrdrWdhBwz4XRWiJeuw0Iv4VrGAUcvT1pKNpycB8rANvwM+XwhyJPPmcXs66lFZbYzgcmwAumRWd7ZSfOd/FWtnx/W3uOUor7U7d9EW6jrdQK+xxkBfxqqR07UuXc4+IcJXyhXhm931vedgLmwLP044dzvrxBl+OreO0iC36Gw3L5SxweZurlxO5zThY7uXjRn29P44ov1EuiHxsdwdho0pf323/52rIw5Rz/kn7ycNGXN+hifBXvs7WtXdHyTE6M+fK4zByfInN85vTjjotWpFH5Ujwew+TEWNObIYwx7H/32vIH3QsLON/Ea5eP68eWL2MMr16/cfJtuz5xW1/dnKWELtm5E5RSvHfrRtMxYsMoYP/la/H0Ptei02H2f30Rb2UHbaf2nKZFce/OraauWy/LKmglM/VKm/x4OtnFgDnIb9KPHyw0deEuxhfxiu4CpRT37txq6pFoGAW8fHVon5jS5dbWiXplTn74wS9fHVqeUGF2H5pe/utr31hW2M0WRtYR7j6nZDaIwgWA9KcPdpkWneUcT8WfZY7PcHBo3XzwwuTEmCWiQxlfbuqiXUxTlldf30kSo7CHmkdhPB7Dnds3pa/pJNywxTArbsSvxfPNrhNs3YeQbh83Z3kvC5YSnonxlPTlnITLOZ5+/vhhqBYf6cc/XeKc/FI8f3J6jmxWfos7lRxGXFgAEsKX9PUdf2JzXYS0eMsxXXMYqJmkFMYYDo6sydec42n6ycN52fvsZtJPHizbCfjgKNNUFtzYqGVNOILLQugWbk1YXrpoOqK0qQXHq9fWpOswC7eKo4AP7aMsbhiIxzA8ZI5eEIKFsFlfKfE6WV3Z7d/M8alllUyAF2EXbhU7ATs9idzSC9ZX0vJara5stW81K0xgn2nRWakLBpSygM1RCMMoIHMs5+b390dCb309i1df30lW2oxeI2t1GWM4tIaHzjglc2FanLkl/eThPCH4uvbcyek5ci7TPUXsrW8xNEk73hVnGPMQEm9krW7m+NS6Jw++GNaguhtYNDoHwPQoOrSvIm6IvfXli83cXzfhWbyVjuTXJAblWosaRsGS1lhO5wvmBoRfpD+ZOeUE87XniqUSTk6zUtdLJYfEU/f059vTcnfXXXhSXaWiwFRBYPNocsWRtRbrDJyFakEhS/qzhysceFZ7LnN8hmLR0xgBAOUcE0v48oqH4nP2aDLpfO2RbAfyXP7SugcPvhiUJJu2UP5DNrkPdVJC65IaMVtfcc0SVDyJV/ylR4YGpd7ULrrQ6+6CSPrJoz3OYfpMsucXUtY3kRgQT43oX20FXsCuxVv5ZU0+gs2H0hBbq8vJoucL9QKx6BJ8sL7VsnwTLPjW173l5WS29lB2oZbNvhNP7YcxacQP0p/MnNpZX5nIQ2IwbjoOg+vgWn2VyZLXiB+GG4rFkrVgUFnd+thY3zOJxB1b1yHgUQdX4i3XY5mjDGLmkhtskk3OlNWtT/qTmVMOslx77rR+5bQtlFLrd3bFA219XVrevtnaI02LSkUZsudml0H8UhQO8CuT61AslaSSdsSnJaWYbeq+Oow78RKYHi8Dcc3zGxWLNh+48KUo7Ek/ebRHgBe152TaWonxXs7x8+burLO4Ei8l3CReLeo9Z1d0GcpZYyqu6xYGczlPLm94voZdlXKQ/V5X4hX/QmX83bzwYZdbMClcw7np8zKMglTUwer3IrzitfvLlPF3rYs1tuH5Ij1M5Sm1X3tOJtsspvULZ/iU9E11mMaWl5t/ORmra7e4UHN2vcM5NmqP3XbGrCUSMRueIC/aGouXmR8r/RHvVlcUr5izqnAL2ag9ujSKnq9gSdLhCGxyemPxEmL65fr7+zy/iZizW+6Pq/BMH0x5zjLhspgYcajT1bLbaSheS6RBojrYujIme54vooCYpM8Y87xoC9MYXM+/iWy5j5mrPc8XUQAohxhrjy8lrK/o+v3Q+T1YuFiwNe8TWR5vsVjPlvk0DUHTtX2RLpgx5wcNxSv6RH6MbOrF4kq/YNws3nZOPOo2wuMA9QocFr+3V2m5eHv5w1W0lpaLV1xQiAsOhUKWlotXXNlWBvQpFE3TevFaV7bSkyUVilrUgi1oCDuevYwb8Zrqp3o5NNMN+LHjGRYaipcQc2jmSqZnVkh2dLoRf3Y8g0lb3Iaw7Oh0A2JhgB9ZfkHd8WwoXsawV3ssk0Nq/YDprOeLKKpV3CaanaAJBHfH043l3Wv2TSxplCS4pScdhVIfMvwsxmff7v8FARfiNacvyhT+WabTQIlXCqEwQKYQ1jIijDRvnDqFC/Ga0xdLEo3exARoAPfsHoGK+oglO5qlHq0xor/LOAmkvwu4EK9Ya1YslaQSoK2POHMjE0V99PWdpLhYk8nwsz452V4Tt9VR3EYbTH6RTAK0pVEJCXarobZTKMzWHtobhMZYG7/w8FpeAOAwx3plIg6DQotNAnwepsk0LUdoSWppWeqCYtH61AxyFbdLy8s3ao9ku7VYAuohmkzTSioTmExz7xIJ71067WbdNXdnncWdeCndqD2UsbyA1VpQEo7ZCC1H+CO3bRbtAtHoMKGUPmi4Em+latWU4yAzG1ecTMOBj4PcK6tdiOOnZIQL2HxnxPxEDRqut4c5zL0WLi7ynt9M06LW3baQTKZpFXYTmGzGUzXEtrdZNLohfWNdgJe2/qZGb7Kugzj6ihB8oWK+zlBqHpUbj8ekogxiS1RC8HVQt4WruBdvrN8k3mKpJOU6DA8nbDKhzF+Qooy+ujkrxnZlrC5gfVIyoetkEHEt3nJ7efNgOxnXAbB+ARXrOyt1sRBDCF2uPe6PRCQXapeWlltiy9Qg4i0lUnAdLt7lpHJDU8lhi+9LCVVd0mvQ175ZgODr3rw5JnUtcQITIfg6DI29vYm37DpcRx0YY7i48O46UEotvi8HPq58YT2Pvro5RWCekhSPx6S2gxljFn+XsXDMAvEk3spcMJP1lR0pOjycsMk2I4sqdAZQSpchFKpOjKekrmUzcPtMXL8EFe+VFH3EMplGZuEG2H4hI5Tx5V7eNtZXtxbFRdrY6Ih0rdqJMPaKgywHPcpQxbN4058+2BWbQ4sfkFs0LWrrPuCy0JP+r766OUsIflV7rvwZyf0tZ7M20zJDNIFJqoaNMbZYe5zPX0rNRwCAsdGk1X0g+KLX/F/9+fY0IdTyOJ+ckFukAVaXjnM8DcNCrYqUeCuZSKY0yTdvT6RvYnJizBL7JSC/1le356UvGiD09Z0kYXwFgp87OTEm7S5kjk+t4THB5Qs60tXDnMBkGQ2jgKzETFygXET43q0blvOE8N+GXcD6+k6SGoUNCGGx4aEEhocTUtdkjFldOYLfiZ3Vg460eNOfPVwRfd/M8Zl0T4CBeMz2ERlmAVeFK/ZAjsdjmJSM6QJlq2v1dfEj6Qt2KU31bRB932KphMyx/EJ2eDhhWcAB4RSw/nx7mhiFXVG4mhbFbZunkFsMo+C0gP5AX9tWbkOV9JNHG+KW8cnpeVMtocZGkxgesj4uywLeWpa+cBehr27OEsY3ILgKmhbFnds3mxp6cnCUcfwZAf8yTHH05jvmcLYAIde33gfohsmbY7YJKITgi2dfbW0EOQ6sr24tEkLXISzO/BBu5vjUYjj6hOtRzkNjfYkfF9HXvlkgIL+uPZdKDuHG+GhT181mL5z+EM44wXz6s4eB2SnSVzenKKXLdpPW4/EYbt+60ZRwDaOA/ZevTedGhgZw/94kdr79q+k85+xHYQiZ+dKrLP34p0t2GxeyO29VhocTeM/+Sx0hHLq+trUShFxgfe2bBULorp1wh4cSTVtcxhi+f/3Gcn7mo/u4e3vcpnKbhKJ20LdGe4yxeYjuw2EGRYkmJbUkBgdw5/ZN23gnAT4nhO7qq1uL3ehK6KubsytrW3uVp5JlJTo5MdZUVKHKwWHGEtP98P27GBkqp0/ev3fT9DMKMt/0m3YBvrgNVfTV7XlC+G9rz/nhywFl65I5Pq23FX3GOZYQiy51eu9eX92cpZRachSqaFq0qQ2IWjLHp5adtPHRIfzsHz+4Ps7lDfz+D+ZC4bnHD3397juB77+Avrq1LJZpDw8lfLEwQDmx+tDG0tRwxkGWwa+W2unX6es7SVwW5yrFkvec/t/Y6Ih0roKI3ZqgP9KHf/75NPoj5uaGv/u3/0KxdHV9zCmZCfqmhf+Nc2PRBWIUpmvjl9V8Uj8EPBCP4d7dWzg5zTqlY44Q8C9B6JfP1rZeMPBlcL7SCiHr6ztJFAqzYJgjRuGLeqYgHo9hYjzlWydzwyjgyGZL/mcPPrAIFwBGhgfw9rjmqXV11XVullda8ujQVzenCKG7EPy8G+MppJLDvr1PsVhC5vjMkmztwD7n2ADIBvqwK2N19NXNKVA6DYZpSmGpL7OjPxLBzZtjvkwOrWIYBbx8dWjZRZv5sLxAs+OP//knk3g5Z58EuVsO0CLxApUdpHIg3pJsIrtn74RHEV9DgBcgOGUcp+JkyfJ/IMnqDAg3Qq0lHo8hlRyS7rHghJNw79+bxEfv33V8nRKvR+wWcEBrBAyUF3Vn2Qucnp7X84lbRrWTTSo51JJBJ07CvfPeOH7y0f26rxV9XgD/NPf44b/7fpNtpOUrTicB+7mIs8MwCsieXyCXN1o6wagq2EQi7ruVrcVJuJMTKTyc+XHd19pFGwjwgmnR2U5HZpqhLeGSTgm4CmMMufwl8vlLXBpF++4xLtG0KLRoFJrWjwHJBiBeyWYvcPT2xHLPI0MDjgu0Wv6yf4Bv//yd5XzQBdy2WJ+TgP2KA3uFMXbdZ7iemDUtCkop+iMRX4aXeMUujguULe5PPrrfULgA8Ps/vHDs7BlkAbc1UO0k4P5IORm9lwfiiTDGcHCYsd1id+PjVnGyurUEVcBt32VxikIA/ofSgophFPD96ze2i85GUYVacnkDG//xrbhQsyWIAu7IFqH+fHuaMr4sJmIDlSqCibGOPKK7ASc3AagfxxUplq7wx+0/4ezcbLnHRkccrx80AXdsf1tf30nCKCwT4HPxZ9WOOr1khQ2jgIOjjG1kpD/Sh589+OA60aYRTsKtpqnWSTUNlIA7npxhlwtcJR6PYWx0xNfdqW6jUcJRaiSBR//w964WZgDw+ugEO//9V4uroGlR3Ltz6/rYrYDLORuX00D3za/ouHiBaz94BQ4JLcND5dq2sLkSVdHWC9v1R/owOZHC305N1rW83716i5ffvzHnL1RwiujUEzBAvgf4MYAPTWeBF4yTpfSTB8uON9MmukK8QNWNKC4S8C+d/k9YRJzNXiBzfOZ5F3AgrmEgHsVYquxOFUtXyJ6/sxVslUahyPoCdqYb3IuuEW+Veou5KsNDiZZtwbaKci+FbCNLewZO/hWE/wJ10irdkkoOYWw02TCGHlQBd514q1RiwkuwCalV0bQoUiNDSCQG2r7J4ZZc/hLZ7LuGSUOc4yli0YUf/MzCAik3dnH8/Z2QWSvUi3KMDA2gWLqy3ejopIC7VrxANcHb3ZeYGBxAYjDeFUKu5lVcXOQbugac4ynAFu3yjcuulDFPQebrPYlqIYTg7t9MenoqOeVNjI8OYebD+9c1cLm8ge2d/7VEMTol4K4WbxWvligejyExGIemRdsSqSgWS5Vmg4brbvH1RGvHD6v+vimATxGKSXDMA9DE/0spdaz7E/GaqeYUhuuEgAMh3ipuS21E4vEYYlo/IpEINC2KWCVfQYZc/hKMMRhG4TpjzUOSj68lSvV2K90IWDbFslsEHCjx1qI/357GFV8gBHOQ8AuBck5FxEXkoipWWQjB14yR5VaEl2QF3ExuMNAdAg6seGvRv9qaA8NcM0L2G0LwNeN8pVX1c7V4FXCzwq3SaQGHQry1VCzyXKXGbBptEjMBXjCQDRC+gWh0o92LF7cC9ku4VTop4NCJV6QsZkwDfIpSzIIj6Xbl7sA+IdhjnOwCbA+c73bLtmkjAd+cGMXh0bFvwq3SKQGHXrz18DS4MBbbDUKySj0B29GscKt0QsA9Ld6w4lbAfgm3SrsFrMQbUhoJ2G/hVmmngJV4Q0xFwN9A2MholXCrtEvASrwhZ2Vt6xzAdZMMsQlfq2iHgLszm0XhC5UF6bVw+yN9eDDzd215b6fqDw58TI2CL93tlXjDDKUmgYwMD7iuyPCDVgtYiTfMcD5VexiJtD+Jv5UCVuINM5ybmgdmz5sbsyBLqwSsxBtmYjGTeHN5A3/+v1cduZVGApa5phJviEl/MnNazhv+gf/5yyt89+ptR+6nnoBlBhwq8YYetghh0M3Ot3/tOgHLDDhU4g056SeP9jgnC+L5Tgv4wcyPrZEPxhe9XEeJtwdIP3mwzDn5pXi+kwIeiGv48H1zMQwBPvcyV0+Jt0foRgE3O+BQibeH6EYBT06khDNk1u1rlXh7jG4T8K0Jc4iXALNuX6vE24N0k4DHRy2dQF2XbSnx9ijdJGBZlHh7mKALWIm3xwmygJV4FR0V8NvjrHjKvtufDUq8CgCdE/DrI3NBBQc23L5WiVdxTScEfHAkTq7nG25fq8SrMNFOAX/36q215y/nK25fr8SrsNAOARdLV/j2z/umcxx45qWvmxKvwpZWCrhaWWwZbkjJopfrKPEqHKkn4L/sH0hd06kknoP8Jv3pg12Hl9mi+jYoGuI0M3pyIoWP3r9rzQxzwGlGnGwvByVehSucBAyUO/DcvT1ul6eAYukKrw9PHGfEAdjnWnRapgmJEq/CNfUEXGV8dOj637l8wXaCUJVmu+co8So80WhaqVtqR3fJXkOJVyGFvrq1KDMnrjyfgy360ZBbiVchTXU6EwifqySROwl5n4OsgGLZa0ShHkq8Ct+oFE9OmU4GpKO8QqFQKBQKhUKhUCgUCoVCoVAoFAqFa/4fCbut2hEefs8AAAAASUVORK5CYII=","e":1},{"id":"image_1","w":85,"h":85,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFUAAABVCAYAAAA49ahaAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAEE0lEQVR4nO2d/XXaMBTF72OB0AnqThA6Qd0JygalEzQj0A3aCUo3gAnqbEAmKNmATHD7hyTqEuMvycgW73cOJzYY83zzJMuS3pNgJJDMAWT2tQAwb/jKEcDe/RWRYjjruiGxfpjkEkBuX/eBTvsEI/QWQCEix0DnHS8klyS3JI+8DluSK5JNXj8tSGYk11cUsoojyQ3JLLYeXlgxNxGFvMT0xCU5p/HMsbPhFKoFmjozZjHvypHkQ2zdKqHxzm1kgXwoGLBK8G5S0bQvtwDuvK2JywuABxHZ+J5o5vNlmqLzG9MXFDDX8JPkd98T9fZUkhsAn30NGCk7AKu+Dw+9RE1cUMcTgLyPsJ1FJblHuMfKsdNL2E51qvXQWxEUMNdasGN7trWoN1Lkq7iHad20ppWo9i5/i4I6PlinakVjnWrbob89DEqJL23asbWi2rrkgDTaoSF4gblx7esOair+G6igZe5gNKnloqg0PfOfAhqUCvck13UHVBZ/LfaNvABYiMih6sNLnvoAFbSOOwAX+wheeartAvszoEEp8bFqFLfKU9eDm5IO66o3//NU9dJevPLWc09dXc2UdFidv3HuqUfoDaoPb8o9WSdPte1SFbQfq/LO7NIHSidW5Z1T8dei78079zAwA7ToB2LpNlzxz+PYkRS521BRw5G7DQEAkoxmSlq8F5H9zPbsK2HIAFP8s6hmpMUCUFFDcxJ1EdmQlJgDRtTxT3ydDhngOetPecVbQEUdBC3+A6CiDsAMZihaCYjWqQOgooblGTCiph8Uez0OgBG1dgab0okjoJ4amj2gnhqaA6Cd1KExndR25ymqKYngZlg7UbUK8OfRbThRO4W0KJWcNHSiFnHsSIrCbcwAwE6u2sWyJgGeyxEr5cdUrQL6synvlOdSafBEf96VgypOnmqrAPXW7uzOo1R0ero/9dPTreK/rmjQ1Hmsik7RkB8/2oX8qLe2ptJLAQ2j9OH9pWjqyuEU2xJYD2nRxPlRF57eFO9fAPgQ2qKJ8wwT7Huxc79p4G8FEzGs/KMxX1WtqPamNc4Eg3H41iZNc6u8VDZV21dfiybOTkSWzYd1SPZFcovbzVTRKelXF1HnMH2Gt5TsC+iRRa1TWrobFLZVdp9zOk37sf+tHLcxUOg8tPP4Xd+slHOYbsJU27C9M1ICPSeoichRRHKk2Uewg4eggOesPxFZAfiCdB4QvonIchQrWZBckNwPlYX7Chw41shHxl95og/fOfZ8/zQrUUwhPX1BclqBeSRza/jYKDjWot4WGnHHsIbKllMX8xyaVSseeN0b2oGmns+uea1RFvmyF1le5CvksM0j/i3yFWU2Y7SV08rQ3DAymIhutxRdBhvrWcEzzBiaW5LuALMknU4JTZW/U1qiUwiP8oYAAAAASUVORK5CYII=","e":1},{"id":"image_2","w":186,"h":242,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAADyCAYAAAD6Bd/wAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAPn0lEQVR4nO3dXVobR74G8LeqW60vGgkZFA/J2OZ54rkNZwXxDiY7GGYHnrOBISs4mbMCZwPnOCsYZwf2re05Mk6GsYUQSE2jr+6ucyGaMCBA6KtK1Pu7sUBSV7n00vp3qVoNEBERERGRScSiGqrVjp7ETrytlNoWSjw7a/3bRbVP2u1B4QMEPiioD0jw6unWxqtFNT7XoL+t1bellDtKiGdCqW/m2RYtrZ8g8NKJnZdbW2vH82pkLkF//7GxoyCeXw53PptBLuci4zpwHYms50LKhb2pkEa9foQkUegPYvT6ETq9AaIoufiQAMD/OImzu7W19mHW7c80Ze8/NnagsAvgcfo7v5hFseAhn80w1PRvoihB2OmjHfbQ70cX7/px1oGfSfLe1urbwnFepHtw15Xwi1mU/TzDTWPpdAcIwh6CsHf+OwX1vZu4P8yipJk6he/2DnYFxF8BQEqBkp9jwGliUZSgfniCTm8AAFBCvFFxvPOHrerrabY7cRprtaNyLOKX6cxJMe+h+mCFAaeZCDt91A9PkCRq+AuBP3/9aP3FpNubKJUXSxUpBdbXivCL2Un7QDRSkijUD08Qdvrpr378+vH6ziTbunPQz6YMfwaw6roSD9d9ZD13kraJxtJsneKo1Ul/nCjsdwr6xZB7nosvq6ssVWghgrCH+uFJ+uOdwy7HfWCtdlQWjvMCDDlp4BezqD5YSX/807u9g927PH/soMcifimU+sZ1JUNOWlwMu4D46/uPje/Gfe5YQX+3d7ALgW+lFHi47jPkpI1fzP428aHwY6129GSc590a9Le1+nY6T76+VuSBJ2lXfbACb5jD1VjEL8Z5zq1BP6vLUcx7nEIkY1QrxeENgW/HKWFuDPr7j42ddK78woEAkXZZz8VaKT/8QeG/b3v8zXv04QItlPwc63IyTqVUgOtKAPj9P/YOn9/02GuD/v5jYwfAY9eVqJQKs+0h0Yyk2VRQ/3nT464NuoJ4DoB1ORnNL2bP9+pnO+eRRgb9ba2+nS65Lfv5uXSQaFYuTDdee1A6MuhSyp10A6zNyXSrxVx684+12lF51GOuK12+A4BiwZtDt4hmy3VlOq+O2IlH7tWvBP3sk6bHwHDunGgZrP5Wvjwbdf+VoMdOvA0MT2QmWhZexklvPht1/5WgK6W2ASCX40f9tDzyufMd8+NRdfqVoKdfLpRxnct3ERktrdMjRNuX77t2Ht11xl7BS2QERwxnCIUjnly+72qaz0525ipFWjZpua2UenL5vmt325w/p/uE9QlZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysYeWJotxchCLvo9SPE6QVVyWg5z0Uu62KlmINj4GmYRgW9FXRw0AwxiGLdXaE7Oj2/6G0bJT+PjUrRqK9MMSLocaLw66fjC4NFy6wVdBCEXTxc91Ey5NuYtQc9ThQ+/rOJbj/S3RWaoSRR2K+3AcCIsGs/GGXI77f9ehutoHP7A+dMa9APmicMuQU+NQLtx13agh4nCs3Wqa7maYGSROGgGWrtg7agt4IOEk4dWiMIu1qnirUFPQh7upomDZJEaZ1V0xZ0TiXap9sbaGtb+6wL2WMQJdraZtBpYXTOvDDotDCFnL7rYmkLOr9/3T6OxquoaGvZ/+0iqGSJQk7f5Tw1Bj2rq2nSIOM6yGX1La3SGnSTlnHSfG1Uilrb13owulld1dk8LUgh72lfwag16IW8hy/WfZ1doDmTUuCrh1eub7v4fujuQKVUwPqa3rc1mo+M6+DxZsWIU+u0n3gBABuVFeSyGXw2YDknzUbJz+OLdd+IkAOGBB0YHpwW8h5Owi6ax6dcp76EpBTwizmU/RwKeX1TiaMYE3QAcKRAyc+fH7hw4dfykFJqnT68jbk9A4zbK9Dy0n4wSrQIDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZAUjv2Q0PrtuvM5Lai9aLptBIe8t/PvEZzXWjiNRyHnGfqOuUb3q9iI0W6doBR3dXdGm5OexUSnO/UJmp50+mq1TBGFvptvNuA5Kfg6VctGYiwAABgX9cyNAs3WquxvatYIOWkEH62tFbFRW5tLGPMd6EMVoHIVoBV1sVleN+epv7TV6nCjs7R8x5Jc0jkLs19sz3WacKNR+OVzIWA+iGHv7R8a8O2sP+udGwCtbXKMVdGYa9l8/HS/8kjn79bYRr6/WoNtej4+jFXRmUkcfNE+0Be6XT8eIE6Wl7ZS2oMeJwkHzRFfzS+VzI5jq+XGitJaGSaLQPA61tQ9oDPpJ2EWi+a98WQyieKp3vlbQ0T7Wuo/BtAV91tNa990049Vq6y8Pk0Rpfc0Z9CURTlFfm3LNVp0fAGqfdaHxTFp6mHQl7kGUaGubQb/nBgOTgq6vLwz6PZfNZnR34dy8lzXcRFvQpUHrIJbBpCExab1JxtW3X9XWctGQNRDLYpo1I6asN9H5mmsLul/M6mp6KU0zXiaMtZRC6x+ctqCX/LzWmm2ZZFxnqrCW/Lz2UrFSKmhtX+vB6Bfrvs7ml8a04+RIMbclv+PIuA4q5aK29gHNQfeLWZT8vM4uGK9SKsyk9KiUClrGWkqBrx6WtR8Ua59e3KyuMuzXKPn5mb7rLXqspRR4vFkx4vQ6/T3A8AXIuBKNI70r3Ewhz0qNedS1ixrrnOfid9WSESEHDAk6AGxUVlBezeOgGSKwdGWjlAJlP49KuTDXA/V5jnXOc1Ep6ymTbmJM0IHhQctmdRXAKk47fQyiGH2DPsKeFy/jIOtlFrr3uzzW3X6EOJ58LUouO+y/qTNpRgX9IlM+5LBBIe/d+/HWfjBKtAgMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBWO/ZHQQxRgM4nv/jbpexkHGdZA5+1eHacc6vdqcyV9UalTQ40SheRyiFXSNurT3omRcByU/h0q5OPdLocxyrC9eVMAvZlEpFYwLvTFBbwUdfGoEVl4AIDWIYjSOQjRbp9isluZ22cRm6xQHzZO5jHUQ9hCEPRTy3tnVNcz4vnQjavT9ehv79bbVIb8oSRR+/XSMz41g5tver7fxeQE7lNNOH//3yyG6vWiu7YxLe9A/NwK0go7ubhgp3fPOyn69vdCxThKFvf2mEWHXGvQg7KHZOtXZBeM1jkKcdvpTbycIe1p2KEmi8K96a+HtXqY16PN4a76P9uvtqbehc6y7/Wim70yT0Bb0VtCxcmZlEoMoRhD2Jn6+CWPdCrpa29cW9GleOBtNM14mjPUgimdSgk1KW9BDjf/pZTRNSEwIOqD3NdcWdE4l3s2kpUds0DgPosmvYzot7dOLNF+93kB3F87pPE5g0O+5TMaMTyYBzH1Zw00Y9CUhJwyJKR/BA0DW07fiRFvQTVv0Y7riFOOV0xiwi3LZjLa2tQV9XguW7qtpxqu0mp9hTyYjpdC6c9MW9JKfn/jt2DZSCqwUcxM/34Sx9os5O2t0RwpUSgVdzS+VjcrKVCHRPdZSCnyx7mtrH9B8MLpRWWGtfov0RIZpbVRWtNXqm9WS1r05YMCsy1cPy8YcLJkm57n4XbU0s+09+rKy8LHerK4acTymPeiOFHj0ZQUlX/8Bk0kqpQK2fv9gpnvCdKwXETwpBb56WDbmdTViV+pIgc3qKsp+DgczWn+9rAp5DxtrxbmVdM5ZAE87/bmMtTw7HljEea93YUTQU4W8h8d573ylW38Qo9ePjFqvMWsZ10HGlfAyDgp5b2Ef8Fwc6yDsIY6Ticc657mQUiCXzRhRpoxiVNBTw7PhzXjLu+8yrmPF7Jf2Gp1oERh0sgKDTlZg0MkKDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZIVRQW8BQK8fLbgrRNNJbriIwdWgK7y+7UlEJur34+GNBK8u33c16ALHANAfxPPtFdGMDeLrM3sl6ArqNcDShZZLkihEUQIAeLq18ery/Vf36Ge7/R736LREOr0BAEAJ8WbU/VeCnv419PvR+V8Ikek63WHQhVKvRt0/enpR4WcACC2+3ictl/OsiqsHosA1QRdCvASAdtibU7eIZqf3W/XR/vrR+stRjxkZdJnIFwDLF1oOraCb3vzf6x4zMuhbW2vHAH4EgGbrdOYdI5qVJFEIziqPJEl+uO5x1y4BUIl6AQBB2ONenYx1HHSGNxR+/sNW9fV1j7s26E+3Nl6lB6Xcq5OJoijBUWsYdKXU7k2PvXFRV/rkIOydT98QmaJxFA5vKPw86kOii24M+tmT/wYA9eYJ17+QMcJO/3xKMVHJ89sef+syXSdxdgG0oyj57S+ISKMoSlA/PAEAKKjvb6rNU2KcDb+rHTwTUvwdAKoPVuAXs1N1lGhSSaLwz3ob/X4EJcSbp48ebI/zvLFOvHi6tfFKQX0PAPXDE9brpE3jKER/uOCw7cbyu3GfN9YePfV+r/ECwJ+kFNisriLruXfrJdEU6ocnF+fM/2OckiV1p6ADwPsPjVcQ+FZKgfW1IssYmrskUWgchechh8Cfv360/uIu27jzOaOOcr4D8FOSKNQPTy5+/Eo0c2lNPk3Ih0+bUFrGAEAx76H6YAVSTrw5oivCTh/1w/Np7bZK1B9vmy+/zlTJ/Mfe4XMF9V8AwFKGZuVyqaKEeKPieOcuNfllU++C39bq28JxXgilvgGAfDaDtVIe+Vxm2k2TZZJE4TjooBV0L344+TcncXbPFhpObGa1xru9g10B8RcAq8Aw8P5Klnt4ulUUJWiH3X8LuBLiDeLk+aSlymUzLaprtaNyLOMfcFa7A8OSppj3UCx4yGczrOMJwPBkiW4vQjvspfPiqT0I7E5ywHmTuaSuVjsqRzJ6LiB2ADy+eJ/nucg4Ep7nABju+el+i+IEgyhGkij0+zF6g2jUuqmfIPDiujOEpjX33evbWn1bSrmjhHiW1vFEGH4j3CsIvHRi5+W0NfhtFl5HvKsdPJNSbidIygLiCRSeLLoPtHhKDM/OF0K8dmLn9dbW2ge9PSIiIiIiIp3+H/yNcCHjpRNmAAAAAElFTkSuQmCC","e":1},{"id":"image_3","w":216,"h":260,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAEECAYAAABKq/oNAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAeX0lEQVR4nO2dX3Ybx5XGv6puNEAIAkGR4vAokQnO2H41ZwXiDuysIM4GJjnZQJIV2LOCaHZg74DeAfwqKQFgOxoOBRIgBDXxp7tqHtAFNWmA+NdV1Q3c3zl+oAii22R/qFu37ncvQBAEQRAEQRAEQZiC2b4BItu8ql+ecodXpZSnDKwKieq010kmzzl4RwhRc+HWTk72OkZv1BIkMGIh6vV2JUBwCo6ziZAYXqz6fpKxH5mU50KIl5+fHNaSu9N0QQIjfsXr+rsz5rAqJE4hcQqGUwC7017LOYOXc+DlHHDGUMi7v3pNEAoEgUAQCgxHIYaj8P5LmgzsWy74y01b2UhgW0y93q6GTngahXenkrEqk/KLWa8v5F24DofrcBTy7lhUfPlHSAgJvz9CfxDA748ghFTf6krIb1zhfrspQiOBbQEqvOOcn0rI03nhnevwyarkec7kax0osXW6fQShUP/cBcMfP/3k4KWWixqEBLZhqPBOSlllkp0tGt4pEU0L8UzR84d3hSbxgyOdr7K8mpHAMkq93q4GCKpR0mFueBcXUiHvwnXHoV4a6XT76Lzvqy+7UsgvPzt5em7xllaGBJZy7oV31Sjp8GB457ocBc/VHt7pZDgK0Wr7HxMiDH/IYshIAksR0ZnSaSy8qwI4nvbatIV3OhBC4vrmFj1/OP6HDIqMBGaBVcK7uIjSHN7p4PrmFt3eYPxFxkRGAtPM6/q7s3vh3cykQzy8c92PmTxinABptf3xFxkSGQksIe6UDM0J7wBMzpHiKfFVzpS2iVbbn4SLQoj/zEIFCP1Fl+ReeFeVjJ1SeGeOy6sP8PsjAOg6wjlOewqfBPYAy4R3KumgwjuVDieSRQiJi1ZPZRe///T44Cvb9/QQJDD8qiL8FMAp5oR3d6odKLwzynAU4u3l+/EXDL/79JOD7+ze0Wy26qlYtiL8zh7J+5gSJ+wTO4xufnp8ULV8OzPZWIGtWhEer3Yg0osQEr/8X3dcKJzirGLmBXa/IhwLhnfrVoQT9oml7lO7imXmyUpzRThhj5/+9ybVq1gq46BpFeEhwl0GBonIOxR9NFB4t92UH+XHezGJrwC8tH0/97G6gi1r+MtSRThhhiAU+OWiCwBwhHNycrLXsHtHdzH2UR+J6SyWdHgRIgQkwCKdMzlenTalIpzQj3o2hqMQoROeIWWrmFaB1evtiuDia8HwdSjDL1R0Ny2829SKcEI/paKH65vbVIaJWp7mer1dDXn41xDh7wGARcIq5F0UPJfCOyJRYh/KZxZvYyqJ7sGUsAD8Xv1bIe+iVPRQLOQoHU5oo/GvcUli2vZhia1gr5vv/hoi/DOAx8B42S6X8rR3IoxQyLvoDwIECKoAGpZvZ8LaAqvX29XAEd+p7F8h7+LJ7g4JizCKl3PQHwQAxxmAc8u3M2Etgb2uvzsLefg9kyhzzvBkdwelopfUvRHEwqj9fFTNkxpWFtibn1pfQ+LvwPjT43D/ESUtCGuoiEkyVrV6I/dYSWBxcZWKHg72isneFUEsiRLYQ4UKNlh6ySFxEWmEczaJoF7VL1MTJi4lsNf1d2ckLiKtuO74ceYOz57A6vV2lXH2PUDiItJJwRvveKSUVbt38pGFBRay8CWAspdz8GR3R98dEcSKqBWMSXZm904+spDA/tG8+hMYXnDOcLj/iCoyiFQyOXtl06ds2mCuwOr1dkVC/g0AKo8LlIonUkusuOG4Xm9XbN6LYq5aQh5+C6BcyLsol/IGbokgVkeJLECQikTHgwKr19tVRIW7lccFE/dDEGuhBMZ5OjKJDwosqowf20zIp0VkALWFkUhHJnGmwKIY9ncArV5EdpgsBBLpXsFCJ/wKQJmayBBZQqXqH+o4ZpLZIeLYfk2JDSJTuA6fHCNFOQSrPLQH+xIAijs5Q7dCEMmgEh2hE1oPE6cK7HX93RmASQdcgsgSE+uKlOkUWOQKpdWLyCRpMl9OFZi6MbL9E1kkTebLqQJTN0bhIZFFVNY7DebL6StYrIENQWQRtTiofIK1+7B5cSL7jIIQg2GIwTDAYBggFOMuswXPRd5zsFPIIeea32q4LkcQCjCHVY1fPH4fNi9OZAchJPqRiAbDAKNA4HY8jHwq8e+Vih72K0XkPXOPW8Eb90m0bb4kgRG/wu+PEAQhRoGA3x9hMAzGM7hWpOcP0fOH2K8UsV8x44T3PNUEx675kgS2xdwP70aBwGAYaLveVcfHKAhxdPBY2zUUkwQds1uTSALbAuLhXRAI9IfBg+GdTrq9AXKuo30lix0x7dbr7crJyV5H6wVnQALbMOKrUTzUSxNXHR+loqd9T6bmhkXmy3OtF5vBrP/DJoDj4Sikw+aUMoqEcxvtkXSHd0lzef0Bz492tV5DCSwyX55rvdgMpgtMogGG4yAUJDDLpCm8S5Lb/gijINSawo+ZL63tw6YKTDJ5zsBeDIchigWqRzRFfCVKa3iXJD1/iL2yvhaAhbwLvAcg7XWZmiowxlgDEuhnKOTIEvHwLp7J2zZu+yOtAkuD+XL6ChbKBuMMwQZ/eppCnSOp8G7dM6VNItT8e1DmSyEk6vV21cbky6kC++zk6fmbZgtBSAJblG0L77KCGswXmS8bpq8/M08qGfuRSflFfxBQ0W8MlXRQ4d28kiHCLkpgkfnyO9PXn6kcJmUDwBfDUbi1AlMr0WAYUningYKB2sTJ3DBL5svZKxhkjYF9uQ1hYjy8ix/UEnrJe/qPgGKexnQJjDFWgwSGo9Dk/Whl2YpwQh+cM5SK+juWxaKvY+0Xm8JMgTmhUwt5mFmBJV0RTiTLXnnH2JQe1xl7w17X3519dvL03MhF1bVnfePkZK/xptmCEBJBKFLbPsB0RTixPjmXaz3/uo+Xc6yZLx/eZUr8AIYXQZAOgakUOIV32YVzhmeHZaMz5rycA78/stJO+2GBMTQAvLCdqu/2+pGXiBIPWYZzhudHu0adzcBH86UNgT24LDGwGgBrB86jIETzbQcXrR6JK+PsFHI4flYxLi7ArvnyQYEJIWqAnUziYBig+bZD+6mMUyp6+O3RLp4f7VppfgP82nxp8toPfpy4cGshzGcShZD4+eKGsn4ZIudyuK6DYiGHnMuR91wrq9UsCvlxExzT5ssHfwMnJ3udN83WDYBdk+bLf112SVwpZqeQQ8Fz4UZCKniu0aTFKkzCxHFb+HNj1537CokaGF6YMl/6/RFlB1NC3nPvrEZ5z7EW5q1LrF991eh1573AtPmy073Vfg3iLpwz5D13Et6pUG+TsGW+nCsw0+bLnj80cp1tZefeHikL4V0STKIvw+bLuQIToahxzo2YL30KDRPjbmiX7fAuCThnE/Plq/rl6ecnhzUT150rsM9PDmvKfCmE3IpPuyyhwjvVC34Tw7ukUN4w7vAqgHQIDPhovtxmb1gaUOFdznUmmTz6wFscG+bLhdRC5kuz3A/v1NfEetgwXy62ghkyXzpb9mkcD+/UmRKFd/qwYb5c7GNR4Bwcf9Fd0ZGPQp5NPGSOJxrioR5hDhvmy4UE5sJthAjRH+hP1ZeKHrq9gfbr6CJ+jkThXfpQ7bRNmS8X+ssr8yUA7ebL/UoxEwKj8C6buA432q9+8Y9WQ+bLnOtgr7yDdooqOuIrEYV32UaZLyXMTL5cXGAMNRgyX+5XihPnsknSXhFOrI9p8+XCTw8Da0hII9YV5Xz9+eJGm8iyWBFOrE+sZCpdAhNC1BhnxtzNSmRXHX+tcJHCOyJObHuza6Jf/cICs2G+5Jzh6ZNHqJQLuOr46PnDmSn8bagIJ5IhZr6sQnO/+oUFFpkvrUy+zLnOZHC23x9BCInBMJgIicI7YhlMmi+X28FHky9tjpZVq1Kp6Fm5PpF9YiVTVd3XWirfLpk8B0Bzw4hMowQmmf6axKUExhhrADT5ksg2kxVMyi90X2spgYlw3MaNVjAiyyjzJQC8ql9qXcWWEphygSrzJUFkFbWKReZLbSxd8yQZ+xHYrLFGxPahhv9F5kttLC0wJqW1br8EkRSuG7Vxk+xM53WWX8EgG4C9fvUEkQSxfvVVnddZvixejA/maAUjsowp8+XSAnPhNgAYMV8ShE5UouN1/d2ZrmssLbCoOPIGoDCRWI5REMLvj+78ZzMbrcLEyHyp5xor/VTUr344ClMx+ZJIH8rPFwRiMnh+lpjynou9cgHlUsHoPZowX64msMh8aapfPZFe4nOx43Oyl32Pi1YPVx0fzw7LxkyusX716VrBTJoviXQhhMRNr4+eP0x8Cs4oEGi+7eDooGRkNVOpep3my5XiOzX5kvZg28VVx8c/f7nGu+sPWkdMXbR66Pb62t5fcd98qeMaKwlMtbuiFWw7EEKi+baDq45vLClxef0Bo0D/86XS9ZH5MnHWyVA0AUrXbzpqnK/pBkRCSFx1fO3Xmfgax+bLxFldYHJstaYwcbP512XX2iD6bm+gfRWLTb7Usg9bWWBkvtx8ur2+9XG+ugcyxsyXVR3vv3I+lDFWMzn5clsRQk7OkdSZUpycy1Es5LRk3UyEaPPo+UPslXe0vb9u8+XKAhOhaHDOKdGRIPFzJL8/QhCEc8+UbjEOpS6vP2CvvIP9SjGxe1n2PEsHupMqnDO4DkcQCi2TL1cWmJp8KYSkyZdLMoqEcxtVO6iD2nVQSYGeP8Szw8dr935My6xsE/s/1x0LjDv8FAlPvlzryJwmX87nfsmQ7j3NYBig+baD42eVtURmIkW+CCY+uAueqyZfVpN+77VUEZkvSWC4WzK0aHinCyEk3l6+x/Oj3ZUf0DSEhwCMlE3pNF+ut4JBNhjYVu3D4uHdKAgxGIbW0tgPMRgGaHdvE9uT2aJgQGCxfvXVpN97vbuPJl9u6lnYMhXhaeSq42OvvLPSKpZzOdIwQOqRgQazsSa6x/V6u3JystdJ6r3XEpjqV5/1ao4kKsLTyk2vv1Kaexya2R2EqI4gTKAmXwYIEh3Mt5bAon71NwB2dU++TAJ1pqTCOxXqbTKrniOVih7eXX/QcEeL82/RPAIT6Jp8uX6Am1LzpUo0DIZhJsO7pFj1A0QNa7f1AbRX3jHqNdRlvlxfYCkxXyqfUrc3SGXSIYvsV4r45eLG+HXLpTyePnlk9Jq6zJfJCEzata70/CEuWu+3coXSSbGQMz4ve6+8Y1xcwB3z5Ysk33ftmE6G4z6JtgR20XqPt5ddEpcmnj55hHIpr/06paKH42cVK+ICxnswlW1N0ny59gr22cnT8zfNlhXbykXrPbo9u5mutJPEQa0afpjU71pNIy14LvKeE432tT/W18s5iU++TOoUrwnguD8IjFV09PwhiWsBktoXHx08RqmYx7vr3lJHGPlIRCppkuYZ2UpgSU6+TEoNNQDHplYxISQuWu+NXCvrJBnelYoeSsUnk4Y38exsPhrjWyzk7gyezxI6zJeJ/AYkZI2BfWlqH3bT69OeawF2ooc9acZC27wRvjrMl4kcXDHGjE5codBwPpwzHB2UbN9GplDbmyTNl4kITISiAZgTGJ1zzefoYH1P2DaiwsSk+tUnIjDlAlXmS534G17atC5q5drEEM4EE+uKw6pJvF9ytU0SPwDUK9EmO4Ucnh/tGu/xvknEJl9Wk3i/5HbADA0AL0ym6olxxflO1PSG5gSsj+epJjjJmC8TU4IyX+pO1efc9BQUm0adI43PlsYHtdQLJVliky8TSdUnt9QYMl/mXAecs41O08dFFD+oJfQTM1/uJmG+TExgJs2XpaK3Ean6+yVDrutQmJcCkjRfJiawuPlyOArjnwSJUy4VMieweJnQTiFH4V2KUQJLwnyZbDYiMl8GodAqsGIhZ9UM+BD3w7sslgxtO2ofJiHX3ocl+5c3aL78zWEZ//zl2tpeLB7euZGIKLzbDGLmy+q675W8wAyZLzlneH60i58vbrSLLEsV4cT6JGm+TFRgMpQNxs31Scx7Lp4f7eKi1UukfCrn8kmigcK77UWZL4WQqNfb1ZOTvcbK75XgfVkxXyqRtbu3aHdvF17NVKKBwjtiGsobFjrhKdYwXyb+8az61Zus6OCcYb9SxH6leMerpHCi/RKFd8SiKIFJKU8BfLfq+ySuACZlAxb71W+qV4kwS1Lmy8TrjiRkDaDRskS2Scp8mbjATJsvCUIHSZkvExeYEzokMGIjSMJ8mbjAVEpTCElhIpFpJvOb1zBf6vF+RObLYEMmlBDbyaTcb4122noENjZfZn6sEbHdKPNl6gTGwCiTSGSeJMyXWgQmhKBEB5F57psvV3kPLQJz4ZLAiI1Apesj8+XSaBFYZLO+AUhkRLaZhInjfvXL/3yC93IXQ+ZLIvvE52KryaRqwIRyNOwUctgtFYy7wGMlU9WVfj65W7mLZPKcgVmffEmkh/hc7Pjg+Yd/RmAUDNHzh3h3/QH7lSL2yjvGhLau+VKbwBhjDUjcqWontgchJHr+YDIjO6n2DlcdH91eH88Oy0a8epPoa0XzpbYmg2ryJR02bxejIMRF6z3e/HSFi1YP7e5t4r1TRoHAzxc3RmYUcM4mq+Wr+uXSiQ5tAvvs5Ok5QGdh20S310fzbcdIxy8hpLHRwWoV4w6vLvuzWtvkSsZ+BKiiYxvo9vq4aPWMNiEaBQJXHV/7dSbWFbl8lymtAovMl5Sq33B6/hAXrZ6Va7e7txgFep+vSdHvCuZLvSsYmS83njSM8+35Q63vPzkLw/IlU3onKYhxV1Rawczh90fo9vq46vi46vhod2+1zlS76vjW5wToFlis9cXxsj+rNc/pwm2ECElgGoifI8UPamfBOUOp6GG/Uky06c9Nr5/Ye62KiWyi63AEocDr+rszlcBb6Oc03hNOTvYab5qtifkyttQSCyKERP+eiFZJewsh0e0N0O0NJh241sXvj6yvXgCMZRKDUCxtvtR/UifxAxheBAEJbB7xMiE/qnbQ8fBcdXwMhgGODh6vVRGRxtkAuvByzjjUXtIbpl9gUb96mnz5kVEQYjAM76xKpge79/whLq97ODp4bPS6WWVV86X2J56BNSTkVu7DkgrvdNHtDZD3XOyVd2zfylrsGKh1jZVMpUtgQoga4/pHy9rmoYrwNHPV8a1UqSeJiUazse3N7jL96rULTE2+3JQVbJWK8DQjhMRNr7/SKpaWedmmOjkX8i76gwABgioW7FevXWDR5MsmgGPdky+TJB7eBYFItCI8bfT84UoCMxGazaNcyhubNXDPfHm+0M9ou5s4Eg2w9Aosq+FdUqz6wZFzHeQ919oKzjnD4ZOSsevFSqaqi/6MEYEp82UarCvKpzROg4eZDu+SRAi50j5sr1ywUoeoBjCa3DvG+tUvnOgwIrA0mC+FkEvPENsm+sNgJed5uVTATW9gNHxW4jI9HHGygi3Rr97ILlWE4zZutlawwTBA8207FXVzaWWdhMVvDsvGEh7lUh7//tsnViaPrmK+NPJb+fzkcFJVb/oBHwwD/Hxxs1V7qlVYJ1HAOcNvNa4oO4Uc9itFnPx2b+3qk3VZ1nxp7GNATb40OZhPCGlkSHrWSSIbmHMdPD/anVTwr/YePBo4794ZPJ8mCp671ORLYwKzMfny8tqswzarJHWOxDnD0yePUCkXcNXx0fOHU3//PBrpW4hEpAbPZwE3CoWZZGcLvV7nzcSRkDUG9qWpio5REBrpDZF1OGfYLRUSfc+c60xqHEf3jjwKnpvpqpFYv/rqIq83dxRv2HzZ6dr3KWWB/UpR6wOfi1Yn9V+WxQUsb740JjAXbgMw1wCn59PqNY9S0ct8oa8NVKJjkcmXxgQWFUfeAGZ6dFDW8GHynktWlRVRYSLnfG6q3my1poSR8zCdPSg2gb3yDo6fVTIfrtliUtEBWZ33WrMCG5svqU+iJcqlPI6fVfD0ySPbt5JpljFfGj0ON2W+LFg45U8bec+9M5kk69m7NLGM+dLok2jKfKlKWrbhDCzn8sk5UvygltDHMuZLo3+Jz06enr9ptoyk6ouFnPZ+eaZRK5EbCYlWJXssar608VHXBHCsuwlOuVTIrMDuh3c5l6euZGjb8XLOOJcwx3xpXmCR+VJ3mFgqelbNgIugSoZUeJelkqFtZ9HJl8YFZtJ8eXRQQvNtR/t1FmHn3h6Jwrtss6j50rjAGGM1U+bL8WFqyajjNh7epbUinFifRc2XxgUmQtHgnBurSSxHhaxJiyzLFeHE+nDOJv3qX9UvT5Xn8T7GBfb5yWFN9atftQ/EspRLBeQ9F5fXH1aytscTDXSmRChcdyww7vBTAOkQGGDHfJn3XDw/2p2M95nmVbpv+FNfE8Q0YubL6qzXWHl6mJQ1GDZfKpRtQuH3R5QGJ1ZiEfOlnRUMssHAUtHtl/ZNxKrESqaqs15jp/dxZL7c9H71xGYTa6J7XK+3K9NeY0Vgps2XBKELJbIAwdTzMCsCM22+JAhdzDNf2huPEZkv07API4hVmWe+tCewyHw5HJLAiOwyyYLPMF9aExgDawC0ghGbgeQsPUkOYGy+BGgPRmSbeTWJ1gT22cnTc4BWMCLbzCuZsz0DtAlQup7YXGwLjMJEYqOxKjAJSal6ItPMWxysCowxRgIjMs3EmS/xw7TvWxWYCEUDIIER2UXIh1sDWhWYcoEq8yVBZA1VKCGZPJ/2fdtJjsnSSqsYkUVUbxnGxoUT97EvMDZu2kipeiKLqOfWCZ3zad+3LjAJ2QAoVU9kj9gUn+as9tnWBUbmSyKr+LcTgc0chm5dYC5cGmlEZBK1gkkh0yuwk5O9DiLzJSU6iKwQ60rWVHW107AuMAAfJ19SmEhkhE63DwBgYN8+9Lp0CIzMl0SG6PlDtRh0ueAvH3ptugRGISKRcoSQk9VLQn4TbXFmkgqByXCcqieBEWmn2xuo1etnV7gPhodASgSmNom0ByPSTH8QoPN+vHqB4b/mrV5ASgQWQeZLIrUIIdFq++rL7z/95GBmaj5OmgRGmUQitVy0eurZbDrC+XrRn0uNwMh8SaSVVttXz2VXCPHVIqGhIjUCI/MlkUZabR89fwgAkEJ+OWvQ3ixSM/zKCZ1ayEMSGJEKhJC4vP7wMSfA8IeHKjZmkZoVTFUjCyFpH0ZYZTgKcdHqKXF1wfC7Tz85eLnKe6VGYAAm5stJnwOCMEy3N8BFqxffc71YNGM4jXQJjMyXhCX6gwBvL9/j+uZ2XMQr8YMjnONl91z3Sc0eDAAYWE1C/p5CRMIU6vA49qHeZWB/+Y/q/twqjUVIlcCEEDXG0zFalthchJDw+yN0e4P7z9r/OML50zJp+HmkSmAu3FqIcSZRCDm37zdBLEIQCgxHIYbDEH5/NO0D/H8c4fx1lu1/HVL3BL/+6arGpPzicP8RDSgnlqY/CDAchR9FFX1Y30cy9iOXeMkFf5nkinWfVK1gAMCkPAfwhX87IoERM5mIaBiiPwwQBOLh4x2JH8BQA0PNCZ3vdIoqTuoEJoR4yTn/Y6xjD7HFCCExHIXoD4I7q9IsJGM/MikbErLGGKs5oVPTEfotSupCRAB402w1ABwf7BVRKnq2b4cwxH0RzQrvIm4gUZNMnjPGGjKUjVUqLXSTuhUMGPc5kJDfdHsDEtgGEg/vlJAWCO8aDKwmhKi5cGumQrx1SeUKVq+3KyEPmwDKRwelj4OmiUxxP7wLQjGviKAJoKbCOxGKxroHvbZJpcAA4HXz3V8Z2F+8nINnh49t3w4xh4mIAoH+MFgovFNJh7SGd0mQWoHFV7Enuzsol/K2b4nA3TOleDp8JlF4JyEbEDjPUniXBKkVGAD8o3n1Jwn5DecMzw4fw3XSVTq5yajwLr5H2rbwLglSLTDg48FzIe/i6KBk+3Y2komIlgzvGFhDCFHb1PAuCVIvsHq9XQ15+COAcrmUx5PdHdu3lFkme6R71Q6ziM6UarHwrmHzTCmLpF5gAPDmp9bXkPg7ANDZ2Hzi4Z0S0dzwTqIRnSlReJcgmRAYALxptr4F8EeARBbnfni3aMkQhXdmyIzAAOBNs/USwO+B7RPZiuFdQ0LWKLyzR6YEBtwV2abuyRatCI+Ih3cNEYoahXfpIXMCA+6Gi4W8i4O9YiZT+KtWhKvwbtvOlLJIJgUGTBIf/w2gzDlD5XEhtYfR8fAuixXhxOpkVmAA8Kp+ecoc5yWT8gsA8HIOnuzuWK1d3MSKcGJ1Mi0wRVTx8TcAZWAcNpaKntYkyDZVhBOrsxECA8a1iwEP/sTA/gzgMQBwzlAs5FDcyaHguSv1+Fi3IpzCu+1mYwSmiAntawDH8e95OQdezoHr8Jlh5BLZu62pCCdWZ+MEFudV/fKUc/61ZOxM7dNWYssrwonV2WiBxanX25UAwSk4zhhYBRKnU18YCYlKhgiCIAiCIAiCIAgiW/w/zQ1m2VyA5iUAAAAASUVORK5CYII=","e":1},{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"magnify","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":42,"s":[75]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":90,"s":[8]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":121,"s":[32]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":134,"s":[32]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":164,"s":[53]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":183,"s":[53]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":219,"s":[53]},{"t":272,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[333.752,339.42,0],"to":[-26,-25,0],"ti":[-4.333,25,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":42,"s":[177.752,189.42,0],"to":[4.333,-25,0],"ti":[-25.667,-23.333,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":90,"s":[359.752,189.42,0],"to":[25.667,23.333,0],"ti":[4.667,-23.333,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":121,"s":[331.752,329.42,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":134,"s":[331.752,329.42,0],"to":[-28.333,4.667,0],"ti":[28.333,-4.667,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":164,"s":[161.752,357.42,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":183,"s":[161.752,357.42,0],"to":[0,-24.333,0],"ti":[-28.667,3,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":219,"s":[161.752,211.42,0],"to":[28.667,-3,0],"ti":[-28.667,-21.333,0]},{"t":272,"s":[333.752,339.42,0]}],"ix":2},"a":{"a":0,"k":[87.194,86.29,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"glass 2","parent":1,"refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":20,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[68.687,68.686,0],"ix":2},"a":{"a":0,"k":[42.065,42.066,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":2,"nm":"glass","parent":1,"td":1,"refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[68.687,68.686,0],"ix":2},"a":{"a":0,"k":[42.065,42.066,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"paper","tt":1,"refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[250,250,0],"ix":1},"s":{"a":0,"k":[125,125,100],"ix":6}},"ao":0,"w":500,"h":500,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":0,"nm":"paper","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[250,250,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":500,"h":500,"ip":0,"op":750,"st":0,"bm":0}]},{"id":"comp_1","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"paper_1","refId":"image_2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[263.625,231.897,0],"ix":2},"a":{"a":0,"k":[92.771,120.853,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"paper_2","refId":"image_3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[214.478,258.49,0],"ix":2},"a":{"a":0,"k":[107.933,130,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0}]}]'),layers:[{ddd:0,ind:1,ty:0,nm:"not_found 2",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[250,250,0],ix:2},a:{a:0,k:[250,250,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,w:500,h:500,ip:0,op:273,st:0,bm:0}],markers:[]},yv={key:0,class:"inline-block"},wi=dt(e.defineComponent({name:"DCodeBadge",inheritAttrs:!1,__name:"DCodeBadge",props:{text:{default:""},variant:{default:"default"},size:{default:"sm"},icon:{},dot:{type:Boolean,default:!1},pill:{type:Boolean,default:!1},color:{},skeleton:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},class:{}},setup(t){const o=t,n=e.computed(()=>Do(o.icon,Lt)),r=e.computed(()=>o.visible??!0),a=e.computed(()=>{const u={xs:"px-1.5 py-0.5 text-[10px] gap-1",sm:"px-2.5 py-0.5 text-xs gap-1.5",md:"px-3 py-1 text-sm gap-2",lg:"px-4 py-1.5 text-base gap-2.5"};return u[o.size]||u.sm}),s=e.computed(()=>{const u={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"};return u[o.size]||u.sm}),i=e.computed(()=>{const u={xs:"w-2.5 h-2.5",sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"};return u[o.size]||u.sm}),l=e.computed(()=>{const u={default:"bg-primary text-primary-foreground border-transparent shadow hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground border-transparent hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground border-transparent shadow hover:bg-destructive/80",success:"bg-success-500 text-white border-transparent shadow-sm hover:bg-success-600",warning:"bg-warning-500 text-white border-transparent shadow-sm hover:bg-warning-600",info:"bg-blue-500 text-white border-transparent shadow-sm hover:bg-blue-600",outline:"bg-transparent border-border text-foreground",tonal:"bg-primary/10 text-primary border-transparent hover:bg-primary/20",ghost:"bg-transparent text-muted-foreground border-transparent hover:bg-accent hover:text-accent-foreground",purple:"bg-purple-600 text-white border-transparent shadow-sm hover:bg-purple-700",pink:"bg-pink-600 text-white border-transparent shadow-sm hover:bg-pink-700",dark:"bg-gray-900 text-white border-transparent shadow-sm hover:bg-gray-950",light:"bg-gray-100 text-gray-900 border-gray-200 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700"};return u[o.variant]||u.default}),c=e.computed(()=>({default:"bg-primary-foreground",secondary:"bg-secondary-foreground",destructive:"bg-destructive-foreground",success:"bg-white",warning:"bg-white",info:"bg-white",outline:"bg-primary",tonal:"bg-primary",ghost:"bg-muted-foreground"})[o.variant]||"bg-current"),d=e.computed(()=>{const u={xs:"h-4 w-10",sm:"h-5 w-14",md:"h-6 w-18",lg:"h-7 w-24"};return Me(u[o.size]||u.sm,"rounded animate-pulse bg-muted")}),f=e.computed(()=>Me("inline-flex items-center font-semibold border transition-all duration-300 select-none focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",o.pill?"rounded-full":"rounded-md",a.value,l.value,o.class));return(u,h)=>r.value?(e.openBlock(),e.createElementBlock("div",yv,[t.skeleton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d.value)},null,2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(f.value)},[t.dot?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["rounded-full animate-pulse",s.value,c.value])},null,2)):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),{key:1,class:e.normalizeClass(["flex-shrink-0",i.value]),"stroke-width":"2.5"},null,8,["class"])):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default",{},()=>[e.createElementVNode("span",null,e.toDisplayString(t.text),1)],!0)],2))])):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-1e8e809d"]]);var wa={exports:{}},xv=wa.exports,ou;function kv(){return ou||(ou=1,(function(t,o){(function(n,r){t.exports=r()})(xv,function(){Array.isArray||(Array.isArray=function(s){return Object.prototype.toString.call(s)==="[object Array]"});function n(s){for(var i=[],l=0,c=s.length;l<c;l++)i.indexOf(s[l])===-1&&i.push(s[l]);return i}var r={},a={"==":function(s,i){return s==i},"===":function(s,i){return s===i},"!=":function(s,i){return s!=i},"!==":function(s,i){return s!==i},">":function(s,i){return s>i},">=":function(s,i){return s>=i},"<":function(s,i,l){return l===void 0?s<i:s<i&&i<l},"<=":function(s,i,l){return l===void 0?s<=i:s<=i&&i<=l},"!!":function(s){return r.truthy(s)},"!":function(s){return!r.truthy(s)},"%":function(s,i){return s%i},log:function(s){return console.log(s),s},in:function(s,i){return!i||typeof i.indexOf>"u"?!1:i.indexOf(s)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(s,i,l){if(l<0){var c=String(s).substr(i);return c.substr(0,c.length+l)}return String(s).substr(i,l)},"+":function(){return Array.prototype.reduce.call(arguments,function(s,i){return parseFloat(s,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(s,i){return parseFloat(s,10)*parseFloat(i,10)})},"-":function(s,i){return i===void 0?-s:s-i},"/":function(s,i){return s/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(s,i){return s.concat(i)},[])},var:function(s,i){var l=i===void 0?null:i,c=this;if(typeof s>"u"||s===""||s===null)return c;for(var d=String(s).split("."),f=0;f<d.length;f++)if(c==null||(c=c[d[f]],c===void 0))return l;return c},missing:function(){for(var s=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,l=0;l<i.length;l++){var c=i[l],d=r.apply({var:c},this);(d===null||d==="")&&s.push(c)}return s},missing_some:function(s,i){var l=r.apply({missing:i},this);return i.length-l.length>=s?[]:l}};return r.is_logic=function(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&Object.keys(s).length===1},r.truthy=function(s){return Array.isArray(s)&&s.length===0?!1:!!s},r.get_operator=function(s){return Object.keys(s)[0]},r.get_values=function(s){return s[r.get_operator(s)]},r.apply=function(s,i){if(Array.isArray(s))return s.map(function(b){return r.apply(b,i)});if(!r.is_logic(s))return s;var l=r.get_operator(s),c=s[l],d,f,u,h,m;if(Array.isArray(c)||(c=[c]),l==="if"||l=="?:"){for(d=0;d<c.length-1;d+=2)if(r.truthy(r.apply(c[d],i)))return r.apply(c[d+1],i);return c.length===d+1?r.apply(c[d],i):null}else if(l==="and"){for(d=0;d<c.length;d+=1)if(f=r.apply(c[d],i),!r.truthy(f))return f;return f}else if(l==="or"){for(d=0;d<c.length;d+=1)if(f=r.apply(c[d],i),r.truthy(f))return f;return f}else{if(l==="filter")return h=r.apply(c[0],i),u=c[1],Array.isArray(h)?h.filter(function(b){return r.truthy(r.apply(u,b))}):[];if(l==="map")return h=r.apply(c[0],i),u=c[1],Array.isArray(h)?h.map(function(b){return r.apply(u,b)}):[];if(l==="reduce")return h=r.apply(c[0],i),u=c[1],m=typeof c[2]<"u"?r.apply(c[2],i):null,Array.isArray(h)?h.reduce(function(b,g){return r.apply(u,{current:g,accumulator:b})},m):m;if(l==="all"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!1;for(d=0;d<h.length;d+=1)if(!r.truthy(r.apply(u,h[d])))return!1;return!0}else if(l==="none"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!0;for(d=0;d<h.length;d+=1)if(r.truthy(r.apply(u,h[d])))return!1;return!0}else if(l==="some"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!1;for(d=0;d<h.length;d+=1)if(r.truthy(r.apply(u,h[d])))return!0;return!1}}if(c=c.map(function(b){return r.apply(b,i)}),a.hasOwnProperty(l)&&typeof a[l]=="function")return a[l].apply(i,c);if(l.indexOf(".")>0){var p=String(l).split("."),y=a;for(d=0;d<p.length;d++){if(!y.hasOwnProperty(p[d]))throw new Error("Unrecognized operation "+l+" (failed at "+p.slice(0,d+1).join(".")+")");y=y[p[d]]}return y.apply(i,c)}throw new Error("Unrecognized operation "+l)},r.uses_data=function(s){var i=[];if(r.is_logic(s)){var l=r.get_operator(s),c=s[l];Array.isArray(c)||(c=[c]),l==="var"?i.push(c[0]):c.forEach(function(d){i.push.apply(i,r.uses_data(d))})}return n(i)},r.add_operation=function(s,i){a[s]=i},r.rm_operation=function(s){delete a[s]},r.rule_like=function(s,i){if(i===s||i==="@")return!0;if(i==="number")return typeof s=="number";if(i==="string")return typeof s=="string";if(i==="array")return Array.isArray(s)&&!r.is_logic(s);if(r.is_logic(i)){if(r.is_logic(s)){var l=r.get_operator(i),c=r.get_operator(s);if(l==="@"||l===c)return r.rule_like(r.get_values(s,!1),r.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(s)){if(i.length!==s.length)return!1;for(var d=0;d<i.length;d+=1)if(!r.rule_like(s[d],i[d]))return!1;return!0}else return!1;return!1},r})})(wa)),wa.exports}var wv=kv();const xt=Dl(wv),Ca=t=>{var o,n,r;return((o=t.propsForm)==null?void 0:o.key)||((n=t.propsTable)==null?void 0:n.key)||((r=t.propsWizard)==null?void 0:r.key)||t.id},yn=(t,o)=>o?o.split(".").reduce((n,r)=>n==null?void 0:n[r],t):void 0,nu=(t,o,n)=>{if(!o)return;const r=o.split(".");let a=t;for(let s=0;s<r.length-1;s++){const i=r[s];(a[i]===void 0||a[i]===null||typeof a[i]!="object")&&(a[i]={}),a=a[i]}a[r[r.length-1]]=n},Wo=t=>{const o=e.toRaw(t);if(Array.isArray(o))return o.map(n=>Wo(n));if(o&&typeof o=="object"){const n={};return Object.keys(o).forEach(r=>n[r]=Wo(o[r])),n}return o},_a=t=>{if(!t||typeof t!="object")return[];if("var"in t)return[t.var];let o=[];return Object.values(t).forEach(n=>{Array.isArray(n)?n.forEach(r=>{o=o.concat(_a(r))}):typeof n=="object"&&(o=o.concat(_a(n)))}),o},Cv=t=>t?[...t].sort((o,n)=>(o.seq||0)-(n.seq||0)):[],ru=(t,o={})=>(!t||typeof t!="object"||Object.keys(t).forEach(n=>{const r=t[n];r&&typeof r=="object"&&!Array.isArray(r)&&!r._isLogicValue?ru(r,o):o[n]=r}),o),Ci=(t,o)=>{if(!t||typeof t!="string"||t.startsWith("http")||!o)return t;const n=o.replace(/\/$/,""),r=t.startsWith("/")?t:`/${t}`;return`${n}${r}`};function _i({formData:t,errors:o,fieldMap:n,rawItemsCache:r,activeSchema:a,locale:s}){const i=(S,N)=>{if(N==null||typeof N=="object"&&N._isLogicValue)return N;const V=n.value.get(S);if(!V)return N;const L=V.field,O=r[L.key];if(!O||!Array.isArray(O))return N;const R=(L.props||{}).itemValue||"id",j=O.find(T=>String(T[R])===String(N)||String(T.id)===String(N)||String(T.code)===String(N));return j!=null&&j.code?{id:N,code:j.code,_isLogicValue:!0}:N},l=S=>{const N=(V,L)=>{if(V==null||typeof V=="object"&&V._isLogicValue)return V;if(typeof V=="boolean")return String(V);if(typeof V=="number"||typeof V=="string")return L?i(L,V):V;if(typeof V=="object"&&!Array.isArray(V)){const O=(V==null?void 0:V.id)??(V==null?void 0:V.code)??(V==null?void 0:V.value)??(V==null?void 0:V.key)??V;return L&&(typeof O=="string"||typeof O=="number")?i(L,O):O}return V};return new Proxy(S,{get(V,L){if(typeof L!="string")return V[L];const O=n.value.get(L);if(O){const P=yn(V,O.path);if(P!=null)return N(P,L)}return N(V[L],L)}})},c=e.computed(()=>{const S={};for(const N of Object.keys(t))S[N]=t[N];return S}),d=e.computed(()=>l(c.value)),f=()=>{const S=N=>N&&typeof N=="object"&&N._isLogicValue;xt.add_operation("length",N=>N==null?0:S(N)?Object.keys(N).length:typeof N=="string"?N.length:typeof N=="number"?String(N).length:Array.isArray(N)?N.length:typeof N=="object"?Object.keys(N).length:0),xt.add_operation("==",(N,V)=>N==null?V==null:V==null?N==null:S(N)&&S(V)?String(N.id)===String(V.id)||String(N.code)===String(V.code):S(N)?String(N.code)===String(V)||String(N.id)===String(V):S(V)?String(V.code)===String(N)||String(V.id)===String(N):typeof N=="boolean"&&typeof V=="string"?String(N)===V:typeof V=="boolean"&&typeof N=="string"?String(V)===N:String(N)===String(V)),xt.add_operation("!=",(N,V)=>{const L=O=>O&&typeof O=="object"&&O._isLogicValue;return N==null&&V==null?!1:N==null||V==null?!0:L(N)&&L(V)?String(N.id)!==String(V.id)&&String(N.code)!==String(V.code):L(N)?String(N.code)!==String(V)&&String(N.id)!==String(V):L(V)?String(V.code)!==String(N)&&String(V.id)!==String(N):String(N)!==String(V)})},u=(S,N,V="LOGIC")=>{if(S==null||typeof S=="object"&&Object.keys(S).length===0)return!0;if(typeof S=="boolean")return S;if(typeof S=="object")try{return f(),xt.apply(S,N)}catch(L){return console.error(`[${V}] JsonLogic error:`,L),!1}return!1},h=(S,N,V)=>S==null?null:Array.isArray(S)?S.find(L=>!L.condition||u(L.condition,N))||null:S,m=(S,N)=>{var P;if(S.isHidden)return!0;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.visibleRule;if(L==null)return!0;const O=h(L,V,`VISIBLE-${S.model}`);return O===null?!0:typeof O=="object"?!!u(O,V,`VISIBLE-${S.model}`):!!O},p=(S,N)=>{var P,R,j;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.requiredRule;if(L==null)return((R=S.props)==null?void 0:R.required)||!1;const O=h(L,V,`REQUIRED-${S.model}`);return O===null?((j=S.props)==null?void 0:j.required)||!1:typeof O=="object"?"required"in O?!!O.required:!!u(O,V):!!O},y=(S,N)=>{var P,R,j;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.disabledRule;if(L==null)return((R=S.props)==null?void 0:R.disabled)||!1;const O=h(L,V,`DISABLED-${S.model}`);return O===null?((j=S.props)==null?void 0:j.disabled)||!1:typeof O=="object"?"disabled"in O?!!O.disabled:!!u(O,V):!!O},b=(S,N)=>{var P,R,j;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.disabledRule;return L===!1?!0:L==null?((R=S.props)==null?void 0:R.readonly)||!1:h(L,V,`READONLY-${S.model}`)===!1?!0:((j=S.props)==null?void 0:j.readonly)||!1},g=S=>{var P;const N=S.propsForm||S.propsTable||S.propsWizard||S.props||{};let V=s.value==="id"?N.titleID||S.titleID||S.labelID:N.titleEN||S.titleEN||S.labelEN,L=s.value==="id"?N.descriptionID||S.descriptionID:N.descriptionEN||S.descriptionEN;const O=h((P=S.logic||N.logic)==null?void 0:P.labelingRule,d.value);return O&&(V=s.value==="id"?O.labelID||O.titleID||O.title:O.labelEN||O.titleEN||O.title,L=s.value==="id"?O.descriptionID:O.descriptionEN),{title:V,description:L}},_=(S,N)=>{var R,j;if(!S)return!0;const V=S.propsForm||S.propsTable||S.propsDataTableWizard||S.propsWizard||S.props||{},L=(R=S.logic||V.logic)==null?void 0:R.visibleRule,O=N?l(N):d.value;if(L!=null){const T=h(L,O);return T===null?!0:typeof T=="object"?!!u(T,O,"VISIBLE-SEC"):!!T}if(S.type==="TABLE"&&((j=V.headers)!=null&&j.length))return!0;const P=V.fields||S.fields||[];return P.length===0||P.some(T=>m(T,N))},E=(S,N)=>{var O;const V=N?l(N):d.value;return h((O=S.logic)==null?void 0:O.labelingRule,V,`LABEL-${S.model}`)||null},B=(S,N)=>{var O;const V=N?l(N):d.value;return h((O=S.logic)==null?void 0:O.lengthRule,V,`LENGTH-${S.model}`)||null},A=(S,N)=>{var T;const V=S.props||{},L=r[S.key]||V.items||V.options||[];if(!((T=S.logic)!=null&&T.optionsFilterRule))return L;const O=N?l(N):d.value,P=h(S.logic.optionsFilterRule,O,`FILTER-${S.model}`);if(!(P!=null&&P.values))return L;const R=new Set((P.values||[]).map(String)),j=V.itemValue||"id";return L.filter(I=>I==null?!1:typeof I!="object"?R.has(String(I)):[j,"code","id","value","key"].some(X=>{const H=I[X];return H!=null&&R.has(String(H))}))},C=S=>{var V;return(((V=S.propsWizard)==null?void 0:V.propsSteps)||[]).filter(L=>_(L)).map((L,O)=>{var j;let P=[];if(Array.isArray(L.sectionsWizard))P=L.sectionsWizard;else if(L.sectionsWizard&&typeof L.sectionsWizard=="object"){const T=L.sectionsWizard;let I=T.type;I||(T.propsDataTableWizard||T.isDataTable||T.propsTable?I="TABLE":T.fields?I="FORM":I="UNKNOWN"),P=[{type:I,...T}]}const R=g(L);return{key:L.key||`step-${O}`,title:R.title,description:R.description,icon:L.icon||void 0,sections:P,actions:((j=L.propsComponent)==null?void 0:j.actionComponent)||L.actionComponent||[]}})},x=()=>{var S;if((S=a.value)!=null&&S.sections)for(let N=0;N<3;N++){let V=!1;if(a.value.sections.forEach(L=>{var O;(((O=L.propsForm)==null?void 0:O.fields)||L.fields||[]).forEach(P=>{var j;const R=(j=P.logic)==null?void 0:j.calculateRule;if(R&&typeof R=="object"){const T=Object.keys(R)[0],I=u(R[T],d.value,`CALC-${T}`);I!==void 0&&t[T]!==I&&(t[T]=I,V=!0)}})}),!V)break}},w=S=>{if(!m(S)||!p(S))return!1;const N=t[S.model];return Array.isArray(N)?N.length===0:N==null||N===""},D=S=>S.sections.flatMap(V=>V.fields||[]).some(w),k=S=>{var V;return(((V=S.propsForm)==null?void 0:V.fields)||S.fields||[]).some(w)?!0:S.type==="WIZARD"?C(S).some(D):!1},v=e.computed(()=>{var S;return(S=a.value)!=null&&S.sections?Object.keys(o).length>0?!0:a.value.sections.some(k):!1});return{normalizedData:d,getNormalizedData:l,evaluateLogic:u,resolveActiveRule:h,resolveValueIdentifier:i,getFilteredItems:A,isFieldVisible:m,isFieldRequired:p,isFieldDisabled:y,isFieldReadonly:b,resolveSectionLabels:g,isSectionVisible:_,resolveFieldLabels:E,resolveFieldLength:B,getWizardTabs:C,applyCalculations:x,isSubmitDisabled:v,resolveSectionGridClass:S=>{switch(S){case"FULL":return"grid-cols-1";case"HALF":return"grid-cols-1 md:grid-cols-2";case"THIRD":return"grid-cols-1 md:grid-cols-3";case"QUARTED":return"grid-cols-1 md:grid-cols-4";case"TWO-THIRD":return"grid-cols-2 md:grid-cols-3";case"THREE-QUARTER":return"grid-cols-3 md:grid-cols-4";default:return"grid-cols-1"}},resolveFieldColumnClass:(S,N="")=>{var L;const V=(L=S.props)==null?void 0:L.colSpan;return V==="FULL"?"col-span-1 md:col-span-full":V==="HALF"?"col-span-1 md:col-span-1":"col-span-1"}}}const _v={class:"dcode-card animate-slide-up"},Ev={class:"px-4 py-2 bg-primary-700 dark:bg-primary-900 border-b border-primary-500/30 dark:border-primary-900/50 rounded-t-xl relative z-30"},Bv={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between items-start gap-4"},Sv={key:0,class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 flex-1 xl:max-w-[15vw] md:max-w-[20vw] max-w-[30vw]"},Av={class:"relative w-full sm:w-64"},vv={key:0,class:"relative"},Dv={class:"flex flex-col h-full"},Nv={key:0,class:"flex-1 overflow-y-auto py-4"},Vv={class:"grid grid-cols-1 gap-4 px-1"},Mv={key:0,class:"sticky bottom-0 left-0 right-0 bg-transparent border-t border-neutral-200 dark:border-neutral-700 pt-4 flex gap-2"},Tv={class:"flex justify-end gap-2 w-full"},Pv={key:0,class:"font-medium text-sm text-neutral-600 dark:text-neutral-400"},Ov={class:"overflow-auto custom-scrollbar relative max-h-[calc(100vh-17rem)]"},Lv={class:"dcode-table w-full"},Rv={class:"bg-primary-700 dark:bg-primary-900 sticky top-0 z-20 shadow-sm"},Iv=["onClick"],Fv={key:0,class:"flex items-center justify-center w-full"},zv={key:0,class:"px-3 py-2 text-xs font-medium text-white dark:text-neutral-100 uppercase tracking-wider"},$v={class:"bg-white dark:bg-zinc-900 divide-y divide-neutral-200 dark:divide-neutral-700"},jv={key:0,class:"px-3 py-0.5"},Uv={key:1},Wv=["colspan"],Hv={class:"flex flex-col items-center gap-2"},qv={class:"text-base font-medium text-neutral-700 dark:text-neutral-300"},Gv={class:"text-sm text-neutral-500 dark:text-neutral-400 mt-1"},Kv={class:"hover:bg-zinc-50 dark:hover:bg-zinc-800/50 transition-colors duration-150"},Xv={key:0,class:"flex items-center justify-center"},Yv=["href","target"],Jv={key:0,class:"text-[10px]"},Qv={key:0,class:"px-3 py-0.5 !text-center"},Zv={key:0,class:"flex items-center justify-center gap-1.5"},eD={key:0,class:"bg-zinc-50/50 dark:bg-zinc-800/30"},tD=["colspan"],oD={key:0,class:"px-4 py-3 bg-zinc-50/50 dark:bg-zinc-800/30 border-t border-neutral-200 dark:border-neutral-700 flex flex-col sm:flex-row items-center justify-between gap-4 w-full"},nD={class:"flex items-center gap-4"},rD={class:"text-xs text-neutral-500 dark:text-neutral-400 font-medium"},aD={class:"text-neutral-900 dark:text-neutral-100 font-medium"},sD={class:"text-neutral-900 dark:text-neutral-100 font-medium"},iD={class:"text-neutral-900 dark:text-neutral-100 font-medium"},lD={class:"flex-shrink-0"},cD={class:"space-y-4"},dD={class:"text-gray-600 dark:text-gray-400"},fD={class:"grid grid-cols-1 gap-4 py-4 px-1 relative"},uD={key:0,class:"absolute inset-0 z-10 bg-white/50 dark:bg-neutral-900/50 flex items-center justify-center backdrop-blur-[1px]"},hD={class:"flex flex-col items-center gap-2"},mD={class:"text-xs font-medium text-neutral-500"},pD={key:1,class:"mb-2 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-100 dark:border-amber-900/30 rounded-lg flex items-center gap-3"},gD={class:"p-1.5 bg-amber-100 dark:bg-amber-900/40 rounded-md text-amber-600 dark:text-amber-400"},bD={class:"flex flex-col gap-0.5"},yD={class:"text-[10px] font-bold uppercase tracking-wider text-amber-500/70 dark:text-amber-400/50"},xD={class:"text-xs text-amber-700 dark:text-amber-300 leading-relaxed font-medium transition-all"},kD={class:"flex items-end gap-2"},xn=e.defineComponent({name:"DataTable",__name:"DataTable",props:{columns:{default:()=>[]},data:{default:()=>[]},perPage:{default:10},loading:{type:Boolean,default:!1},hasActions:{type:Boolean,default:!1},nested:{type:Boolean,default:!1},apiModule:{},apiAction:{default:"list"},apiMethod:{},apiUrl:{},permissionBase:{},apiParams:{default:()=>({})},configKey:{},tableConfig:{},dynamicColumns:{type:Boolean,default:!1},searchApiEndpoint:{},enableQuickSearch:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},ignorePermissions:{type:Boolean,default:!1},userPermissions:{default:null},permissionChecker:{type:Function,default:void 0},permissions:{default:void 0},checkPermission:{type:Function,default:void 0},menuPermissions:{default:()=>[]},dummyMode:{type:Boolean,default:!1},baseUrl:{default:void 0}},emits:["update:search","update:sort","update:page","create","export","action","update:selection","navigate"],setup(t,{expose:o,emit:n}){var Cu,_u,Eu,Bu,Su,Au;xt.add_operation("length",M=>M==null?0:typeof M=="string"||Array.isArray(M)?M.length:typeof M=="number"?String(M).length:typeof M=="object"?Object.keys(M).length:0),xt.add_operation("==",(M,F)=>M!==null&&typeof M=="object"&&"_isLogicValue"in M?M.id==F||M.code==F:F!==null&&typeof F=="object"&&"_isLogicValue"in F?F.id==M||F.code==M:M==F),xt.add_operation("!=",(M,F)=>M!==null&&typeof M=="object"&&"_isLogicValue"in M?!(M.id==F||M.code==F):F!==null&&typeof F=="object"&&"_isLogicValue"in F?!(F.id==M||F.code==M):M!=F);const r=t,a=n,s=e.getCurrentInstance(),{apiUrl:i}=Ye(),{locale:l}=_t.useI18n();let c={query:{},params:{},path:""};try{const M=_o.useRoute();M?c=M:(Eu=(_u=(Cu=s==null?void 0:s.appContext)==null?void 0:Cu.config)==null?void 0:_u.globalProperties)!=null&&Eu.$route&&(c=s.appContext.config.globalProperties.$route)}catch{console.warn("useRoute not available, using fallback")}let d={back:()=>console.warn("Router back() not available"),push:M=>{console.warn("Router push() logic called from fallback:",M),typeof M=="string"&&M.startsWith("/")&&(window.location.href=M)}};try{const M=_o.useRouter();M?d=M:(Au=(Su=(Bu=s==null?void 0:s.appContext)==null?void 0:Bu.config)==null?void 0:Su.globalProperties)!=null&&Au.$router&&(d=s.appContext.config.globalProperties.$router)}catch{console.warn("useRouter not available, using fallback")}const f=e.ref(""),u=e.ref(1),h=e.ref(r.perPage),m=e.ref({key:"",direction:"asc"}),p=e.ref([]),y=e.ref(!1),b=e.ref(0),g=e.ref({}),_=e.ref([]),E=e.ref(null),B=e.ref(!0),A=e.ref([]),C=e.ref([]),x=e.ref([]),w=e.ref(!1),D=e.ref(!1),k=e.reactive({}),v=e.reactive({}),S=e.reactive({}),N=e.ref(null),V=e.ref(null),L=e.ref(null),O=e.computed(()=>V.value?V.value.fieldActionCustom||V.value.fieldActionGlobal||V.value.field||[]:[]),P=e.computed(()=>{const M=new Map;return O.value.forEach(F=>{F.model&&M.set(F.model,{field:F,path:F.model})}),M}),R=e.computed(()=>({sections:[{fields:O.value}]})),j=e.computed(()=>l.value),{isFieldVisible:T,isFieldRequired:I,isFieldDisabled:X,isFieldReadonly:H,resolveFieldLabels:W,resolveFieldLength:Z,getFilteredItems:oe,applyCalculations:ge,getNormalizedData:Ne}=_i({formData:k,errors:v,fieldMap:P,rawItemsCache:S,activeSchema:R,locale:j}),we=async(M,F=!1)=>{const K=M.props||{},z=K.endpointReference||K.endpoint;if(z!=null&&z.apiUrl&&!(!F&&S[M.key]))try{const{apiUrl:U}=Ye();let J=z.apiUrl;if(r.baseUrl&&typeof J=="string"&&!J.startsWith("http")){const Ve=r.baseUrl.replace(/\/$/,""),Be=J.startsWith("/")?J:`/${J}`;J=`${Ve}${Be}`}const ce={page:1,perPage:100};if(Array.isArray(z.keyParam)){let Ve=!1;if(z.keyParam.forEach(Be=>{const Se=Ne(k)[Be];Se==null||Se===""?Ve=!0:ce[Be]=Se&&typeof Se=="object"&&Se._isLogicValue?Se.id:Se}),Ve){S[M.key]=[];return}}const be=await U(J,z.apiMethod||"GET",ce),ke=(be==null?void 0:be.data)||be;let xe=[];Array.isArray(ke)?xe=ke:ke&&(xe=[ke]),S[M.key]=xe}catch(U){console.error(`[prefetchDialogFieldItems] Error fetching items for ${M.key}:`,U),S[M.key]=[]}};e.watch(k,M=>{D.value&&(ge(),O.value.forEach(F=>{const K=F.props||{},z=K.endpoint||K.endpointReference;Array.isArray(z==null?void 0:z.keyParam)&&we(F,!0)}))},{deep:!0});const Q=e.computed(()=>{const M=new Map;return Ce.value.forEach(F=>{F.model&&M.set(F.model,{field:F,path:F.model})}),M}),$=e.computed(()=>({sections:[{fields:Ce.value}]})),{isFieldVisible:Y,isFieldRequired:ae,isFieldDisabled:ye,isFieldReadonly:Pe,resolveFieldLabels:Ee,resolveFieldLength:Ue,getFilteredItems:Ie}=_i({formData:g,errors:{},fieldMap:Q,rawItemsCache:{},activeSchema:$,locale:j}),se=e.ref([]),Oe=e.computed(()=>{if(lo.value.length===0)return!1;const M=lo.value.map(F=>{const K=nt.value.find(U=>U.type==="CHECKBOX"),z=(K==null?void 0:K.keyCheckbox)||"id";return F[z]}).filter(F=>F!=null);return M.length===0?!1:M.every(F=>se.value.includes(F))}),Le=e.computed(()=>{if(lo.value.length===0)return!1;const M=nt.value.find(U=>U.type==="CHECKBOX"),F=(M==null?void 0:M.keyCheckbox)||"id",K=lo.value.map(U=>U[F]).filter(U=>U!=null),z=K.filter(U=>se.value.includes(U)).length;return z>0&&z<K.length}),ve=M=>{const F=nt.value.find(U=>U.type==="CHECKBOX"),K=(F==null?void 0:F.keyCheckbox)||"id",z=M[K];return z!==void 0&&se.value.includes(z)},lt=M=>{const F=nt.value.find(U=>U.type==="CHECKBOX"),K=(F==null?void 0:F.keyCheckbox)||"id",z=lo.value.map(U=>U[K]).filter(U=>U!=null);if(M){const U=new Set([...se.value,...z]);se.value=Array.from(U)}else se.value=se.value.filter(U=>!z.includes(U))},q=(M,F)=>{const K=nt.value.find(J=>J.type==="CHECKBOX"),z=(K==null?void 0:K.keyCheckbox)||"id",U=M[z];U!=null&&(F?se.value.includes(U)||se.value.push(U):se.value=se.value.filter(J=>J!==U))};e.watch(se,M=>{var K;a("update:selection",M);const F=Oe.value||M.length>1;(K=C.value)!=null&&K.length&&C.value.forEach(z=>{var U;(U=z.fieldActionGlobal)!=null&&U.length&&z.fieldActionGlobal.forEach(J=>{var xe,Ve;const ce=z.endpoint||((xe=z.propsActionGlobal)==null?void 0:xe.endpointPropAction)||z.propsActionGlobal,be=(Ve=ce==null?void 0:ce.keyParam)==null?void 0:Ve[0];(be&&J.model===be||!be&&/^(id|ids|idAuditTrail)/i.test(J.model))&&F&&J.model&&(k[J.model]=M)})})},{deep:!0});const ie=M=>Array.from({length:M}).map((F,K)=>{const z={id:K+1,no:K+1};return nt.value.forEach(U=>{U.key!=="no"&&U.key!=="action"&&U.type!=="ACTION"&&U.type!=="action"&&(U.type==="CHECKBOX"?z[U.keyCheckbox||"id"]=K+1:U.type==="BADGE"||U.type==="badge"||U.condition?z[U.key]=U.condition&&U.condition.length>0?U.condition[0].value:"Active":z[U.key]=`Data ${U.label} ${K+1}`)}),z}),he=M=>M&&typeof M=="string"&&M.trim()?M:void 0,te=e.computed(()=>{var M,F,K,z;return he((F=(M=E.value)==null?void 0:M.endpoint)==null?void 0:F.apiModule)||he((z=(K=E.value)==null?void 0:K.endpointGlobal)==null?void 0:z.apiModule)||r.apiModule}),le=e.computed(()=>{var M,F,K,z;return he((F=(M=E.value)==null?void 0:M.endpoint)==null?void 0:F.apiAction)||he((z=(K=E.value)==null?void 0:K.endpointGlobal)==null?void 0:z.apiAction)||r.apiAction}),G=e.computed(()=>{var M,F,K,z;return he((F=(M=E.value)==null?void 0:M.endpoint)==null?void 0:F.apiMethod)||he((z=(K=E.value)==null?void 0:K.endpointGlobal)==null?void 0:z.apiMethod)||r.apiMethod||"POST"}),ee=e.computed(()=>{var M,F,K,z;return he((F=(M=E.value)==null?void 0:M.endpoint)==null?void 0:F.apiUrl)||he((z=(K=E.value)==null?void 0:K.endpointGlobal)==null?void 0:z.apiUrl)||r.apiUrl}),re=e.computed(()=>r.permissionBase||""),Ce=e.computed(()=>!x.value||x.value.length===0?[]:[...x.value].sort((M,F)=>(M.seq||0)-(F.seq||0))),qe=M=>{var J,ce,be;const F=(M==null?void 0:M.column)||((J=M==null?void 0:M.props)==null?void 0:J.column)||((ce=M==null?void 0:M.propsFieldGlobal)==null?void 0:ce.column)||((be=M==null?void 0:M.propsFieldCustom)==null?void 0:be.column);if(!F)return"col-span-1";const K=F.toLowerCase(),U={full:"col-span-1 md:col-span-2",half:"col-span-1",third:"col-span-1","two-thirds":"col-span-1 md:col-span-2",two_thirds:"col-span-1 md:col-span-2"}[K]||"col-span-1";return console.log(`[DEBUG] getColumnClass for ${M==null?void 0:M.model}: type=${F}, returned=${U}`),U},kt=()=>{let M=null;if(r.tableConfig&&(M=r.tableConfig),M){E.value=M,A.value=[],C.value=[],M.headers&&(_.value=M.headers.map(z=>{var ce,be,ke,xe,Ve,Be,Se,wt,Ht,Aa,vu;if(z.key==="action"||((ce=z.custom)==null?void 0:ce.type)==="ACTION"||((be=z.custom)==null?void 0:be.type)==="action"){const Ct=((ke=z.custom)==null?void 0:ke.actionCustom)||((xe=z.custom)==null?void 0:xe.action);if(Ct){const _N=Ct.map(Dt=>{const Xe=Dt.propsActionCustom||Dt.props||{},va=Dt.propCustomMessage||{};return{permission:Dt.permission,label:l.value==="id"?Xe.labelID:Xe.labelEN,tooltip:l.value==="id"?Xe.tooltipID||Xe.labelID:Xe.tooltipEN||Xe.labelEN,icon:Xe.icon,variant:Xe.variant||"ghost",bgColor:Xe.bgColor,action:Xe.actionType||Xe.key,route:Xe.route,path:Xe.path,endpoint:Xe.endpointPropAction,requiredCondition:Dt.requiredCondition||!1,propCustomCondition:Dt.propCustomCondition||[],fieldMapping:Dt.fieldMapping||Xe.fieldMapping||null,openDialog:Dt.openDialog||!1,fieldActionCustom:(Dt.fieldActionCustom||[]).map(Da=>{const Li=Da.propsFieldCustom||Da.propsFieldGlobal||Da.props||{};return{...Da,props:{...Li,endpoint:Li.endpointComponent||Li.endpoint}}}),condition:Dt.visibleRule||Dt.propCustomCondition||Xe.visibleRule||Xe.propCustomCondition||null,requireConfirm:Dt.requireConfirm||Xe.requireConfirm||!1,confirmTitle:l.value==="id"?va.titleID||Xe.confirmTitleID||"Konfirmasi":va.titleEN||Xe.confirmTitleEN||"Confirm",confirmMessage:l.value==="id"?va.messageID||Xe.confirmMessageID||"Apakah Anda yakin?":va.messageEN||Xe.confirmMessageEN||"Are you sure?"}});A.value.push(..._N)}return null}let U;const J=((Ve=z.custom)==null?void 0:Ve.conditionBadge)||((Be=z.custom)==null?void 0:Be.condition);return(((Se=z.custom)==null?void 0:Se.type)==="BADGE"||((wt=z.custom)==null?void 0:wt.type)==="badge")&&J&&(U=J.map(Ct=>({value:Ct.value,label:l.value==="id"?Ct.labelID:Ct.labelEN,labelID:Ct.labelID,labelEN:Ct.labelEN,color:Ct.color||Ct.bgColor,variant:Ct.variant,logic:Ct.logic||Ct.conditionRule||null}))),{key:z.key,label:l.value==="id"?z.labelID:z.labelEN,width:z.width,align:z.align,sortable:!0,type:(Ht=z.custom)==null?void 0:Ht.type,condition:U,keyCheckbox:(Aa=z.custom)==null?void 0:Aa.keyCheckbox,propsCustom:(vu=z.custom)==null?void 0:vu.propsCustom}}).filter(z=>z!==null));const F=M.filters||M.filter;F&&Array.isArray(F)&&(x.value=F.map(z=>({...z,props:z.propsFilters||z.props||{}})),x.value.forEach(z=>{g.value[z.model]=""}));const K=M.actionTableGlobal||M.actionGlobal||M.action;console.log("[DEBUG] loadConfig rawActions:",K),K&&Array.isArray(K)?(C.value=K.map(z=>{const U=z.propsActionGlobal||z.props||{},J=z.propCustomMessage||{};return{key:U.key,permission:z.permission,label:l.value==="id"?U.labelID||"Action":U.labelEN||"Action",tooltip:l.value==="id"?U.tooltipID||U.labelID:U.tooltipEN||U.labelEN,icon:U.icon,variant:U.variant||"default",bgColor:U.bgColor,textColor:U.textColor,route:U.route,path:U.path,endpoint:U.endpointPropAction||z.endpoint,fieldMapping:z.fieldMapping||U.fieldMapping||null,visibleRule:z.visibleRule||U.visibleRule||z.propCustomCondition||U.propCustomCondition||null,openDialog:z.openDialog||!1,requireConfirm:z.requireConfirm||U.requireConfirm||!1,confirmTitle:l.value==="id"?J.titleID||U.confirmTitleID||"Konfirmasi":J.titleEN||U.confirmTitleEN||"Confirm",confirmMessage:l.value==="id"?J.messageID||U.confirmMessageID||"Apakah Anda yakin?":J.messageEN||U.confirmMessageEN||"Are you sure?",fieldActionGlobal:(z.fieldActionGlobal||z.fieldActionCustom||z.field||[]).map(ce=>{const be=ce.propsFieldGlobal||ce.props||{};return{...ce,props:{...be,endpoint:be.endpointComponent||be.endpoint}}})}}),console.log("[DEBUG] loadConfig headerActions set:",C.value)):console.log("[DEBUG] loadConfig no rawActions found"),M.pagination!==void 0&&(B.value=M.pagination)}};e.watch(()=>r.tableConfig,()=>{kt()},{deep:!0,immediate:!0});const nt=e.computed(()=>r.dynamicColumns||r.configKey||r.tableConfig?_.value:r.columns||[]),tr=e.computed(()=>r.hasActions||A.value.length>0),Ho=e.computed(()=>r.dummyMode?!1:te.value||ee.value?y.value:r.loading),ot=e.computed(()=>!!te.value||!!ee.value),du=e.computed(()=>[]),Ai=M=>{if(console.log("[DEBUG] hasAction called:",{actionCode:M,permissionChecker:!!r.permissionChecker,effectivePath:re.value}),r.menuPermissions&&r.menuPermissions.length>0){const F=c.path,K=r.menuPermissions.find(z=>F.startsWith(z.path));if(K&&K.actions){const z=K.actions.find(U=>U.code===M.toUpperCase());return z?z.checked:!1}return!1}if(r.permissionChecker){const F=r.permissionChecker(re.value,M);return console.log("[DEBUG] permissionChecker result:",F),F}return du.value.some(F=>F.code===M)},fu=(M,F)=>{if(M.condition)try{return xt.apply(M.condition,F)}catch(ce){return console.warn("Row action jsonLogic error:",ce),!1}if(!M.visibilityCondition)return!0;const{field:K,operator:z,value:U}=M.visibilityCondition,J=ct(F,K);switch(z){case"equals":return J===U;case"notEquals":return J!==U;case"in":return Array.isArray(U)&&U.includes(J);case"notIn":return Array.isArray(U)&&!U.includes(J);case"greaterThan":return J>U;case"lessThan":return J<U;case"contains":return String(J).includes(String(U));default:return!0}},vi=e.computed(()=>{if(console.log("[DEBUG] visibleHeaderActions:",{headerActions:C.value,ignorePermissions:r.ignorePermissions}),C.value.length===0)return C.value;const M=C.value.filter(F=>{if(F.visibleRule)try{const z=lo.value[0]||{};if(!xt.apply(F.visibleRule,z))return!1}catch(z){console.warn("Header action visibility logic error:",z)}if(r.ignorePermissions||r.dummyMode)return!0;if(!F.permission)return console.log("[DEBUG] Action no permission, showing:",F.label),!0;if(r.checkPermission){const z=r.checkPermission(F.permission);return console.log("[DEBUG] Parent checkPermission result:",z),z}if(r.permissions){const z=r.permissions.includes(F.permission);return console.log("[DEBUG] Parent permissions check result:",z),z}const K=Ai(F.permission);return console.log("[DEBUG] Internal permission check:",{label:F.label,permission:F.permission,hasPerm:K}),K});return console.log("[DEBUG] Filtered header actions:",M.length),M}),uu=e.computed(()=>A.value.length===0?A.value:A.value.filter(M=>r.ignorePermissions||r.dummyMode||!M.permission?!0:r.checkPermission?r.checkPermission(M.permission):r.permissions?r.permissions.includes(M.permission):Ai(M.permission))),Ba=M=>uu.value.filter(F=>fu(F,M)),Di=(M,F)=>{var U,J;if(M.requiredCondition&&((U=M.propCustomCondition)==null?void 0:U.length)>0){const ce=ct(F,"status"),be=M.propCustomCondition.find(ke=>ke.value===ce);if(be)return be.bgColor||M.bgColor||"primary"}if(!M.dynamicColor||!M.colorCondition)return M.bgColor||"primary";const K=ct(F,M.colorCondition.field),z=(J=M.colorCondition.conditions)==null?void 0:J.find(ce=>ce.value===K);return(z==null?void 0:z.bgColor)||M.bgColor||"primary"},hu=M=>{const F=(M||"left").toLowerCase();return F==="center"?"justify-center":F==="right"?"justify-end":"justify-start"},mu={ToggleLeft:ne.ToggleLeft,SquarePen:ne.SquarePen,Trash2:ne.Trash2,Eye:ne.Eye,CheckCircle:ne.CheckCircle,Plus:ne.Plus,Download:ne.Download,RefreshCw:ne.RefreshCw,Search:ne.Search,SlidersHorizontal:ne.SlidersHorizontal},Ni=M=>M&&(Do(M,Lt)||mu[M])||null,lo=e.computed(()=>r.dummyMode?nt.value.length>0?ie(5):[]:ot.value?p.value.map((M,F)=>({...M,no:(u.value-1)*h.value+F+1})):sN.value),or=e.computed(()=>r.dummyMode?5:ot.value?b.value:Vi.value.length),nN=e.computed(()=>or.value===0?0:(u.value-1)*h.value+1),rN=e.computed(()=>{const M=u.value*h.value;return M>or.value?or.value:M}),ct=(M,F)=>{if(!(!M||!F))return F in M?M[F]:F.split(".").reduce((K,z)=>K&&K[z],M)},Vi=e.computed(()=>{if(ot.value)return[];if(!f.value)return r.data;const M=f.value.toLowerCase();return r.data.filter(F=>nt.value.some(K=>{const z=ct(F,K.key);return z==null?!1:String(z).toLowerCase().includes(M)}))}),aN=e.computed(()=>ot.value?[]:m.value.key?[...Vi.value].sort((F,K)=>{const z=ct(F,m.value.key),U=ct(K,m.value.key);if(z===U)return 0;let J=0;return typeof z=="number"&&typeof U=="number"?J=z-U:J=String(z).localeCompare(String(U)),m.value.direction==="asc"?J:-J}):Vi.value),sN=e.computed(()=>{if(ot.value)return[];const M=(u.value-1)*h.value,F=M+h.value;return aN.value.slice(M,F).map((K,z)=>({...K,no:M+z+1}))}),iN=(M,F)=>{var U,J;const K=ct(M,F.key);if(K==null||K==="")return"-";if((F.type==="TEXT"||F.type==="text")&&((J=(U=F.propsCustom)==null?void 0:U[0])!=null&&J.value)){const ce=F.propsCustom[0].value;if(K&&typeof K=="object")return ct(K,ce)||"-"}if(["DATE","date","DATETIME","datetime"].includes(F.type||"")){const ce=(F.type||"").toUpperCase()==="DATETIME";return sp(K,ce?"datetime":"long")}return F.format?F.format(K):K},pu=e.computed(()=>ot.value?Object.values(g.value).some(M=>!!M):!!f.value),lN=[10,25,50,100],gu=()=>{ot.value&&(g.value={...g.value,keyword:f.value},u.value=1,ut())};let Mi;const cN=()=>{r.enableQuickSearch&&(clearTimeout(Mi),Mi=setTimeout(()=>{gu()},500))};let Ti;const dN=()=>{clearTimeout(Ti),Ti=setTimeout(()=>{ot.value&&ut()},1e3)};e.watch(f,()=>{r.enableQuickSearch&&ot.value&&cN()});const ut=async()=>{if(!r.dummyMode&&ot.value&&!(!te.value&&!ee.value))try{y.value=!0;const M={page:u.value,perPage:h.value,...g.value,...r.apiParams};f.value&&(M.keyword=f.value),Object.keys(M).forEach(K=>{(M[K]===""||M[K]===null||M[K]===void 0)&&delete M[K]});let F;if(te.value)F=await i(te.value,le.value,M);else if(ee.value){let K=ee.value;if(r.baseUrl&&typeof K=="string"&&!K.startsWith("http")){const z=r.baseUrl.replace(/\/$/,""),U=K.startsWith("/")?K:`/${K}`;K=`${z}${U}`}F=await i(K,G.value,M)}fN(F)}catch(M){console.error("DataTable fetch error",M),y.value=!1}},fN=M=>{console.log("DataTable handleResponseData:",M),M&&(r.dynamicColumns&&M.columns&&Array.isArray(M.columns)&&(_.value=M.columns.map(F=>({key:F.key||F.field||F.name,label:F.label||F.header||F.name,width:F.width,align:F.align||"LEFT",sortable:F.sortable!==!1,type:F.type,condition:F.condition,format:F.format}))),M.data&&Array.isArray(M.data)?(p.value=M.data,M.totalData?b.value=M.totalData:M.maxPage?b.value=M.maxPage*h.value:b.value=M.data.length*(M.maxPage||1)):Array.isArray(M)?(p.value=M,b.value=M.length):M.users?(p.value=M.users,b.value=M.users.length):M.items&&Array.isArray(M.items)?(p.value=M.items,b.value=M.total||M.totalItems||M.items.length):M.list&&Array.isArray(M.list)?(p.value=M.list,b.value=M.total||M.list.length):M.rows&&Array.isArray(M.rows)?(p.value=M.rows,b.value=M.count||M.total||M.rows.length):M.result&&Array.isArray(M.result)?(p.value=M.result,b.value=M.total||M.count||M.result.length):(console.warn("DataTable: Unknown response format",M),p.value=[],b.value=0)),y.value=!1};e.onUnmounted(()=>{clearTimeout(Mi),clearTimeout(Ti)});const Pi=()=>{Object.keys(g.value).forEach(M=>{g.value[M]=""}),f.value="",u.value=1,ut()},uN=()=>{u.value=1,ut()},Oi=(M,F)=>{const K=ct(M,F.key);let z={variant:"secondary",class:"",label:K};if(F.condition){const U=F.condition.find(J=>{if(J.logic||typeof J.value=="object"&&J.value!==null)try{const be=J.logic||J.value;return xt.apply(be,M)}catch(be){return console.warn("Badge logic error:",be),!1}const ce=(be,ke)=>be==null||ke===void 0||ke===null?!1:typeof be=="string"&&typeof ke=="string"?be.toLowerCase().trim()===ke.toLowerCase().trim():be==ke;if(ce(J.value,K)||typeof K=="object"&&K!==null&&(ce(J.value,K.code)||ce(J.value,K.id)))return!0;if(F.key.includes(".")){const ke=F.key.split(".").slice(0,-1).join("."),xe=ct(M,ke);if(xe&&typeof xe=="object"&&(ce(J.value,xe.code)||ce(J.value,xe.id)))return!0}return!1});if(U){U.variant&&(z.variant=U.variant);const ce=(l.value||"en")==="id"?U.labelID:U.labelEN;if(z.label=ce||U.label||(typeof K=="object"?K.name||K.code:K),U.color||U.bgColor){const be=(U.color||U.bgColor||"").toLowerCase(),ke=z.variant==="outline",xe={success:"bg-green-500 hover:bg-green-600 border-transparent text-white shadow",warning:"bg-yellow-500 hover:bg-yellow-600 border-transparent text-white shadow",info:"bg-blue-500 hover:bg-blue-600 border-transparent text-white shadow",primary:"bg-primary-600 hover:bg-primary-700 border-transparent text-white shadow",secondary:"bg-neutral-500 hover:bg-neutral-600 border-transparent text-white shadow",danger:"bg-red-500 hover:bg-red-600 border-transparent text-white shadow",destructive:"bg-red-500 hover:bg-red-600 border-transparent text-white shadow"},Ve={success:"text-green-600 border-green-600 hover:bg-green-50",warning:"text-yellow-600 border-yellow-600 hover:bg-yellow-50",info:"text-blue-600 border-blue-600 hover:bg-blue-50",danger:"text-red-600 border-red-600 hover:bg-red-50",destructive:"text-red-600 border-red-600 hover:bg-red-50",primary:"text-primary-600 border-primary-600 hover:bg-primary-50",secondary:"text-neutral-600 border-neutral-600 hover:bg-zinc-50"},Be={danger:"destructive",destructive:"destructive",secondary:"secondary",primary:"default",success:"success",warning:"warning",info:"info"};ke?Ve[be]&&(z.class=Ve[be]):Be[be]?z.variant=Be[be]:xe[be]&&(z.class=xe[be])}}else z.label=typeof K=="object"?(K==null?void 0:K.name)||(K==null?void 0:K.code)||"-":K}else z.label=typeof K=="object"?(K==null?void 0:K.name)||(K==null?void 0:K.code)||"-":K;return z},hN=M=>{m.value.key===M?m.value.direction=m.value.direction==="asc"?"desc":"asc":(m.value.key=M,m.value.direction="asc"),a("update:sort",m.value)},bu=M=>{M!==u.value&&(u.value=M,ot.value&&ut(),a("update:page",M))},mN=M=>{h.value=M,u.value=1,ot.value&&ut()},pN=M=>{const F=Math.random()*15+75;if(M.width){const K=parseInt(String(M.width));return K<100?`${Math.floor(K*(Math.random()*.2+.7))}px`:`${F}%`}return`${F}%`},yu=()=>{f.value="",g.value={},u.value=1,ut()},xu=M=>{var F;if(console.log("[DEBUG] handleHeaderAction called:",M),M.requireConfirm){N.value={button:M,row:null},w.value=!0;return}if(M.route&&!r.dummyMode){if(M.path){const K=M.route.startsWith("/")?M.route:"/"+M.route;sessionStorage.setItem(`layout_${K}`,M.path)}d==null||d.push(M.route)}else if(M.openDialog||r.dummyMode&&M.route){V.value=M,L.value=null,Object.keys(k).forEach(z=>delete k[z]);const K=M.fieldActionGlobal||M.fieldActionCustom||M.field||[];K.length&&K.forEach(z=>{var ce;we(z);const U=M.endpoint||((ce=M.propsActionGlobal)==null?void 0:ce.endpointPropAction)||M.propsActionGlobal,J=U!=null&&U.keyParam&&U.keyParam.length>0?U.keyParam[0]:null;J&&z.model===J||!J&&/^(id|ids|idAuditTrail)/i.test(z.model)?k[z.model]=se.value:k[z.model]||(k[z.model]="")}),D.value=!0}else a("action",{action:((F=M.propsActionCustom)==null?void 0:F.key)||M.key||"create",row:null,selection:se.value})},ku=async(M,F)=>{var K,z,U,J;if(M.requireConfirm){N.value={button:M,row:F},w.value=!0;return}if(M.openDialog){V.value=M,L.value=F,Object.keys(k).forEach(xe=>delete k[xe]),D.value=!0;const ce=nt.value.find(xe=>xe.type==="CHECKBOX"),be=(ce==null?void 0:ce.keyCheckbox)||"id";M.fieldActionCustom&&M.fieldActionCustom.forEach(xe=>{we(xe),/^(id|ids|idAuditTrail)/i.test(xe.model)?k[xe.model]=[F[be]]:M.action==="showToken"&&xe.model==="token"?k[xe.model]=F.token!==void 0?F.token:"":F[xe.model]!==void 0?k[xe.model]=F[xe.model]:k[xe.model]=""});const ke=M.endpoint||((K=M.propsActionGlobal)==null?void 0:K.endpointPropAction)||((z=M.propsActionCustom)==null?void 0:z.endpointPropAction)||((U=M.props)==null?void 0:U.endpointPropAction);if(((J=ke==null?void 0:ke.apiMethod)==null?void 0:J.toUpperCase())==="GET"&&ke.apiUrl){y.value=!0;const{apiUrl:xe}=Ye(),Ve={};ke.keyParam&&Array.isArray(ke.keyParam)&&ke.keyParam.forEach((Be,Se)=>{const wt=ke.model&&Se===0?ke.model:Be;F[Be]!==void 0&&(Ve[wt]=F[Be])}),Object.keys(Ve).length===0&&F.id&&(Ve.id=F.id),xe(ke.apiUrl,"GET",Ve).then(Be=>{let Se=Be;if(Be&&Be.data!==void 0?Se=Be.data:Be&&Be.result!==void 0&&(Se=Be.result),Se!=null){if(typeof Se=="string")Object.prototype.hasOwnProperty.call(k,"token")&&(k.token=Se);else if(typeof Se=="object"&&(Se.item&&(Se=Se.item),Array.isArray(Se)&&(Se=Se[0]||{}),Object.keys(Se).forEach(wt=>{k[wt]=Se[wt]}),!k.token)){const wt=Object.keys(Se).find(Ht=>Ht.toLowerCase().includes("token"));if(wt)k.token=Se[wt];else{const Ht=Object.values(Se).filter(Aa=>typeof Aa=="string");Ht.length===1&&(k.token=Ht[0])}}}}).catch(Be=>{console.error("Fetch Data Failed",Be)}).finally(()=>{y.value=!1});return}return}gN(M,F)},gN=(M,F)=>{if(M.route){if(M.path){const U=M.route.startsWith("/")?M.route:"/"+M.route;sessionStorage.setItem(`layout_${U}`,M.path)}let K=M.route;K.includes(":")?K=K.replaceAll(/:([a-zA-Z0-9_]+)/g,(U,J)=>(F?F[J]||F.id:null)||J):F&&F.id&&(K=`${K.replace(/\/$/,"")}/${F.id}`);const z={};M.path&&(z.code=M.path),d==null||d.push({path:K,query:z})}else if(M.endpoint&&M.endpoint.apiUrl){y.value=!0;const{apiUrl:K}=Ye(),z=M.endpoint.apiUrl,U=M.endpoint.apiMethod||"POST",J={},ce=M.fieldMapping;if(ce&&typeof ce=="object"){const{locale:be}=_t.useI18n(),ke=be.value||"en",xe=[];if(Object.entries(ce).forEach(([Ve,Be])=>{if(typeof Be=="string"){const Se=ct(F,Ve);Se!==void 0?J[Be]=Se:(console.warn(`[MAPPING-DEBUG] No matching source found for '${Ve}'`),xe.push(Ve))}}),xe.length>0){const Ve=ke==="id"?"Masalah Sinkronisasi Data":"Data Synchronization Issue",Be=ke==="id"?`Terdapat ketidaksesuaian skema pada field: ${xe.join(", ")}. Harap hubungi tim pengembang.`:`Schema mismatch detected in fields: ${xe.join(", ")}. Please contact the development team.`;Fe.warning(`${Ve}: ${Be}`,{autoClose:5e3,position:"top-right"})}}if(Object.keys(J).length===0){const be=M.endpoint;F&&be.model&&be.keyParam&&Array.isArray(be.keyParam)?be.keyParam.forEach(ke=>{const xe=ct(F,ke);xe!==void 0&&(J[be.model]=xe)}):F&&F.id&&(J.id=F.id)}K(z,U,J).then(()=>{ut(),a("action",{action:M.action||"success",row:F})}).catch(be=>{console.error("Action Failed",be)}).finally(()=>{y.value=!1})}else a("action",{action:M.action,row:F})},bN=()=>{if(N.value){const{button:M,row:F}=N.value;wu(),F===null?xu({...M,requireConfirm:!1}):ku({...M,requireConfirm:!1},F)}},yN=()=>{var M,F,K;if(V.value){const z=V.value,U=z.endpoint||((M=z.propsActionGlobal)==null?void 0:M.endpointPropAction)||z.propsActionGlobal;let J=(U==null?void 0:U.model)||(U!=null&&U.keyParam&&U.keyParam.length>0?U.keyParam[0]:null);if(!J){const xe=(z.fieldActionGlobal||z.fieldActionCustom||z.field||[]).find(Ve=>/^(id|ids|idAuditTrail)/i.test(Ve.model));J=xe?xe.model:"ids"}let ce=null,be=!1;if(L.value){const ke=nt.value.find(Be=>Be.type==="CHECKBOX"),xe=(ke==null?void 0:ke.keyCheckbox)||"id",Ve=L.value[xe];if(U!=null&&U.apiUrl){ce={...k};const Be=z.fieldMapping;Be&&typeof Be=="object"&&Object.entries(Be).forEach(([Se,wt])=>{if(typeof wt=="string"){const Ht=ct(L.value,Se);Ht!==void 0&&(ce[wt]=Ht)}}),ce[J]||(ce[J]=U!=null&&U.model?Ve:[Ve]),be=!0}}else U!=null&&U.apiUrl&&(ce={...k},ce[J]||(ce[J]=se.value||[]),be=!0);if(be&&ce&&(U!=null&&U.apiUrl)){if(((F=U==null?void 0:U.apiMethod)==null?void 0:F.toUpperCase())==="GET"){D.value=!1,L.value||(se.value=[]);return}const{apiUrl:ke}=Ye(),xe=U.apiUrl,Ve=U.apiMethod||"POST";ke(xe,Ve,ce).then(()=>{D.value=!1,L.value||(se.value=[]),ut(),a("action",{action:"success",row:null})}).catch(Be=>{console.error("Action Failed",Be)})}else if(L.value){const ke=nt.value.find(Se=>Se.type==="CHECKBOX"),xe=(ke==null?void 0:ke.keyCheckbox)||"id",Ve=L.value[xe],Be={...k};Be[J]||(Be[J]=[Ve]),a("action",{action:V.value.action,row:Be}),D.value=!1}else{const ke={...k};ke[J]||(ke[J]=se.value);const xe={action:((K=V.value.propsActionGlobal)==null?void 0:K.key)||V.value.key,row:ke,selection:se.value};a("action",xe),D.value=!1}}},xN=M=>{const F=k[M];F&&lp(String(F)).then(()=>{Fe.success("Berhasil disalin!",{autoClose:2e3,theme:"dark",pauseOnHover:!1})}).catch(K=>{console.error("Failed to copy",K)})},wu=()=>{w.value=!1,N.value=null},kN=e.computed(()=>N.value?N.value.button.confirmTitle||"Confirm":""),wN=e.computed(()=>N.value?N.value.button.confirmMessage||"Confirm":"");o({fetchData:ut,filters:g,resetFilters:Pi,handleRefresh:yu});const Sa=e.ref(""),CN=M=>{if(!M)return"";const F=M.endpoint||M.endpointGlobal||{};return JSON.stringify({url:F.apiUrl||M.apiUrl,module:F.apiModule||M.apiModule,action:F.apiAction||M.apiAction,method:F.apiMethod||M.apiMethod,params:M.apiParams,socket:F.socket||M.socketEndpoint,socketParams:M.socketParams})};return e.watch(()=>r.tableConfig,()=>{if(r.tableConfig){kt();const M=CN(r.tableConfig);M!==Sa.value&&(!Sa.value&&ot.value?(Sa.value=M,ut()):(Sa.value=M,ot.value&&dN()))}},{deep:!0,immediate:!0}),e.watch(()=>r.apiModule,()=>{ot.value&&ut()}),e.watch(()=>r.apiParams,()=>{ot.value&&ut()},{deep:!0}),e.watch(()=>C.value,M=>{console.log("[DEBUG] headerActions changed:",M.length,"items");const F=vi.value;console.log("[DEBUG] visibleHeaderActions evaluated:",F.length,"items")},{deep:!0}),e.onMounted(()=>{kt(),ot.value&&(r.tableConfig||(y.value=!0,ut()))}),(M,F)=>{var K;return e.openBlock(),e.createElementBlock("div",_v,[e.createElementVNode("div",Ev,[e.createElementVNode("div",Bv,[t.nested?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Sv,[e.createElementVNode("div",Av,[e.createVNode(e.unref(ne.Search),{class:"absolute left-2.5 top-2.5 h-4 w-4 text-neutral-500 dark:text-neutral-400"}),e.createVNode(e.unref(a5),{modelValue:f.value,"onUpdate:modelValue":F[0]||(F[0]=z=>f.value=z),placeholder:"Search...",style:{"padding-left":"2.25rem !important"},class:"h-9 bg-white/95 dark:bg-zinc-800/95 border-white/30 dark:border-neutral-700/50 text-neutral-900 dark:text-neutral-100 placeholder:text-neutral-500 dark:placeholder:text-neutral-400",onKeyup:e.withKeys(gu,["enter"])},null,8,["modelValue"])]),x.value.length>0?(e.openBlock(),e.createElementBlock("div",vv,[e.createVNode(PA,null,{trigger:e.withCtx(()=>[e.createVNode(We,{variant:"secondary",icon:"SlidersHorizontal",tooltip:"Advance Search",class:"gap-2 h-9 w-full sm:w-auto justify-center bg-white/95 dark:bg-zinc-800/95 text-neutral-700 dark:text-neutral-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 border border-white/30 dark:border-neutral-700/50 shadow-sm backdrop-blur-sm text-xs font-medium"})]),footer:e.withCtx(()=>[e.createElementVNode("div",Tv,[e.renderSlot(M.$slots,"filter-footer",{fetch:ut,reset:Pi})])]),default:e.withCtx(()=>[F[9]||(F[9]=e.createElementVNode("hr",{class:"border-neutral-200 dark:border-neutral-700"},null,-1)),e.createElementVNode("div",Dv,[e.renderSlot(M.$slots,"filter-form",{filters:g.value},()=>[x.value.length>0?(e.openBlock(),e.createElementBlock("div",Nv,[e.createElementVNode("div",Vv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,(z,U)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:U},[e.unref(Y)(z)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(qe(z))},[e.createVNode(RA,{field:z,modelValue:g.value[z.model],"onUpdate:modelValue":J=>g.value[z.model]=J,disabled:e.unref(ye)(z),required:e.unref(ae)(z),readonly:e.unref(Pe)(z),options:e.unref(Ie)(z),"dynamic-labels":e.unref(Ee)(z),"dynamic-length":e.unref(Ue)(z)},null,8,["field","modelValue","onUpdate:modelValue","disabled","required","readonly","options","dynamic-labels","dynamic-length"])],2)):e.createCommentVNode("",!0)],64))),128))])])):e.createCommentVNode("",!0)]),x.value.length>0?(e.openBlock(),e.createElementBlock("div",Mv,[e.createVNode(We,{variant:"outline",text:"Reset",tooltip:"Reset",rounded:"md",icon:"RefreshCw",onClick:Pi,disabled:Ho.value},null,8,["disabled"]),e.createVNode(We,{onClick:uN,disabled:Ho.value,rounded:"md",text:"Search",tooltip:"Search",icon:"Search"},null,8,["disabled"])])):e.createCommentVNode("",!0)])]),_:3})])):e.createCommentVNode("",!0)])),e.createElementVNode("div",{class:e.normalizeClass(["flex items-center gap-2 flex-wrap",{"w-full justify-between":t.nested}])},[t.nested?(e.openBlock(),e.createElementBlock("span",Pv)):e.createCommentVNode("",!0),t.nested?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We,{key:1,variant:"secondary",icon:"RefreshCw",text:"Refresh",tooltip:"Refresh",class:"gap-2 h-9 bg-white/95 dark:bg-zinc-800/95 text-neutral-700 dark:text-neutral-300 hover:bg-white dark:hover:bg-zinc-800 border border-white/30 dark:border-neutral-700/50 shadow-sm backdrop-blur-sm text-xs font-medium",onClick:yu,disabled:Ho.value},{icon:e.withCtx(()=>[e.createVNode(e.unref(ne.RefreshCw),{class:e.normalizeClass(["w-3.5 h-3.5",{"animate-spin":Ho.value}])},null,8,["class"])]),_:1},8,["disabled"])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(vi.value,(z,U)=>(e.openBlock(),e.createBlock(We,{key:U,icon:z.icon,text:z.label,tooltip:z.tooltip,variant:z.variant,"bg-color":z.bgColor,"text-color":z.textColor,class:"gap-2 h-9 shadow-lg shadow-primary-500/20 border-none text-xs font-medium",onClick:J=>xu(z)},null,8,["icon","text","tooltip","variant","bg-color","text-color","onClick"]))),128)),e.renderSlot(M.$slots,"header-actions")],2)])]),e.createElementVNode("div",Ov,[e.createElementVNode("table",Lv,[e.createElementVNode("thead",Rv,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nt.value,z=>(e.openBlock(),e.createElementBlock("th",{key:z.key,class:e.normalizeClass([z.align?`text-${z.align.toLowerCase()}`:"text-left",z.sortable?"cursor-pointer select-none":"","px-3 py-2 text-xs font-black text-white dark:text-neutral-100 uppercase tracking-wider transition-colors duration-150"]),style:e.normalizeStyle(z.width?{width:z.width}:{}),onClick:U=>z.sortable&&hN(z.key)},[z.type==="CHECKBOX"?(e.openBlock(),e.createElementBlock("div",Fv,[e.createVNode(so,{"model-value":Oe.value,indeterminate:Le.value,"onUpdate:modelValue":F[1]||(F[1]=U=>lt(!!U)),onClick:F[2]||(F[2]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","indeterminate"])])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["flex items-center gap-2 w-full",hu(z.align)])},[e.createElementVNode("span",null,e.toDisplayString(z.label),1)],2))],14,Iv))),128)),tr.value?(e.openBlock(),e.createElementBlock("th",zv,[...F[10]||(F[10]=[e.createElementVNode("div",{class:"flex items-center justify-center w-full"}," Actions ",-1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",$v,[Ho.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h.value,z=>(e.openBlock(),e.createElementBlock("tr",{key:`skeleton-${z}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nt.value,U=>{var J,ce;return e.openBlock(),e.createElementBlock("td",{key:U.key,class:e.normalizeClass([U.align?`text-${U.align.toLowerCase()}`:"text-left","px-3 py-0.5"])},[e.createElementVNode("div",{class:e.normalizeClass(["bg-gradient-to-r from-neutral-200 via-neutral-300 to-neutral-200 dark:from-neutral-700 dark:via-neutral-600 dark:to-neutral-700 animate-shimmer",[["badge","BADGE"].includes(U.type??"")||U.condition?"h-5 rounded-full w-20":"h-4 rounded-md",((J=U.align)==null?void 0:J.toLowerCase())==="center"?"mx-auto":"",((ce=U.align)==null?void 0:ce.toLowerCase())==="right"?"ml-auto":""]]),style:e.normalizeStyle({width:["badge","BADGE"].includes(U.type??"")||U.condition?void 0:pN(U),backgroundSize:"200% 100%"})},null,6)],2)}),128)),t.hasActions?(e.openBlock(),e.createElementBlock("td",jv,[...F[11]||(F[11]=[e.createElementVNode("div",{class:"flex items-center justify-center gap-1.5"},[e.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse"}),e.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse delay-75"}),e.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse delay-150"})],-1)])])):e.createCommentVNode("",!0)]))),128)):lo.value.length===0?(e.openBlock(),e.createElementBlock("tr",Uv,[e.createElementVNode("td",{colspan:nt.value.length+(tr.value?1:0),class:"text-center py-16"},[e.createElementVNode("div",Hv,[e.createVNode(e.unref(Tu.Vue3Lottie),{animationData:e.unref(bv),height:200,width:200},null,8,["animationData"]),e.createElementVNode("div",null,[e.createElementVNode("p",qv,e.toDisplayString(pu.value?"No search results":"No data"),1),e.createElementVNode("p",Gv,e.toDisplayString(pu.value?"Try changing keywords":"No data added"),1)])])],8,Wv)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(lo.value,(z,U)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:U},[e.createElementVNode("tr",Kv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nt.value,J=>(e.openBlock(),e.createElementBlock("td",{key:J.key,class:e.normalizeClass([J.align?`text-${J.align.toLowerCase()}`:"text-left","px-3 py-0.5 text-sm text-neutral-900 dark:text-neutral-100"])},[e.renderSlot(M.$slots,`cell-${J.key}`,{row:z,value:ct(z,J.key)},()=>{var ce,be,ke,xe,Ve,Be;return[J.type==="CHECKBOX"?(e.openBlock(),e.createElementBlock("div",Xv,[e.createVNode(so,{"model-value":ve(z),"onUpdate:modelValue":Se=>q(z,!!Se),onClick:F[3]||(F[3]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onUpdate:modelValue"])])):J.type==="badge"||J.type==="BADGE"||J.condition?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["flex items-center gap-1.5 flex-wrap md:flex-nowrap",[J.align?`justify-${J.align.toLowerCase()}`:"justify-start"]])},[e.createVNode(wi,{variant:Oi(z,J).variant,class:e.normalizeClass([Oi(z,J).class,"whitespace-nowrap truncate max-w-[150px] inline-block"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Oi(z,J).label),1)]),_:2},1032,["variant","class"])],2)):J.key==="no"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString((u.value-1)*h.value+U+1),1)],64)):J.type==="HYPERLINK"||J.type==="hyperlink"?(e.openBlock(),e.createElementBlock("a",{key:3,href:ct(z,(be=(ce=J.propsCustom)==null?void 0:ce[0])==null?void 0:be.urlLink)||"#",target:((xe=(ke=J.propsCustom)==null?void 0:ke[0])==null?void 0:xe.target)||"_blank",class:"text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1 font-medium"},[e.createTextVNode(e.toDisplayString(ct(z,J.key)||"-")+" ",1),((Be=(Ve=J.propsCustom)==null?void 0:Ve[0])==null?void 0:Be.target)==="_blank"?(e.openBlock(),e.createElementBlock("span",Jv,[...F[12]||(F[12]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e.createElementVNode("polyline",{points:"15 3 21 3 21 9"}),e.createElementVNode("line",{x1:"10",y1:"14",x2:"21",y2:"3"})],-1)])])):e.createCommentVNode("",!0)],8,Yv)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(iN(z,J)),1)],64))]})],2))),128)),tr.value?(e.openBlock(),e.createElementBlock("td",Qv,[e.renderSlot(M.$slots,"actions",{row:z,buttons:Ba(z),getButtonColor:Di,getIconComponent:Ni},()=>[Ba(z).length>0?(e.openBlock(),e.createElementBlock("div",Zv,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ba(z),(J,ce)=>(e.openBlock(),e.createElementBlock("div",{key:ce,class:"group relative"},[e.createVNode(We,{tooltip:J.tooltip||J.label,icon:J.icon,text:J.icon?"":J.label||(e.unref(l)==="id"?"Aksi":"Action"),size:J.icon?"icon":"sm",rounded:J.rounded||"sm",borderStyle:J.borderStyle||"none",variant:J.variant||"ghost","bg-color":Di(J,z),onClick:be=>ku(J,z)},null,8,["tooltip","icon","text","size","rounded","borderStyle","variant","bg-color","onClick"])]))),128))])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]),M.$slots["expanded-row"]?(e.openBlock(),e.createElementBlock("tr",eD,[e.createElementVNode("td",{colspan:nt.value.length+(tr.value?1:0),class:"px-0 py-0"},[e.renderSlot(M.$slots,"expanded-row",{row:z,index:U})],8,tD)])):e.createCommentVNode("",!0)],64))),128))])])]),!Ho.value&&lo.value.length>0&&t.showPagination&&B.value?(e.openBlock(),e.createElementBlock("div",oD,[e.createElementVNode("div",nD,[e.createVNode(e.unref(m5),{"model-value":String(h.value),"onUpdate:modelValue":F[4]||(F[4]=z=>mN(Number(z)))},{default:e.withCtx(()=>[e.createVNode(e.unref(k5),{class:"h-8 w-[70px] bg-white dark:bg-zinc-800 border-neutral-200 dark:border-neutral-700"},{default:e.withCtx(()=>[e.createVNode(e.unref(w5),{placeholder:String(h.value)},null,8,["placeholder"])]),_:1}),e.createVNode(e.unref(p5),null,{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(lN,z=>e.createVNode(e.unref(b5),{key:z,value:String(z)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(z),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"]),F[17]||(F[17]=e.createElementVNode("div",{class:"h-5 w-px bg-zinc-300 dark:bg-zinc-600"},null,-1)),e.createElementVNode("span",rD,[F[13]||(F[13]=e.createTextVNode(" Showing ",-1)),e.createElementVNode("span",aD,e.toDisplayString(nN.value),1),F[14]||(F[14]=e.createTextVNode(" to ",-1)),e.createElementVNode("span",sD,e.toDisplayString(rN.value),1),F[15]||(F[15]=e.createTextVNode(" of ",-1)),e.createElementVNode("span",iD,e.toDisplayString(or.value),1),F[16]||(F[16]=e.createTextVNode(" items ",-1))])]),e.createElementVNode("div",lD,[e.createVNode(e.unref(s5),{total:or.value,"items-per-page":h.value,"sibling-count":1,"show-edges":"",page:u.value,"onUpdate:page":bu,class:"scale-90 origin-right"},{default:e.withCtx(()=>[e.createVNode(e.unref(i5),{class:"flex items-center gap-1"},{default:e.withCtx(({items:z})=>[e.createVNode(e.unref(c5),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:opacity-50 disabled:cursor-not-allowed"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.ChevronsLeft),{class:"h-4 w-4"})]),_:1}),e.createVNode(e.unref(h5),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.ChevronLeft),{class:"h-4 w-4"})]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z,(U,J)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[U.type==="page"?(e.openBlock(),e.createBlock(e.unref(d5),{key:J,value:U.value,"as-child":""},{default:e.withCtx(()=>[e.createVNode(e.unref(Tt),{class:"w-8 h-8 p-0 text-sm",variant:U.value===u.value?"default":"outline",disabled:U.value===u.value,onClick:ce=>bu(U.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(U.value),1)]),_:2},1032,["variant","disabled","onClick"])]),_:2},1032,["value"])):(e.openBlock(),e.createBlock(e.unref(l5),{key:U.type,index:J},null,8,["index"]))],64))),256)),e.createVNode(e.unref(u5),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.ChevronRight),{class:"h-4 w-4"})]),_:1}),e.createVNode(e.unref(f5),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:e.withCtx(()=>[e.createVNode(e.unref(ne.ChevronsRight),{class:"h-4 w-4"})]),_:1})]),_:1})]),_:1},8,["total","items-per-page","page"])])])):e.createCommentVNode("",!0),e.createVNode(io,{modelValue:w.value,"onUpdate:modelValue":F[5]||(F[5]=z=>w.value=z),title:kN.value,icon:"AlertCircle","max-width":450,persistent:!1},{actions:e.withCtx(()=>[e.createVNode(We,{variant:"outline",onClick:wu,text:"Cancel"}),e.createVNode(We,{variant:"default",onClick:bN,text:"Yes"})]),default:e.withCtx(()=>[e.createElementVNode("div",cD,[e.createElementVNode("p",dD,e.toDisplayString(wN.value),1)])]),_:1},8,["modelValue","title"]),e.createVNode(io,{modelValue:D.value,"onUpdate:modelValue":F[8]||(F[8]=z=>D.value=z),title:((K=V.value)==null?void 0:K.label)||"Action",icon:"AlertCircle","max-width":450},{actions:e.withCtx(()=>{var z;return[e.createVNode(We,{variant:"outline",onClick:F[6]||(F[6]=U=>D.value=!1),text:"Cancel"}),t.dummyMode&&((z=V.value)!=null&&z.route)?(e.openBlock(),e.createBlock(We,{key:1,variant:"default",onClick:F[7]||(F[7]=U=>D.value=!1),text:e.unref(l)==="id"?"Tutup":"Close"},null,8,["text"])):(e.openBlock(),e.createBlock(We,{key:0,variant:"default",onClick:yN,text:"Save"}))]}),default:e.withCtx(()=>{var z,U,J;return[e.createElementVNode("div",fD,[y.value?(e.openBlock(),e.createElementBlock("div",uD,[e.createElementVNode("div",hD,[F[18]||(F[18]=e.createElementVNode("div",{class:"w-8 h-8 border-4 border-primary border-t-transparent rounded-full animate-spin"},null,-1)),e.createElementVNode("span",mD,e.toDisplayString(e.unref(l)==="id"?"Memuat data...":"Loading data..."),1)])])):e.createCommentVNode("",!0),t.dummyMode&&((z=V.value)!=null&&z.route)?(e.openBlock(),e.createElementBlock("div",pD,[e.createElementVNode("div",gD,[e.createVNode(e.unref(ne.Search),{class:"w-4 h-4"})]),e.createElementVNode("div",bD,[e.createElementVNode("span",yD,e.toDisplayString(e.unref(l)==="id"?"Info Navigasi":"Navigation Info"),1),e.createElementVNode("p",xD,e.toDisplayString(e.unref(l)==="id"?`Aksi ini akan mengarah ke rute: ${V.value.route}`:`This action will navigate to: ${V.value.route}`),1)])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((U=V.value)==null?void 0:U.fieldActionCustom)||((J=V.value)==null?void 0:J.fieldActionGlobal)||[],(ce,be)=>{var ke,xe,Ve,Be;return e.openBlock(),e.createElementBlock(e.Fragment,{key:be},[!ce.isHidden&&e.unref(T)(ce)&&!(t.dummyMode&&((ke=V.value)!=null&&ke.route))?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(qe(ce))},[e.createElementVNode("div",kD,[e.createVNode(mn,{class:"flex-1 w-full",field:ce,"model-value":k[ce.model],"form-data":k,required:e.unref(I)(ce),disabled:e.unref(X)(ce),readonly:e.unref(H)(ce),options:e.unref(oe)(ce),"dynamic-labels":e.unref(W)(ce),"dynamic-length":e.unref(Z)(ce),"onUpdate:modelValue":Se=>k[ce.model]=Se},null,8,["field","model-value","form-data","required","disabled","readonly","options","dynamic-labels","dynamic-length","onUpdate:modelValue"]),ce.isCopyable||(xe=ce.props)!=null&&xe.isCopyable||((Ve=V.value)==null?void 0:Ve.action)==="showToken"||((Be=V.value)==null?void 0:Be.action)==="copyToken"?(e.openBlock(),e.createBlock(We,{key:0,icon:"Copy",variant:"outline",class:"h-10 w-10 p-0 flex-shrink-0",tooltip:"Salin",onClick:Se=>xN(ce.model)},null,8,["onClick"])):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0)],64)}),128))])]}),_:1},8,["modelValue","title"])])}}});function wD(){const t=e.reactive({}),o=e.reactive({}),n=e.reactive({}),r=e.reactive({}),a=e.reactive({}),s=e.ref(!1),i=e.ref(null),l=e.reactive({}),c=e.reactive({visible:!1,title:"",message:"",action:null});return{formData:t,errors:o,fieldErrors:n,wizardState:r,inlineState:a,isSubmitting:s,internalSchema:i,rawItemsCache:l,confirmDialog:c}}function CD({formData:t,locale:o,errors:n,fieldMap:r,activeSchema:a,isSectionVisible:s,isFieldVisible:i,isFieldRequired:l,resolveFieldLength:c}){const d=(u,h,m)=>{const p=u.props||u.propsFieldGlobal||{},y=h==null?"":String(h).trim();if(l(u,m)&&y==="")return o.value==="id"?"Wajib diisi":"Required";if(y==="")return null;const b=c==null?void 0:c(u,m),g=Number((b==null?void 0:b.minLength)??p.minLength),_=Number((b==null?void 0:b.maxLength)??p.maxLength);if(!Number.isNaN(g)&&g>0&&y.length<g)return o.value==="id"?`Minimal ${g} karakter`:`Minimum ${g} characters`;if(!Number.isNaN(_)&&_>0&&y.length>_)return o.value==="id"?`Maksimal ${_} karakter`:`Maximum ${_} characters`;if(p.regex)try{if(!new RegExp(p.regex).test(y))return p.regexMessage||(o.value==="id"?"Format tidak valid":"Invalid format")}catch{console.warn(`[DynamicForm] Invalid validation regex for field ${u.model}:`,p.regex)}return null};return{validateField:d,validateAll:()=>{var h,m;let u=!0;return(m=(h=a.value)==null?void 0:h.sections)==null||m.forEach(p=>{var y;s(p)&&(((y=p.propsForm)==null?void 0:y.fields)||p.fields||[]).forEach(b=>{if(b.model&&i(b)){const g=r.value.get(b.model),_=g?yn(t,g.path):t[b.model],E=d(b,_);E&&(n[b.model]=E,u=!1)}})}),u}}}function _D({formData:t,activeSchema:o,isSectionVisible:n,isFieldVisible:r,getWizardTabs:a}){const s=()=>{var u;const d=[],f=h=>{h==null||h.forEach(m=>{var y;if(m.type==="TABLE"||m.propsTable){const b=m.propsTable||m;b.modelDatatable&&d.push({key:b.modelDatatable,subFields:(b.headers||[]).map(g=>g.key)})}(((y=m.propsForm)==null?void 0:y.fields)||m.fields||[]).forEach(b=>{var _,E;const g=["DCodeDynamicUploadList","DCodeUploadList","DCodeDataTable","DCodeDynamicFormList"].includes(b.component);if(b.model&&((_=b.props)!=null&&_.multiple||((E=b.props)==null?void 0:E.valueType)==="array"||g)){const B=b.component.includes("Upload")?["id","filename","document","typeDocument","idDocumentType"]:["id"];d.push({key:b.model,subFields:B})}}),m.type==="WIZARD"&&a(m).forEach(b=>f(b.sections))})};return f((u=o.value)==null?void 0:u.sections),d};return{getCleanPayload:()=>{var u;if(!((u=o.value)!=null&&u.sections))return{...t};const d={},f=new Set;return o.value.sections.forEach(h=>{var b,g;if(!n(h))return;const p=Ca(h),y=(_,E)=>{if(_.model&&r(_)){const B=yn(t,E?`${E}.${_.model}`:_.model)??t[_.model];d[_.model]=Wo(B)??null,f.add(_.model)}};if((((b=h.propsForm)==null?void 0:b.fields)||h.fields||[]).forEach(_=>{var E;return y(_,p||((E=h.propsForm)==null?void 0:E.key))}),h.type==="WIZARD"&&a(h).forEach(_=>_.sections.forEach(E=>(E.fields||[]).forEach(B=>y(B,_.key)))),(g=h.propsTable)!=null&&g.modelDatatable){const _=h.propsTable.modelDatatable;d[_]=Wo(t[_]||[]),f.add(_)}}),["id","_id"].forEach(h=>{t[h]!==void 0&&!f.has(h)&&(d[h]=Wo(t[h]))}),d},applyFieldMapping:(d,f)=>{const u={},h=m=>m&&typeof m=="object"?m._isLogicValue?m.id:m.id??m.code??m.value??m:m;return Object.entries(f).forEach(([m,p])=>{if(typeof p=="string"){const y=d[m]??yn(t,m)??t[m];y!==void 0&&(u[p]=h(y))}else if(Array.isArray(p)&&p[0]){const y=p[0],b=Object.keys(y);let g=d[m]??yn(t,m)??t[m];if(!Array.isArray(g)||g.length===0){const _=s().find(E=>b.some(B=>E.subFields.includes(B)));if(_){const E=d[_.key]??yn(t,_.key)??t[_.key];Array.isArray(E)&&E.length>0&&(g=E)}}Array.isArray(g)&&(console.log(`[DynamicForm][MAPPING-SOURCE] ${m}:`,Wo(g)),u[m]=g.map((_,E)=>{const B={},A=Wo(_);return Object.entries(y).forEach(([C,x])=>{const w=A[C]??A[x]??_[C]??_[x]??null;B[x]=h(w)}),B}))}}),console.log("[DynamicForm][MAPPING-RESULT]",u),u},handleResponseMapping:(d,f)=>{const u=(d==null?void 0:d.data)!==void 0?d.data:d,h=Array.isArray(u)?u[0]:u;h&&Object.entries(f).forEach(([m,p])=>{const y=h[p]??h[m];y!==void 0&&nu(t,m,y)})},getFormArrayModels:s}}function ED({state:t,props:o,emit:n,apiUrl:r,router:a,locale:s,mapping:i,validation:l,fieldMap:c,activeSchema:d,resolvedBaseUrl:f}){const u=_=>o.dummyMode||!_.permission||(o.isEditMode?_.permission!=="CREATE":_.permission!=="UPDATE"),h=_=>{var E,B,A,C;_.requireConfirm?(t.confirmDialog.title=s.value==="id"?((E=_.propCustomMessage)==null?void 0:E.titleID)||"Konfirmasi":((B=_.propCustomMessage)==null?void 0:B.titleEN)||"Confirm",t.confirmDialog.message=s.value==="id"?((A=_.propCustomMessage)==null?void 0:A.messageID)||"Lanjutkan?":((C=_.propCustomMessage)==null?void 0:C.messageEN)||"Continue?",t.confirmDialog.action=_,t.confirmDialog.visible=!0):p(_)},m=()=>{t.confirmDialog.visible=!1,t.confirmDialog.action&&p(t.confirmDialog.action)},p=async _=>{var C,x;const E=_.propsActionGlobal||_.props||{},B=i.applyFieldMapping(i.getCleanPayload(),E.fieldMapping||_.fieldMapping||{});n("action",_,B);const A=E.endpointPropAction||_.endpointPropAction||E.endpoint||_.endpoint;if((E.type==="SUBMIT"||E.type==="ACTION")&&(A!=null&&A.apiUrl)){const w=Fe.loading(s.value==="id"?"Memproses...":"Processing..."),D=Ci(A.apiUrl,f.value);try{const k=await r(D,A.apiMethod||"POST",B);console.log("[DynamicForm][ACTIONS] API Response:",k);const v=(k==null?void 0:k.status)===!0||(k==null?void 0:k.success)===!0||(k==null?void 0:k.code)===200||(k==null?void 0:k.code)==="00"||(k==null?void 0:k.status)==="SUCCESS",S=(k==null?void 0:k.message)||(v?s.value==="id"?"Sukses":"Success":s.value==="id"?"Gagal":"Failed");if(Fe.update(w,{render:S,type:v?"success":"error",isLoading:!1,autoClose:v?3e3:5e3}),v){if((E.fieldMapping||_.fieldMapping)&&i.handleResponseMapping(k,E.fieldMapping||_.fieldMapping),n("success",k),console.log("[DynamicForm][ACTIONS] Router Instance:",a?"FOUND":"NOT FOUND"),a){const N=V=>{const L=V.startsWith("/")?V:"/"+V;console.log("[DynamicForm][ACTIONS] Navigating to:",L),a.push(L).catch(O=>{console.error("[DynamicForm][ACTIONS] Router Push Failed:",O)})};if(E.routeBack)N(E.routeBack);else{const V=a.currentRoute.value.path,L=V.split("/").filter(Boolean);console.log("[DynamicForm][ACTIONS] No routeBack, fallback to parent. Current path:",V),L.length>1?(L.pop(),N("/"+L.join("/"))):N("/")}}}else n("error",k)}catch(k){const v=((x=(C=k.response)==null?void 0:C.data)==null?void 0:x.message)||k.message||(s.value==="id"?"Terjadi kesalahan":"An error occurred");Fe.update(w,{render:`Gagal: ${v}`,type:"error",isLoading:!1,autoClose:5e3}),n("error",k)}}else E.type==="SUBMIT"&&n("submit",B);E.keyRedirect&&E.route&&a&&a.push(E.route)};return{isActionVisible:u,handleGlobalButtonClick:h,confirmAction:m,performAction:p,handleSubmit:async()=>{var _,E;if(l.validateAll()){t.isSubmitting.value=!0;try{const B=i.getCleanPayload(),A=(((_=d.value)==null?void 0:_.actions)||[]).find(x=>{var w;return x.type==="SUBMIT"||x.key==="SUBMIT"||((w=x.propsActionGlobal)==null?void 0:w.type)==="SUBMIT"}),C=(A==null?void 0:A.fieldMapping)||((E=A==null?void 0:A.propsActionGlobal)==null?void 0:E.fieldMapping);n("submit",C?i.applyFieldMapping(B,C):B)}finally{t.isSubmitting.value=!1}}},handleCancel:()=>n("cancel"),handleFieldUpdate:(_,E,B)=>{var C;t.formData[_]=E;const A=(C=c.value.get(_))==null?void 0:C.field;if(A){const x=l.validateField(A,E);x?t.errors[_]=x:delete t.errors[_]}}}}function BD({formData:t,validation:o,locale:n,emit:r,mapping:a}){const s=e.ref(!1),i=e.ref(""),l=e.ref("Plus"),c=e.ref([]),d=e.reactive({}),f=e.reactive({}),u=e.ref(""),h=e.ref(null),m=e.ref(!1),p=e.ref(null),y=e.ref(!1),b=k=>{var v;return!(k!=null&&k.apiUrl)&&!((v=k==null?void 0:k.endpointTable)!=null&&v.apiUrl)},g=k=>{if(!k)return!1;const v=(k.key||"").toLowerCase(),S=(k.permission||"").toUpperCase();return v==="detail"||v.includes("view")||S==="VIEW"},_=k=>Array.isArray(t[k.modelDatatable])?t[k.modelDatatable]:[],E=k=>{var S,N;if((S=k.fields)!=null&&S.length)return k.fields;const v=(k.actionTableGlobal||[]).find(V=>V.permission==="CREATE"||(V.key||"").toLowerCase().includes("add"));return(N=v==null?void 0:v.fieldActionGlobal)!=null&&N.length?v.fieldActionGlobal:(k.headers||[]).filter(V=>V.key&&V.key!=="no").map(V=>({key:V.key,model:V.key,component:"DCodeTextField"}))},B=(k,v)=>{p.value={propsTable:k,row:v},y.value=!0},A=()=>{if(!p.value)return;const{propsTable:k,row:v}=p.value;y.value=!1;const S=t[k.modelDatatable];if(Array.isArray(S)){const N=S.indexOf(v);if(N!==-1)S.splice(N,1);else{const V=JSON.stringify(v,(O,P)=>["no","_index"].includes(O)?void 0:P),L=S.findIndex(O=>JSON.stringify(O,(P,R)=>["no","_index"].includes(P)?void 0:R)===V);L!==-1&&S.splice(L,1)}r("update:model",a.getCleanPayload())}},C=(k,v)=>{d[k]=v;const S=c.value.find(N=>N.model===k);if(S){const N=o.validateField(S,v);N?f[k]=N:delete f[k]}},x=(k,v,S)=>{u.value=k.modelDatatable||"",m.value=g(v),h.value=null,i.value=n.value==="id"?v.labelID||"Tambah Data":v.labelEN||"Add Data",l.value=v.icon||"Plus";const N=E(k);c.value=N,Object.keys(d).forEach(V=>delete d[V]),Object.keys(f).forEach(V=>delete f[V]),N.forEach(V=>d[V.model]=S?S[V.model]??null:null),s.value=!0};return{tableDialogOpen:s,tableDialogTitle:i,tableDialogIcon:l,tableDialogFields:c,tableRowFormData:d,tableRowErrors:f,activeTableKey:u,editingRowIndex:h,tableDialogViewOnly:m,confirmDeletePending:p,confirmDeleteOpen:y,isTemporaryTable:b,isActionViewOnly:g,tableRows:_,resolveTableFields:E,confirmTableDelete:B,executeTableDelete:A,handleTableRowUpdate:C,openTableRowDialog:x,handleDataTableAction:(k,v)=>{const{action:S,row:N}=v;if(/delete|trash/i.test(S)){const R=t[k.modelDatatable];if(Array.isArray(R)){const j=R.indexOf(N);if(j!==-1)R.splice(j,1);else{const T=JSON.stringify(N,(X,H)=>["no","_index"].includes(X)?void 0:H),I=R.findIndex(X=>JSON.stringify(X,(H,W)=>["no","_index"].includes(H)?void 0:W)===T);I!==-1&&R.splice(I,1)}}return}if(/detail|view/i.test(S)){x(k,{key:"detail",permission:"VIEW"},N);return}const V=k.modelDatatable||"";u.value=V,m.value=!1,i.value=n.value==="id"?"Ubah Data":"Edit Data",l.value="SquarePen";const L=t[V];let O=Array.isArray(L)?L.indexOf(N):-1;if(O===-1&&Array.isArray(L)){const R=JSON.stringify(N,(j,T)=>["no","_index"].includes(j)?void 0:T);O=L.findIndex(j=>JSON.stringify(j,(T,I)=>["no","_index"].includes(T)?void 0:I)===R)}h.value=O!==-1?O:null;const P=E(k);c.value=P,Object.keys(d).forEach(R=>delete d[R]),P.forEach(R=>d[R.model]=N[R.model]??null),s.value=!0},saveTableRow:()=>{let k=!0;if(c.value.forEach(S=>{const N=o.validateField(S,d[S.model]);N&&(f[S.model]=N,k=!1)}),!k)return;const v=u.value;v&&(t[v]=t[v]||[],h.value!==null?t[v].splice(h.value,1,{...d}):t[v].push({...d}),s.value=!1,r("update:model",a.getCleanPayload()))}}}function SD(t){const{state:o,props:n,emit:r,logic:a,mapping:s,activeSchema:i,fieldMap:l,prefetchFieldItems:c}=t;let d="";const f=new Map,u=new Map,h=(m,p)=>{var A;const y=(A=i.value)==null?void 0:A.sections;if(!y)return;a.applyCalculations();const b=a.getNormalizedData(m),g=(C,x,w,D)=>{const k=C.model,v=a.isFieldVisible(C,w)&&x,S=f.get(k),N=o.formData[k];return f.set(k,v),D&&S===!0&&v===!1&&N!=null&&(console.log(`[DynamicForm][DEBUG][RESET-VISIBLE] ${k} became hidden. Clearing value:`,N),o.formData[k]=Array.isArray(N)?[]:null),v},_=(C,x,w,D)=>{var P,R,j,T,I,X;const k=C.model,v=C.logic,S=Array.isArray((R=(P=C.props)==null?void 0:P.endpoint)==null?void 0:R.keyParam)||Array.isArray((T=(j=C.props)==null?void 0:j.endpointReference)==null?void 0:T.keyParam);if(!v&&!S)return;const N={};let V=!1;["lengthRule","optionsFilterRule","visibleRule","disabledRule"].forEach(H=>{const W=v==null?void 0:v[H];if(!W)return;const Z=a.resolveActiveRule(W,w,`${H}-${k}`),oe=JSON.stringify(Z);N[H]=oe;const ge=u.get(k);(ge==null?void 0:ge[H])!==void 0&&ge[H]!==oe&&(V=!0,console.log(`[DynamicForm][DEBUG][CONTEXT-CHANGE] ${k} rule ${H} changed while tracking.`))});const O=((I=C.props)==null?void 0:I.endpoint)||((X=C.props)==null?void 0:X.endpointReference);Array.isArray(O==null?void 0:O.keyParam)&&O.keyParam.forEach(H=>{const W=w[H],Z=JSON.stringify(W);N[`kp-${H}`]=Z;const oe=u.get(k);(oe==null?void 0:oe[`kp-${H}`])!==void 0&&oe[`kp-${H}`]!==Z&&(V=!0,console.log(`[DynamicForm][DEBUG][CASCADE] ${k} dependency ${H} changed while tracking.`),D&&x&&c(C,!0))}),D&&V&&o.formData[k]!=null&&(console.log(`[DynamicForm][DEBUG][RESET-LOGIC] Context changed for ${k}. Clearing value.`),o.formData[k]=Array.isArray(o.formData[k])?[]:null),u.set(k,N)},E=(C,x,w)=>{var k;if(C.type!=="WIZARD")return;(((k=C.propsWizard)==null?void 0:k.propsSteps)||[]).forEach(v=>{const N=a.isSectionVisible(v,w)&&x;Array.isArray(v.sectionsWizard)?B(v.sectionsWizard,N):v.sectionsWizard&&B([v.sectionsWizard],N)})},B=(C,x=!0)=>{var w;for(const D of C){const v=a.isSectionVisible(D,m)&&x,S=((w=D.propsForm)==null?void 0:w.fields)||D.fields||[];for(const N of S){if(!N.model)continue;const V=g(N,v,m,p);_(N,V,b,p)}E(D,v,m)}};B(y,!0)};return e.watch(()=>i.value,m=>{var y,b,g,_,E;if(!(m!=null&&m.sections))return;const p=B=>{if(!B)return;const A=["visibleRule","requiredRule","disabledRule","optionsFilterRule","lengthRule","calculateRule"];for(const C of A){const x=B[C];if(Array.isArray(x))for(const w of x)w.condition&&_a(w.condition);else x&&_a(x)}};for(const B of m.sections){if(p(B.logic||((y=B.propsForm)==null?void 0:y.logic)),B.type==="WIZARD")for(const C of((b=B.propsWizard)==null?void 0:b.propsSteps)||[])p(C.logic);const A=((g=B.propsForm)==null?void 0:g.fields)||B.fields||[];for(const C of A)p(C.logic),(_=C.logic)!=null&&_.optionsFilterRule&&c(C);if(B.type==="TABLE"&&((E=B.propsTable)!=null&&E.modelDatatable)&&(o.formData[B.propsTable.modelDatatable]=o.formData[B.propsTable.modelDatatable]||[]),B.type==="WIZARD"){const C=Ca(B);o.wizardState[C]===void 0&&(o.wizardState[C]=0)}}h(o.formData,!1)},{immediate:!0}),e.watch(o.formData,m=>{h(m,!0);const p=s.getCleanPayload()||{},y=JSON.stringify(p);y!==d&&(console.log("[DynamicForm][DEBUG][EMIT] Sending updated model to parent:",p),d=y,r("update:model",p))},{deep:!0}),e.watch(()=>n.model,m=>{m&&Object.keys(m).length>0&&JSON.stringify(m)!==d&&Object.entries(m).forEach(([y,b])=>{if(f.get(y)===!1)return;if(b==null&&f.get(y)===!0){const E=o.formData[y];if(E!=null)return}const g=l.value.get(y),_=(g==null?void 0:g.path)||y;nu(o.formData,_,b)})},{immediate:!0,deep:!0}),{lastEmittedPayload:()=>d}}xt.add_operation("length",t=>t==null?0:typeof t=="string"||Array.isArray(t)?t.length:typeof t=="number"?String(t).length:typeof t=="object"?Object.keys(t).length:0),xt.add_operation("==",(t,o)=>{const n=r=>r&&typeof r=="object"&&r._isLogicValue;return t==null?o==null:o==null?t==null:n(t)&&n(o)?String(t.id)===String(o.id)||String(t.code)===String(o.code):n(t)?String(t.code)===String(o)||String(t.id)===String(o):n(o)?String(o.code)===String(t)||String(o.id)===String(t):typeof t=="boolean"&&typeof o=="string"?String(t)===o:typeof o=="boolean"&&typeof t=="string"?String(o)===t:String(t)===String(o)}),xt.add_operation("!=",(t,o)=>{const n=r=>r&&typeof r=="object"&&r._isLogicValue;return t==null&&o==null?!1:t==null||o===null||o===void 0?!0:n(t)&&n(o)?!(String(t.id)===String(o.id)||String(t.code)===String(o.code)):n(t)?!(String(t.code)===String(o)||String(t.id)===String(o)):n(o)?!(String(o.code)===String(t)||String(o.id)===String(t)):String(t)!==String(o)});function AD(t,o){const{t:n,locale:r}=_t.useI18n(),a=e.computed(()=>r.value),{apiUrl:s}=Ye(),i=t.router||_o.useRouter(),l=wD(),c=e.computed(()=>t.schema||l.internalSchema.value),d=e.computed(()=>{var B;if((B=t.selectedTokenCore)!=null&&B.address)return t.selectedTokenCore.address;if(t.baseUrl)return t.baseUrl}),f=(B,A,C)=>{A.model&&B.set(A.model,{field:A,path:A.model})},u=(B,A)=>{A.key||A.id;const C=Array.isArray(A.sectionsWizard)?A.sectionsWizard:[A.sectionsWizard].filter(Boolean);for(const x of C)if(x.fields)for(const w of x.fields)f(B,w)},h=e.computed(()=>{var C,x,w;const B=new Map,A=(C=c.value)==null?void 0:C.sections;if(!A)return B;for(const D of A){const k=D.propsForm||D.propsTable||D.props||{};Ca(D);const v=k.fields||D.fields||[];for(const S of v)f(B,S);if(((x=D.type)==null?void 0:x.toUpperCase())==="WIZARD"&&((w=D.propsWizard)!=null&&w.propsSteps))for(const S of D.propsWizard.propsSteps)u(B,S)}return B}),m=_i({formData:l.formData,errors:l.errors,fieldMap:h,rawItemsCache:l.rawItemsCache,activeSchema:c,locale:a});e.watch(()=>c.value,B=>{if(B!=null&&B.payload){console.log("[DynamicForm][DEBUG] Initializing flat state from schema payload...");const A=ru(B.payload);Object.keys(A).forEach(C=>{(l.formData[C]===void 0||l.formData[C]===null)&&(l.formData[C]=A[C])})}},{immediate:!0});const p=CD({formData:l.formData,locale:a,errors:l.errors,fieldMap:h,activeSchema:c,isSectionVisible:m.isSectionVisible,isFieldVisible:m.isFieldVisible,isFieldRequired:m.isFieldRequired,resolveFieldLength:m.resolveFieldLength}),y=_D({formData:l.formData,activeSchema:c,isSectionVisible:m.isSectionVisible,isFieldVisible:m.isFieldVisible,getWizardTabs:m.getWizardTabs}),b=ED({state:l,props:t,emit:o,apiUrl:s,router:i,locale:a,mapping:y,validation:p,fieldMap:h,activeSchema:c,resolvedBaseUrl:d}),g=BD({formData:l.formData,validation:p,locale:a,emit:o,mapping:y}),_=async(B,A=!1)=>{const C=B.props||{},x=C.endpointReference||C.endpoint;if(x!=null&&x.apiUrl&&!(!A&&l.rawItemsCache[B.key]))try{const w=Ci(x.apiUrl,d.value),D={page:1,perPage:100};if(Array.isArray(x.keyParam)){let N=!1;if(x.keyParam.forEach(V=>{const L=m.getNormalizedData(l.formData)[V];L==null||L===""?N=!0:D[V]=L&&typeof L=="object"&&L._isLogicValue?L.id:L}),N){l.rawItemsCache[B.key]=[];return}}const k=await s(w,x.apiMethod||"GET",D),v=(k==null?void 0:k.data)||k;let S=[];Array.isArray(v)?S=v:v&&(S=[v]),l.rawItemsCache[B.key]=S}catch(w){console.error(`[prefetchFieldItems] Error fetching items for ${B.key}:`,w),l.rawItemsCache[B.key]=[]}};SD({state:l,props:t,emit:o,logic:m,mapping:y,fieldMap:h,activeSchema:c,prefetchFieldItems:_});const E=e.computed(()=>{const B={},A=c.value;return A!=null&&A.sections&&A.sections.forEach(C=>{var w,D,k;(((w=C.propsForm)==null?void 0:w.fields)||((D=C.propsTable)==null?void 0:D.fields)||((k=C.props)==null?void 0:k.fields)||[]).forEach(v=>{var S,N,V,L,O,P,R,j,T,I,X;if(v.component==="DCodeRadioCustom"){const H=((S=v.props)==null?void 0:S.name)||"default-group";B[H]||(B[H]=[]);let W=((V=(N=v.props)==null?void 0:N.endpoint)==null?void 0:V.apiUrl)||((L=v.props)==null?void 0:L.apiUrl);W=Ci(W,d.value),B[H].push({key:v.key,value:(O=v.props)==null?void 0:O.value,label:((P=v.props)==null?void 0:P.labelID)||((R=v.props)==null?void 0:R.labelEN)||v.key,model:v.model||v.key,apiUrl:W,apiMethod:((T=(j=v.props)==null?void 0:j.endpoint)==null?void 0:T.apiMethod)||((I=v.props)==null?void 0:I.apiMethod),icon:(X=v.props)==null?void 0:X.icon,name:H})}})}),B});return{t:n,locale:a,i18nLocale:r,apiUrl:s,router:i,isSubmitting:l.isSubmitting,internalSchema:l.internalSchema,activeSchema:c,resolvedBaseUrl:d,radioGroups:E,confirmDialog:l.confirmDialog,fieldMap:h,rawItemsCache:l.rawItemsCache,formData:l.formData,errors:l.errors,fieldErrors:l.fieldErrors,inlineState:l.inlineState,wizardState:l.wizardState,getSectionKey:Ca,sortedFields:Cv,prefetchFieldItems:_,...m,...y,...b,...g}}const vD={class:"flex items-center gap-2"},DD=e.defineComponent({__name:"DynamicFormSection",props:{section:{},sIdx:{}},setup(t){const o=e.computed(()=>{var k,v;switch((v=(k=t.section)==null?void 0:k.propsForm)==null?void 0:v.layoutColumns){case"FULL":return"grid-cols-1";case"HALF":return"grid-cols-1 md:grid-cols-2";case"THIRD":return"grid-cols-1 md:grid-cols-3";case"QUARTED":return"grid-cols-1 md:grid-cols-4";case"TWO-THIRD":return"grid-cols-2 md:grid-cols-3";case"THREE-QUARTER":return"grid-cols-3 md:grid-cols-4";default:return"grid-cols-1"}}),n=e.inject("dynamicFormContext",{}),r=e.computed(()=>{var v,S,N;const D=(N=(S=(v=t.section)==null?void 0:v.propsForm)==null?void 0:S.actionSection)==null?void 0:N.some(V=>s==null?void 0:s(V)),k=t.sIdx===0;return D||k}),{resolveSectionLabels:a,isActionVisible:s,handleGlobalButtonClick:i,locale:l,t:c,handleCancel:d,sortedFields:f,isFieldVisible:u,getDeepValue:h,formData:m,getSectionKey:p,isFieldRequired:y,isFieldDisabled:b,isFieldReadonly:g,getFilteredItems:_,errors:E,resolveFieldLabels:B,resolveFieldLength:A,resolvedBaseUrl:C,handleFieldUpdate:x}=n,w=D=>typeof f!="function"?[]:f(D||[]);return(D,k)=>{var v;return e.openBlock(),e.createBlock(Yo,{title:(v=e.unref(a)(t.section))==null?void 0:v.title,border:!0,padding:"",class:"overflow-hidden"},e.createSlots({default:e.withCtx(()=>{var S,N;return[e.createElementVNode("div",{class:e.normalizeClass(["p-4 grid gap-4",o.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w((N=(S=t.section)==null?void 0:S.propsForm)==null?void 0:N.fields),V=>{var L,O,P,R,j,T,I,X,H;return e.openBlock(),e.createElementBlock(e.Fragment,{key:V==null?void 0:V.key},[(L=e.unref(u))!=null&&L(V)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.value)},[e.createVNode(mn,{field:V,"model-value":(O=e.unref(m))==null?void 0:O[V.model],"form-data":e.unref(m),required:(P=e.unref(y))==null?void 0:P(V),disabled:(R=e.unref(b))==null?void 0:R(V),readonly:(j=e.unref(g))==null?void 0:j(V),options:(T=e.unref(_))==null?void 0:T(V),error:(I=e.unref(E))==null?void 0:I[V.model],"dynamic-labels":(X=e.unref(B))==null?void 0:X(V),"dynamic-length":(H=e.unref(A))==null?void 0:H(V),"base-url":e.unref(C),"onUpdate:modelValue":W=>e.unref(x)(V.model,W)},null,8,["field","model-value","form-data","required","disabled","readonly","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])],2)):e.createCommentVNode("",!0)],64)}),128))],2)]}),_:2},[r.value?{name:"actions",fn:e.withCtx(()=>{var S,N,V,L;return[e.createElementVNode("div",vD,[(V=(N=(S=t.section)==null?void 0:S.propsForm)==null?void 0:N.actionSection)!=null&&V.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.section.propsForm.actionSection,(O,P)=>{var R,j,T,I,X,H,W,Z;return e.openBlock(),e.createElementBlock(e.Fragment,{key:P},[(R=e.unref(s))!=null&&R(O)?(e.openBlock(),e.createBlock(We,{key:0,icon:O.icon||((j=O.propsActionGlobal)==null?void 0:j.icon),text:e.unref(l)==="id"?O.labelID||((T=O.propsActionGlobal)==null?void 0:T.labelID):O.labelEN||((I=O.propsActionGlobal)==null?void 0:I.labelEN),"bg-color":((H=O.bgColor||((X=O.propsActionGlobal)==null?void 0:X.bgColor))==null?void 0:H.toLowerCase())||"primary",variant:((Z=O.variant||((W=O.propsActionGlobal)==null?void 0:W.variant))==null?void 0:Z.toLowerCase())||"outline",size:"sm",onClick:oe=>{var ge;return(ge=e.unref(i))==null?void 0:ge(O)}},null,8,["icon","text","bg-color","variant","onClick"])):e.createCommentVNode("",!0)],64)}),128)):e.createCommentVNode("",!0),t.sIdx===0?(e.openBlock(),e.createBlock(We,{key:1,size:"sm",icon:"List",text:(L=e.unref(c))==null?void 0:L("common.back"),variant:"outline",onClick:k[0]||(k[0]=O=>{var P;return(P=e.unref(d))==null?void 0:P()})},null,8,["text"])):e.createCommentVNode("",!0)])]}),key:"0"}:void 0]),1032,["title"])}}}),ND=e.defineComponent({__name:"DynamicTableSection",props:{section:{},dummyMode:{type:Boolean}},setup(t){const o=e.inject("dynamicFormContext"),{tableRows:n,isTemporaryTable:r,handleDataTableAction:a,resolvedBaseUrl:s}=o;return(i,l)=>(e.openBlock(),e.createBlock(Yo,{border:!0,padding:"",class:"overflow-hidden"},{default:e.withCtx(()=>[e.createVNode(xn,{"table-config":t.section.propsTable,data:e.unref(n)(t.section.propsTable),nested:!0,"show-pagination":t.section.propsTable.pagination??!0,"has-actions":e.unref(r)(t.section.propsTable),"base-url":e.unref(s),"dummy-mode":t.dummyMode,onAction:l[0]||(l[0]=c=>e.unref(a)(t.section.propsTable,c))},null,8,["table-config","data","show-pagination","has-actions","base-url","dummy-mode"])]),_:1}))}}),VD={class:"w-full"},MD={class:"space-y-6 mt-4"},TD={key:2,class:"p-4 border border-dashed border-neutral-300 rounded-lg text-xs text-neutral-400"},PD=e.defineComponent({__name:"DynamicWizardSection",props:{section:{},dummyMode:{type:Boolean}},setup(t){const o=e.inject("dynamicFormContext"),{getWizardTabs:n,wizardState:r,getSectionKey:a,isSubmitting:s,isSectionVisible:i,sortedFields:l,isFieldVisible:c,formData:d,isFieldRequired:f,isFieldDisabled:u,getFilteredItems:h,errors:m,resolveFieldLabels:p,resolveFieldLength:y,resolvedBaseUrl:b,handleFieldUpdate:g,tableRows:_,handleDataTableAction:E,resolveSectionGridClass:B,resolveFieldColumnClass:A}=o;return(C,x)=>{var w;return e.openBlock(),e.createElementBlock("div",VD,[e.createVNode(di,{tabs:e.unref(n)(t.section),modelValue:e.unref(r)[e.unref(a)(t.section)],"onUpdate:modelValue":x[0]||(x[0]=D=>e.unref(r)[e.unref(a)(t.section)]=D),"is-vertical":t.section.propsWizard.isVertical,"is-wizard":t.section.propsWizard.isWizard,"type-wizard":((w=t.section.propsWizard.typeWizard)==null?void 0:w.toLowerCase())||"icon",loading:e.unref(s)},e.createSlots({_:2},[e.renderList(e.unref(n)(t.section),D=>({name:`tab-${D.key}`,fn:e.withCtx(()=>[e.createElementVNode("div",MD,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.sections,(k,v)=>{var S,N;return e.openBlock(),e.createElementBlock(e.Fragment,{key:v},[e.unref(i)(k)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[((S=k.type)==null?void 0:S.toUpperCase())==="FORM"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["grid gap-4",e.unref(B)(k.layoutColumns)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)(k.fields),V=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:V.key},[e.unref(c)(V)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(A)(V,k.layoutColumns))},[e.createVNode(mn,{field:V,"model-value":e.unref(d)[V.model],"form-data":e.unref(d),required:e.unref(f)(V),disabled:e.unref(u)(V),options:e.unref(h)(V),error:e.unref(m)[V.model],"dynamic-labels":e.unref(p)(V),"dynamic-length":e.unref(y)(V),"base-url":e.unref(b),"onUpdate:modelValue":L=>e.unref(g)(V.model,L)},null,8,["field","model-value","form-data","required","disabled","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])],2)):e.createCommentVNode("",!0)],64))),128))],2)):((N=k.type)==null?void 0:N.toUpperCase())==="TABLE"||k.isDataTable?(e.openBlock(),e.createBlock(Yo,{key:1,border:!0,padding:"",class:"overflow-hidden"},{default:e.withCtx(()=>{var V;return[e.createVNode(xn,{"dummy-mode":t.dummyMode,"table-config":k.propsDataTableWizard||k.propsTable,data:e.unref(_)(k.propsDataTableWizard||k.propsTable),nested:!0,"show-pagination":((V=k.propsDataTableWizard||k.propsTable)==null?void 0:V.pagination)??!0,onAction:L=>e.unref(E)(k.propsDataTableWizard||k.propsTable,L)},null,8,["dummy-mode","table-config","data","show-pagination","onAction"])]}),_:2},1024)):(e.openBlock(),e.createElementBlock("div",TD," Unknown section type: "+e.toDisplayString(k.type),1))],64)):e.createCommentVNode("",!0)],64)}),128))])])}))]),1032,["tabs","modelValue","is-vertical","is-wizard","type-wizard","loading"])])}}}),OD={class:"py-2 text-sm text-neutral-600 dark:text-neutral-400"},LD={key:0,class:"grid grid-cols-1 md:grid-cols-2 gap-4 py-2"},RD={class:"py-2 text-sm text-neutral-600 dark:text-neutral-400"},ID=e.defineComponent({__name:"DynamicFormDialogs",setup(t){const o=e.inject("dynamicFormContext"),{confirmDialog:n,t:r,confirmAction:a,tableDialogOpen:s,tableDialogTitle:i,tableDialogIcon:l,tableDialogFields:c,isFieldVisible:d,tableRowFormData:f,tableDialogViewOnly:u,isFieldRequired:h,isFieldDisabled:m,getFilteredItems:p,tableRowErrors:y,resolveFieldLabels:b,resolveFieldLength:g,resolvedBaseUrl:_,handleTableRowUpdate:E,locale:B,saveTableRow:A,confirmDeleteOpen:C,executeTableDelete:x}=o;return(w,D)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(io,{modelValue:e.unref(n).visible,"onUpdate:modelValue":D[1]||(D[1]=k=>e.unref(n).visible=k),title:e.unref(n).title,icon:"AlertTriangle","max-width":450},{actions:e.withCtx(()=>[e.createVNode(We,{variant:"outline",text:e.unref(r)("common.cancel"),onClick:D[0]||(D[0]=k=>e.unref(n).visible=!1)},null,8,["text"]),e.createVNode(We,{text:e.unref(r)("common.confirm"),onClick:e.unref(a)},null,8,["text","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",OD,e.toDisplayString(e.unref(n).message),1)]),_:1},8,["modelValue","title"]),e.createVNode(io,{modelValue:e.unref(s),"onUpdate:modelValue":D[3]||(D[3]=k=>e.isRef(s)?s.value=k:null),title:e.unref(i),icon:e.unref(l),"max-width":700},{actions:e.withCtx(()=>[e.createVNode(We,{variant:"outline",text:e.unref(u)?e.unref(B)==="id"?"Tutup":"Close":e.unref(B)==="id"?"Batal":"Cancel",onClick:D[2]||(D[2]=k=>s.value=!1)},null,8,["text"]),e.unref(u)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(We,{key:0,text:"Save",onClick:e.unref(A)},null,8,["onClick"]))]),default:e.withCtx(()=>[e.unref(c).length?(e.openBlock(),e.createElementBlock("div",LD,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),k=>(e.openBlock(),e.createElementBlock("div",{key:k.key,class:e.normalizeClass(k.column==="FULL"?"md:col-span-2":"col-span-1")},[e.unref(d)(k,e.unref(f))?(e.openBlock(),e.createBlock(mn,{key:0,field:k,"model-value":e.unref(f)[k.model],"form-data":e.unref(f),required:e.unref(u)?!1:e.unref(h)(k,e.unref(f)),disabled:e.unref(u)||e.unref(m)(k,e.unref(f)),"view-only":e.unref(u),options:e.unref(p)(k,e.unref(f)),error:e.unref(u)?void 0:e.unref(y)[k.model],"dynamic-labels":e.unref(b)(k,e.unref(f)),"dynamic-length":e.unref(g)(k,e.unref(f)),"base-url":e.unref(_),"onUpdate:modelValue":v=>e.unref(E)(k.model,v)},null,8,["field","model-value","form-data","required","disabled","view-only","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])):e.createCommentVNode("",!0)],2))),128))])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title","icon"]),e.createVNode(io,{modelValue:e.unref(C),"onUpdate:modelValue":D[5]||(D[5]=k=>e.isRef(C)?C.value=k:null),title:e.unref(B)==="id"?"Konfirmasi Hapus":"Confirm Delete",icon:"Trash2","max-width":440},{actions:e.withCtx(()=>[e.createVNode(We,{variant:"outline",text:e.unref(B)==="id"?"Batal":"Cancel",onClick:D[4]||(D[4]=k=>C.value=!1)},null,8,["text"]),e.createVNode(We,{variant:"default","bg-color":"danger",icon:"Trash2",text:e.unref(B)==="id"?"Hapus":"Delete",onClick:e.unref(x)},null,8,["text","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",RD,e.toDisplayString(e.unref(B)==="id"?"Apakah Anda yakin ingin menghapus data ini? Tindakan ini tidak dapat dibatalkan.":"Are you sure you want to delete this row? This action cannot be undone."),1)]),_:1},8,["modelValue","title"])]))}}),FD={class:"w-full space-y-6"},Ei=e.defineComponent({__name:"DynamicForm",props:{schema:{},model:{default:()=>({})},isEditMode:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},baseUrl:{default:void 0},selectedTokenCore:{default:null},dummyMode:{type:Boolean,default:!1},router:{default:null}},emits:["submit","cancel","action","update:model","success","error"],setup(t,{emit:o}){const n=t,a=AD(n,o);e.provide("dynamicFormContext",a);const{activeSchema:s,isSectionVisible:i,inlineState:l,isActionVisible:c,locale:d,isSubmitting:f,isSubmitDisabled:u,handleGlobalButtonClick:h,handleSubmit:m}=a;return(p,y)=>{var b,g,_,E,B,A;return e.openBlock(),e.createElementBlock("div",FD,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((b=e.unref(s))==null?void 0:b.sections,(C,x)=>{var w,D,k;return e.openBlock(),e.createElementBlock(e.Fragment,{key:x},[((w=C.type)==null?void 0:w.toUpperCase())==="FORM"&&C.propsForm&&e.unref(i)(C)?(e.openBlock(),e.createBlock(DD,{key:0,"dummy-mode":n.dummyMode,section:C,sIdx:Number(x)},null,8,["dummy-mode","section","sIdx"])):((D=C.type)==null?void 0:D.toUpperCase())==="TABLE"&&C.propsTable&&e.unref(i)(C)?(e.openBlock(),e.createBlock(ND,{key:1,"dummy-mode":n.dummyMode,section:C},null,8,["dummy-mode","section"])):((k=C.type)==null?void 0:k.toUpperCase())==="WIZARD"&&C.propsWizard&&e.unref(i)(C)?(e.openBlock(),e.createBlock(PD,{key:2,"dummy-mode":n.dummyMode,section:C},null,8,["dummy-mode","section"])):e.createCommentVNode("",!0)],64)}),128)),(g=e.unref(l))!=null&&g.global?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(((E=(_=e.unref(s))==null?void 0:_.ui)==null?void 0:E.actionsClass)||"flex items-center gap-2 flex-wrap pt-4 border-t border-neutral-100 dark:border-neutral-800")},[(A=(B=e.unref(s))==null?void 0:B.actionGlobal)!=null&&A.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(s).actionGlobal,(C,x)=>{var w,D,k;return e.openBlock(),e.createElementBlock(e.Fragment,{key:x},[C.propsActionGlobal&&e.unref(c)(C)?(e.openBlock(),e.createBlock(We,{key:0,icon:C.propsActionGlobal.icon,text:e.unref(d)==="id"?C.propsActionGlobal.labelID:C.propsActionGlobal.labelEN,"bg-color":((w=C.propsActionGlobal.bgColor)==null?void 0:w.toLowerCase())||"primary",variant:((D=C.propsActionGlobal.variant)==null?void 0:D.toLowerCase())||"default",loading:e.unref(f),disabled:e.unref(u)&&(C.permission==="CREATE"||C.permission==="UPDATE"||((k=C.propsActionGlobal)==null?void 0:k.key)==="submit"),onClick:v=>e.unref(h)(C)},null,8,["icon","text","bg-color","variant","loading","disabled","onClick"])):e.createCommentVNode("",!0)],64)}),128)):e.createCommentVNode("",!0)],2)),e.createVNode(ID)])}}}),zD={"aria-label":"Breadcrumb"},$D={class:"flex flex-wrap items-center text-sm md:text-base"},jD={class:"truncate max-w-[100px] sm:max-w-[150px] md:max-w-none"},au=e.defineComponent({__name:"Breadcrumb",props:{items:{},showHomeIcon:{type:Boolean,default:!0},iconSize:{default:18},separatorSize:{default:16},separatorType:{default:"chevron"},strokeWidth:{default:2}},setup(t){const o=t,n=ne.Home,r=o.separatorType==="slash"?ne.Slash:ne.ChevronRight;return(a,s)=>(e.openBlock(),e.createElementBlock("nav",zD,[e.createElementVNode("ol",$D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(i,l)=>(e.openBlock(),e.createElementBlock("li",{key:l,class:"flex items-center"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.to?"router-link":"span"),{to:i.to,class:e.normalizeClass(["inline-flex items-center gap-1.5 transition-all duration-200 rounded-lg font-medium",i.to?"text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 hover:bg-primary-50 dark:hover:bg-primary-900/20 cursor-pointer":"dark:text-gray-100 bg-primary-50 dark:bg-primary-900/30 text-primary-700"])},{default:e.withCtx(()=>[i.icon||l===0&&t.showHomeIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.icon||e.unref(n)),{key:0,size:t.iconSize,class:e.normalizeClass(["flex-shrink-0",i.to?"text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-400":"text-primary-600 dark:text-primary-400",i.iconClass||""]),"stroke-width":t.strokeWidth},null,8,["size","class","stroke-width"])):e.createCommentVNode("",!0),e.createElementVNode("span",jD,e.toDisplayString(i.label),1)]),_:2},1032,["to","class"])),l<t.items.length-1?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r)),{key:0,size:t.separatorSize,class:"mx-1.5 text-gray-300 dark:text-gray-700 flex-shrink-0"},null,8,["size"])):e.createCommentVNode("",!0)]))),128))])]))}});function su(){return{setPageTitle:n=>{typeof document<"u"&&(document.title=n||document.title),typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:page-title",{detail:{title:n},bubbles:!0,composed:!0}))},setBreadcrumb:n=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:breadcrumb",{detail:{items:n},bubbles:!0,composed:!0}))}}}const UD={class:"w-full space-y-6 animate-pulse"},WD={class:"p-4 grid grid-cols-1 md:grid-cols-2 gap-4"},HD=e.defineComponent({__name:"AutoLayoutSkeleton",setup(t){return(o,n)=>(e.openBlock(),e.createElementBlock("div",UD,[n[2]||(n[2]=e.createElementVNode("div",{class:"h-6 w-48 bg-neutral-200 dark:bg-neutral-700 rounded-md"},null,-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(2,r=>e.createElementVNode("div",{key:r,class:"rounded-xl border border-neutral-200 dark:border-neutral-700 overflow-hidden"},[n[1]||(n[1]=e.createElementVNode("div",{class:"px-4 py-3 bg-neutral-200 dark:bg-neutral-700"},[e.createElementVNode("div",{class:"h-4 w-32 bg-neutral-300 dark:bg-neutral-600 rounded"})],-1)),e.createElementVNode("div",WD,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(6,a=>e.createElementVNode("div",{key:a,class:e.normalizeClass(a>4?"md:col-span-2":"col-span-1")},[...n[0]||(n[0]=[e.createElementVNode("div",{class:"h-3 w-24 bg-neutral-200 dark:bg-neutral-700 rounded mb-2"},null,-1),e.createElementVNode("div",{class:"h-10 w-full bg-neutral-200 dark:bg-neutral-700 rounded-lg"},null,-1)])],2)),64))])])),64)),n[3]||(n[3]=e.createElementVNode("div",{class:"flex items-center gap-2"},[e.createElementVNode("div",{class:"h-9 w-24 bg-neutral-300 dark:bg-neutral-600 rounded-lg"}),e.createElementVNode("div",{class:"h-9 w-20 bg-neutral-200 dark:bg-neutral-700 rounded-lg"})],-1))]))}}),qD={class:"w-full"},GD={class:"relative mx-auto min-h-[37.5rem]"},KD={key:"content",class:"w-full"},XD={class:"mb-6"},YD={class:"text-neutral-500 dark:text-neutral-400"},JD={key:"skeleton",class:"w-full"},QD={key:"error",class:"flex items-center justify-center p-20 text-red-500 w-full"},Bi=dt(e.defineComponent({name:"AutoLayoutForm",__name:"AutoLayoutForm",props:{layoutCode:{},isEditMode:{type:Boolean},model:{},selectedTokenCore:{},router:{}},emits:["submit-success","cancel","action-success","update:model"],setup(t,{emit:o}){var S,N,V,L,O,P,R,j;const n=t,r=o,a=(N=(S=e.getCurrentInstance())==null?void 0:S.appContext)==null?void 0:N.app;a&&!a._context.provides[Symbol.for("vue-router-route-location")]&&a.provide(Symbol.for("vue-router-route-location"),{query:{},params:{},path:""});let s={query:{},params:{},path:""};try{const T=_o.useRoute();if(T&&Object.keys(T).length>0)s=T;else{const I=e.getCurrentInstance();(O=(L=(V=I==null?void 0:I.appContext)==null?void 0:V.config)==null?void 0:L.globalProperties)!=null&&O.$route&&(s=I.appContext.config.globalProperties.$route)}}catch{console.warn("useRoute not available, using fallback")}let i={back:()=>{typeof window<"u"&&window.history&&window.history.length>1&&window.history.back()},push:T=>{typeof window<"u"&&(typeof T=="string"?window.location.href=T:T&&T.path&&(window.location.href=T.path))},__isFallback:!0};try{const T=n.router||_o.useRouter();if(T)i=T;else{const I=e.getCurrentInstance();(j=(R=(P=I==null?void 0:I.appContext)==null?void 0:P.config)==null?void 0:R.globalProperties)!=null&&j.$router&&(i=I.appContext.config.globalProperties.$router)}}catch{console.warn("useRouter not available, using fallback")}const{apiUrl:l,DCodeApi:c}=Ye();let d;try{d=_t.useI18n().locale}catch{d=e.ref("en")}const{setPageTitle:f}=su(),u=e.computed(()=>n.isEditMode!==void 0?n.isEditMode:s.params&&"id"in s.params?!0:s.path?/\/edit\/[^\/]+$/.test(s.path):!1);e.watchEffect(()=>{console.log("isEditModeisEditMode",u.value)});const h=e.computed(()=>{if(s.params&&"id"in s.params)return s.params.id;if(!s.path)return null;const T=s.path.match(/\/edit\/([^\/]+)$/);return T?T[1]:null}),m=e.ref({}),p=e.ref(null),y=e.ref(!0),b=e.ref(!1),g="https://dcodedynamic.skyworx.co.id/api/auto-layout/form/form-dynamic?code=",_="https://dcodedynamic.skyworx.co.id/api/auto-layout/datatable/form-dynamic?code=",E=e.ref(n.layoutCode),B=e.computed(()=>{var X;if(!p.value)return"";const T=((X=d==null?void 0:d.value)==null?void 0:X.toLowerCase())||"en";return(T==="en"||T.startsWith("en-")?p.value.titleEN:p.value.titleID)||p.value.title||n.layoutCode});e.watch(B,T=>{T&&f(T)},{immediate:!0});const A=(T,I="")=>{const X={};return!T||typeof T!="object"||Object.keys(T).forEach(H=>{const W=T[H],Z=I?`${I}.${H}`:H;W&&typeof W=="object"&&!Array.isArray(W)&&!(W instanceof Date)&&Object.assign(X,A(W,Z)),X[Z]=W}),X},C=T=>{var W;if(!T||typeof T!="string"||T.startsWith("http"))return T;const I=(W=n.selectedTokenCore)==null?void 0:W.address;if(!I)return T;const X=I.replace(/\/$/,""),H=T.startsWith("/")?T:`/${T}`;return`${X}${H}`},x=async()=>{var T,I,X,H,W,Z;y.value=!0;try{let oe=n.layoutCode;s&&s.query&&typeof s.query=="object"&&"code"in s.query&&(oe=s.query.code||n.layoutCode);const ge="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJDQkFTIiwiaWF0IjoxNzcyNDU5MzQ0LCJkYXRlIjoiMDIwMzIwMjYiLCJjb2RlIjoidGVzdGVyIiwidXJsRm9ybSI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvZm9ybSIsInVybEFjdGlvbiI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvYWN0aW9uIiwidXJsRGF0YXRhYmxlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9kYXRhdGFibGUiLCJ1cmxQYXRoIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9wYXRoIiwidXJsUmVmZXJhbmNlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9yZWZlcmVuY2UifQ.JGIUTL0GEAp34zanY6dqLKg7jOLHwKzataY271JStsE",Ne=ge?{Authorization:`Bearer ${ge}`}:{},we=C(`${g}${oe}`);let Q=await l(we,"GET",null,Ne);if(!Q.status||!Q.data||Array.isArray(Q.data)&&Q.data.length===0)try{const $=C(`${_}${oe}`),Y=await l($,"GET",null,Ne);if(Y.status){const ae=Array.isArray(Y.data)?Y.data[0]:Y.data;ae&&ae.code&&(oe=ae.code,E.value=oe,Q=await l(C(`${g}${oe}`),"GET",null,Ne))}}catch($){console.warn("Failed to resolve layout code via datatable",$)}if(Q.status){p.value=Array.isArray(Q.data)?Q.data[0]:Q.data;const $={};if((T=p.value)!=null&&T.sections&&p.value.sections.forEach(Y=>{((Y.propsForm||Y.props||{}).fields||Y.fields||[]).forEach(Pe=>{var Ue;const Ee=Pe.model||((Ue=Pe.props)==null?void 0:Ue.model)||Pe.key;Ee&&($[Ee]=null)})}),m.value=$,y.value=!1,u.value&&h.value){b.value=!0;try{const Y=(H=(X=(I=p.value.sections)==null?void 0:I[0])==null?void 0:X.propsForm)==null?void 0:H.endpointForm,ae=p.value.endpointForm,ye=Y||ae;if(ye!=null&&ye.apiUrl){const Pe=ye.apiUrl,Ee=ye.apiMethod||"GET",Ue=ye.keyParam||[],Ie={};Ue.length>0?Ue.forEach(Oe=>{Ie[Oe]=h.value}):Ie.id=h.value;const se=await c(C(Pe),Ee,Ie);if(console.log(`[AutoLayoutForm] API Result for ${Pe}:`,se),se.status){let Oe=Array.isArray(se.data)?se.data[0]:se.data;se.payload&&(Oe={...Oe,...se.payload}),console.log("[AutoLayoutForm] Successfully fetched record:",Oe);const Le=A(Oe);m.value={...m.value,...Oe,...Le},console.log("[AutoLayoutForm] Updated initialData:",m.value)}else console.warn("[AutoLayoutForm] Record API returned status: false",se)}else if((W=p.value.endpointGlobal)!=null&&W.apiUrl){const Pe=p.value.endpointGlobal.apiUrl,Ee=p.value.endpointGlobal.apiMethod||"GET",Ue={id:h.value},Ie=await c(C(Pe),Ee,Ue);if(Ie.status){const se=Array.isArray(Ie.data)?Ie.data[0]:Ie.data,Oe=A(se);m.value={...m.value,...se,...Oe}}}else{const Pe=((Z=p.value.endpoint)==null?void 0:Z.detailUrl)||`/api/${E.value}/detail/${h.value}`,Ee=await l(C(Pe),"GET");if(Ee.status){let Ue=Array.isArray(Ee.data)?Ee.data[0]:Ee.data;if(Ee.payload){const Oe={...Ee.payload};if(Object.keys(Oe).forEach(Le=>{Ue[Le]!==void 0&&Ue[Le]!==null&&(Oe[Le]=Ue[Le])}),!("id"in Oe)&&Ue.id){const Le=Object.keys(Oe).find(ve=>ve.startsWith("id")&&ve.length>2&&!Oe[ve]);Le&&(Oe[Le]=Ue.id)}Ue=Oe}const Ie={...Ue};Object.keys(m.value).forEach(Oe=>{if(Ie[Oe]===void 0||Ie[Oe]===null){if(Oe.toLowerCase().startsWith("id")&&Oe.length>2){const ve=Oe.substring(2).toLowerCase(),lt=Array.isArray(Ee.data)?Ee.data[0]:Ee.data,q=Object.keys(lt).find(ie=>ie.toLowerCase()===ve);q&<[q]&&typeof lt[q]=="object"&&"id"in lt[q]&&(Ie[Oe]=lt[q].id)}if(Oe==="idSupervisor"){const ve=Array.isArray(Ee.data)?Ee.data[0]:Ee.data;ve.supervisorId&&(Ie[Oe]=ve.supervisorId)}}});const se=A(Ie);m.value={...m.value,...Ie,...se}}}}catch(Y){console.error("Failed to fetch record data:",Y)}finally{b.value=!1}}}}catch(oe){console.error("Failed to load form layout:",oe),y.value=!1}},w=T=>{const I=Object.keys(m.value||{}).filter(H=>m.value[H]!==null&&m.value[H]!==void 0),X=Object.keys(T||{}).filter(H=>T[H]!==null&&T[H]!==void 0);if(I.length>3&&X.length<I.length/2){console.warn('[AutoLayoutForm] Circuit breaker triggered: Ignoring likely erroneous "empty" update from child.',{currentCount:I.length,incomingCount:X.length,data:T});return}console.log("[AutoLayoutForm] Allowing model update:",T),m.value=T,r("update:model",T)},D=async T=>{var I,X,H;try{const W=(H=(X=(I=p.value.sections)==null?void 0:I[0])==null?void 0:X.propsForm)==null?void 0:H.endpointForm,Z=p.value.endpointGlobal||p.value.endpoint,oe=(W==null?void 0:W.submitUrl)||(Z==null?void 0:Z.submitUrl)||`/api/generic/${n.layoutCode}`,ge=(W==null?void 0:W.submitMethod)||(Z==null?void 0:Z.submitMethod)||(u.value?"PUT":"POST"),Ne=Object.values(T).some(Q=>Q instanceof File||Q instanceof Blob);let we;Ne?(we=new FormData,Object.keys(T).forEach(Q=>{const $=T[Q];$!=null&&(Array.isArray($)?$.forEach(Y=>we.append(`${Q}[]`,Y)):we.append(Q,$))})):(we={...T},u.value&&h.value&&!we.id&&(we.id=h.value)),await l(C(oe),ge,we),r("submit-success",we),i.back()}catch(W){console.error("Submit failed:",W)}},k=async(T,I,X)=>{if(T==="cancel"){v();return}const H=I.endpointPropAction||I.propsActionGlobal&&I.propsActionGlobal.endpointPropAction;if(H)try{y.value=!0;const W=X?{...X}:{...m.value};u.value&&I.model&&h.value&&(W[I.model]=h.value);const Z=H.apiUrl,oe=H.apiMethod||"POST";(await c(C(Z),oe,W)).status&&(r("action-success",T,I,W),i.back())}catch(W){console.error("Action failed:",W)}finally{y.value=!1}},v=()=>{r("cancel"),i.back()};return e.onMounted(()=>{x()}),e.watch(()=>n.model,T=>{T&&Object.keys(T).length>0&&(m.value={...m.value,...T})},{immediate:!0,deep:!0}),e.onUnmounted(()=>{f("")}),(T,I)=>(e.openBlock(),e.createElementBlock("div",qD,[e.createElementVNode("div",GD,[e.createVNode(e.Transition,{name:"fade",mode:"out-in"},{default:e.withCtx(()=>[!y.value&&p.value?(e.openBlock(),e.createElementBlock("div",KD,[e.createElementVNode("div",XD,[e.createElementVNode("p",YD,e.toDisplayString(p.value.description),1)]),e.createVNode(Ei,{schema:p.value,model:m.value,"is-edit-mode":u.value,loading:b.value,"selected-token-core":n.selectedTokenCore,router:e.unref(i),"onUpdate:model":I[0]||(I[0]=X=>w(X)),onSubmit:D,onCancel:v,onAction:k,class:"w-full"},null,8,["schema","model","is-edit-mode","loading","selected-token-core","router"])])):y.value?(e.openBlock(),e.createElementBlock("div",JD,[e.createVNode(HD)])):(e.openBlock(),e.createElementBlock("div",QD," Failed to load form configuration for "+e.toDisplayString(n.layoutCode),1))]),_:1})])]))}}),[["__scopeId","data-v-fa0a05fb"]]),ZD={class:"h-full flex flex-col"},eN={key:1,class:"flex-1 flex items-center justify-center"},tN={key:2,class:"flex-1 flex items-center justify-center text-red-500"},Si=e.defineComponent({name:"AutoLayoutDatatable",__name:"AutoLayoutDatatable",props:{layoutCode:{},userPermissions:{},permissionBase:{},checkPermission:{type:Function}},emits:["action","navigate"],setup(t,{emit:o}){var A,C,x,w,D,k;const n=t,r=o,a=e.getCurrentInstance(),{apiUrl:s}=Ye();let i={query:{},params:{},path:""};try{const v=_o.useRoute();v?i=v:(x=(C=(A=a==null?void 0:a.appContext)==null?void 0:A.config)==null?void 0:C.globalProperties)!=null&&x.$route&&(i=a.appContext.config.globalProperties.$route)}catch{console.warn("useRoute not available, using fallback")}let l={back:()=>{typeof window<"u"&&window.history&&window.history.length>1&&window.history.back()},push:v=>{typeof window<"u"&&(typeof v=="string"?window.location.href=v:v&&v.path&&(window.location.href=v.path))}};try{const v=_o.useRouter();v?l=v:(k=(D=(w=a==null?void 0:a.appContext)==null?void 0:w.config)==null?void 0:D.globalProperties)!=null&&k.$router&&(l=a.appContext.config.globalProperties.$router)}catch{console.warn("useRouter not available, using fallback")}const c=e.inject("hasActionAccess",()=>!1),d=e.inject("userPermissions",null),f=e.ref(null),u=e.ref(!0),h=e.ref(null),m="https://dcodedynamic.skyworx.co.id/api/auto-layout/datatable/form-dynamic?code=",p=e.computed(()=>`${m}${n.layoutCode}`),{setPageTitle:y}=su();let b;try{b=_t.useI18n().locale}catch{b=e.ref("en")}const g=()=>{if(f.value){const S=(b.value==="id"?f.value.titleID:f.value.titleEN)||f.value.title||"Datatable";y(S)}};e.watch(b,()=>{g()});const _=async()=>{u.value=!0;try{const v="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJDQkFTIiwiaWF0IjoxNzcyNDU5MzQ0LCJkYXRlIjoiMDIwMzIwMjYiLCJjb2RlIjoidGVzdGVyIiwidXJsRm9ybSI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvZm9ybSIsInVybEFjdGlvbiI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvYWN0aW9uIiwidXJsRGF0YXRhYmxlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9kYXRhdGFibGUiLCJ1cmxQYXRoIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9wYXRoIiwidXJsUmVmZXJhbmNlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9yZWZlcmVuY2UifQ.JGIUTL0GEAp34zanY6dqLKg7jOLHwKzataY271JStsE",S=v?{Authorization:`Bearer ${v}`}:{},N=await s(p.value,"GET",null,S);N.status&&(f.value=Array.isArray(N.data)?N.data[0]:N.data,console.log("[DEBUG] AutoLayoutDatatable config loaded:",f.value),g())}catch(v){console.error("Gagal Menampilkan Datatable:",v)}finally{u.value=!1}},E=v=>{v.action==="add"&&console.log("[AutoLayoutDatatable] Add action triggered"),console.log("Aksi:",v.action,v)},B=v=>{console.log("[DEBUG] AutoLayoutDatatable handleNavigate:",v);let S=v.route;const N=v.path;if(!S&&N){const L=((i==null?void 0:i.path)||"").split("/");L.length>=2&&(S=`/${L[1]}/create`)}if(S||N){const V={...v.query||{},code:N||void 0};Object.keys(V).forEach(L=>V[L]===void 0&&delete V[L]),console.log("[DEBUG] Emitting navigate to parent:",{route:S,query:V}),r("navigate",{route:S||"/form",query:V}),l&&!l.__isFallback&&l.push({path:S||"/form",query:V})}else console.warn("[DEBUG] No route or path provided for navigation")};return e.onMounted(()=>{_()}),(v,S)=>(e.openBlock(),e.createElementBlock("div",ZD,[!u.value&&f.value?(e.openBlock(),e.createBlock(xn,{key:0,ref_key:"dtRef",ref:h,"api-url":p.value,"api-method":"GET","table-config":f.value,"permission-base":n.permissionBase||"","dummy-mode":["datatable-create","datatable-edit"].includes(n.layoutCode),"user-permissions":n.userPermissions||e.unref(d),"permission-checker":e.unref(c),checkPermission:n.checkPermission,onAction:E,onNavigate:B},{"header-actions":e.withCtx(()=>[...S[0]||(S[0]=[])]),_:1},8,["api-url","table-config","permission-base","dummy-mode","user-permissions","permission-checker","checkPermission"])):u.value?(e.openBlock(),e.createElementBlock("div",eN,[...S[1]||(S[1]=[e.createElementVNode("i",{class:"mdi mdi-loading mdi-spin text-4xl text-primary-600"},null,-1)])])):(e.openBlock(),e.createElementBlock("div",tN," Failed to load configuration for "+e.toDisplayString(n.layoutCode),1))]))}}),iu=e.defineCustomElement(Bi),lu=e.defineCustomElement(Si);typeof customElements<"u"&&(customElements.get("micro-dynamic-form")||customElements.define("micro-dynamic-form",iu),customElements.get("micro-dynamic-datatable")||customElements.define("micro-dynamic-datatable",lu));const oN=[fr,sl,We,Yo,ss,is,Vf,so,Xs,Ys,ra,io,Of,aa,Lf,ni,Js,Rf,ai,sa,si,Uo,ii,ia,If,Ff,li,ci,la,ca,tn,un,Uf,Wf,di,fi,ui,wi,hn,hi,xn,Bi,Si,Ei,au,mn],cu={install(t,o={}){o&&Object.keys(o).length>0&&Ii(o),oN.forEach(n=>{n.name&&t.component(n.name,n)})}};de.AutoLayoutDatatable=Si,de.AutoLayoutForm=Bi,de.Breadcrumb=au,de.DCodeAutoComplete=fr,de.DCodeBadge=wi,de.DCodeBeforeAfter=ss,de.DCodeButton=We,de.DCodeCard=Yo,de.DCodeCardCheckboxList=Xs,de.DCodeChart=Vf,de.DCodeCheckbox=so,de.DCodeCurrencyField=Ys,de.DCodeDatePicker=ra,de.DCodeDialog=io,de.DCodeDialogCloseBtn=Of,de.DCodeDropzone=aa,de.DCodeDynamicUploadList=Js,de.DCodeFileField=Lf,de.DCodeFileResult=ni,de.DCodeIconDropdown=Rf,de.DCodeImageCropperDialog=ai,de.DCodeImageField=sa,de.DCodeImageResult=si,de.DCodeInfiniteAutoComplete=sl,de.DCodeLabel=Uo,de.DCodeListLabels=is,de.DCodeMultiSelect=ii,de.DCodeOtpInput=ia,de.DCodePermissionMenu=fi,de.DCodeProgress=If,de.DCodeProgressBar=Ff,de.DCodeRadio=li,de.DCodeRadioCustom=ci,de.DCodeSlider=la,de.DCodeStaticImage=hi,de.DCodeStaticLabel=hn,de.DCodeSwitch=ca,de.DCodeTextField=tn,de.DCodeTextarea=un,de.DCodeTimelineWithIcons=Uf,de.DCodeTreePermissions=ui,de.DCodeUploadFile=Wf,de.DCodeWizard=di,de.DataTable=xn,de.DataTableComponent=xn,de.DynamicForm=Ei,de.DynamicFormField=mn,de.DynamicUI=cu,de.MicroDynamicDatatable=lu,de.MicroDynamicForm=iu,de.cn=Me,de.default=cu,de.setApiConfig=Ii,Object.defineProperties(de,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|