diff --git a/src/new/assets/images/changelog/screen1.png b/src/new/assets/images/changelog/screen1.png
new file mode 100644
index 000000000..6347021c4
Binary files /dev/null and b/src/new/assets/images/changelog/screen1.png differ
diff --git a/src/new/assets/images/changelog/screen2.png b/src/new/assets/images/changelog/screen2.png
new file mode 100644
index 000000000..cdbaea98f
Binary files /dev/null and b/src/new/assets/images/changelog/screen2.png differ
diff --git a/src/new/config/bundles.php b/src/new/config/bundles.php
index 85f9e742e..b14f73add 100755
--- a/src/new/config/bundles.php
+++ b/src/new/config/bundles.php
@@ -27,6 +27,7 @@ return [
PSC\Backend\DashboardBundle\PSCBackendDashboardBundle::class => ['all' => true],
PSC\Shop\SettingsBundle\PSCShopSettingsBundle::class => ['all' => true],
PSC\System\SettingsBundle\PSCSystemSettingsBundle::class => ['all' => true],
+ PSC\System\ContentEngineBundle\PSCSystemContentEngineBundle::class => ['all' => true],
PSC\Backend\ToolsBundle\PSCBackendToolsBundle::class => ['all' => true],
PSC\Shop\OrderBundle\PSCShopOrderBundle::class => ['all' => true],
PSC\Shop\ContactBundle\PSCShopContactBundle::class => ['all' => true],
diff --git a/src/new/config/routes.php b/src/new/config/routes.php
index 476bb621b..071c47ef4 100755
--- a/src/new/config/routes.php
+++ b/src/new/config/routes.php
@@ -49,6 +49,8 @@ return static function (RoutingConfigurator $routingConfigurator): void {
$routingConfigurator->import('@PSCSystemSettingsBundle/Resources/config/routing.yml');
+ $routingConfigurator->import('@PSCSystemContentEngineBundle/Resources/config/routing.yml');
+
$routingConfigurator->import('@PSCSystemUpdateBundle/Resources/config/routing.yml');
$routingConfigurator->import('@PSCShopPaymentBundle/Resources/config/routing.yml');
diff --git a/src/new/src/PSC/Shop/SettingsBundle/Resources/views/backend/settings/index.html.twig b/src/new/src/PSC/Shop/SettingsBundle/Resources/views/backend/settings/index.html.twig
index b193a0a2c..3ec8cb032 100755
--- a/src/new/src/PSC/Shop/SettingsBundle/Resources/views/backend/settings/index.html.twig
+++ b/src/new/src/PSC/Shop/SettingsBundle/Resources/views/backend/settings/index.html.twig
@@ -2603,9 +2603,11 @@
v&&(d=v)}if(c){var g,b;const y=f==="y"?"width":"height",Q=["top","left"].includes(Lr(r)),v=s.reference[O]-s.floating[y]+(Q&&((g=o.offset)==null?void 0:g[O])||0)+(Q?0:$.crossAxis),S=s.reference[O]+s.reference[y]+(Q?0:((b=o.offset)==null?void 0:b[O])||0)-(Q?$.crossAxis:0);hS&&(h=S)}return{[f]:d,[O]:h}}}},_A=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:r,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=Dr(t,e),u=await Ml(e,c),O=Lr(r),f=Ca(r),d=er(r)==="y",{width:h,height:p}=s.floating;let $,g;O==="top"||O==="bottom"?($=O,g=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=O,$=f==="end"?"top":"bottom");const b=p-u.top-u.bottom,y=h-u.left-u.right,Q=Ss(p-u[$],b),v=Ss(h-u[g],y),S=!e.middlewareData.shift;let P=Q,w=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(P=b),S&&!f){const q=Hn(u.left,0),U=Hn(u.right,0),A=Hn(u.top,0),K=Hn(u.bottom,0);d?w=h-2*(q!==0||U!==0?q+U:Hn(u.left,u.right)):P=p-2*(A!==0||K!==0?A+K:Hn(u.top,u.bottom))}await l({...e,availableWidth:w,availableHeight:P});const T=await o.getDimensions(a.floating);return h!==T.width||p!==T.height?{reset:{rects:!0}}:{}}}};function Yf(){return typeof window<"u"}function So(t){return Og(t)?(t.nodeName||"").toLowerCase():"#document"}function Jn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function hr(t){var e;return(e=(Og(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Og(t){return Yf()?t instanceof Node||t instanceof Jn(t).Node:!1}function Vi(t){return Yf()?t instanceof Element||t instanceof Jn(t).Element:!1}function Or(t){return Yf()?t instanceof HTMLElement||t instanceof Jn(t).HTMLElement:!1}function DQ(t){return!Yf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Jn(t).ShadowRoot}function xc(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=Ai(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function TA(t){return["table","td","th"].includes(So(t))}function Mf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function fg(t){const e=dg(),n=Vi(t)?Ai(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function kA(t){let e=Ps(t);for(;Or(e)&&!da(e);){if(fg(e))return e;if(Mf(e))return null;e=Ps(e)}return null}function dg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function da(t){return["html","body","#document"].includes(So(t))}function Ai(t){return Jn(t).getComputedStyle(t)}function If(t){return Vi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ps(t){if(So(t)==="html")return t;const e=t.assignedSlot||t.parentNode||DQ(t)&&t.host||hr(t);return DQ(e)?e.host:e}function oP(t){const e=Ps(t);return da(e)?t.ownerDocument?t.ownerDocument.body:t.body:Or(e)&&xc(e)?e:oP(e)}function Il(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=oP(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=Jn(r);if(s){const a=ip(o);return e.concat(o,o.visualViewport||[],xc(r)?r:[],a&&n?Il(a):[])}return e.concat(r,Il(r,[],n))}function ip(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function aP(t){const e=Ai(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Or(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,a=_O(n)!==s||_O(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function hg(t){return Vi(t)?t:t.contextElement}function ea(t){const e=hg(t);if(!Or(e))return sr(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=aP(e);let o=(s?_O(n.width):n.width)/i,a=(s?_O(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const RA=sr(0);function lP(t){const e=Jn(t);return!dg()||!e.visualViewport?RA:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function CA(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Jn(t)?!1:e}function fo(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=hg(t);let o=sr(1);e&&(i?Vi(i)&&(o=ea(i)):o=ea(t));const a=CA(s,n,i)?lP(s):sr(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,u=r.width/o.x,O=r.height/o.y;if(s){const f=Jn(s),d=i&&Vi(i)?Jn(i):i;let h=f,p=ip(h);for(;p&&i&&d!==h;){const $=ea(p),g=p.getBoundingClientRect(),b=Ai(p),y=g.left+(p.clientLeft+parseFloat(b.paddingLeft))*$.x,Q=g.top+(p.clientTop+parseFloat(b.paddingTop))*$.y;l*=$.x,c*=$.y,u*=$.x,O*=$.y,l+=y,c+=Q,h=Jn(p),p=ip(h)}}return kO({width:u,height:O,x:l,y:c})}function pg(t,e){const n=If(t).scrollLeft;return e?e.left+n:fo(hr(t)).left+n}function cP(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-(n?0:pg(t,i)),s=i.top+e.scrollTop;return{x:r,y:s}}function XA(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",o=hr(i),a=e?Mf(e.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=sr(1);const u=sr(0),O=Or(i);if((O||!O&&!s)&&((So(i)!=="body"||xc(o))&&(l=If(i)),Or(i))){const d=fo(i);c=ea(i),u.x=d.x+i.clientLeft,u.y=d.y+i.clientTop}const f=o&&!O&&!s?cP(o,l,!0):sr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function VA(t){return Array.from(t.getClientRects())}function AA(t){const e=hr(t),n=If(t),i=t.ownerDocument.body,r=Hn(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=Hn(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+pg(t);const a=-n.scrollTop;return Ai(i).direction==="rtl"&&(o+=Hn(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}function EA(t,e){const n=Jn(t),i=hr(t),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const c=dg();(!c||c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a,y:l}}function zA(t,e){const n=fo(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=Or(t)?ea(t):sr(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function LQ(t,e,n){let i;if(e==="viewport")i=EA(t,n);else if(e==="document")i=AA(hr(t));else if(Vi(e))i=zA(e,n);else{const r=lP(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return kO(i)}function uP(t,e){const n=Ps(t);return n===e||!Vi(n)||da(n)?!1:Ai(n).position==="fixed"||uP(n,e)}function qA(t,e){const n=e.get(t);if(n)return n;let i=Il(t,[],!1).filter(a=>Vi(a)&&So(a)!=="body"),r=null;const s=Ai(t).position==="fixed";let o=s?Ps(t):t;for(;Vi(o)&&!da(o);){const a=Ai(o),l=fg(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||xc(o)&&!l&&uP(t,o))?i=i.filter(u=>u!==o):r=a,o=Ps(o)}return e.set(t,i),i}function ZA(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?Mf(e)?[]:qA(e,this._c):[].concat(n),i],a=o[0],l=o.reduce((c,u)=>{const O=LQ(e,u,r);return c.top=Hn(O.top,c.top),c.right=Ss(O.right,c.right),c.bottom=Ss(O.bottom,c.bottom),c.left=Hn(O.left,c.left),c},LQ(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function YA(t){const{width:e,height:n}=aP(t);return{width:e,height:n}}function MA(t,e,n){const i=Or(e),r=hr(e),s=n==="fixed",o=fo(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=sr(0);function c(){l.x=pg(r)}if(i||!i&&!s)if((So(e)!=="body"||xc(r))&&(a=If(e)),i){const d=fo(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&c();s&&!i&&r&&c();const u=r&&!i&&!s?cP(r,a):sr(0),O=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:O,y:f,width:o.width,height:o.height}}function Xd(t){return Ai(t).position==="static"}function WQ(t,e){if(!Or(t)||Ai(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return hr(t)===n&&(n=n.ownerDocument.body),n}function OP(t,e){const n=Jn(t);if(Mf(t))return n;if(!Or(t)){let r=Ps(t);for(;r&&!da(r);){if(Vi(r)&&!Xd(r))return r;r=Ps(r)}return n}let i=WQ(t,e);for(;i&&TA(i)&&Xd(i);)i=WQ(i,e);return i&&da(i)&&Xd(i)&&!fg(i)?n:i||kA(t)||n}const IA=async function(t){const e=this.getOffsetParent||OP,n=this.getDimensions,i=await n(t.floating);return{reference:MA(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function UA(t){return Ai(t).direction==="rtl"}const DA={convertOffsetParentRelativeRectToViewportRelativeRect:XA,getDocumentElement:hr,getClippingRect:ZA,getOffsetParent:OP,getElementRects:IA,getClientRects:VA,getDimensions:YA,getScale:ea,isElement:Vi,isRTL:UA};function fP(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function LA(t,e){let n=null,i;const r=hr(t);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:O,width:f,height:d}=c;if(a||e(),!f||!d)return;const h=ru(O),p=ru(r.clientWidth-(u+f)),$=ru(r.clientHeight-(O+d)),g=ru(u),y={rootMargin:-h+"px "+-p+"px "+-$+"px "+-g+"px",threshold:Hn(0,Ss(1,l))||1};let Q=!0;function v(S){const P=S[0].intersectionRatio;if(P!==l){if(!Q)return o();P?o(!1,P):i=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!fP(c,t.getBoundingClientRect())&&o(),Q=!1}try{n=new IntersectionObserver(v,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return o(!0),s}function WA(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=hg(t),u=r||s?[...c?Il(c):[],...Il(e)]:[];u.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const O=c&&a?LA(c,n):null;let f=-1,d=null;o&&(d=new ResizeObserver(g=>{let[b]=g;b&&b.target===c&&d&&(d.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=d)==null||y.observe(e)})),n()}),c&&!l&&d.observe(c),d.observe(e));let h,p=l?fo(t):null;l&&$();function $(){const g=fo(t);p&&!fP(p,g)&&n(),p=g,h=requestAnimationFrame($)}return n(),()=>{var g;u.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),O==null||O(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(h)}}const NA=PA,jA=xA,NQ=bA,BA=_A,GA=vA,FA=yA,HA=wA,KA=(t,e,n)=>{const i=new Map,r={platform:DA,...n},s={...r.platform,_c:i};return QA(t,e,{...r,platform:s})};function JA(t){return t!=null&&typeof t=="object"&&"$el"in t}function rp(t){if(JA(t)){const e=t.$el;return Og(e)&&So(e)==="#comment"?null:e}return t}function zo(t){return typeof t=="function"?t():m(t)}function eE(t){return{name:"arrow",options:t,fn(e){const n=rp(zo(t.element));return n==null?{}:FA({element:n,padding:t.padding}).fn(e)}}}function dP(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function jQ(t,e){const n=dP(t);return Math.round(e*n)/n}function tE(t,e,n){n===void 0&&(n={});const i=n.whileElementsMounted,r=j(()=>{var P;return(P=zo(n.open))!=null?P:!0}),s=j(()=>zo(n.middleware)),o=j(()=>{var P;return(P=zo(n.placement))!=null?P:"bottom"}),a=j(()=>{var P;return(P=zo(n.strategy))!=null?P:"absolute"}),l=j(()=>{var P;return(P=zo(n.transform))!=null?P:!0}),c=j(()=>rp(t.value)),u=j(()=>rp(e.value)),O=H(0),f=H(0),d=H(a.value),h=H(o.value),p=rr({}),$=H(!1),g=j(()=>{const P={position:d.value,left:"0",top:"0"};if(!u.value)return P;const w=jQ(u.value,O.value),T=jQ(u.value,f.value);return l.value?{...P,transform:"translate("+w+"px, "+T+"px)",...dP(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:w+"px",top:T+"px"}});let b;function y(){if(c.value==null||u.value==null)return;const P=r.value;KA(c.value,u.value,{middleware:s.value,placement:o.value,strategy:a.value}).then(w=>{O.value=w.x,f.value=w.y,d.value=w.strategy,h.value=w.placement,p.value=w.middlewareData,$.value=P!==!1})}function Q(){typeof b=="function"&&(b(),b=void 0)}function v(){if(Q(),i===void 0){y();return}if(c.value!=null&&u.value!=null){b=i(c.value,u.value,y);return}}function S(){r.value||($.value=!1)}return Ze([s,o,a,r],y,{flush:"sync"}),Ze([c,u],v,{flush:"sync"}),Ze(r,S,{flush:"sync"}),mc()&&Qf(Q),{x:js(O),y:js(f),strategy:js(d),placement:js(h),middlewareData:js(p),isPositioned:js($),floatingStyles:g,update:y}}const nE={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[qK,iE]=Qn("PopperContent");var rE=M({inheritAttrs:!1,__name:"PopperContent",props:x0({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...nE}),emits:["placed"],setup(t,{emit:e}){const n=t,i=e,r=rP(),{forwardRef:s,currentElement:o}=Ne(),a=H(),l=H(),{width:c,height:u}=f5(l),O=j(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),f=j(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),d=j(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),h=j(()=>({padding:f.value,boundary:d.value.filter(cA),altBoundary:d.value.length>0})),p=j(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),$=MV(()=>[NA({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&NQ({...h.value,...p.value}),n.avoidCollisions&&jA({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?HA():void 0,...h.value}),!n.prioritizePosition&&n.avoidCollisions&&NQ({...h.value,...p.value}),BA({...h.value,apply:({elements:A,rects:K,availableWidth:ae,availableHeight:fe})=>{const{width:J,height:re}=K.reference,se=A.floating.style;se.setProperty("--reka-popper-available-width",`${ae}px`),se.setProperty("--reka-popper-available-height",`${fe}px`),se.setProperty("--reka-popper-anchor-width",`${J}px`),se.setProperty("--reka-popper-anchor-height",`${re}px`)}}),l.value&&eE({element:l.value,padding:n.arrowPadding}),uA({arrowWidth:c.value,arrowHeight:u.value}),n.hideWhenDetached&&GA({strategy:"referenceHidden",...h.value})]),g=j(()=>n.reference??r.anchor.value),{floatingStyles:b,placement:y,isPositioned:Q,middlewareData:v}=tE(g,a,{strategy:n.positionStrategy,placement:O,whileElementsMounted:(...A)=>WA(...A,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:$}),S=j(()=>ep(y.value)[0]),P=j(()=>ep(y.value)[1]);qm(()=>{Q.value&&i("placed")});const w=j(()=>{var K;const A=((K=v.value.arrow)==null?void 0:K.centerOffset)!==0;return n.hideShiftedArrow&&A}),T=H("");It(()=>{o.value&&(T.value=window.getComputedStyle(o.value).zIndex)});const q=j(()=>{var A;return((A=v.value.arrow)==null?void 0:A.x)??0}),U=j(()=>{var A;return((A=v.value.arrow)==null?void 0:A.y)??0});return iE({placedSide:S,onArrowChange:A=>l.value=A,arrowX:q,arrowY:U,shouldHideArrow:w}),(A,K)=>{var ae,fe,J;return _(),W("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:ti({...m(b),transform:m(Q)?m(b).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T.value,"--reka-popper-transform-origin":[(ae=m(v).transformOrigin)==null?void 0:ae.x,(fe=m(v).transformOrigin)==null?void 0:fe.y].join(" "),...((J=m(v).hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[X(m(Ie),ve({ref:m(s)},A.$attrs,{"as-child":n.asChild,as:A.as,"data-side":S.value,"data-align":P.value,style:{animation:m(Q)?void 0:"none"}}),{default:V(()=>[oe(A.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),sE=rE;function hP(t){const e=Ef({nonce:H()});return j(()=>{var n;return(t==null?void 0:t.value)||((n=e.nonce)==null?void 0:n.value)})}const[oE,aE]=Qn("RovingFocusGroup");var lE=M({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const i=t,r=n,{loop:s,orientation:o,dir:a}=un(i),l=qf(a),c=vs(i,"currentTabStopId",r,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),u=H(!1),O=H(!1),f=H(0),{getItems:d,CollectionSlot:h}=Es({isProvider:!0});function p(g){const b=!O.value;if(g.currentTarget&&g.target===g.currentTarget&&b&&!u.value){const y=new CustomEvent(K5,J5);if(g.currentTarget.dispatchEvent(y),r("entryFocus",y),!y.defaultPrevented){const Q=d().map(T=>T.ref).filter(T=>T.dataset.disabled!==""),v=Q.find(T=>T.getAttribute("data-active")===""),S=Q.find(T=>T.getAttribute("data-highlighted")===""),P=Q.find(T=>T.id===c.value),w=[v,S,P,...Q].filter(Boolean);iP(w,i.preventScrollOnEntryFocus)}}O.value=!1}function $(){setTimeout(()=>{O.value=!1},1)}return e({getItems:d}),aE({loop:s,dir:l,orientation:o,currentTabStopId:c,onItemFocus:g=>{c.value=g},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(g,b)=>(_(),I(m(h),null,{default:V(()=>[X(m(Ie),{tabindex:u.value||f.value===0?-1:0,"data-orientation":m(o),as:g.as,"as-child":g.asChild,dir:m(l),style:{outline:"none"},onMousedown:b[0]||(b[0]=y=>O.value=!0),onMouseup:$,onFocus:p,onBlur:b[1]||(b[1]=y=>u.value=!1)},{default:V(()=>[oe(g.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),cE=lE,uE=M({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=oE(),i=Xi(),r=j(()=>e.tabStopId||i),s=j(()=>n.currentTabStopId.value===r.value),{getItems:o,CollectionItem:a}=Es();dt(()=>{e.focusable&&n.onFocusableItemAdd()}),qi(()=>{e.focusable&&n.onFocusableItemRemove()});function l(c){if(c.key==="Tab"&&c.shiftKey){n.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=nA(c,n.orientation.value,n.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!e.allowShiftKey&&c.shiftKey)return;c.preventDefault();let O=[...o().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")O.reverse();else if(u==="prev"||u==="next"){u==="prev"&&O.reverse();const f=O.indexOf(c.currentTarget);O=n.loop.value?iA(O,f+1):O.slice(f+1)}Mt(()=>iP(O))}}return(c,u)=>(_(),I(m(a),null,{default:V(()=>[X(m(Ie),{tabindex:s.value?0:-1,"data-orientation":m(n).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=O=>{c.focusable?m(n).onItemFocus(r.value):O.preventDefault()}),onFocus:u[1]||(u[1]=O=>m(n).onItemFocus(r.value)),onKeydown:l},{default:V(()=>[oe(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),pP=uE;const[OE,ZK]=Qn("CheckboxGroupRoot");function mg(t){return t==="indeterminate"}function mP(t){return mg(t)?"indeterminate":t?"checked":"unchecked"}const[fE,dE]=Qn("CheckboxRoot");var hE=M({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Ne(),o=OE(null),a=vs(n,"modelValue",i,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),l=j(()=>(o==null?void 0:o.disabled.value)||n.disabled),c=j(()=>Yl(a.value,n.trueValue)),u=j(()=>fa(o==null?void 0:o.modelValue.value)?a.value==="indeterminate"?"indeterminate":c.value:CQ(o.modelValue.value,n.value));function O(){if(fa(o==null?void 0:o.modelValue.value))a.value==="indeterminate"?a.value=n.trueValue:a.value=c.value?n.falseValue:n.trueValue;else{const h=[...o.modelValue.value||[]];if(CQ(h,n.value)){const p=h.findIndex($=>Yl($,n.value));h.splice(p,1)}else h.push(n.value);o.modelValue.value=h}}const f=og(s),d=j(()=>{var h;return n.id&&s.value?(h=document.querySelector(`[for="${n.id}"]`))==null?void 0:h.innerText:void 0});return dE({disabled:l,state:u}),(h,p)=>{var $,g;return _(),I(Tf(($=m(o))!=null&&$.rovingFocus.value?m(pP):m(Ie)),ve(h.$attrs,{id:h.id,ref:m(r),role:"checkbox","as-child":h.asChild,as:h.as,type:h.as==="button"?"button":void 0,"aria-checked":m(mg)(u.value)?"mixed":u.value,"aria-required":h.required,"aria-label":h.$attrs["aria-label"]||d.value,"data-state":m(mP)(u.value),"data-disabled":l.value?"":void 0,disabled:l.value,focusable:(g=m(o))!=null&&g.rovingFocus.value?!l.value:void 0,onKeydown:Vf(cn(()=>{},["prevent"]),["enter"]),onClick:O}),{default:V(()=>[oe(h.$slots,"default",{modelValue:m(a),state:u.value}),m(f)&&h.name&&!m(o)?(_(),I(m(nP),{key:0,type:"checkbox",checked:!!u.value,name:h.name,value:h.value,disabled:l.value,required:h.required},null,8,["checked","name","value","disabled","required"])):de("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])}}}),pE=hE,mE=M({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const{forwardRef:e}=Ne(),n=fE();return(i,r)=>(_(),I(m(Pc),{present:i.forceMount||m(mg)(m(n).state.value)||m(n).state.value===!0},{default:V(()=>[X(m(Ie),ve({ref:m(e),"data-state":m(mP)(m(n).state.value),"data-disabled":m(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":i.asChild,as:i.as},i.$attrs),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),gE=mE,$E=M({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(t){const e=t;return Ne(),(n,i)=>(_(),I(m(Ie),ve(e,{onMousedown:i[0]||(i[0]=r=>{!r.defaultPrevented&&r.detail>1&&r.preventDefault()})}),{default:V(()=>[oe(n.$slots,"default")]),_:3},16))}}),QE=$E,yE=M({__name:"PaginationEllipsis",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return Ne(),(n,i)=>(_(),I(m(Ie),ve(e,{"data-type":"ellipsis"}),{default:V(()=>[oe(n.$slots,"default",{},()=>[i[0]||(i[0]=Ce("…"))])]),_:3},16))}}),bE=yE;const[Uf,vE]=Qn("PaginationRoot");var SE=M({__name:"PaginationRoot",props:{page:{type:Number,required:!1},defaultPage:{type:Number,required:!1,default:1},itemsPerPage:{type:Number,required:!0},total:{type:Number,required:!1,default:0},siblingCount:{type:Number,required:!1,default:2},disabled:{type:Boolean,required:!1},showEdges:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"nav"}},emits:["update:page"],setup(t,{emit:e}){const n=t,i=e,{siblingCount:r,disabled:s,showEdges:o}=un(n);Ne();const a=vs(n,"page",i,{defaultValue:n.defaultPage,passive:n.page===void 0}),l=j(()=>Math.max(1,Math.ceil(n.total/(n.itemsPerPage||1))));return vE({page:a,onPageChange(c){a.value=c},pageCount:l,siblingCount:r,disabled:s,showEdges:o}),(c,u)=>(_(),I(m(Ie),{as:c.as,"as-child":c.asChild},{default:V(()=>[oe(c.$slots,"default",{page:m(a),pageCount:l.value})]),_:3},8,["as","as-child"]))}}),PE=SE;function Kr(t,e){const n=e-t+1;return Array.from({length:n},(i,r)=>r+t)}function xE(t){return t.map(e=>typeof e=="number"?{type:"page",value:e}:{type:"ellipsis"})}const su="ellipsis";function wE(t,e,n,i){const s=e,o=Math.max(t-n,1),a=Math.min(t+n,s);if(i){const c=Math.min(2*n+5,e)-2,u=o>3&&Math.abs(s-c-1+1)>2&&Math.abs(o-1)>2,O=a 2&&Math.abs(s-a)>2;if(!u&&O)return[...Kr(1,c),su,s];if(u&&!O){const d=Kr(s-c+1,s);return[1,su,...d]}if(u&&O){const d=Kr(o,a);return[1,su,...d,su,s]}return Kr(1,s)}else{const l=n*2+1;return e xE(wE(n.page.value,n.pageCount.value,n.siblingCount.value,n.showEdges.value)));return(r,s)=>(_(),I(m(Ie),yo(As(e)),{default:V(()=>[oe(r.$slots,"default",{items:i.value})]),_:3},16))}}),TE=_E,kE=M({__name:"PaginationListItem",props:{value:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Ne();const n=Uf(),i=j(()=>n.page.value===e.value),r=j(()=>n.disabled.value);return(s,o)=>(_(),I(m(Ie),ve(e,{"data-type":"page","aria-label":`Page ${s.value}`,"aria-current":i.value?"page":void 0,"data-selected":i.value?"true":void 0,disabled:r.value,type:s.as==="button"?"button":void 0,onClick:o[0]||(o[0]=a=>!r.value&&m(n).onPageChange(s.value))}),{default:V(()=>[oe(s.$slots,"default",{},()=>[Ce(B(s.value),1)])]),_:3},16,["aria-label","aria-current","data-selected","disabled","type"]))}}),RE=kE,CE=M({__name:"PaginationNext",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Ne();const n=Uf(),i=j(()=>n.page.value===n.pageCount.value||n.disabled.value);return(r,s)=>(_(),I(m(Ie),ve(e,{"aria-label":"Next Page",type:r.as==="button"?"button":void 0,disabled:i.value,onClick:s[0]||(s[0]=o=>!i.value&&m(n).onPageChange(m(n).page.value+1))}),{default:V(()=>[oe(r.$slots,"default",{},()=>[s[1]||(s[1]=Ce("Next page"))])]),_:3},16,["type","disabled"]))}}),XE=CE,VE=M({__name:"PaginationPrev",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Ne();const n=Uf(),i=j(()=>n.page.value===1||n.disabled.value);return(r,s)=>(_(),I(m(Ie),ve(e,{"aria-label":"Previous Page",type:r.as==="button"?"button":void 0,disabled:i.value,onClick:s[0]||(s[0]=o=>!i.value&&m(n).onPageChange(m(n).page.value-1))}),{default:V(()=>[oe(r.$slots,"default",{},()=>[s[1]||(s[1]=Ce("Prev page"))])]),_:3},16,["type","disabled"]))}}),AE=VE;const EE=[" ","Enter","ArrowUp","ArrowDown"],zE=[" ","Enter"],bi=10;function Ul(t,e,n){return t===void 0?!1:Array.isArray(t)?t.some(i=>sp(i,e,n)):sp(t,e,n)}function sp(t,e,n){return t===void 0||e===void 0?!1:typeof t=="string"?t===e:typeof n=="function"?n(t,e):typeof n=="string"?(t==null?void 0:t[n])===(e==null?void 0:e[n]):Yl(t,e)}function qE(t){return t==null||t===""||Array.isArray(t)&&t.length===0}const ZE={key:0,value:""},[zs,gP]=Qn("SelectRoot");var YE=M({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,i=e,{required:r,disabled:s,multiple:o,dir:a}=un(n),l=vs(n,"modelValue",i,{defaultValue:n.defaultValue??(o.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),c=vs(n,"open",i,{defaultValue:n.defaultOpen,passive:n.open===void 0}),u=H(),O=H(),f=H({x:0,y:0}),d=j(()=>{var Q;return o.value&&Array.isArray(l.value)?((Q=l.value)==null?void 0:Q.length)===0:fa(l.value)});Es({isProvider:!0});const h=qf(a),p=og(u),$=H(new Set),g=j(()=>Array.from($.value).map(Q=>Q.value).join(";"));function b(Q){if(o.value){const v=Array.isArray(l.value)?[...l.value]:[],S=v.findIndex(P=>sp(P,Q,n.by));S===-1?v.push(Q):v.splice(S,1),l.value=[...v]}else l.value=Q}function y(Q){return Array.from($.value).find(v=>Ul(Q,v.value,n.by))}return gP({triggerElement:u,onTriggerChange:Q=>{u.value=Q},valueElement:O,onValueElementChange:Q=>{O.value=Q},contentId:"",modelValue:l,onValueChange:b,by:n.by,open:c,multiple:o,required:r,onOpenChange:Q=>{c.value=Q},dir:h,triggerPointerDownPosRef:f,disabled:s,isEmptyModelValue:d,optionsSet:$,onOptionAdd:Q=>{const v=y(Q.value);v&&$.value.delete(v),$.value.add(Q)},onOptionRemove:Q=>{const v=y(Q.value);v&&$.value.delete(v)}}),(Q,v)=>(_(),I(m(oA),null,{default:V(()=>[oe(Q.$slots,"default",{modelValue:m(l),open:m(c)}),m(p)?(_(),I(UE,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:m(o),required:m(r),name:Q.name,autocomplete:Q.autocomplete,disabled:m(s),value:m(l)},{default:V(()=>[m(fa)(m(l))?(_(),W("option",ZE)):de("v-if",!0),(_(!0),W(ze,null,kt(Array.from($.value),S=>(_(),W("option",ve({key:S.value??""},{ref_for:!0},S),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):de("v-if",!0)]),_:3}))}}),ME=YE,IE=M({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(t){const e=t,n=H(),i=zs();Ze(()=>e.value,(s,o)=>{const a=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==o&&c&&n.value){const u=new Event("change",{bubbles:!0});c.call(n.value,s),n.value.dispatchEvent(u)}});function r(s){i.onValueChange(s.target.value)}return(s,o)=>(_(),I(m(tP),{"as-child":""},{default:V(()=>[Y("select",ve({ref_key:"selectElement",ref:n},e,{onInput:r}),[oe(s.$slots,"default")],16)]),_:3}))}}),UE=IE,DE=M({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:bi},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const n=gi(t);return(i,r)=>(_(),I(m(sE),ve(m(n),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16))}}),LE=DE;const WE={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Po,$P]=Qn("SelectContent");var NE=M({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,r=zs();o5(),Z1(n.bodyLock);const{CollectionSlot:s,getItems:o}=Es(),a=H();I1(a);const{search:l,handleTypeaheadSearch:c}=U1(),u=H(),O=H(),f=H(),d=H(!1),h=H(!1),p=H(!1);function $(){O.value&&a.value&&qQ([O.value,a.value])}Ze(d,()=>{$()});const{onOpenChange:g,triggerPointerDownPosRef:b}=r;It(S=>{if(!a.value)return;let P={x:0,y:0};const w=q=>{var U,A;P={x:Math.abs(Math.round(q.pageX)-(((U=b.value)==null?void 0:U.x)??0)),y:Math.abs(Math.round(q.pageY)-(((A=b.value)==null?void 0:A.y)??0))}},T=q=>{var U;q.pointerType!=="touch"&&(P.x<=10&&P.y<=10?q.preventDefault():(U=a.value)!=null&&U.contains(q.target)||g(!1),document.removeEventListener("pointermove",w),b.value=null)};b.value!==null&&(document.addEventListener("pointermove",w),document.addEventListener("pointerup",T,{capture:!0,once:!0})),S(()=>{document.removeEventListener("pointermove",w),document.removeEventListener("pointerup",T,{capture:!0})})});function y(S){const P=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!P&&S.key.length===1&&c(S.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let T=[...o().map(q=>q.ref)];if(["ArrowUp","End"].includes(S.key)&&(T=T.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const q=S.target,U=T.indexOf(q);T=T.slice(U+1)}setTimeout(()=>qQ(T)),S.preventDefault()}}const Q=j(()=>n.position==="popper"?n:{}),v=gi(Q.value);return $P({content:a,viewport:u,onViewportChange:S=>{u.value=S},itemRefCallback:(S,P,w)=>{const T=!h.value&&!w,q=Ul(r.modelValue.value,P,r.by);if(r.multiple.value){if(p.value)return;(q||T)&&(O.value=S,q&&(p.value=!0))}else(q||T)&&(O.value=S);T&&(h.value=!0)},selectedItem:O,selectedItemText:f,onItemLeave:()=>{var S;(S=a.value)==null||S.focus()},itemTextRefCallback:(S,P,w)=>{const T=!h.value&&!w;(Ul(r.modelValue.value,P,r.by)||T)&&(f.value=S)},focusSelectedItem:$,position:n.position,isPositioned:d,searchRef:l}),(S,P)=>(_(),I(m(s),null,{default:V(()=>[X(m(j1),{"as-child":"",onMountAutoFocus:P[6]||(P[6]=cn(()=>{},["prevent"])),onUnmountAutoFocus:P[7]||(P[7]=w=>{var T;i("closeAutoFocus",w),!w.defaultPrevented&&((T=m(r).triggerElement.value)==null||T.focus({preventScroll:!0}),w.preventDefault())})},{default:V(()=>[X(m(W1),{"as-child":"","disable-outside-pointer-events":S.disableOutsidePointerEvents,onFocusOutside:P[2]||(P[2]=cn(()=>{},["prevent"])),onDismiss:P[3]||(P[3]=w=>m(r).onOpenChange(!1)),onEscapeKeyDown:P[4]||(P[4]=w=>i("escapeKeyDown",w)),onPointerDownOutside:P[5]||(P[5]=w=>i("pointerDownOutside",w))},{default:V(()=>[(_(),I(Tf(S.position==="popper"?LE:FE),ve({...S.$attrs,...m(v)},{id:m(r).contentId,ref:w=>{const T=m(ur)(w);T!=null&&T.hasAttribute("data-reka-popper-content-wrapper")?a.value=T.firstElementChild:a.value=T},role:"listbox","data-state":m(r).open.value?"open":"closed",dir:m(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:P[0]||(P[0]=cn(()=>{},["prevent"])),onPlaced:P[1]||(P[1]=w=>d.value=!0),onKeydown:y}),{default:V(()=>[oe(S.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),jE=NE;const[gg,BE]=Qn("SelectItemAlignedPosition");var GE=M({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(t,{emit:e}){const n=t,i=e,{getItems:r}=Es(),s=zs(),o=Po(),a=H(!1),l=H(!0),c=H(),{forwardRef:u,currentElement:O}=Ne(),{viewport:f,selectedItem:d,selectedItemText:h,focusSelectedItem:p}=o;function $(){if(s.triggerElement.value&&s.valueElement.value&&c.value&&O.value&&(f!=null&&f.value)&&(d!=null&&d.value)&&(h!=null&&h.value)){const y=s.triggerElement.value.getBoundingClientRect(),Q=O.value.getBoundingClientRect(),v=s.valueElement.value.getBoundingClientRect(),S=h.value.getBoundingClientRect();if(s.dir.value!=="rtl"){const Se=S.left-Q.left,qe=v.left-Se,Ee=y.left-qe,He=y.width+Ee,$t=Math.max(He,Q.width),Qt=window.innerWidth-bi,k=RQ(qe,bi,Math.max(bi,Qt-$t));c.value.style.minWidth=`${He}px`,c.value.style.left=`${k}px`}else{const Se=Q.right-S.right,qe=window.innerWidth-v.right-Se,Ee=window.innerWidth-y.right-qe,He=y.width+Ee,$t=Math.max(He,Q.width),Qt=window.innerWidth-bi,k=RQ(qe,bi,Math.max(bi,Qt-$t));c.value.style.minWidth=`${He}px`,c.value.style.right=`${k}px`}const P=r().map(Se=>Se.ref),w=window.innerHeight-bi*2,T=f.value.scrollHeight,q=window.getComputedStyle(O.value),U=Number.parseInt(q.borderTopWidth,10),A=Number.parseInt(q.paddingTop,10),K=Number.parseInt(q.borderBottomWidth,10),ae=Number.parseInt(q.paddingBottom,10),fe=U+A+T+ae+K,J=Math.min(d.value.offsetHeight*5,fe),re=window.getComputedStyle(f.value),se=Number.parseInt(re.paddingTop,10),ge=Number.parseInt(re.paddingBottom,10),ue=y.top+y.height/2-bi,te=w-ue,le=d.value.offsetHeight/2,Oe=d.value.offsetTop+le,Qe=U+A+Oe,he=fe-Qe;if(Qe<=ue){const Se=d.value===P[P.length-1];c.value.style.bottom="0px";const qe=O.value.clientHeight-f.value.offsetTop-f.value.offsetHeight,Ee=Math.max(te,le+(Se?ge:0)+qe+K),He=Qe+Ee;c.value.style.height=`${He}px`}else{const Se=d.value===P[0];c.value.style.top="0px";const Ee=Math.max(ue,U+f.value.offsetTop+(Se?se:0)+le)+he;c.value.style.height=`${Ee}px`,f.value.scrollTop=Qe-ue+f.value.offsetTop}c.value.style.margin=`${bi}px 0`,c.value.style.minHeight=`${J}px`,c.value.style.maxHeight=`${w}px`,i("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=H("");dt(async()=>{await Mt(),$(),O.value&&(g.value=window.getComputedStyle(O.value).zIndex)});function b(y){y&&l.value===!0&&($(),p==null||p(),l.value=!1)}return t5(s.triggerElement,()=>{$()}),BE({contentWrapper:c,shouldExpandOnScrollRef:a,onScrollButtonChange:b}),(y,Q)=>(_(),W("div",{ref_key:"contentWrapperElement",ref:c,style:ti({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[X(m(Ie),ve({ref:m(u),style:{boxSizing:"border-box",maxHeight:"100%"}},{...y.$attrs,...n}),{default:V(()=>[oe(y.$slots,"default")]),_:3},16)],4))}}),FE=GE,HE=M({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(t){return gP(t.context),$P(WE),(n,i)=>oe(n.$slots,"default")}}),KE=HE;const JE={key:1};var e8=M({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=Dn(n,e),s=zs(),o=H();dt(()=>{o.value=new DocumentFragment});const a=H(),l=j(()=>n.forceMount||s.open.value),c=H(l.value);return Ze(l,()=>{setTimeout(()=>c.value=l.value)}),(u,O)=>{var f;return l.value||c.value||(f=a.value)!=null&&f.present?(_(),I(m(Pc),{key:0,ref_key:"presenceRef",ref:a,present:l.value},{default:V(()=>[X(jE,yo(As({...m(r),...u.$attrs})),{default:V(()=>[oe(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):o.value?(_(),W("div",JE,[(_(),I(Zm,{to:o.value},[X(KE,{context:m(s)},{default:V(()=>[oe(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):de("v-if",!0)}}}),t8=e8;const[YK,n8]=Qn("SelectGroup");var i8=M({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=Xi(void 0,"reka-select-group");return n8({id:n}),(i,r)=>(_(),I(m(Ie),ve({role:"group"},e,{"aria-labelledby":m(n)}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),r8=i8,s8=M({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){return(e,n)=>(_(),I(m(Ie),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:V(()=>[oe(e.$slots,"default",{},()=>[n[0]||(n[0]=Ce("▼"))])]),_:3},8,["as","as-child"]))}}),o8=s8;const[QP,a8]=Qn("SelectItem");var l8=M({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(t,{emit:e}){const n=t,i=e,{disabled:r}=un(n),s=zs(),o=Po(),{forwardRef:a,currentElement:l}=Ne(),{CollectionItem:c}=Es(),u=j(()=>{var Q;return Ul((Q=s.modelValue)==null?void 0:Q.value,n.value,s.by)}),O=H(!1),f=H(n.textValue??""),d=Xi(void 0,"reka-select-item-text"),h="select.select";async function p(Q){if(Q.defaultPrevented)return;const v={originalEvent:Q,value:n.value};ig(h,$,v)}async function $(Q){await Mt(),i("select",Q),!Q.defaultPrevented&&(r.value||(s.onValueChange(n.value),s.multiple.value||s.onOpenChange(!1)))}async function g(Q){var v,S;await Mt(),!Q.defaultPrevented&&(r.value?(v=o.onItemLeave)==null||v.call(o):(S=Q.currentTarget)==null||S.focus({preventScroll:!0}))}async function b(Q){var v;await Mt(),!Q.defaultPrevented&&Q.currentTarget===_n()&&((v=o.onItemLeave)==null||v.call(o))}async function y(Q){var S;await Mt(),!(Q.defaultPrevented||((S=o.searchRef)==null?void 0:S.value)!==""&&Q.key===" ")&&(zE.includes(Q.key)&&p(Q),Q.key===" "&&Q.preventDefault())}if(n.value==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return dt(()=>{l.value&&o.itemRefCallback(l.value,n.value,n.disabled)}),a8({value:n.value,disabled:r,textId:d,isSelected:u,onItemTextChange:Q=>{f.value=((f.value||(Q==null?void 0:Q.textContent))??"").trim()}}),(Q,v)=>(_(),I(m(c),{value:{textValue:f.value}},{default:V(()=>[X(m(Ie),{ref:m(a),role:"option","aria-labelledby":m(d),"data-highlighted":O.value?"":void 0,"aria-selected":u.value,"data-state":u.value?"checked":"unchecked","aria-disabled":m(r)||void 0,"data-disabled":m(r)?"":void 0,tabindex:m(r)?void 0:-1,as:Q.as,"as-child":Q.asChild,onFocus:v[0]||(v[0]=S=>O.value=!0),onBlur:v[1]||(v[1]=S=>O.value=!1),onPointerup:p,onPointerdown:v[2]||(v[2]=S=>{S.currentTarget.focus({preventScroll:!0})}),onTouchend:v[3]||(v[3]=cn(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:b,onKeydown:y},{default:V(()=>[oe(Q.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),c8=l8,u8=M({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=QP();return(i,r)=>m(n).isSelected.value?(_(),I(m(Ie),ve({key:0,"aria-hidden":"true"},e),{default:V(()=>[oe(i.$slots,"default")]),_:3},16)):de("v-if",!0)}}),O8=u8,f8=M({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=zs(),i=Po(),r=QP(),{forwardRef:s,currentElement:o}=Ne(),a=j(()=>{var l,c;return{value:r.value,disabled:r.disabled.value,textContent:((l=o.value)==null?void 0:l.textContent)??((c=r.value)==null?void 0:c.toString())??""}});return dt(()=>{o.value&&(r.onItemTextChange(o.value),i.itemTextRefCallback(o.value,r.value,r.disabled.value),n.onOptionAdd(a.value))}),qi(()=>{n.onOptionRemove(a.value)}),(l,c)=>(_(),I(m(Ie),ve({id:m(r).textId,ref:m(s)},{...e,...l.$attrs}),{default:V(()=>[oe(l.$slots,"default")]),_:3},16,["id"]))}}),d8=f8,h8=M({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,i)=>(_(),I(m(K1),yo(As(e)),{default:V(()=>[oe(n.$slots,"default")]),_:3},16))}}),p8=h8,m8=M({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(t,{emit:e}){const n=e,{getItems:i}=Es(),r=Po(),s=H(null);function o(){s.value!==null&&(window.clearInterval(s.value),s.value=null)}It(()=>{const c=i().map(u=>u.ref).find(u=>u===_n());c==null||c.scrollIntoView({block:"nearest"})});function a(){s.value===null&&(s.value=window.setInterval(()=>{n("autoScroll")},50))}function l(){var c;(c=r.onItemLeave)==null||c.call(r),s.value===null&&(s.value=window.setInterval(()=>{n("autoScroll")},50))}return Vs(()=>o()),(c,u)=>{var O;return _(),I(m(Ie),ve({"aria-hidden":"true",style:{flexShrink:0}},(O=c.$parent)==null?void 0:O.$props,{onPointerdown:a,onPointermove:l,onPointerleave:u[0]||(u[0]=()=>{o()})}),{default:V(()=>[oe(c.$slots,"default")]),_:3},16)}}}),yP=m8,g8=M({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=Po(),n=e.position==="item-aligned"?gg():void 0,{forwardRef:i,currentElement:r}=Ne(),s=H(!1);return It(o=>{var l,c;if((l=e.viewport)!=null&&l.value&&((c=e.isPositioned)!=null&&c.value)){let O=function(){const f=u.scrollHeight-u.clientHeight;s.value=Math.ceil(u.scrollTop) u.removeEventListener("scroll",O))}}),Ze(r,()=>{r.value&&(n==null||n.onScrollButtonChange(r.value))}),(o,a)=>s.value?(_(),I(yP,{key:0,ref:m(i),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=m(e);l!=null&&l.value&&(c!=null&&c.value)&&(l.value.scrollTop=l.value.scrollTop+c.value.offsetHeight)})},{default:V(()=>[oe(o.$slots,"default")]),_:3},512)):de("v-if",!0)}}),$8=g8,Q8=M({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=Po(),n=e.position==="item-aligned"?gg():void 0,{forwardRef:i,currentElement:r}=Ne(),s=H(!1);return It(o=>{var l,c;if((l=e.viewport)!=null&&l.value&&((c=e.isPositioned)!=null&&c.value)){let O=function(){s.value=u.scrollTop>0};var a=O;const u=e.viewport.value;O(),u.addEventListener("scroll",O),o(()=>u.removeEventListener("scroll",O))}}),Ze(r,()=>{r.value&&(n==null||n.onScrollButtonChange(r.value))}),(o,a)=>s.value?(_(),I(yP,{key:0,ref:m(i),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=m(e);l!=null&&l.value&&(c!=null&&c.value)&&(l.value.scrollTop=l.value.scrollTop-c.value.offsetHeight)})},{default:V(()=>[oe(o.$slots,"default")]),_:3},512)):de("v-if",!0)}}),y8=Q8,b8=M({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=zs(),{forwardRef:i,currentElement:r}=Ne(),s=j(()=>{var f;return((f=n.disabled)==null?void 0:f.value)||e.disabled});n.contentId||(n.contentId=Xi(void 0,"reka-select-content")),dt(()=>{n.onTriggerChange(r.value)});const{getItems:o}=Es(),{search:a,handleTypeaheadSearch:l,resetTypeahead:c}=U1();function u(){s.value||(n.onOpenChange(!0),c())}function O(f){u(),n.triggerPointerDownPosRef.value={x:Math.round(f.pageX),y:Math.round(f.pageY)}}return(f,d)=>(_(),I(m(lA),{"as-child":"",reference:f.reference},{default:V(()=>{var h,p,$,g;return[X(m(Ie),{ref:m(i),role:"combobox",type:f.as==="button"?"button":void 0,"aria-controls":m(n).contentId,"aria-expanded":m(n).open.value||!1,"aria-required":(h=m(n).required)==null?void 0:h.value,"aria-autocomplete":"none",disabled:s.value,dir:(p=m(n))==null?void 0:p.dir.value,"data-state":($=m(n))!=null&&$.open.value?"open":"closed","data-disabled":s.value?"":void 0,"data-placeholder":m(qE)((g=m(n).modelValue)==null?void 0:g.value)?"":void 0,"as-child":f.asChild,as:f.as,onClick:d[0]||(d[0]=b=>{var y;(y=b==null?void 0:b.currentTarget)==null||y.focus()}),onPointerdown:d[1]||(d[1]=b=>{if(b.pointerType==="touch")return b.preventDefault();const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(O(b),b.preventDefault())}),onPointerup:d[2]||(d[2]=cn(b=>{b.pointerType==="touch"&&O(b)},["prevent"])),onKeydown:d[3]||(d[3]=b=>{const y=m(a)!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&y&&b.key===" "||(m(l)(b.key,m(o)()),m(EE).includes(b.key)&&(u(),b.preventDefault()))})},{default:V(()=>[oe(f.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),v8=b8,S8=M({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Ne(),r=zs();dt(()=>{r.valueElement=i});const s=j(()=>{var u;let a=[];const l=Array.from(r.optionsSet.value),c=O=>l.find(f=>Ul(O,f.value,r.by));return Array.isArray(r.modelValue.value)?a=r.modelValue.value.map(O=>{var f;return((f=c(O))==null?void 0:f.textContent)??""}):a=[((u=c(r.modelValue.value))==null?void 0:u.textContent)??""],a.filter(Boolean)}),o=j(()=>s.value.length?s.value.join(", "):e.placeholder);return(a,l)=>(_(),I(m(Ie),{ref:m(n),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":s.value.length?void 0:e.placeholder},{default:V(()=>[oe(a.$slots,"default",{selectedLabel:s.value,modelValue:m(r).modelValue.value},()=>[Ce(B(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),P8=S8,x8=M({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{nonce:n}=un(e),i=hP(n),r=Po(),s=r.position==="item-aligned"?gg():void 0,{forwardRef:o,currentElement:a}=Ne();dt(()=>{r==null||r.onViewportChange(a.value)});const l=H(0);function c(u){const O=u.currentTarget,{shouldExpandOnScrollRef:f,contentWrapper:d}=s??{};if(f!=null&&f.value&&(d!=null&&d.value)){const h=Math.abs(l.value-O.scrollTop);if(h>0){const p=window.innerHeight-bi*2,$=Number.parseFloat(d.value.style.minHeight),g=Number.parseFloat(d.value.style.height),b=Math.max($,g);if(b 0?v:0,d.value.style.justifyContent="flex-end")}}}l.value=O.scrollTop}return(u,O)=>(_(),W(ze,null,[X(m(Ie),ve({ref:m(o),"data-reka-select-viewport":"",role:"presentation"},{...u.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:V(()=>[oe(u.$slots,"default")]),_:3},16),X(m(Ie),{as:"style",nonce:m(i)},{default:V(()=>O[0]||(O[0]=[Ce(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),w8=x8;function We(t,e="Assertion failed!"){if(!t)throw console.error(e),new Error(e)}function bP(t,e=document){var i;if(!Sc)return null;if(e instanceof HTMLElement&&((i=e==null?void 0:e.dataset)==null?void 0:i.panelGroupId)===t)return e;const n=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return n||null}function Df(t,e=document){if(!Sc)return null;const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function vP(t,e,n=document){return Sc?Dl(t,n).findIndex(s=>s.getAttribute("data-panel-resize-handle-id")===e)??null:null}function Dl(t,e=document){return Sc?Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`)):[]}function _8(t,e,n,i=document){var c,u;const r=Df(e,i),s=Dl(t,i),o=r?s.indexOf(r):-1,a=((c=n[o])==null?void 0:c.id)??null,l=((u=n[o+1])==null?void 0:u.id)??null;return[a,l]}function SP(t){return t.type==="keydown"}function PP(t){return t.type.startsWith("mouse")}function xP(t){return t.type.startsWith("touch")}function Lf(t){if(PP(t))return{x:t.clientX,y:t.clientY};if(xP(t)){const e=t.touches[0];if(e&&e.clientX&&e.clientY)return{x:e.clientX,y:e.clientY}}return{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY}}function wP(t,e){const n=t==="horizontal",{x:i,y:r}=Lf(e);return n?i:r}function T8(t,e,n,i,r){const s=n==="horizontal",o=Df(e,r);We(o);const a=o.getAttribute("data-panel-group-id");We(a);const{initialCursorPosition:l}=i,c=wP(n,t),u=bP(a,r);We(u);const O=u.getBoundingClientRect(),f=s?O.width:O.height;return(c-l)/f*100}function k8(t,e,n,i,r,s){if(SP(t)){const o=n==="horizontal";let a=0;t.shiftKey?a=100:a=r??10;let l=0;switch(t.key){case"ArrowDown":l=o?0:a;break;case"ArrowLeft":l=o?-a:0;break;case"ArrowRight":l=o?a:0;break;case"ArrowUp":l=o?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return i==null?0:T8(t,e,n,i,s)}function R8({layout:t,panelsArray:e,pivotIndices:n}){let i=0,r=100,s=0,o=0;const a=n[0];We(a!=null),e.forEach((O,f)=>{const{constraints:d}=O,{maxSize:h=100,minSize:p=0}=d;f===a?(i=p,r=h):(s+=p,o+=h)});const l=Math.min(r,100-s),c=Math.max(i,100-o),u=t[a];return{valueMax:l,valueMin:c,valueNow:u}}function C8({panelDataArray:t}){const e=Array.from({length:t.length}),n=t.map(s=>s.constraints);let i=0,r=100;for(let s=0;s
{const s=t[r];We(s);const{callbacks:o,constraints:a,id:l}=s,{collapsedSize:c=0,collapsible:u}=a,O=n[l];if(O==null||i!==O){n[l]=i;const{onCollapse:f,onExpand:d,onResize:h}=o;h&&h(i,O),u&&(f||d)&&(d&&(O==null||O===c)&&i!==c&&d(),f&&(O==null||O!==c)&&i===c&&f())}})}const $g=10;function ha(t,e,n=$g){t=Number.parseFloat(t.toFixed(n)),e=Number.parseFloat(e.toFixed(n));const i=t-e;return i===0?0:i>0?1:-1}function Gn(t,e,n){return ha(t,e,n)===0}function X8(t,e=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...r)},e)}}function Uo({panelConstraints:t,panelIndex:e,size:n}){const i=t[e];We(i!=null);const{collapsedSize:r=0,collapsible:s,maxSize:o=100,minSize:a=0}=i;if(ha(n,a)<0)if(s){const l=(r+a)/2;ha(n,l)<0?n=r:n=a}else n=a;return n=Math.min(o,n),n=Number.parseFloat(n.toFixed($g)),n}function Wa(t,e){if(t.length!==e.length)return!1;for(let n=0;n 0&&(t=t<0?0-$:$)}}}{const u=t<0?o:a,O=n[u];We(O);const{collapsible:f}=O;if(f){const d=e[u];We(d!=null);const h=n[u];We(h);const{collapsedSize:p=0,minSize:$=0}=h;if(Gn(d,$)){const g=d-p;ha(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const u=t<0?1:-1;let O=t<0?a:o,f=0;for(;;){const h=e[O];We(h!=null);const $=Uo({panelConstraints:n,panelIndex:O,size:100})-h;if(f+=$,O+=u,O<0||O>=n.length)break}const d=Math.min(Math.abs(t),Math.abs(f));t=t<0?0-d:d}{let O=t<0?o:a;for(;O>=0&&O =0))break;t<0?O--:O++}}if(Gn(l,0))return e;{const u=t<0?a:o,O=e[u];We(O!=null);const f=O+l,d=Uo({panelConstraints:n,panelIndex:u,size:f});if(s[u]=d,!Gn(d,f)){let h=f-d,$=t<0?a:o;for(;$>=0&&$ 0?$--:$++}}}const c=s.reduce((u,O)=>O+u,0);return Gn(c,100)?s:e}function _P(t,e,n){const i=vP(t,e,n);return i!=null?[i,i+1]:[-1,-1]}function V8(t,e,n){return t.x e.x&&t.y e.y}function A8(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:FQ(t),b:FQ(e)};let i;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),i=t;We(i);const r={a:GQ(BQ(n.a)),b:GQ(BQ(n.b))};if(r.a===r.b){const s=i.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const l=s[a];if(l===o.a)return 1;if(l===o.b)return-1}}return Math.sign(r.a-r.b)}const E8=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function z8(t){const e=getComputedStyle(TP(t)).display;return e==="flex"||e==="inline-flex"}function q8(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||z8(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||E8.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function BQ(t){let e=t.length;for(;e--;){const n=t[e];if(We(n),q8(n))return n}return null}function GQ(t){return t&&Number(getComputedStyle(t).zIndex)||0}function FQ(t){const e=[];for(;t;)e.push(t),t=TP(t);return e}function TP(t){var e;return t.parentNode instanceof DocumentFragment&&((e=t.parentNode)==null?void 0:e.host)||t.parentNode}const kP=1,RP=2,CP=4,XP=8;function Z8(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}const Y8=Z8()==="coarse",xs=[];let Wf=!1;const ds=new Map,Nf=new Map,Ll=new Set;function M8(t,e,n,i,r,s){const{ownerDocument:o}=e,a={direction:n,element:e,hitAreaMargins:i,nonce:r,setResizeHandlerState:s},l=ds.get(o)??0;return ds.set(o,l+1),Ll.add(a),RO(),function(){Nf.delete(t),Ll.delete(a);const u=ds.get(o)??1;ds.set(o,u-1),RO(),AP(),u===1&&ds.delete(o)}}function ou(t){const{target:e}=t,{x:n,y:i}=Lf(t);Wf=!0,Qg({target:e,x:n,y:i}),RO(),xs.length>0&&(yg("down",t),t.preventDefault())}function Jr(t){const{x:e,y:n}=Lf(t);if(!Wf){const{target:i}=t;Qg({target:i,x:e,y:n})}yg("move",t),VP(),xs.length>0&&t.preventDefault()}function es(t){const{target:e}=t,{x:n,y:i}=Lf(t);Nf.clear(),Wf=!1,xs.length>0&&t.preventDefault(),yg("up",t),Qg({target:e,x:n,y:i}),VP(),RO()}function Qg({target:t,x:e,y:n}){xs.splice(0);let i=null;t instanceof HTMLElement&&(i=t),Ll.forEach(r=>{const{element:s,hitAreaMargins:o}=r,a=s.getBoundingClientRect(),{bottom:l,left:c,right:u,top:O}=a,f=Y8?o.coarse:o.fine;if(e>=c-f&&e<=u+f&&n>=O-f&&n<=l+f){if(i!==null&&s!==i&&!s.contains(i)&&!i.contains(s)&&A8(i,s)>0){let h=i,p=!1;for(;h&&!h.contains(s);){if(V8(h.getBoundingClientRect(),a)){p=!0;break}h=h.parentElement}if(p)return}xs.push(r)}})}function Vd(t,e){Nf.set(t,e)}function VP(){let t=!1,e=!1,n;xs.forEach(r=>{const{direction:s,nonce:o}=r;s.value==="horizontal"?t=!0:e=!0,n=o.value});let i=0;Nf.forEach(r=>{i|=r}),t&&e?Ad("intersection",i,n):t?Ad("horizontal",i,n):e?Ad("vertical",i,n):AP()}function RO(){ds.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",es),n.removeEventListener("mousedown",ou),n.removeEventListener("mouseleave",Jr),n.removeEventListener("mousemove",Jr),n.removeEventListener("touchmove",Jr),n.removeEventListener("touchstart",ou)}),window.removeEventListener("mouseup",es),window.removeEventListener("touchcancel",es),window.removeEventListener("touchend",es),Ll.size>0&&(Wf?(xs.length>0&&ds.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",es),n.addEventListener("mouseleave",Jr),n.addEventListener("mousemove",Jr),n.addEventListener("touchmove",Jr,{passive:!1}))}),window.addEventListener("mouseup",es),window.addEventListener("touchcancel",es),window.addEventListener("touchend",es)):ds.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("mousedown",ou),n.addEventListener("mousemove",Jr),n.addEventListener("touchmove",Jr,{passive:!1}),n.addEventListener("touchstart",ou))}))}function yg(t,e){Ll.forEach(n=>{const{setResizeHandlerState:i}=n,r=xs.includes(n);i(t,r,e)})}let op=null,hs=null;function I8(t,e){if(e){const n=(e&kP)!==0,i=(e&RP)!==0,r=(e&CP)!==0,s=(e&XP)!==0;if(n)return r?"se-resize":s?"ne-resize":"e-resize";if(i)return r?"sw-resize":s?"nw-resize":"w-resize";if(r)return"s-resize";if(s)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function AP(){hs!==null&&(document.head.removeChild(hs),op=null,hs=null)}function Ad(t,e,n){const i=I8(t,e);op!==i&&(op=i,hs===null&&(hs=document.createElement("style"),n&&(hs.nonce=n),document.head.appendChild(hs)),hs.innerHTML=`*{cursor: ${i}!important;}`)}function U8({defaultSize:t,dragState:e,layout:n,panelData:i,panelIndex:r,precision:s=3}){const o=n[r];let a;return o==null?a=t!==void 0?t.toPrecision(s):"1":i.length===1?a="1":a=o.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function au({sizeUnit:t,groupSizeInPixels:e,value:n}){if(n==null||t==="%")return n;if(!(e==null||e===0))return n/e*100}function D8({panelDataArray:t,groupSizeInPixels:e}){return t.some(i=>(i.constraints.sizeUnit??"%")==="px")&&(!e||Number.isNaN(e))?null:t.map(i=>{const r=i.constraints,s=r.sizeUnit??"%",o=au({groupSizeInPixels:e,sizeUnit:s,value:r.collapsedSize}),a=au({groupSizeInPixels:e,sizeUnit:s,value:r.defaultSize}),l=au({groupSizeInPixels:e,sizeUnit:s,value:r.maxSize}),c=au({groupSizeInPixels:e,sizeUnit:s,value:r.minSize});return{...r,collapsedSize:o??r.collapsedSize??0,defaultSize:a,maxSize:l??100,minSize:c??0,sizeUnit:"%"}})}function EP(t){return t.some(e=>(e.constraints.sizeUnit??"%")==="px")}function L8({layout:t,panelDataArray:e,prevGroupSize:n,nextGroupSize:i}){if(!EP(e)||n==null||i==null||n===0||i===0||Number.isNaN(n)||Number.isNaN(i))return null;const r=e.reduce((f,d,h)=>((d.constraints.sizeUnit??"%")==="px"&&f.push(h),f),[]);if(r.length===0)return null;const s=new Set(r),o=t.map(f=>f??0);r.reduce((f,d)=>f+(t[d]??0),0);const a=r.map(f=>(t[f]??0)/100*n/i*100),l=a.reduce((f,d)=>f+d,0),c=t.reduce((f,d,h)=>s.has(h)?f:f+(d??0),0),u=Math.max(0,100-l),O=c>0?u/c:0;r.forEach((f,d)=>{o[f]=a[d]});for(let f=0;f s+o,0);if(n.length!==e.length)throw new Error(`Invalid ${e.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!Gn(i,100)){console.warn(`WARNING: Invalid layout total size: ${n.map(s=>`${s}%`).join(", ")}. Layout normalization will be applied.`);for(let s=0;s {const l=r.value;if(!l)return;const c=o();if(!c)return;const u=Dl(e,l);for(let O=0;O {u.forEach(O=>{O.removeAttribute("aria-controls"),O.removeAttribute("aria-valuemax"),O.removeAttribute("aria-valuemin"),O.removeAttribute("aria-valuenow")})})}),It(a=>{const l=r.value;if(!l)return;const c=t.value;We(c);const u=o();if(!u)return;const{panelDataArray:O}=c,f=bP(e,l);We(f!=null,`No group found for id "${e}"`);const d=Dl(e,l);We(d);const h=d.map(p=>{const $=p.getAttribute("data-panel-resize-handle-id");We($);const[g,b]=_8(e,$,O,l);if(g==null||b==null)return()=>{};const y=Q=>{if(!Q.defaultPrevented)switch(Q.key){case"Enter":{Q.preventDefault();const v=u.findIndex(S=>S.id===g);if(v>=0){const S=u[v];We(S);const P=n.value[v],{collapsedSize:w=0,collapsible:T,minSize:q=0}=S.constraints;if(P!=null&&T){const U=rl({delta:Gn(P,w)?q-w:w-P,layout:n.value,panelConstraints:u.map(A=>A.constraints),pivotIndices:_P(e,$,l),trigger:"keyboard"});n.value!==U&&s(U)}}break}}};return p.addEventListener("keydown",y),()=>{p.removeEventListener("keydown",y)}});a(()=>{h.forEach(p=>p())})})}function KQ(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new TypeError("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function zP(t){return`reka:${t}`}function qP(t){return t.map(e=>{const{constraints:n,id:i,idIsFromProps:r,order:s}=e;return r?i:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function ZP(t,e){try{const n=zP(t),i=e.getItem(n);if(i){const r=JSON.parse(i);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function N8(t,e,n){const i=ZP(t,n)??{},r=qP(e);return i[r]??null}function j8(t,e,n,i,r){const s=zP(t),o=qP(e),a=ZP(t,r)??{},l={};e.forEach((c,u)=>{(c.constraints.sizeUnit??"%")==="px"&&(l[u]="px")}),a[o]={expandToSizes:Object.fromEntries(n.entries()),layout:i,...Object.keys(l).length>0&&{sizeUnits:l}};try{r.setItem(s,JSON.stringify(a))}catch(c){console.error(c)}}const B8=100,sl={getItem:t=>(KQ(sl),sl.getItem(t)),setItem:(t,e)=>{KQ(sl),sl.setItem(t,e)}},[YP,G8]=Qn("PanelGroup");var F8=M({__name:"SplitterGroup",props:{id:{type:[String,null],required:!1},autoSaveId:{type:[String,null],required:!1,default:null},direction:{type:String,required:!0},keyboardResizeBy:{type:[Number,null],required:!1,default:10},storage:{type:Object,required:!1,default:()=>sl},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,r={},{direction:s}=un(n),o=Xi(n.id,"reka-splitter-group"),a=qf(),{forwardRef:l,currentElement:c}=Ne(),u=H(null),O=H(null),f=H([]),d=H({}),h=H(new Map),p=H(0),$=j(()=>({autoSaveId:n.autoSaveId,direction:n.direction,dragState:u.value,id:o,keyboardResizeBy:n.keyboardResizeBy,storage:n.storage})),g=H({layout:f.value,panelDataArray:[],panelDataArrayChanged:!1});function b(){if(O.value!=null)return O.value;const te=c.value;if(te&&te instanceof HTMLElement){const le=te.getBoundingClientRect(),Oe=s.value==="horizontal"?le.width:le.height;if(!Number.isNaN(Oe))return O.value=Oe,Oe}return null}function y(te){const le=te??b();return D8({panelDataArray:g.value.panelDataArray,groupSizeInPixels:le})}function Q(te){const le=y(te);return le?g.value.panelDataArray.map((Oe,Qe)=>({...Oe,constraints:le[Qe]})):null}const v=te=>f.value=te;W8({eagerValuesRef:g,groupId:o,layout:f,panelDataArray:g.value.panelDataArray,setLayout:v,panelGroupElement:c,getPanelDataWithPercentConstraints:Q}),It(te=>{const le=c.value;if(!le||typeof ResizeObserver!="function")return;const Oe=new ResizeObserver(Qe=>{const he=Qe[0];if(!he)return;const{height:ye,width:Se}=he.contentRect,qe=s.value==="horizontal"?Se:ye;Number.isNaN(qe)||(O.value=qe)});le instanceof HTMLElement&&Oe.observe(le),te(()=>Oe.disconnect())}),It(()=>{const{panelDataArray:te}=g.value,{autoSaveId:le}=n;if(le){if(f.value.length===0||f.value.length!==te.length)return;let Oe=r[le];Oe||(Oe=X8(j8,B8),r[le]=Oe);const Qe=[...te],he=new Map(h.value);Oe(le,Qe,he,f.value,n.storage)}});function S(te,le){const{panelDataArray:Oe}=g.value,Qe=ge(Oe,te);return U8({defaultSize:le,dragState:u.value,layout:f.value,panelData:Oe,panelIndex:Qe})}function P(te){const{panelDataArray:le}=g.value;le.push(te),le.sort((Oe,Qe)=>{const he=Oe.order,ye=Qe.order;return he==null&&ye==null?0:he==null?-1:ye==null?1:he-ye}),g.value.panelDataArrayChanged=!0}Ze(()=>g.value.panelDataArrayChanged,()=>{if(g.value.panelDataArrayChanged){g.value.panelDataArrayChanged=!1;const{autoSaveId:te,storage:le}=$.value,{layout:Oe,panelDataArray:Qe}=g.value;let he=null;if(te){const qe=N8(te,Qe,le);qe&&(h.value=new Map(Object.entries(qe.expandToSizes)),he=qe.layout)}if(he===null){const qe=Q();if(!qe)return;he=C8({panelDataArray:qe})}const ye=y();if(!ye)return;const Se=HQ({layout:he,panelConstraints:ye});YV(Oe,Se)||(v(Se),g.value.layout=Se,i("layout",Se),Xo(Qe,Se,d.value))}}),Ze(O,(te,le)=>{if(le==null||te==null)return;const{layout:Oe,panelDataArray:Qe}=g.value;if(Oe.length===0||!EP(Qe))return;const he=L8({layout:Oe,panelDataArray:Qe,prevGroupSize:le,nextGroupSize:te});if(!he)return;const ye=y(te);if(!ye)return;const Se=HQ({layout:he,panelConstraints:ye});Wa(Oe,Se)||(v(Se),g.value.layout=Se,i("layout",Se),Xo(Qe,Se,d.value))});function w(te){return function(Oe){Oe.preventDefault();const Qe=c.value;if(!Qe)return()=>null;const{direction:he,dragState:ye,id:Se,keyboardResizeBy:qe}=$.value,{layout:Ee,panelDataArray:He}=g.value,{initialLayout:$t}=ye??{},Qt=_P(Se,te,Qe);let k=k8(Oe,te,he,ye,qe,Qe);if(k===0)return;const E=he==="horizontal";a.value==="rtl"&&E&&(k=-k);const N=y();if(!N)return;const ee=rl({delta:k,layout:$t??Ee,panelConstraints:N,pivotIndices:Qt,trigger:SP(Oe)?"keyboard":"mouse-or-touch"}),ne=!Wa(Ee,ee);(PP(Oe)||xP(Oe))&&p.value!==k&&(p.value=k,ne?Vd(te,0):E?Vd(te,k<0?kP:RP):Vd(te,k<0?CP:XP)),ne&&(v(ee),g.value.layout=ee,i("layout",ee),Xo(He,ee,d.value))}}function T(te,le){const{layout:Oe,panelDataArray:Qe}=g.value,he=y();if(!he)return;const ye=ge(Qe,te),Se=te.constraints.sizeUnit??"%";let qe=le;if(Se==="px"){const E=b();E!=null&&(qe=le/E*100)}const{panelSize:Ee,pivotIndices:He}=ue(Qe,te,Oe,he);We(Ee!=null);const Qt=ye===Qe.length-1?Ee-qe:qe-Ee,k=rl({delta:Qt,layout:Oe,panelConstraints:he,pivotIndices:He,trigger:"imperative-api"});Wa(Oe,k)||(v(k),g.value.layout=k,i("layout",k),Xo(Qe,k,d.value))}function q(te,le){const{layout:Oe,panelDataArray:Qe}=g.value,he=ge(Qe,te);Qe[he]=te,g.value.panelDataArrayChanged=!0;const ye=y();if(!ye)return;const Se=ye[he],{panelSize:qe}=ue(Qe,te,Oe,ye);if(qe===null)return;const Ee=(Se==null?void 0:Se.collapsedSize)??0,He=(Se==null?void 0:Se.maxSize)??100,$t=(Se==null?void 0:Se.minSize)??0;Se!=null&&Se.collapsible&&re(te)?qe!==Ee&&T(te,Ee):qe<$t?T(te,$t):qe>He&&T(te,He)}function U(te,le){const{direction:Oe}=$.value,{layout:Qe}=g.value;if(!c.value)return;const he=Df(te,c.value);We(he);const ye=wP(Oe,le);u.value={dragHandleId:te,dragHandleRect:he.getBoundingClientRect(),initialCursorPosition:ye,initialLayout:Qe}}function A(){u.value=null}function K(te){const{panelDataArray:le}=g.value,Oe=ge(le,te);Oe>=0&&(le.splice(Oe,1),delete d.value[te.id],g.value.panelDataArrayChanged=!0)}function ae(te){const{layout:le,panelDataArray:Oe}=g.value;if(te.constraints.collapsible){const Qe=y();if(!Qe)return;const{collapsedSize:he=0,panelSize:ye,pivotIndices:Se}=ue(Oe,te,le,Qe);if(We(ye!=null,`Panel size not found for panel "${te.id}"`),ye!==he){const qe=te.constraints.sizeUnit??"%",Ee=O.value??b(),He=qe==="px"&&Ee?ye/100*Ee:ye;h.value.set(te.id,He);const Qt=ge(Oe,te)===Oe.length-1?ye-he:he-ye,k=rl({delta:Qt,layout:le,panelConstraints:Qe,pivotIndices:Se,trigger:"imperative-api"});Wa(le,k)||(v(k),g.value.layout=k,i("layout",k),Xo(Oe,k,d.value))}}}function fe(te){const{layout:le,panelDataArray:Oe}=g.value;if(te.constraints.collapsible){const Qe=y();if(!Qe)return;const{collapsedSize:he=0,panelSize:ye=0,minSize:Se=0,pivotIndices:qe}=ue(Oe,te,le,Qe);if(ha(ye,he)<=0){const Ee=h.value.get(te.id),He=te.constraints.sizeUnit??"%",$t=O.value??b(),Qt=He==="px"&&$t?Ee!=null?Ee/$t*100:null:Ee,k=Qt!=null&&Qt>=Se?Qt:Se,N=ge(Oe,te)===Oe.length-1?ye-k:k-ye,ee=rl({delta:N,layout:le,panelConstraints:Qe,pivotIndices:qe,trigger:"imperative-api"});Wa(le,ee)||(v(ee),g.value.layout=ee,i("layout",ee),Xo(Oe,ee,d.value))}}}function J(te){const{layout:le,panelDataArray:Oe}=g.value,{panelSize:Qe}=ue(Oe,te,le);if(We(Qe!=null,`Panel size not found for panel "${te.id}"`),(te.constraints.sizeUnit??"%")==="px"){const ye=b();if(ye!=null)return Qe/100*ye}return Qe}function re(te){const{layout:le,panelDataArray:Oe}=g.value,Qe=y(),{collapsedSize:he=0,collapsible:ye,panelSize:Se}=ue(Oe,te,le,Qe??void 0);if(!ye)return!1;if(Se===void 0){const qe=ge(Oe,te),Ee=(Qe==null?void 0:Qe[qe])??te.constraints;return Ee.defaultSize===Ee.collapsedSize}else return Se===he}function se(te){const{layout:le,panelDataArray:Oe}=g.value,Qe=y(),{collapsedSize:he=0,collapsible:ye,panelSize:Se}=ue(Oe,te,le,Qe??void 0);return We(Se!=null,`Panel size not found for panel "${te.id}"`),!ye||Se>he}G8({direction:s,dragState:u.value,groupId:o,reevaluatePanelConstraints:q,registerPanel:P,registerResizeHandle:w,resizePanel:T,startDragging:U,stopDragging:A,unregisterPanel:K,panelGroupElement:c,collapsePanel:ae,expandPanel:fe,isPanelCollapsed:re,isPanelExpanded:se,getPanelSize:J,getPanelStyle:S});function ge(te,le){return te.findIndex(Oe=>Oe===le||Oe.id===le.id)}function ue(te,le,Oe,Qe){const he=ge(te,le),Se=he===te.length-1?[he-1,he]:[he,he+1],qe=Qe??y(),Ee=qe==null?void 0:qe[he],He=Oe[he];return{...Ee??le.constraints,panelSize:He,pivotIndices:Se}}return(te,le)=>(_(),I(m(Ie),{ref:m(l),as:te.as,"as-child":te.asChild,style:ti({display:"flex",flexDirection:m(s)==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"}),"data-panel-group":"","data-orientation":m(s),"data-panel-group-id":m(o)},{default:V(()=>[oe(te.$slots,"default",{layout:f.value})]),_:3},8,["as","as-child","style","data-orientation","data-panel-group-id"]))}}),H8=F8,K8=M({__name:"SplitterPanel",props:{collapsedSize:{type:Number,required:!1},collapsible:{type:Boolean,required:!1},defaultSize:{type:Number,required:!1},id:{type:String,required:!1},maxSize:{type:Number,required:!1},minSize:{type:Number,required:!1},order:{type:Number,required:!1},sizeUnit:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const i=t,r=n,s=YP();if(s===null)throw new Error("SplitterPanel components must be rendered within a SplitterGroup container");const{collapsePanel:o,expandPanel:a,getPanelSize:l,getPanelStyle:c,isPanelCollapsed:u,resizePanel:O,groupId:f,reevaluatePanelConstraints:d,registerPanel:h,unregisterPanel:p}=s,$=Xi(i.id,"reka-splitter-panel"),g=j(()=>({callbacks:{onCollapse:()=>r("collapse"),onExpand:()=>r("expand"),onResize:(...w)=>r("resize",...w)},constraints:{collapsedSize:i.collapsedSize&&Number.parseFloat(i.collapsedSize.toFixed($g)),collapsible:i.collapsible,defaultSize:i.defaultSize,maxSize:i.maxSize,minSize:i.minSize,sizeUnit:i.sizeUnit??"%"},id:$,idIsFromProps:i.id!==void 0,order:i.order}));Ze(()=>g.value.constraints,(w,T)=>{(T.collapsedSize!==w.collapsedSize||T.collapsible!==w.collapsible||T.maxSize!==w.maxSize||T.minSize!==w.minSize||T.sizeUnit!==w.sizeUnit)&&d(g.value,T)},{deep:!0}),dt(()=>{h(g.value)}),qi(()=>{p(g.value)});const b=j(()=>c(g.value,i.defaultSize)),y=j(()=>u(g.value)),Q=j(()=>!y.value);function v(){o(g.value)}function S(){a(g.value)}function P(w){O(g.value,w)}return e({collapse:v,expand:S,getSize(){return l(g.value)},resize:P,isCollapsed:y,isExpanded:Q}),(w,T)=>(_(),I(m(Ie),{id:m($),style:ti(b.value),as:w.as,"as-child":w.asChild,"data-panel":"","data-panel-collapsible":w.collapsible||void 0,"data-panel-group-id":m(f),"data-panel-id":m($),"data-panel-size":Number.parseFloat(`${b.value.flexGrow}`).toFixed(1),"data-state":w.collapsible?y.value?"collapsed":"expanded":void 0},{default:V(()=>[oe(w.$slots,"default",{isCollapsed:y.value,isExpanded:Q.value,expand:S,collapse:v,resize:P})]),_:3},8,["id","style","as","as-child","data-panel-collapsible","data-panel-group-id","data-panel-id","data-panel-size","data-state"]))}}),J8=K8;function e2({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:i}){It(r=>{const s=i.value;if(t.value||n.value===null||s===null)return;const o=Df(e,s);if(o==null)return;const a=l=>{var c;if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),(c=n.value)==null||c.call(n,l);break}case"F6":{l.preventDefault();const u=o.getAttribute("data-panel-group-id");We(u);const O=Dl(u,s),f=vP(u,e,s);We(f!==null);const d=l.shiftKey?f>0?f-1:O.length-1:f+1 {o.removeEventListener("keydown",a)})})}var t2=M({__name:"SplitterResizeHandle",props:{id:{type:String,required:!1},hitAreaMargins:{type:Object,required:!1},tabindex:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Ne(),{disabled:o}=un(n),a=YP();if(a===null)throw new Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:l,groupId:c,registerResizeHandle:u,startDragging:O,stopDragging:f,panelGroupElement:d}=a,h=Xi(n.id,"reka-splitter-resize-handle"),p=H("inactive"),$=H(!1),g=H(null),{nonce:b}=un(n),y=hP(b);return Ze(o,()=>{Sc&&(o.value?g.value=null:g.value=u(h))},{immediate:!0}),It(Q=>{var P,w;if(o.value||g.value===null)return;const v=s.value;if(!v)return;We(v);const S=(T,q,U)=>{var A;if(q)switch(T){case"down":{p.value="drag",O(h,U),i("dragging",!0);break}case"move":{p.value!=="drag"&&(p.value="hover"),(A=g.value)==null||A.call(g,U);break}case"up":{p.value="hover",f(),i("dragging",!1);break}}else p.value="inactive"};Q(M8(h,v,l,{coarse:((P=n.hitAreaMargins)==null?void 0:P.coarse)??15,fine:((w=n.hitAreaMargins)==null?void 0:w.fine)??5},y,S))}),e2({disabled:o,resizeHandler:g,handleId:h,panelGroupElement:d}),(Q,v)=>(_(),I(m(Ie),{id:m(h),ref:m(r),style:{touchAction:"none",userSelect:"none"},as:Q.as,"as-child":Q.asChild,role:"separator","data-resize-handle":"",tabindex:Q.tabindex,"data-state":p.value,"data-disabled":m(o)?"":void 0,"data-orientation":m(l),"data-panel-group-id":m(c),"data-resize-handle-active":p.value==="drag"?"pointer":$.value?"keyboard":void 0,"data-resize-handle-state":p.value,"data-panel-resize-handle-enabled":!m(o),"data-panel-resize-handle-id":m(h),onBlur:v[0]||(v[0]=S=>$.value=!1),onFocus:v[1]||(v[1]=S=>$.value=!1)},{default:V(()=>[oe(Q.$slots,"default")]),_:3},8,["id","as","as-child","tabindex","data-state","data-disabled","data-orientation","data-panel-group-id","data-resize-handle-active","data-resize-handle-state","data-panel-resize-handle-enabled","data-panel-resize-handle-id"]))}}),n2=t2;const[i2,r2]=Qn("SwitchRoot");var s2=M({__name:"SwitchRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:"on"},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{disabled:r}=un(n),s=vs(n,"modelValue",i,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),o=j(()=>s.value===n.trueValue);function a(){r.value||(s.value=o.value?n.falseValue:n.trueValue)}const{forwardRef:l,currentElement:c}=Ne(),u=og(c),O=j(()=>{var f;return n.id&&c.value?(f=document.querySelector(`[for="${n.id}"]`))==null?void 0:f.innerText:void 0});return r2({checked:o,toggleCheck:a,disabled:r}),(f,d)=>(_(),I(m(Ie),ve(f.$attrs,{id:f.id,ref:m(l),role:"switch",type:f.as==="button"?"button":void 0,value:f.value,"aria-label":f.$attrs["aria-label"]||O.value,"aria-checked":o.value,"aria-required":f.required,"data-state":o.value?"checked":"unchecked","data-disabled":m(r)?"":void 0,"as-child":f.asChild,as:f.as,disabled:m(r),onClick:a,onKeydown:Vf(cn(a,["prevent"]),["enter"])}),{default:V(()=>[oe(f.$slots,"default",{modelValue:m(s),checked:o.value}),m(u)&&f.name?(_(),I(m(nP),{key:0,type:"checkbox",name:f.name,disabled:m(r),required:f.required,value:f.value,checked:o.value},null,8,["name","disabled","required","value","checked"])):de("v-if",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),o2=s2,a2=M({__name:"SwitchThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=i2();return Ne(),(n,i)=>(_(),I(m(Ie),{"data-state":m(e).checked.value?"checked":"unchecked","data-disabled":m(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:V(()=>[oe(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"]))}}),l2=a2;const[bg,c2]=Qn("TabsRoot");var u2=M({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{orientation:r,unmountOnHide:s,dir:o}=un(n),a=qf(o);Ne();const l=vs(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),c=H(),u=rr(new Set);return c2({modelValue:l,changeModelValue:O=>{l.value=O},orientation:r,dir:a,unmountOnHide:s,activationMode:n.activationMode,baseId:Xi(void 0,"reka-tabs"),tabsList:c,contentIds:u,registerContent:O=>{u.value=new Set([...u.value,O])},unregisterContent:O=>{const f=new Set(u.value);f.delete(O),u.value=f}}),(O,f)=>(_(),I(m(Ie),{dir:m(a),"data-orientation":m(r),"as-child":O.asChild,as:O.as},{default:V(()=>[oe(O.$slots,"default",{modelValue:m(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),O2=u2;function MP(t,e){return`${t}-trigger-${e}`}function IP(t,e){return`${t}-content-${e}`}var f2=M({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n}=Ne(),i=bg(),r=j(()=>MP(i.baseId,e.value)),s=j(()=>IP(i.baseId,e.value)),o=j(()=>e.value===i.modelValue.value),a=H(o.value);return dt(()=>{i.registerContent(e.value),requestAnimationFrame(()=>{a.value=!1})}),Vs(()=>{i.unregisterContent(e.value)}),(l,c)=>(_(),I(m(Pc),{present:l.forceMount||o.value,"force-mount":""},{default:V(({present:u})=>[X(m(Ie),{id:s.value,ref:m(n),"as-child":l.asChild,as:l.as,role:"tabpanel","data-state":o.value?"active":"inactive","data-orientation":m(i).orientation.value,"aria-labelledby":r.value,hidden:!u,tabindex:"0",style:ti({animationDuration:a.value?"0s":void 0})},{default:V(()=>[!m(i).unmountOnHide.value||u?oe(l.$slots,"default",{key:0}):de("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),d2=f2,h2=M({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{loop:n}=un(e),{forwardRef:i,currentElement:r}=Ne(),s=bg();return s.tabsList=r,(o,a)=>(_(),I(m(cE),{"as-child":"",orientation:m(s).orientation.value,dir:m(s).dir.value,loop:m(n)},{default:V(()=>[X(m(Ie),{ref:m(i),role:"tablist","as-child":o.asChild,as:o.as,"aria-orientation":m(s).orientation.value},{default:V(()=>[oe(o.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),p2=h2,m2=M({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,{forwardRef:n}=Ne(),i=bg(),r=j(()=>MP(i.baseId,e.value)),s=j(()=>i.contentIds.value.has(e.value)?IP(i.baseId,e.value):void 0),o=j(()=>e.value===i.modelValue.value);return(a,l)=>(_(),I(m(pP),{"as-child":"",focusable:!a.disabled,active:o.value},{default:V(()=>[X(m(Ie),{id:r.value,ref:m(n),role:"tab",type:a.as==="button"?"button":void 0,as:a.as,"as-child":a.asChild,"aria-selected":o.value?"true":"false","aria-controls":s.value,"data-state":o.value?"active":"inactive",disabled:a.disabled,"data-disabled":a.disabled?"":void 0,"data-orientation":m(i).orientation.value,onMousedown:l[0]||(l[0]=cn(c=>{!a.disabled&&c.ctrlKey===!1?m(i).changeModelValue(a.value):c.preventDefault()},["left"])),onKeydown:l[1]||(l[1]=Vf(c=>m(i).changeModelValue(a.value),["enter","space"])),onFocus:l[2]||(l[2]=()=>{const c=m(i).activationMode!=="manual";!o.value&&!a.disabled&&c&&m(i).changeModelValue(a.value)})},{default:V(()=>[oe(a.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),g2=m2;function UP(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e {const n=new Array(t.length+e.length);for(let i=0;i ({classGroupId:t,validator:e}),LP=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),CO="-",JQ=[],y2="arbitrary..",b2=t=>{const e=S2(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return v2(o);const a=o.split(CO),l=a[0]===""&&a.length>1?1:0;return WP(a,l,e)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=i[o],c=n[o];return l?c?$2(c,l):l:c||JQ}return n[o]||JQ}}},WP=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const r=t[e],s=n.nextPart.get(r);if(s){const c=WP(t,e+1,s);if(c)return c}const o=n.validators;if(o===null)return;const a=e===0?t.join(CO):t.slice(e).join(CO),l=o.length;for(let c=0;c t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),i=e.slice(0,n);return i?y2+i:void 0})(),S2=t=>{const{theme:e,classGroups:n}=t;return P2(n,e)},P2=(t,e)=>{const n=LP();for(const i in t){const r=t[i];vg(r,n,i,e)}return n},vg=(t,e,n,i)=>{const r=t.length;for(let s=0;s {if(typeof t=="string"){w2(t,e,n);return}if(typeof t=="function"){_2(t,e,n,i);return}T2(t,e,n,i)},w2=(t,e,n)=>{const i=t===""?e:NP(e,t);i.classGroupId=n},_2=(t,e,n,i)=>{if(k2(t)){vg(t(i),e,n,i);return}e.validators===null&&(e.validators=[]),e.validators.push(Q2(n,t))},T2=(t,e,n,i)=>{const r=Object.entries(t),s=r.length;for(let o=0;o {let n=t;const i=e.split(CO),r=i.length;for(let s=0;s"isThemeGetter"in t&&t.isThemeGetter===!0,R2=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),i=Object.create(null);const r=(s,o)=>{n[s]=o,e++,e>t&&(e=0,i=n,n=Object.create(null))};return{get(s){let o=n[s];if(o!==void 0)return o;if((o=i[s])!==void 0)return r(s,o),o},set(s,o){s in n?n[s]=o:r(s,o)}}},ap="!",ey=":",C2=[],ty=(t,e,n,i,r)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:i,isExternal:r}),X2=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=r=>{const s=[];let o=0,a=0,l=0,c;const u=r.length;for(let p=0;pl?c-l:void 0;return ty(s,d,f,h)};if(e){const r=e+ey,s=i;i=o=>o.startsWith(r)?s(o.slice(r.length)):ty(C2,!1,o,void 0,!0)}if(n){const r=i;i=s=>n({className:s,parseClassName:r})}return i},V2=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,i)=>{e.set(n,1e6+i)}),n=>{const i=[];let r=[];for(let s=0;s 0&&(r.sort(),i.push(...r),r=[]),i.push(o)):r.push(o)}return r.length>0&&(r.sort(),i.push(...r)),i}},A2=t=>({cache:R2(t.cacheSize),parseClassName:X2(t),sortModifiers:V2(t),...b2(t)}),E2=/\s+/,z2=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:s}=e,o=[],a=t.trim().split(E2);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:O,modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(u);if(O){l=u+(l.length>0?" "+l:l);continue}let $=!!p,g=i($?h.substring(0,p):h);if(!g){if(!$){l=u+(l.length>0?" "+l:l);continue}if(g=i(h),!g){l=u+(l.length>0?" "+l:l);continue}$=!1}const b=f.length===0?"":f.length===1?f[0]:s(f).join(":"),y=d?b+ap:b,Q=y+g;if(o.indexOf(Q)>-1)continue;o.push(Q);const v=r(g,$);for(let S=0;S 0?" "+l:l)}return l},q2=(...t)=>{let e=0,n,i,r="";for(;e {if(typeof t=="string")return t;let e,n="";for(let i=0;i {let n,i,r,s;const o=l=>{const c=e.reduce((u,O)=>O(u),t());return n=A2(c),i=n.cache.get,r=n.cache.set,s=a,a(l)},a=l=>{const c=i(l);if(c)return c;const u=z2(l,n);return r(l,u),u};return s=o,(...l)=>s(q2(...l))},Y2=[],Nt=t=>{const e=n=>n[t]||Y2;return e.isThemeGetter=!0,e},BP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,GP=/^\((?:(\w[\w-]*):)?(.+)\)$/i,M2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,I2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,U2=/\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$/,D2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,L2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,W2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ts=t=>M2.test(t),Le=t=>!!t&&!Number.isNaN(Number(t)),ns=t=>!!t&&Number.isInteger(Number(t)),Ed=t=>t.endsWith("%")&&Le(t.slice(0,-1)),yr=t=>I2.test(t),FP=()=>!0,N2=t=>U2.test(t)&&!D2.test(t),Sg=()=>!1,j2=t=>L2.test(t),B2=t=>W2.test(t),G2=t=>!Te(t)&&!ke(t),F2=t=>qs(t,JP,Sg),Te=t=>BP.test(t),Ws=t=>qs(t,ex,N2),ny=t=>qs(t,rz,Le),H2=t=>qs(t,nx,FP),K2=t=>qs(t,tx,Sg),iy=t=>qs(t,HP,Sg),J2=t=>qs(t,KP,B2),lu=t=>qs(t,ix,j2),ke=t=>GP.test(t),Na=t=>xo(t,ex),ez=t=>xo(t,tx),ry=t=>xo(t,HP),tz=t=>xo(t,JP),nz=t=>xo(t,KP),cu=t=>xo(t,ix,!0),iz=t=>xo(t,nx,!0),qs=(t,e,n)=>{const i=BP.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},xo=(t,e,n=!1)=>{const i=GP.exec(t);return i?i[1]?e(i[1]):n:!1},HP=t=>t==="position"||t==="percentage",KP=t=>t==="image"||t==="url",JP=t=>t==="length"||t==="size"||t==="bg-size",ex=t=>t==="length",rz=t=>t==="number",tx=t=>t==="family-name",nx=t=>t==="number"||t==="weight",ix=t=>t==="shadow",sz=()=>{const t=Nt("color"),e=Nt("font"),n=Nt("text"),i=Nt("font-weight"),r=Nt("tracking"),s=Nt("leading"),o=Nt("breakpoint"),a=Nt("container"),l=Nt("spacing"),c=Nt("radius"),u=Nt("shadow"),O=Nt("inset-shadow"),f=Nt("text-shadow"),d=Nt("drop-shadow"),h=Nt("blur"),p=Nt("perspective"),$=Nt("aspect"),g=Nt("ease"),b=Nt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...Q(),ke,Te],S=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],w=()=>[ke,Te,l],T=()=>[ts,"full","auto",...w()],q=()=>[ns,"none","subgrid",ke,Te],U=()=>["auto",{span:["full",ns,ke,Te]},ns,ke,Te],A=()=>[ns,"auto",ke,Te],K=()=>["auto","min","max","fr",ke,Te],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...w()],re=()=>[ts,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],se=()=>[ts,"screen","full","dvw","lvw","svw","min","max","fit",...w()],ge=()=>[ts,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],ue=()=>[t,ke,Te],te=()=>[...Q(),ry,iy,{position:[ke,Te]}],le=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Oe=()=>["auto","cover","contain",tz,F2,{size:[ke,Te]}],Qe=()=>[Ed,Na,Ws],he=()=>["","none","full",c,ke,Te],ye=()=>["",Le,Na,Ws],Se=()=>["solid","dashed","dotted","double"],qe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>[Le,Ed,ry,iy],He=()=>["","none",h,ke,Te],$t=()=>["none",Le,ke,Te],Qt=()=>["none",Le,ke,Te],k=()=>[Le,ke,Te],E=()=>[ts,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[yr],breakpoint:[yr],color:[FP],container:[yr],"drop-shadow":[yr],ease:["in","out","in-out"],font:[G2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[yr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[yr],shadow:[yr],spacing:["px",Le],text:[yr],"text-shadow":[yr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ts,Te,ke,$]}],container:["container"],columns:[{columns:[Le,Te,ke,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:v()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[ns,"auto",ke,Te]}],basis:[{basis:[ts,"full","auto",a,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,ts,"auto","initial","none",Te]}],grow:[{grow:["",Le,ke,Te]}],shrink:[{shrink:["",Le,ke,Te]}],order:[{order:[ns,"first","last","none",ke,Te]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],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:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mbs:[{mbs:J()}],mbe:[{mbe:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],"inline-size":[{inline:["auto",...se()]}],"min-inline-size":[{"min-inline":["auto",...se()]}],"max-inline-size":[{"max-inline":["none",...se()]}],"block-size":[{block:["auto",...ge()]}],"min-block-size":[{"min-block":["auto",...ge()]}],"max-block-size":[{"max-block":["none",...ge()]}],w:[{w:[a,"screen",...re()]}],"min-w":[{"min-w":[a,"screen","none",...re()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",n,Na,Ws]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,iz,H2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ed,Te]}],"font-family":[{font:[ez,K2,e]}],"font-features":[{"font-features":[Te]}],"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:[r,ke,Te]}],"line-clamp":[{"line-clamp":[Le,"none",ke,ny]}],leading:[{leading:[s,...w()]}],"list-image":[{"list-image":["none",ke,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ue()}],"text-color":[{text:ue()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ke,Ws]}],"text-decoration-color":[{decoration:ue()}],"underline-offset":[{"underline-offset":[Le,"auto",ke,Te]}],"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",ke,Te]}],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",ke,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:Oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ns,ke,Te],radial:["",ke,Te],conic:[ns,ke,Te]},nz,J2]}],"bg-color":[{bg:ue()}],"gradient-from-pos":[{from:Qe()}],"gradient-via-pos":[{via:Qe()}],"gradient-to-pos":[{to:Qe()}],"gradient-from":[{from:ue()}],"gradient-via":[{via:ue()}],"gradient-to":[{to:ue()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-bs":[{"border-bs":ye()}],"border-w-be":[{"border-be":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:ue()}],"border-color-x":[{"border-x":ue()}],"border-color-y":[{"border-y":ue()}],"border-color-s":[{"border-s":ue()}],"border-color-e":[{"border-e":ue()}],"border-color-bs":[{"border-bs":ue()}],"border-color-be":[{"border-be":ue()}],"border-color-t":[{"border-t":ue()}],"border-color-r":[{"border-r":ue()}],"border-color-b":[{"border-b":ue()}],"border-color-l":[{"border-l":ue()}],"divide-color":[{divide:ue()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ke,Te]}],"outline-w":[{outline:["",Le,Na,Ws]}],"outline-color":[{outline:ue()}],shadow:[{shadow:["","none",u,cu,lu]}],"shadow-color":[{shadow:ue()}],"inset-shadow":[{"inset-shadow":["none",O,cu,lu]}],"inset-shadow-color":[{"inset-shadow":ue()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ue()}],"ring-offset-w":[{"ring-offset":[Le,Ws]}],"ring-offset-color":[{"ring-offset":ue()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":ue()}],"text-shadow":[{"text-shadow":["none",f,cu,lu]}],"text-shadow-color":[{"text-shadow":ue()}],opacity:[{opacity:[Le,ke,Te]}],"mix-blend":[{"mix-blend":[...qe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":qe()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ee()}],"mask-image-linear-from-color":[{"mask-linear-from":ue()}],"mask-image-linear-to-color":[{"mask-linear-to":ue()}],"mask-image-t-from-pos":[{"mask-t-from":Ee()}],"mask-image-t-to-pos":[{"mask-t-to":Ee()}],"mask-image-t-from-color":[{"mask-t-from":ue()}],"mask-image-t-to-color":[{"mask-t-to":ue()}],"mask-image-r-from-pos":[{"mask-r-from":Ee()}],"mask-image-r-to-pos":[{"mask-r-to":Ee()}],"mask-image-r-from-color":[{"mask-r-from":ue()}],"mask-image-r-to-color":[{"mask-r-to":ue()}],"mask-image-b-from-pos":[{"mask-b-from":Ee()}],"mask-image-b-to-pos":[{"mask-b-to":Ee()}],"mask-image-b-from-color":[{"mask-b-from":ue()}],"mask-image-b-to-color":[{"mask-b-to":ue()}],"mask-image-l-from-pos":[{"mask-l-from":Ee()}],"mask-image-l-to-pos":[{"mask-l-to":Ee()}],"mask-image-l-from-color":[{"mask-l-from":ue()}],"mask-image-l-to-color":[{"mask-l-to":ue()}],"mask-image-x-from-pos":[{"mask-x-from":Ee()}],"mask-image-x-to-pos":[{"mask-x-to":Ee()}],"mask-image-x-from-color":[{"mask-x-from":ue()}],"mask-image-x-to-color":[{"mask-x-to":ue()}],"mask-image-y-from-pos":[{"mask-y-from":Ee()}],"mask-image-y-to-pos":[{"mask-y-to":Ee()}],"mask-image-y-from-color":[{"mask-y-from":ue()}],"mask-image-y-to-color":[{"mask-y-to":ue()}],"mask-image-radial":[{"mask-radial":[ke,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ee()}],"mask-image-radial-from-color":[{"mask-radial-from":ue()}],"mask-image-radial-to-color":[{"mask-radial-to":ue()}],"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":Q()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ee()}],"mask-image-conic-from-color":[{"mask-conic-from":ue()}],"mask-image-conic-to-color":[{"mask-conic-to":ue()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:Oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,Te]}],filter:[{filter:["","none",ke,Te]}],blur:[{blur:He()}],brightness:[{brightness:[Le,ke,Te]}],contrast:[{contrast:[Le,ke,Te]}],"drop-shadow":[{"drop-shadow":["","none",d,cu,lu]}],"drop-shadow-color":[{"drop-shadow":ue()}],grayscale:[{grayscale:["",Le,ke,Te]}],"hue-rotate":[{"hue-rotate":[Le,ke,Te]}],invert:[{invert:["",Le,ke,Te]}],saturate:[{saturate:[Le,ke,Te]}],sepia:[{sepia:["",Le,ke,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,Te]}],"backdrop-blur":[{"backdrop-blur":He()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ke,Te]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ke,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ke,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ke,Te]}],"backdrop-invert":[{"backdrop-invert":["",Le,ke,Te]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ke,Te]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ke,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ke,Te]}],"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",ke,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ke,Te]}],ease:[{ease:["linear","initial",g,ke,Te]}],delay:[{delay:[Le,ke,Te]}],animate:[{animate:["none",b,ke,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,ke,Te]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:$t()}],"rotate-x":[{"rotate-x":$t()}],"rotate-y":[{"rotate-y":$t()}],"rotate-z":[{"rotate-z":$t()}],scale:[{scale:Qt()}],"scale-x":[{"scale-x":Qt()}],"scale-y":[{"scale-y":Qt()}],"scale-z":[{"scale-z":Qt()}],"scale-3d":["scale-3d"],skew:[{skew:k()}],"skew-x":[{"skew-x":k()}],"skew-y":[{"skew-y":k()}],transform:[{transform:[ke,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:E()}],"translate-x":[{"translate-x":E()}],"translate-y":[{"translate-y":E()}],"translate-z":[{"translate-z":E()}],"translate-none":["translate-none"],accent:[{accent:ue()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ue()}],"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",ke,Te]}],"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",ke,Te]}],fill:[{fill:["none",...ue()]}],"stroke-w":[{stroke:[Le,Na,Ws,ny]}],stroke:[{stroke:["none",...ue()]}],"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"]}},oz=Z2(sz);function Fe(...t){return oz(DP(t))}const az={key:0,class:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border"},ol=M({__name:"ResizableHandle",props:{id:{},hitAreaMargins:{},tabindex:{},disabled:{type:Boolean},nonce:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},withHandle:{type:Boolean}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,r=ht(n,"class","withHandle"),s=Dn(r,i);return(o,a)=>(_(),I(m(n2),ve({"data-slot":"resizable-handle"},m(s),{class:m(Fe)("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",n.class)}),{default:V(()=>[n.withHandle?(_(),W("div",az,[X(m(SV),{class:"size-2.5"})])):de("",!0)]),_:1},16,["class"]))}}),us=M({__name:"ResizablePanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},sizeUnit:{},asChild:{type:Boolean},as:{}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const s=Dn(t,n),o=H();function a(){return o.value}return e({collapse:()=>{var l;return(l=a())==null?void 0:l.collapse()},expand:()=>{var l;return(l=a())==null?void 0:l.expand()},resize:l=>{var c;return(c=a())==null?void 0:c.resize(l)},getSize:()=>{var l;return(l=a())==null?void 0:l.getSize()},isCollapsed:()=>{var l,c;return((c=(l=a())==null?void 0:l.isCollapsed)==null?void 0:c.value)??!1},isExpanded:()=>{var l,c;return((c=(l=a())==null?void 0:l.isExpanded)==null?void 0:c.value)??!0}}),(l,c)=>(_(),I(m(J8),ve({ref_key:"splitterRef",ref:o,"data-slot":"resizable-panel"},m(s)),{default:V(()=>[oe(l.$slots,"default")]),_:3},16))}}),lp=M({__name:"ResizablePanelGroup",props:{id:{},autoSaveId:{},direction:{},keyboardResizeBy:{},storage:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,r=ht(n,"class"),s=Dn(r,i);return(o,a)=>(_(),I(m(H8),ve({"data-slot":"resizable-panel-group"},m(s),{class:m(Fe)("flex h-full w-full data-[orientation=vertical]:flex-col",n.class)}),{default:V(()=>[oe(o.$slots,"default")]),_:3},16,["class"]))}}),lz=M({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=ht(n,"class"),s=Dn(r,i);return(o,a)=>(_(),I(m(O2),ve({"data-slot":"tabs"},m(s),{class:m(Fe)("flex flex-col gap-2",n.class)}),{default:V(()=>[oe(o.$slots,"default")]),_:3},16,["class"]))}}),uu=M({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(_(),I(m(d2),ve({"data-slot":"tabs-content",class:m(Fe)("flex-1 outline-none",e.class)},m(n)),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}}),cz=M({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(_(),I(m(p2),ve({"data-slot":"tabs-list"},m(n),{class:m(Fe)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-b-lg p-[3px]",e.class)}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}}),Ou=M({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class"),i=gi(n);return(r,s)=>(_(),I(m(g2),ve({"data-slot":"tabs-trigger"},m(i),{class:m(Fe)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:V(()=>[oe(r.$slots,"default")]),_:3},16,["class"]))}}),sy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,oy=DP,uz=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return oy(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=e,o=Object.keys(r).map(c=>{const u=n==null?void 0:n[c],O=s==null?void 0:s[c];if(u===null)return null;const f=sy(u)||sy(O);return r[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[O,f]=u;return f===void 0||(c[O]=f),c},{}),l=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:O,className:f,...d}=u;return Object.entries(d).every(h=>{let[p,$]=h;return Array.isArray($)?$.includes({...s,...a}[p]):{...s,...a}[p]===$})?[...c,O,f]:c},[]);return oy(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},Et=M({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;return(n,i)=>(_(),I(m(Ie),{"data-slot":"button",as:t.as,"as-child":t.asChild,class:wt(m(Fe)(m(jf)({variant:t.variant,size:t.size}),e.class))},{default:V(()=>[oe(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),jf=uz("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),en=[];for(let t=0;t<256;++t)en.push((t+256).toString(16).slice(1));function Oz(t,e=0){return(en[t[e+0]]+en[t[e+1]]+en[t[e+2]]+en[t[e+3]]+"-"+en[t[e+4]]+en[t[e+5]]+"-"+en[t[e+6]]+en[t[e+7]]+"-"+en[t[e+8]]+en[t[e+9]]+"-"+en[t[e+10]]+en[t[e+11]]+en[t[e+12]]+en[t[e+13]]+en[t[e+14]]+en[t[e+15]]).toLowerCase()}let zd;const fz=new Uint8Array(16);function dz(){if(!zd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");zd=crypto.getRandomValues.bind(crypto)}return zd(fz)}const hz=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ay={randomUUID:hz};function pa(t,e,n){var r;if(ay.randomUUID&&!t)return ay.randomUUID();t=t||{};const i=t.random??((r=t.rng)==null?void 0:r.call(t))??dz();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Oz(i)}class rx{constructor(){pe(this,"uuid","");pe(this,"formula","");pe(this,"calcValue","");pe(this,"calcValue1","");pe(this,"calcValue2","");pe(this,"calcValue3","");pe(this,"calcValue4","");pe(this,"calcValue5","");pe(this,"calcValue6","");pe(this,"calcValue7","");pe(this,"calcValue8","");pe(this,"calcValue9","");pe(this,"calcValue10","");pe(this,"flatRate","");pe(this,"value","");pe(this,"dependencys",[]);this.uuid=pa()}addDependency(e){this.dependencys.push(e)}toJSON(){return{formula:this.formula,calcValue:this.calcValue,calcValue1:this.calcValue1,calcValue2:this.calcValue2,calcValue3:this.calcValue3,calcValue4:this.calcValue4,calcValue5:this.calcValue5,calcValue6:this.calcValue6,calcValue7:this.calcValue7,calcValue8:this.calcValue8,calcValue9:this.calcValue9,calcValue10:this.calcValue10,flatRate:this.flatRate,value:this.value,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.formula=e.formula,this.value=e.value,this.flatRate=e.flatRate,this.calcValue=e.calcValue,this.calcValue1=e.calcValue1,this.calcValue2=e.calcValue2,this.calcValue3=e.calcValue3,this.calcValue4=e.calcValue4,this.calcValue5=e.calcValue5,this.calcValue6=e.calcValue6,this.calcValue7=e.calcValue7,this.calcValue8=e.calcValue8,this.calcValue9=e.calcValue9,this.calcValue10=e.calcValue10,e.dependencys.map(n=>{const i=new Xa;i.fromJSON(n),this.dependencys.push(i)})}}class Xa{constructor(){pe(this,"uuid","");pe(this,"relation","");pe(this,"formula","");pe(this,"borders",[]);this.uuid=pa()}addBorder(e){this.borders.push(e)}toJSON(){return{formula:this.formula,relation:this.relation,borders:this.borders.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.relation=e.relation,this.formula=e.formula,e.borders.map(n=>{const i=new rx;i.fromJSON(n),this.borders.push(i)})}}class pr{constructor(){pe(this,"uuid","");pe(this,"id","");pe(this,"type",1);pe(this,"isFocused",!1);pe(this,"dependencys",[]);this.uuid=pa(),this.id=this.uuid}hasDependencys(){return this.dependencys.length>0}toJSON(){return{id:this.id,type:this.type,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}getIdRecursiv(e){}fromJSON(e){this.id=e.id,this.type=e.type,e.dependencys.map(n=>{const i=new Xa;i.fromJSON(n),this.dependencys.push(i)})}changeFocus(e){this.uuid==e?this.isFocused=!0:this.isFocused=!1}addDependency(e){this.dependencys.push(e)}insertItem(e,n){return!1}cutItem(e){return null}deleteItem(e){return!1}}var sx=(t=>(t[t.Product=1]="Product",t[t.CMS=2]="CMS",t[t.News=3]="News",t))(sx||{});class cp extends Error{constructor(n,i,r){const s=n.status||n.status===0?n.status:"",o=n.statusText??"",a=`${s} ${o}`.trim(),l=a?`status code ${a}`:"an unknown error";super(`Request failed with ${l}: ${i.method} ${i.url}`);pe(this,"response");pe(this,"request");pe(this,"options");this.name="HTTPError",this.response=n,this.request=i,this.options=r}}class ox extends Error{constructor(n){let i="Non-error value was thrown";try{typeof n=="string"?i=n:n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"&&(i=n.message)}catch{}super(i);pe(this,"name","NonError");pe(this,"value");this.value=n}}class qd extends Error{constructor(n){const i=n!=null&&n.cause?n.cause instanceof Error?n.cause:new ox(n.cause):void 0;super(n!=null&&n.code?`Forced retry: ${n.code}`:"Forced retry",i?{cause:i}:void 0);pe(this,"name","ForceRetryError");pe(this,"customDelay");pe(this,"code");pe(this,"customRequest");this.customDelay=n==null?void 0:n.delay,this.code=n==null?void 0:n.code,this.customRequest=n==null?void 0:n.request}}const ly=(()=>{let t=!1,e=!1;const n=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(n&&i)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(r){if(r instanceof Error&&r.message==="unsupported BodyInit type")return!1;throw r}return t&&!e})(),pz=typeof globalThis.AbortController=="function",ax=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",mz=typeof globalThis.ReadableStream=="function",gz=typeof globalThis.FormData=="function",lx=["get","post","put","patch","head","delete"],$z={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Zd=2147483647,Qz=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,cx=Symbol("stop");class ux{constructor(e){pe(this,"options");this.options=e}}const yz=t=>new ux(t),bz={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},vz={next:!0},Sz={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},Pz=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[n,i]of t)e+=Qz,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,e+=typeof i=="string"?new TextEncoder().encode(i).length:i.size;return e}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if(typeof t=="string")return new TextEncoder().encode(t).length;if(t instanceof URLSearchParams)return new TextEncoder().encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if(typeof t=="object"&&t!==null)try{const e=JSON.stringify(t);return new TextEncoder().encode(e).length}catch{return 0}return 0},Ox=(t,e,n)=>{let i,r=0;return t.pipeThrough(new TransformStream({transform(s,o){if(o.enqueue(s),i){r+=i.byteLength;let a=e===0?0:r/e;a>=1&&(a=1-Number.EPSILON),n==null||n({percent:a,totalBytes:Math.max(e,r),transferredBytes:r},i)}i=s},flush(){i&&(r+=i.byteLength,n==null||n({percent:1,totalBytes:Math.max(e,r),transferredBytes:r},i))}}))},xz=(t,e)=>{if(!t.body)return t;if(t.status===204)return new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers});const n=Math.max(0,Number(t.headers.get("content-length"))||0);return new Response(Ox(t.body,n,e),{status:t.status,statusText:t.statusText,headers:t.headers})},wz=(t,e,n)=>{if(!t.body)return t;const i=Pz(n??t.body);return new Request(t,{duplex:"half",body:Ox(t.body,i,e)})},Bs=t=>t!==null&&typeof t=="object",fu=(...t)=>{for(const e of t)if((!Bs(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Pg({},...t)},fx=(t={},e={})=>{const n=new globalThis.Headers(t),i=e instanceof globalThis.Headers,r=new globalThis.Headers(e);for(const[s,o]of r.entries())i&&o==="undefined"||o===void 0?n.delete(s):n.set(s,o);return n};function du(t,e,n){return Object.hasOwn(e,n)&&e[n]===void 0?[]:Pg(t[n]??[],e[n]??[])}const dx=(t={},e={})=>({beforeRequest:du(t,e,"beforeRequest"),beforeRetry:du(t,e,"beforeRetry"),afterResponse:du(t,e,"afterResponse"),beforeError:du(t,e,"beforeError")}),_z=(t,e)=>{const n=new URLSearchParams;for(const i of[t,e])if(i!==void 0)if(i instanceof URLSearchParams)for(const[r,s]of i.entries())n.append(r,s);else if(Array.isArray(i))for(const r of i){if(!Array.isArray(r)||r.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");n.append(String(r[0]),String(r[1]))}else if(Bs(i))for(const[r,s]of Object.entries(i))s!==void 0&&n.append(r,String(s));else{const r=new URLSearchParams(i);for(const[s,o]of r.entries())n.append(s,o)}return n},Pg=(...t)=>{let e={},n={},i={},r;const s=[];for(const o of t)if(Array.isArray(o))Array.isArray(e)||(e=[]),e=[...e,...o];else if(Bs(o)){for(let[a,l]of Object.entries(o)){if(a==="signal"&&l instanceof globalThis.AbortSignal){s.push(l);continue}if(a==="context"){if(l!=null&&(!Bs(l)||Array.isArray(l)))throw new TypeError("The `context` option must be an object");e={...e,context:l==null?{}:{...e.context,...l}};continue}if(a==="searchParams"){l==null?r=void 0:r=r===void 0?l:_z(r,l);continue}Bs(l)&&a in e&&(l=Pg(e[a],l)),e={...e,[a]:l}}Bs(o.hooks)&&(i=dx(i,o.hooks),e.hooks=i),Bs(o.headers)&&(n=fx(n,o.headers),e.headers=n)}return r!==void 0&&(e.searchParams=r),s.length>0&&(s.length===1?e.signal=s[0]:ax?e.signal=AbortSignal.any(s):e.signal=s.at(-1)),e},Tz=t=>lx.includes(t)?t.toUpperCase():t,kz=["get","put","head","delete","options","trace"],Rz=[408,413,429,500,502,503,504],Cz=[413,429,503],cy={limit:2,methods:kz,statusCodes:Rz,afterStatusCodes:Cz,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3,jitter:void 0,retryOnTimeout:!1},Xz=(t={})=>{if(typeof t=="number")return{...cy,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.methods&&(t.methods=t.methods.map(n=>n.toLowerCase())),t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");const e=Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0));return{...cy,...e}};class up extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);pe(this,"request");this.name="TimeoutError",this.request=n}}async function Vz(t,e,n,i){return new Promise((r,s)=>{const o=setTimeout(()=>{n&&n.abort(),s(new up(t))},i.timeout);i.fetch(t,e).then(r).catch(s).then(()=>{clearTimeout(o)})})}async function Az(t,{signal:e}){return new Promise((n,i)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",r,{once:!0}));function r(){clearTimeout(s),i(e.reason)}const s=setTimeout(()=>{e==null||e.removeEventListener("abort",r),n()},t)})}const Ez=(t,e)=>{const n={};for(const i in e)Object.hasOwn(e,i)&&!(i in Sz)&&!(i in bz)&&(!(i in t)||i in vz)&&(n[i]=e[i]);return n},zz=t=>t===void 0?!1:Array.isArray(t)?t.length>0:t instanceof URLSearchParams?t.size>0:typeof t=="object"?Object.keys(t).length>0:typeof t=="string"?t.trim().length>0:!!t;function qz(t){return t instanceof cp||(t==null?void 0:t.name)===cp.name}function Zz(t){return t instanceof up||(t==null?void 0:t.name)===up.name}var Of,hx,vi,si,fn,xe,ms,Fi,to,Ue,ju,px,Op,Bu,os,fp,mx,al,Gu,dp;const Tl=class Tl{constructor(e,n={}){Qi(this,Ue);pe(this,"request");Qi(this,vi);Qi(this,si,0);Qi(this,fn);Qi(this,xe);Qi(this,ms);Qi(this,Fi);Qi(this,to);var r,s,o;if(yi(this,fn,e),yi(this,xe,{...n,headers:fx(ie(this,fn).headers,n.headers),hooks:dx({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:Tz(n.method??ie(this,fn).method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:Xz(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}}),typeof ie(this,fn)!="string"&&!(ie(this,fn)instanceof URL||ie(this,fn)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(ie(this,xe).prefixUrl&&typeof ie(this,fn)=="string"){if(ie(this,fn).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");ie(this,xe).prefixUrl.endsWith("/")||(ie(this,xe).prefixUrl+="/"),yi(this,fn,ie(this,xe).prefixUrl+ie(this,fn))}pz&&ax&&(yi(this,Fi,ie(this,xe).signal??ie(this,fn).signal),yi(this,vi,new globalThis.AbortController),ie(this,xe).signal=ie(this,Fi)?AbortSignal.any([ie(this,Fi),ie(this,vi).signal]):ie(this,vi).signal),ly&&(ie(this,xe).duplex="half"),ie(this,xe).json!==void 0&&(ie(this,xe).body=((s=(r=ie(this,xe)).stringifyJson)==null?void 0:s.call(r,ie(this,xe).json))??JSON.stringify(ie(this,xe).json),ie(this,xe).headers.set("content-type",ie(this,xe).headers.get("content-type")??"application/json"));const i=n.headers&&new globalThis.Headers(n.headers).has("content-type");if(ie(this,fn)instanceof globalThis.Request&&(gz&&ie(this,xe).body instanceof globalThis.FormData||ie(this,xe).body instanceof URLSearchParams)&&!i&&ie(this,xe).headers.delete("content-type"),this.request=new globalThis.Request(ie(this,fn),ie(this,xe)),zz(ie(this,xe).searchParams)){const l="?"+(typeof ie(this,xe).searchParams=="string"?ie(this,xe).searchParams.replace(/^\?/,""):new URLSearchParams(ct(o=Tl,Of,hx).call(o,ie(this,xe).searchParams)).toString()),c=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,l);this.request=new globalThis.Request(c,ie(this,xe))}if(ie(this,xe).onUploadProgress){if(typeof ie(this,xe).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!ly)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=ct(this,Ue,dp).call(this,this.request,ie(this,xe).body??void 0)}}static create(e,n){var o,a,l;const i=new Tl(e,n),r=async()=>{var u,O,f,d,h,p,$,g,b,y,Q,v;if(typeof ie(i,xe).timeout=="number"&&ie(i,xe).timeout>Zd)throw new RangeError(`The \`timeout\` option cannot be greater than ${Zd}`);await Promise.resolve();let c=await ct(u=i,Ue,mx).call(u);for(const S of ie(i,xe).hooks.afterResponse){const P=ct(O=i,Ue,Op).call(O,c.clone());let w;try{w=await S(i.request,ct(f=i,Ue,al).call(f),P,{retryCount:ie(i,si)})}catch(q){throw ct(d=i,Ue,os).call(d,P),ct(h=i,Ue,os).call(h,c),q}if(w instanceof ux)throw ct(p=i,Ue,os).call(p,P),ct($=i,Ue,os).call($,c),new qd(w.options);const T=w instanceof globalThis.Response?w:c;P!==T&&ct(g=i,Ue,os).call(g,P),c!==T&&ct(b=i,Ue,os).call(b,c),c=T}if(ct(y=i,Ue,Op).call(y,c),!c.ok&&(typeof ie(i,xe).throwHttpErrors=="function"?ie(i,xe).throwHttpErrors(c.status):ie(i,xe).throwHttpErrors)){let S=new cp(c,i.request,ct(Q=i,Ue,al).call(Q));for(const P of ie(i,xe).hooks.beforeError)S=await P(S,{retryCount:ie(i,si)});throw S}if(ie(i,xe).onDownloadProgress){if(typeof ie(i,xe).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!mz)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const S=c.clone();return ct(v=i,Ue,os).call(v,c),xz(S,ie(i,xe).onDownloadProgress)}return c},s=ct(o=i,Ue,fp).call(o,r).finally(()=>{var u,O;const c=ie(i,ms);ct(u=i,Ue,Bu).call(u,(c==null?void 0:c.body)??void 0),ct(O=i,Ue,Bu).call(O,i.request.body??void 0)});for(const[c,u]of Object.entries($z))c==="bytes"&&typeof((l=(a=globalThis.Response)==null?void 0:a.prototype)==null?void 0:l.bytes)!="function"||(s[c]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||u);const O=await s;if(c==="json"){if(O.status===204)return"";const f=await O.text();return f===""?"":n.parseJson?n.parseJson(f):JSON.parse(f)}return O[c]()});return s}};Of=new WeakSet,hx=function(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0)):e},vi=new WeakMap,si=new WeakMap,fn=new WeakMap,xe=new WeakMap,ms=new WeakMap,Fi=new WeakMap,to=new WeakMap,Ue=new WeakSet,ju=function(){const e=ie(this,xe).retry.delay(ie(this,si));let n=e;ie(this,xe).retry.jitter===!0?n=Math.random()*e:typeof ie(this,xe).retry.jitter=="function"&&(n=ie(this,xe).retry.jitter(e),(!Number.isFinite(n)||n<0)&&(n=e));const i=ie(this,xe).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(i,n)},px=async function(e){if(z$(this,si)._++,ie(this,si)>ie(this,xe).retry.limit)throw e;const n=e instanceof Error?e:new ox(e);if(n instanceof qd)return n.customDelay??ct(this,Ue,ju).call(this);if(!ie(this,xe).retry.methods.includes(this.request.method.toLowerCase()))throw e;if(ie(this,xe).retry.shouldRetry!==void 0){const i=await ie(this,xe).retry.shouldRetry({error:n,retryCount:ie(this,si)});if(i===!1)throw e;if(i===!0)return ct(this,Ue,ju).call(this)}if(Zz(e)&&!ie(this,xe).retry.retryOnTimeout)throw e;if(qz(e)){if(!ie(this,xe).retry.statusCodes.includes(e.response.status))throw e;const i=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(i&&ie(this,xe).retry.afterStatusCodes.includes(e.response.status)){let r=Number(i)*1e3;Number.isNaN(r)?r=Date.parse(i)-Date.now():r>=Date.parse("2024-01-01")&&(r-=Date.now());const s=ie(this,xe).retry.maxRetryAfter??r;return r ie(this,xe).parseJson(await e.text())),e},Bu=function(e){e&&e.cancel().catch(()=>{})},os=function(e){ct(this,Ue,Bu).call(this,e.body??void 0)},fp=async function(e){try{return await e()}catch(n){const i=Math.min(await ct(this,Ue,px).call(this,n),Zd);if(ie(this,si)<1)throw n;if(await Az(i,ie(this,Fi)?{signal:ie(this,Fi)}:{}),n instanceof qd&&n.customRequest){const r=ie(this,xe).signal?new globalThis.Request(n.customRequest,{signal:ie(this,xe).signal}):new globalThis.Request(n.customRequest);ct(this,Ue,Gu).call(this,r)}for(const r of ie(this,xe).hooks.beforeRetry){const s=await r({request:this.request,options:ct(this,Ue,al).call(this),error:n,retryCount:ie(this,si)});if(s instanceof globalThis.Request){ct(this,Ue,Gu).call(this,s);break}if(s instanceof globalThis.Response)return s;if(s===cx)return}return ct(this,Ue,fp).call(this,e)}},mx=async function(){var n;(n=ie(this,vi))!=null&&n.signal.aborted&&(yi(this,vi,new globalThis.AbortController),ie(this,xe).signal=ie(this,Fi)?AbortSignal.any([ie(this,Fi),ie(this,vi).signal]):ie(this,vi).signal,this.request=new globalThis.Request(this.request,{signal:ie(this,xe).signal}));for(const i of ie(this,xe).hooks.beforeRequest){const r=await i(this.request,ct(this,Ue,al).call(this),{retryCount:ie(this,si)});if(r instanceof Response)return r;if(r instanceof globalThis.Request){ct(this,Ue,Gu).call(this,r);break}}const e=Ez(this.request,ie(this,xe));return yi(this,ms,this.request),this.request=ie(this,ms).clone(),ie(this,xe).timeout===!1?ie(this,xe).fetch(ie(this,ms),e):Vz(ie(this,ms),e,ie(this,vi),ie(this,xe))},al=function(){if(!ie(this,to)){const{hooks:e,...n}=ie(this,xe);yi(this,to,Object.freeze(n))}return ie(this,to)},Gu=function(e){yi(this,to,void 0),this.request=ct(this,Ue,dp).call(this,e)},dp=function(e,n){return!ie(this,xe).onUploadProgress||!e.body?e:wz(e,ie(this,xe).onUploadProgress,n??ie(this,xe).body??void 0)},Qi(Tl,Of);let XO=Tl;/*! MIT License © Sindre Sorhus */const hp=t=>{const e=(n,i)=>XO.create(n,fu(t,i));for(const n of lx)e[n]=(i,r)=>XO.create(i,fu(t,r,{method:n}));return e.create=n=>hp(fu(n)),e.extend=n=>(typeof n=="function"&&(n=n(t??{})),hp(fu(t,n))),e.stop=cx,e.retry=yz,e},Yd=hp(),Cn=Yd.create({prefixUrl:"/apps",timeout:1e4,hooks:{afterResponse:[(t,e,n)=>(console.log(n),n),async(t,e,n)=>{if(n.status===403){const i=await Yd("https://example.com/token").text();return t.headers.set("Authorization",`token ${i}`),Yd(t)}}]}}),Yz=async t=>{try{return await(await Cn.post("api/plugin/system/psc/xmlcalc/product/config",{json:{product:t}})).json()}catch(e){throw console.error("Error loading JSON from API:",e),e}},Mz=async t=>{try{return await(await Cn.post("api/plugin/system/psc/xmlcalc/price",{json:{product:t}})).json()}catch(e){throw console.error("Error loading price from API:",e),e}},Iz=async(t,e,n)=>{try{return await(await Cn.post("api/plugin/system/psc/xmlcalc/product/design",{json:{product:t,shop:e,jsonProduct:n}})).json()}catch(i){throw console.error("Error saving design to API:",i),i}},Md=async(t,e)=>{try{return await(await Cn.post("api/plugin/system/psc/xmlcalc/product/xml",{json:{product:t,xml:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},Uz=async(t,e)=>{try{return await(await Cn.put("api/plugin/system/psc/xmlcalc/product/"+t,{json:{calcXml:e}})).json()}catch(n){throw console.error("Error XML to PRODUCT API:",n),n}},uy=async(t,e,n)=>{try{return await(await Cn.put("api/plugin/system/psc/xmlcalc/shop/"+t,{json:{formel:e,parameter:n}})).json()}catch(i){throw console.error("Error saving design to API:",i),i}},Dz=async(t,e)=>{try{return await(await Cn.put("api/system/papercontainer",{json:{content:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},Lz=async(t,e,n)=>{const i=new FormData;i.append("file",t),i.append("folder",e);try{return await(await Cn.post("api/media/create",{body:i,onDownloadProgress:s=>{n(Math.round(s.percent*100))}})).json()}catch(r){throw console.error("Error uploading file:",r),r}},gx=async()=>{try{return await(await Cn.get("api/media/folder/all")).json()}catch(t){throw console.error("Error fetching media directories:",t),t}},Wz=async(t,e=1)=>{try{return await(await Cn.get(`api/media/folder/${t}/page/${e}/12`)).json()}catch(n){throw console.error(`Error fetching media for folder ${t}:`,n),n}},Nz=async(t,e,n)=>{try{return await(await Cn.post("api/plugin/custom/psc/formbuilder/layouts/add",{json:{title:t,data:n,shop:e}})).json()}catch(i){throw console.error("Error saving layout:",i),i}},jz=async t=>{try{return await(await Cn.get("api/plugin/custom/psc/formbuilder/layouts/all/"+t)).json()}catch(e){throw console.error("Error fetching layouts:",e),e}},Bz=async(t,e,n)=>{try{return await(await Cn.post("api/plugin/system/psc/xmlcalc/product/pd",{json:{shop:t,json:e,values:n}})).json()}catch(i){throw console.error("Error fetching preview:",i),i}},Gz=async(t,e,n,i,r,s)=>await(await Cn.post("api/plugin/custom/psc/formbuilder/ai/chat",{json:{message:t,xml:e,formulas:n,parameter:i,paperDb:r,history:s},timeout:18e4})).json(),$x=async t=>{try{return(await(await Cn.get(`api/media/${t}`)).json()).url}catch(e){throw console.error(`Error fetching media url for ${t}:`,e),e}};class Oy extends pr{constructor(){super();pe(this,"default","");pe(this,"placeHolder","Placeholder");pe(this,"required",!1);pe(this,"name","");pe(this,"xmlType","input");pe(this,"minValue",0);pe(this,"minCalc","");pe(this,"maxCalc","");pe(this,"maxValue",0);this.type=2}toJSON(){return Object.assign(super.toJSON(),{placeHolder:this.placeHolder,default:this.default,name:this.name,minValue:this.minValue,minCalc:this.minCalc,maxValue:this.maxValue,maxCalc:this.maxCalc,required:this.required})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.required=n.required,this.placeHolder=n.placeHolder,this.minValue=n.minValue,this.minCalc=n.minCalc,this.maxValue=n.maxValue,this.maxCalc=n.maxCalc}}class oo extends pr{constructor(){super();pe(this,"items",[]);this.type=8}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{options:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),n.options.map(i=>{const r=wo.getModelForType(i.type);r.fromJSON(i),this.items.push(r)})}getIdRecursiv(n){this.items.forEach(i=>{n.push(i.id),i.getIdRecursiv(n)})}cutItem(n){let i=null;return this.items.forEach((r,s)=>{if(r.uuid===n)return i=this.items.splice(s,1)[0],!0;i===null&&(i=r.cutItem(n))}),i}insertItem(n,i){let r=!1;for(let s=0;s{if(i.uuid===n.uuid)return n=this.items.splice(r,1)[0],!0;if(i.deleteItem(n))return!0})}}class Qx extends pr{constructor(){super();pe(this,"columns",[]);this.type=7}addColumnAtTheEnd(n){this.columns.push(n)}addColumnAtTheBeginning(n){this.columns.unshift(n)}getIdRecursiv(n){this.columns.forEach(i=>{i.getIdRecursiv(n)})}deleteColumnAt(n){return this.columns.some((i,r)=>{if(i.uuid===n)return this.columns.splice(r,1)[0],!0})}addColumnAt(n,i){let r=!1;for(let s=0;s (n.push(i.toJSON()),n),[])})}cutItem(n){let i=null;return this.columns.some(r=>{if(i=r.cutItem(n),i!==null)return!0}),i}insertItem(n,i){return this.columns.some(r=>{if(r.insertItem(n,i))return!0}),!1}deleteItem(n){return this.columns.some(i=>{if(i.deleteItem(n))return!0}),!1}insertItemInEmptyColumn(n,i,r){return this.uuid==i?(r.items.push(n),!0):!1}fromJSON(n){super.fromJSON(n),n.columns.map(i=>{const r=new oo;r.fromJSON(i),this.columns.push(r)})}}class yx extends pr{constructor(){super();pe(this,"default","");pe(this,"name","");pe(this,"xmlType","img");pe(this,"url","");this.type=9}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class bx extends pr{constructor(){super();pe(this,"items",[]);pe(this,"label","");this.type=12}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{label:this.label,options:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),this.label=n.label,n.options.map(i=>{const r=wo.getModelForType(i.type);r.fromJSON(i),this.items.push(r)})}getIdRecursiv(n){this.items.forEach(i=>{n.push(i.id),i.getIdRecursiv(n)})}cutItem(n){let i=null;return this.items.forEach((r,s)=>{if(r.uuid===n)return i=this.items.splice(s,1)[0],!0;i===null&&(i=r.cutItem(n))}),i}insertItem(n,i){let r=!1;for(let s=0;s {if(i.uuid===n.uuid)return n=this.items.splice(r,1)[0],!0;if(i.deleteItem(n))return!0})}}class vx extends pr{constructor(){super();pe(this,"default","");pe(this,"name","");pe(this,"xmlType","hidden");this.type=1,this.name="hidden"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}let Sx=class{constructor(e){pe(this,"uuid","");pe(this,"id","");pe(this,"name","");pe(this,"dependencys",[]);this.uuid=pa(),this.id=e}addDependency(e){this.dependencys.push(e)}toJSON(){return{id:this.id,name:this.name,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.name=e.name,this.id=e.id,e.dependencys.map(n=>{const i=new Xa;i.fromJSON(n),this.dependencys.push(i)})}};class Px extends pr{constructor(){super();pe(this,"default","");pe(this,"name","");pe(this,"xmlType","select");pe(this,"options",[]);pe(this,"mode","normal");pe(this,"container","");this.type=3}addOption(n){this.options.push(n)}hasDependencys(){return this.options.reduce((i,r)=>(r.dependencys.length>0&&(i=!0),i),!1)||super.hasDependencys()}toJSON(){return Object.assign(super.toJSON(),{default:this.default,mode:this.mode,container:this.container,options:this.options.reduce((n,i)=>(n.push(i.toJSON()),n),[]),name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.mode=n.mode,this.container=n.container,this.default=n.default,n.options.map(i=>{const r=new Sx("");r.fromJSON(i),this.options.push(r)})}}class Fz extends pr{constructor(){super();pe(this,"default","");pe(this,"name","");pe(this,"xmlType","text");this.type=4,this.default="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class Hz extends pr{constructor(){super();pe(this,"default","");pe(this,"name","");pe(this,"xmlType","text");this.type=5}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class xx extends pr{constructor(){super();pe(this,"default","");pe(this,"variant","1");pe(this,"name","");pe(this,"xmlType","text");this.type=6,this.default="Headline"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name,variant:this.variant})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.variant=n.variant}}let wo=class{static getModelForType(e){switch(e){case 12:return new bx;case 9:return new yx;case 8:return new oo;case 7:return new Qx;case 6:return new xx;case 5:return new Hz;case 4:return new Fz;case 3:return new Px;case 2:return new Oy;case 1:return new vx;default:return new Oy}}};const Ti=C1("items",{state:()=>({uuid:pa(),items:[],name:pa()}),getters:{getCount:t=>t.items.length,getIdRecursiv(t){let e=[];return t.items.forEach(n=>{e.push(n.id),n.getIdRecursiv(e)}),e},getItems:t=>t.items,getUuid:t=>t.uuid},actions:{loadJSON(){let t=this.items.reduce((e,n)=>(e.push(n.toJSON()),e),[]);return[{uuid:this.uuid,name:this.name,options:t}]},parseJSON(t){this.items=[];let e=JSON.parse(t);this.name=e[0].name,e[0].uuid&&(this.uuid=e[0].uuid),e[0].options.map(n=>{const i=wo.getModelForType(n.type);i.fromJSON(n),this.addElement(i)})},addElement(t){this.items.push(t)},deleteItem(t){return this.items.some((e,n)=>{if(e.uuid===t.uuid)return t=this.items.splice(n,1)[0],!0;if(e.deleteItem(t))return!0})},moveItemBefore(t,e){const n=this.cutItem(t);return n?this.insertItem(this.items,n,e):!1},addElementAfter(t,e){this.insertItem(this.items,t,e)},cutItem(t){let e=null;return this.items.some((n,i)=>{if(n.uuid===t)return e=this.items.splice(i,1)[0],!0;if(e===null&&(e=n.cutItem(t),e!==null))return!0}),e},insertItem(t,e,n){let i=!1;for(let r=0;r ({activeItem:{},formulaData:[],formulaError:"",productUuid:"",isFormulaLoading:!1,showProperties:!1,showDependency:!1,showOptions:!1,showPreview:!1,showSaveLayoutDialog:!1,showLoadLayoutDialog:!1,showFormel:!1,showParameter:!1,showAi:!1,aiSnapshots:[],sourceDragUuid:"",dragMode:"",json:"",xml:"",formulas:"",paperContainer:"",parameter:"",shopUuid:"",mode:sx.Product,saving:!1,syncing:!1,currentTab:"designer",previewData:null,isPreviewLoading:!1,previewError:""}),getters:{getActiveItem:t=>t.activeItem,isShowPropierties:t=>t.showProperties,isShowDependency:t=>t.showDependency,isShowOptions:t=>t.showOptions,isShowPreview:t=>t.showPreview,getSourceDragUuid:t=>t.sourceDragUuid,getShopUuid:t=>t.shopUuid,getDragMode:t=>t.dragMode,getFormulaData:t=>t.formulaData,getFormulaError:t=>t.formulaError,getPreviewData:t=>t.previewData},actions:{setXml(t){this.xml=t},setFormulas(t){this.formulas=t},setPaperContainer(t){this.paperContainer=t},setParameter(t){this.parameter=t},setMode(t){this.mode=t},setJson(t){this.json=t},setShowDependency(t){this.showDependency=t},setShowOptions(t){this.showOptions=t},setShowProperties(t){this.showProperties=t},setProductUuid(t){this.productUuid=t},setShowPreview(t){this.showPreview=t},setActiveItem(t){this.activeItem=t},setSourceDragUuid(t){this.sourceDragUuid=t},setDragMode(t){this.dragMode=t},setShowSaveLayoutDialog(t){this.showSaveLayoutDialog=t},setShowLoadLayoutDialog(t){this.showLoadLayoutDialog=t},setShowFormel(t){this.showFormel=t},setShowParameter(t){this.showParameter=t},setShowAi(t){this.showAi=t},saveAiSnapshot(){this.aiSnapshots.push({xml:this.xml,formulas:this.formulas,parameter:this.parameter}),this.aiSnapshots.length>10&&this.aiSnapshots.shift()},undoAiSnapshot(){const t=this.aiSnapshots.pop();if(!t)return!1;this.xml=t.xml,this.formulas=t.formulas,this.parameter=t.parameter;const e=Ti();return Md(this.productUuid,t.xml).then(n=>{this.setXML(n.xml),this.setJSON(n.json),this.formulaData=JSON.parse(n.jsonGraph),e.parseJSON(n.json)})},async applyAiResult(t){if(this.saveAiSnapshot(),t.xml){const e=Ti();this.syncing=!0;try{const n=await Md(this.productUuid,t.xml);this.setXML(n.xml),this.setJSON(n.json),this.formulaData=JSON.parse(n.jsonGraph),e.parseJSON(n.json)}finally{this.syncing=!1}}t.formulas&&(this.formulas=t.formulas),t.parameter&&(this.parameter=t.parameter)},syncFormulasAndParameter(){this.syncing=!0,uy(this.shopUuid,this.formulas,this.parameter).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1})},setShopUuid(t){this.shopUuid=t},async loadConfigFromProductApi(t){const e=await Yz(t);return this.json=e.json,this.xml=e.xml,this.parameter=e.parameter,this.formulas=e.formulas,this.paperContainer=e.paperContainer,this.shopUuid=e.shopUuid,e.json},async loadFormulaAnalyserDataFromApi(t){if(!(this.formulaData&&this.formulaData.length>0)){this.isFormulaLoading=!0,this.formulaError="";try{const e=await Mz(t);if(e&&e.debug&&e.debug.graphJson)this.formulaData=JSON.parse(e.debug.graphJson);else throw new Error("Invalid or empty response format from API.")}catch(e){this.formulaError=`Failed to load formula data: ${e.message}`,console.error(e)}finally{this.isFormulaLoading=!1}}},setXML(t){this.xml=t},setJSON(t){this.json=t},saveDesign(t){Iz(this.productUuid,this.shopUuid,t).then(e=>{this.setXML(e.xml),this.setJSON(e.json),this.formulaData=JSON.parse(e.jsonGraph)})},manualSave(){this.saving=!0,Uz(this.productUuid,this.xml).then(t=>{this.saving=!1})},manualSync(){this.syncing=!0,this.currentTab=="xml"&&Md(this.productUuid,this.xml).then(t=>{this.setXML(t.xml),this.setJSON(t.json),this.formulaData=JSON.parse(t.jsonGraph),this.syncing=!1,Ti().parseJSON(t.json)}),(this.currentTab=="formulas"||this.currentTab=="parameter")&&uy(this.shopUuid,this.formulas,this.parameter).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1}),this.currentTab=="paperdb"&&Dz(this.shopUuid,this.paperContainer).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1})},setCurrentTab(t){this.currentTab=t},async loadPreview(t,e){this.previewError="";try{const n=await Bz(this.shopUuid,t,e);this.previewData=n}catch(n){this.previewError=`Failed to load preview data: ${n.message}`,console.error(n)}finally{this.isPreviewLoading=!1}}}}),Kz={class:"w-full p-2 flex gap-2 flex-wrap"},Jz=M({__name:"TopBar",setup(t){const e=zt();function n(){e.manualSave()}function i(){e.setShowSaveLayoutDialog(!0)}return(r,s)=>(_(),W("div",Kz,[X(m(Et),{onClick:n,disabled:m(e).saving},{default:V(()=>[Ce(B(m(e).saving?r.$t("saving"):r.$t("save")),1)]),_:1},8,["disabled"]),X(m(Et),{onClick:i,variant:"outline"},{default:V(()=>[Ce(B(r.$t("save_layout")),1)]),_:1})]))}}),eq=M({__name:"Switch",props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},id:{},value:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=ht(n,"class"),s=Dn(r,i);return(o,a)=>(_(),I(m(o2),ve({"data-slot":"switch"},m(s),{class:m(Fe)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:V(()=>[X(m(l2),{"data-slot":"switch-thumb",class:wt(m(Fe)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"))},{default:V(()=>[oe(o.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),xg=M({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(_(),I(m(QE),ve({"data-slot":"label"},m(n),{class:m(Fe)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e.class)}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}});/*! +`))}return()=>r.value||i.value||o.value?_n(e.default({present:o.value})[0],{ref:u=>{const O=Or(u);return typeof(O==null?void 0:O.hasAttribute)>"u"||(O!=null&&O.hasAttribute("data-reka-popper-content-wrapper")?s.value=O.firstElementChild:s.value=O),O}}):null}});const ep=Y({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var l;if(!n.default)return null;const i=og(n.default()),r=i.findIndex(c=>c.type!==At);if(r===-1)return i;const s=i[r];(l=s.props)==null||delete l.ref;const o=s.props?ve(e,s.props):e,a=Ci({...s,props:{}},o);return i.length===1?a:(i[r]=a,i)}}}),$5=["area","img","input"],Ie=Y({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const i=t.asChild?"template":t.as;return typeof i=="string"&&$5.includes(i)?()=>_n(i,e):i!=="template"?()=>_n(t.as,e,{default:n.default}):()=>_n(ep,e,{default:n.default})}});function tp(){const t=H(),e=j(()=>{var n,i;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(i=t.value)==null?void 0:i.$el.nextElementSibling:Or(t)});return{primitiveElement:t,currentElement:e}}const[hr,y5]=Qn("DialogRoot");var Q5=Y({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=Ss(n,"open",e,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=H(),o=H(),{modal:a}=On(n);return y5({open:r,modal:a,openModal:()=>{r.value=!0},onOpenChange:l=>{r.value=l},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:o}),(l,c)=>oe(l.$slots,"default",{open:m(r),close:()=>r.value=!1})}}),W1=Q5,b5=Y({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Ne();const n=hr();return(i,r)=>(x(),I(m(Ie),ve(e,{type:i.as==="button"?"button":void 0,onClick:r[0]||(r[0]=s=>m(n).onOpenChange(!1))}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["type"]))}}),cg=b5;const v5="dismissableLayer.pointerDownOutside",S5="dismissableLayer.focusOutside";function N1(t,e){const n=e.closest("[data-dismissable-layer]"),i=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),r=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(i===n||r.indexOf(i) {});return It(a=>{if(!Fr||!cn(n))return;const l=async u=>{const O=u.target;if(!(!(e!=null&&e.value)||!O)){if(N1(e.value,O)){r.value=!1;return}if(u.target&&!r.value){let h=function(){sg(v5,t,d)};var f=h;const d={originalEvent:u};u.pointerType==="touch"?(i.removeEventListener("click",s.value),s.value=h,i.addEventListener("click",s.value,{once:!0})):h()}else i.removeEventListener("click",s.value);r.value=!1}},c=window.setTimeout(()=>{i.addEventListener("pointerdown",l)},0);a(()=>{window.clearTimeout(c),i.removeEventListener("pointerdown",l),i.removeEventListener("click",s.value)})}),{onPointerDownCapture:()=>{cn(n)&&(r.value=!0)}}}function x5(t,e,n=!0){var s;const i=((s=e==null?void 0:e.value)==null?void 0:s.ownerDocument)??(globalThis==null?void 0:globalThis.document),r=H(!1);return It(o=>{if(!Fr||!cn(n))return;const a=async l=>{if(!(e!=null&&e.value))return;await Yt(),await Yt();const c=l.target;!e.value||!c||N1(e.value,c)||l.target&&!r.value&&sg(S5,t,{originalEvent:l})};i.addEventListener("focusin",a),o(()=>i.removeEventListener("focusin",a))}),{onFocusCapture:()=>{cn(n)&&(r.value=!0)},onBlurCapture:()=>{cn(n)&&(r.value=!1)}}}const ri=Ir({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});var w5=Y({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Ne(),o=j(()=>{var d;return((d=s.value)==null?void 0:d.ownerDocument)??globalThis.document}),a=j(()=>ri.layersRoot),l=j(()=>s.value?Array.from(a.value).indexOf(s.value):-1),c=j(()=>ri.layersWithOutsidePointerEventsDisabled.size>0),u=j(()=>{const d=Array.from(a.value),[h]=[...ri.layersWithOutsidePointerEventsDisabled].slice(-1),p=d.indexOf(h);return l.value>=p}),O=P5(async d=>{const h=[...ri.branches].some(p=>p==null?void 0:p.contains(d.target));!u.value||h||(i("pointerDownOutside",d),i("interactOutside",d),await Yt(),d.defaultPrevented||i("dismiss"))},s),f=x5(d=>{[...ri.branches].some(p=>p==null?void 0:p.contains(d.target))||(i("focusOutside",d),i("interactOutside",d),d.defaultPrevented||i("dismiss"))},s);return e5("Escape",d=>{l.value===a.value.size-1&&(i("escapeKeyDown",d),d.defaultPrevented||i("dismiss"))}),It(d=>{s.value&&(n.disableOutsidePointerEvents&&(ri.layersWithOutsidePointerEventsDisabled.size===0&&(ri.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),ri.layersWithOutsidePointerEventsDisabled.add(s.value)),a.value.add(s.value),d(()=>{n.disableOutsidePointerEvents&&ri.layersWithOutsidePointerEventsDisabled.size===1&&!da(ri.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=ri.originalBodyPointerEvents)}))}),It(d=>{d(()=>{s.value&&(a.value.delete(s.value),ri.layersWithOutsidePointerEventsDisabled.delete(s.value))})}),(d,h)=>(x(),I(m(Ie),{ref:m(r),"as-child":d.asChild,as:d.as,"data-dismissable-layer":"",style:ti({pointerEvents:c.value?u.value?"auto":"none":void 0}),onFocusCapture:m(f).onFocusCapture,onBlurCapture:m(f).onBlurCapture,onPointerdownCapture:m(O).onPointerDownCapture},{default:V(()=>[oe(d.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),j1=w5;const _5=UV(()=>H([]));function T5(){const t=_5();return{add(e){const n=t.value[0];e!==n&&(n==null||n.pause()),t.value=zy(t.value,e),t.value.unshift(e)},remove(e){var n;t.value=zy(t.value,e),(n=t.value[0])==null||n.resume()}}}function zy(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}const Cd="focusScope.autoFocusOnMount",Xd="focusScope.autoFocusOnUnmount",qy={bubbles:!1,cancelable:!0};function k5(t,{select:e=!1}={}){const n=Tn();for(const i of t)if(os(i,{select:e}),Tn()!==n)return!0}function R5(t){const e=B1(t),n=Zy(e,t),i=Zy(e.reverse(),t);return[n,i]}function B1(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Zy(t,e){for(const n of t)if(!C5(n,{upTo:e}))return n}function C5(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function X5(t){return t instanceof HTMLInputElement&&"select"in t}function os(t,{select:e=!1}={}){if(t&&t.focus){const n=Tn();t.focus({preventScroll:!0}),t!==n&&X5(t)&&e&&t.select()}}var V5=Y({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const n=t,i=e,{currentRef:r,currentElement:s}=Ne(),o=H(null),a=T5(),l=Ir({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});It(u=>{if(!Fr)return;const O=s.value;if(!n.trapped)return;function f($){if(l.paused||!O)return;const g=$.target;O.contains(g)?o.value=g:os(o.value,{select:!0})}function d($){if(l.paused||!O)return;const g=$.relatedTarget;g!==null&&(O.contains(g)||os(o.value,{select:!0}))}function h($){O.contains(o.value)||os(O)}document.addEventListener("focusin",f),document.addEventListener("focusout",d);const p=new MutationObserver(h);O&&p.observe(O,{childList:!0,subtree:!0}),u(()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",d),p.disconnect()})}),It(async u=>{const O=s.value;if(await Yt(),!O)return;a.add(l);const f=Tn();if(!O.contains(f)){const h=new CustomEvent(Cd,qy);O.addEventListener(Cd,p=>i("mountAutoFocus",p)),O.dispatchEvent(h),h.defaultPrevented||(k5(B1(O),{select:!0}),Tn()===f&&os(O))}u(()=>{O.removeEventListener(Cd,$=>i("mountAutoFocus",$));const h=new CustomEvent(Xd,qy),p=$=>{i("unmountAutoFocus",$)};O.addEventListener(Xd,p),O.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||os(f??document.body,{select:!0}),O.removeEventListener(Xd,p),a.remove(l)},0)})});function c(u){if(!n.loop&&!n.trapped||l.paused)return;const O=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,f=Tn();if(O&&f){const d=u.currentTarget,[h,p]=R5(d);h&&p?!u.shiftKey&&f===p?(u.preventDefault(),n.loop&&os(h,{select:!0})):u.shiftKey&&f===h&&(u.preventDefault(),n.loop&&os(p,{select:!0})):f===d&&u.preventDefault()}}return(u,O)=>(x(),I(m(Ie),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":u.asChild,as:u.as,onKeydown:c},{default:V(()=>[oe(u.$slots,"default")]),_:3},8,["as-child","as"]))}}),G1=V5;function A5(t){return t?"open":"closed"}function My(t){const e=Tn();for(const n of t)if(n===e||(n.focus(),Tn()!==e))return}var E5=Y({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=hr(),{forwardRef:s,currentElement:o}=Ne();return r.titleId||(r.titleId=Xi(void 0,"reka-dialog-title")),r.descriptionId||(r.descriptionId=Xi(void 0,"reka-dialog-description")),dt(()=>{r.contentElement=o,Tn()!==document.body&&(r.triggerElement.value=Tn())}),(a,l)=>(x(),I(m(G1),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:l[5]||(l[5]=c=>i("openAutoFocus",c)),onUnmountAutoFocus:l[6]||(l[6]=c=>i("closeAutoFocus",c))},{default:V(()=>[X(m(j1),ve({id:m(r).contentId,ref:m(s),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":m(r).descriptionId,"aria-labelledby":m(r).titleId,"data-state":m(A5)(m(r).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=c=>m(r).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=c=>i("escapeKeyDown",c)),onFocusOutside:l[2]||(l[2]=c=>i("focusOutside",c)),onInteractOutside:l[3]||(l[3]=c=>i("interactOutside",c)),onPointerDownOutside:l[4]||(l[4]=c=>i("pointerDownOutside",c))}),{default:V(()=>[oe(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),F1=E5,z5=Y({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=hr(),s=Mf(i),{forwardRef:o,currentElement:a}=Ne();return D1(a),(l,c)=>(x(),I(F1,ve({...n,...m(s)},{ref:m(o),"trap-focus":m(r).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=u=>{var O;u.defaultPrevented||(u.preventDefault(),(O=m(r).triggerElement.value)==null||O.focus())}),onPointerDownOutside:c[1]||(c[1]=u=>{const O=u.detail.originalEvent,f=O.button===0&&O.ctrlKey===!0;(O.button===2||f)&&u.preventDefault()}),onFocusOutside:c[2]||(c[2]=u=>{u.preventDefault()})}),{default:V(()=>[oe(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),q5=z5,Z5=Y({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=Mf(e);Ne();const s=hr(),o=H(!1),a=H(!1);return(l,c)=>(x(),I(F1,ve({...n,...m(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=u=>{var O;u.defaultPrevented||(o.value||(O=m(s).triggerElement.value)==null||O.focus(),u.preventDefault()),o.value=!1,a.value=!1}),onInteractOutside:c[1]||(c[1]=u=>{var d;u.defaultPrevented||(o.value=!0,u.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const O=u.target;((d=m(s).triggerElement.value)==null?void 0:d.contains(O))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&a.value&&u.preventDefault()})}),{default:V(()=>[oe(l.$slots,"default")]),_:3},16))}}),M5=Z5,Y5=Y({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=hr(),s=Mf(i),{forwardRef:o}=Ne();return(a,l)=>(x(),I(m(xc),{present:a.forceMount||m(r).open.value},{default:V(()=>[m(r).modal.value?(x(),I(q5,ve({key:0,ref:m(o)},{...n,...m(s),...a.$attrs}),{default:V(()=>[oe(a.$slots,"default")]),_:3},16)):(x(),I(M5,ve({key:1,ref:m(o)},{...n,...m(s),...a.$attrs}),{default:V(()=>[oe(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),H1=Y5,I5=Y({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(t){const e=t;Ne();const n=hr();return(i,r)=>(x(),I(m(Ie),ve(e,{id:m(n).descriptionId}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["id"]))}}),K1=I5,U5=Y({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=hr();return Y1(!0),Ne(),(n,i)=>(x(),I(m(Ie),{as:n.as,"as-child":n.asChild,"data-state":m(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:V(()=>[oe(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),D5=U5,L5=Y({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=hr(),{forwardRef:n}=Ne();return(i,r)=>{var s;return(s=m(e))!=null&&s.modal.value?(x(),I(m(xc),{key:0,present:i.forceMount||m(e).open.value},{default:V(()=>[X(D5,ve(i.$attrs,{ref:m(n),as:i.as,"as-child":i.asChild}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):ue("v-if",!0)}}}),J1=L5,W5=Y({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=M1();return(n,i)=>m(e)||n.forceMount?(x(),I(Ym,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[oe(n.$slots,"default")],8,["to","disabled","defer"])):ue("v-if",!0)}}),eP=W5,N5=Y({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,i)=>(x(),I(m(eP),bo(Es(e)),{default:V(()=>[oe(n.$slots,"default")]),_:3},16))}}),tP=N5,j5=Y({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(t){const e=t,n=hr();return Ne(),(i,r)=>(x(),I(m(Ie),ve(e,{id:m(n).titleId}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["id"]))}}),nP=j5,B5=Y({__name:"DialogTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=hr(),{forwardRef:i,currentElement:r}=Ne();return n.contentId||(n.contentId=Xi(void 0,"reka-dialog-content")),dt(()=>{n.triggerElement.value=r.value}),(s,o)=>(x(),I(m(Ie),ve(e,{ref:m(i),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":m(n).open.value||!1,"aria-controls":m(n).open.value?m(n).contentId:void 0,"data-state":m(n).open.value?"open":"closed",onClick:m(n).onOpenToggle}),{default:V(()=>[oe(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),G5=B5;const Yy="data-reka-collection-item";function zs(t={}){const{key:e="",isProvider:n=!1}=t,i=`${e}CollectionProvider`;let r;n?(r={collectionRef:H(),itemMap:H(new Map)},kr(i,r)):r=wn(i);const s=(u=!1)=>{const O=r.collectionRef.value;if(!O)return[];const f=Array.from(O.querySelectorAll(`[${Yy}]`)),h=Array.from(r.itemMap.value.values()).sort((p,$)=>f.indexOf(p.ref)-f.indexOf($.ref));return u?h:h.filter(p=>p.ref.dataset.disabled!=="")},o=Y({name:"CollectionSlot",inheritAttrs:!1,setup(u,{slots:O,attrs:f}){const{primitiveElement:d,currentElement:h}=tp();return Ze(h,()=>{r.collectionRef.value=h.value}),()=>_n(ep,{ref:d,...f},O)}}),a=Y({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(u,{slots:O,attrs:f}){const{primitiveElement:d,currentElement:h}=tp();return It(p=>{if(h.value){const $=yc(h.value);r.itemMap.value.set($,{ref:h.value,value:u.value}),p(()=>r.itemMap.value.delete($))}}),()=>_n(ep,{...f,[Yy]:"",ref:d},O)}}),l=j(()=>Array.from(r.itemMap.value.values())),c=j(()=>r.itemMap.value.size);return{getItems:s,reactiveItems:l,itemMapSize:c,CollectionSlot:o,CollectionItem:a}}var F5=Y({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){return(e,n)=>(x(),I(m(Ie),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:V(()=>[oe(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),iP=F5,H5=Y({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:i}=tp(),r=j(()=>e.checked??e.value);return Ze(r,(s,o)=>{if(!i.value)return;const a=i.value,l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(u&&s!==o){const O=new Event("input",{bubbles:!0}),f=new Event("change",{bubbles:!0});u.call(a,s),a.dispatchEvent(O),a.dispatchEvent(f)}}),(s,o)=>(x(),I(iP,ve({ref_key:"primitiveElement",ref:n},{...e,...s.$attrs},{as:"input"}),null,16))}}),Iy=H5,K5=Y({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(t){const e=t,n=j(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),i=j(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"||e.value===null||e.value===void 0?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((r,s)=>typeof r=="object"?Object.entries(r).map(([o,a])=>({name:`${e.name}[${s}][${o}]`,value:a})):{name:`${e.name}[${s}]`,value:r}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([r,s])=>({name:`${e.name}[${r}]`,value:s})):[]);return(r,s)=>(x(),W(ze,null,[ue(" We render single input if it's required "),n.value?(x(),I(Iy,ve({key:r.name},{...e,...r.$attrs},{name:r.name,value:r.value}),null,16,["name","value"])):(x(!0),W(ze,{key:1},kt(i.value,o=>(x(),I(Iy,ve({key:o.name},{ref_for:!0},{...e,...r.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),rP=K5;const J5="rovingFocusGroup.onEntryFocus",eA={bubbles:!1,cancelable:!0},tA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function nA(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function iA(t,e,n){const i=nA(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return tA[i]}function sP(t,e=!1){const n=Tn();for(const i of t)if(i===n||(i.focus({preventScroll:e}),Tn()!==n))return}function rA(t,e){return t.map((n,i)=>t[(e+i)%t.length])}const[oP,sA]=Qn("PopperRoot");var oA=Y({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=H();return sA({anchor:e,onAnchorChange:n=>e.value=n}),(n,i)=>oe(n.$slots,"default")}}),aA=oA,lA=Y({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Ne(),r=oP();return Mm(()=>{r.onAnchorChange(e.reference??i.value)}),(s,o)=>(x(),I(m(Ie),{ref:m(n),as:s.as,"as-child":s.asChild},{default:V(()=>[oe(s.$slots,"default")]),_:3},8,["as","as-child"]))}}),cA=lA;function uA(t){return t!==null}function OA(t){return{name:"transformOrigin",options:t,fn(e){var $,g,b;const{placement:n,rects:i,middlewareData:r}=e,o=(($=r.arrow)==null?void 0:$.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=np(n),O={start:"0%",center:"50%",end:"100%"}[u],f=(((g=r.arrow)==null?void 0:g.x)??0)+a/2,d=(((b=r.arrow)==null?void 0:b.y)??0)+l/2;let h="",p="";return c==="bottom"?(h=o?O:`${f}px`,p=`${-l}px`):c==="top"?(h=o?O:`${f}px`,p=`${i.floating.height+l}px`):c==="right"?(h=`${-l}px`,p=o?O:`${d}px`):c==="left"&&(h=`${i.floating.width+l}px`,p=o?O:`${d}px`),{data:{x:h,y:p}}}}}function np(t){const[e,n="center"]=t.split("-");return[e,n]}const fA=["top","right","bottom","left"],Ps=Math.min,Hn=Math.max,TO=Math.round,su=Math.floor,or=t=>({x:t,y:t}),dA={left:"right",right:"left",bottom:"top",top:"bottom"},hA={start:"end",end:"start"};function ip(t,e,n){return Hn(t,Ps(e,n))}function Lr(t,e){return typeof t=="function"?t(e):t}function Wr(t){return t.split("-")[0]}function Xa(t){return t.split("-")[1]}function ug(t){return t==="x"?"y":"x"}function Og(t){return t==="y"?"height":"width"}function tr(t){return["top","bottom"].includes(Wr(t))?"y":"x"}function fg(t){return ug(tr(t))}function pA(t,e,n){n===void 0&&(n=!1);const i=Xa(t),r=fg(t),s=Og(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=kO(o)),[o,kO(o)]}function mA(t){const e=kO(t);return[rp(t),e,rp(e)]}function rp(t){return t.replace(/start|end/g,e=>hA[e])}function gA(t,e,n){const i=["left","right"],r=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:i:e?i:r;case"left":case"right":return e?s:o;default:return[]}}function $A(t,e,n,i){const r=Xa(t);let s=gA(Wr(t),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map(rp)))),s}function kO(t){return t.replace(/left|right|bottom|top/g,e=>dA[e])}function yA(t){return{top:0,right:0,bottom:0,left:0,...t}}function aP(t){return typeof t!="number"?yA(t):{top:t,right:t,bottom:t,left:t}}function RO(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function Uy(t,e,n){let{reference:i,floating:r}=t;const s=tr(e),o=fg(e),a=Og(o),l=Wr(e),c=s==="y",u=i.x+i.width/2-r.width/2,O=i.y+i.height/2-r.height/2,f=i[a]/2-r[a]/2;let d;switch(l){case"top":d={x:u,y:i.y-r.height};break;case"bottom":d={x:u,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:O};break;case"left":d={x:i.x-r.width,y:O};break;default:d={x:i.x,y:i.y}}switch(Xa(e)){case"start":d[o]-=f*(n&&c?-1:1);break;case"end":d[o]+=f*(n&&c?-1:1);break}return d}const QA=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:O}=Uy(c,i,l),f=i,d={},h=0;for(let p=0;p ({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Lr(t,e)||{};if(c==null)return{};const O=aP(u),f={x:n,y:i},d=fg(r),h=Og(d),p=await o.getDimensions(c),$=d==="y",g=$?"top":"left",b=$?"bottom":"right",Q=$?"clientHeight":"clientWidth",y=s.reference[h]+s.reference[d]-f[d]-s.floating[h],v=f[d]-s.reference[d],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let P=S?S[Q]:0;(!P||!await(o.isElement==null?void 0:o.isElement(S)))&&(P=a.floating[Q]||s.floating[h]);const _=y/2-v/2,T=P/2-p[h]/2-1,q=Ps(O[g],T),U=Ps(O[b],T),A=q,K=P-p[h]-U,ae=P/2-p[h]/2+_,de=ip(A,ae,K),J=!l.arrow&&Xa(r)!=null&&ae!==de&&s.reference[h]/2-(aeae<=0)){var U,A;const ae=(((U=s.flip)==null?void 0:U.index)||0)+1,de=P[ae];if(de&&(!(O==="alignment"?b!==tr(de):!1)||q.every(se=>se.overflows[0]>0&&tr(se.placement)===b)))return{data:{index:ae,overflows:q},reset:{placement:de}};let J=(A=q.filter(re=>re.overflows[0]<=0).sort((re,se)=>re.overflows[1]-se.overflows[1])[0])==null?void 0:A.placement;if(!J)switch(d){case"bestFit":{var K;const re=(K=q.filter(se=>{if(S){const ge=tr(se.placement);return ge===b||ge==="y"}return!0}).map(se=>[se.placement,se.overflows.filter(ge=>ge>0).reduce((ge,Oe)=>ge+Oe,0)]).sort((se,ge)=>se[1]-ge[1])[0])==null?void 0:K[0];re&&(J=re);break}case"initialPlacement":J=a;break}if(r!==J)return{reset:{placement:J}}}return{}}}};function Dy(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ly(t){return fA.some(e=>t[e]>=0)}const SA=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...r}=Lr(t,e);switch(i){case"referenceHidden":{const s=await Il(e,{...r,elementContext:"reference"}),o=Dy(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Ly(o)}}}case"escaped":{const s=await Il(e,{...r,altBoundary:!0}),o=Dy(s,n.floating);return{data:{escapedOffsets:o,escaped:Ly(o)}}}default:return{}}}}};async function PA(t,e){const{placement:n,platform:i,elements:r}=t,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Wr(n),a=Xa(n),l=tr(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,O=Lr(e,t);let{mainAxis:f,crossAxis:d,alignmentAxis:h}=typeof O=="number"?{mainAxis:O,crossAxis:0,alignmentAxis:null}:{mainAxis:O.mainAxis||0,crossAxis:O.crossAxis||0,alignmentAxis:O.alignmentAxis};return a&&typeof h=="number"&&(d=a==="end"?h*-1:h),l?{x:d*u,y:f*c}:{x:f*c,y:d*u}}const xA=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=e,l=await PA(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:o}}}}},wA=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:$=>{let{x:g,y:b}=$;return{x:g,y:b}}},...l}=Lr(t,e),c={x:n,y:i},u=await Il(e,l),O=tr(Wr(r)),f=ug(O);let d=c[f],h=c[O];if(s){const $=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=d+u[$],Q=d-u[g];d=ip(b,d,Q)}if(o){const $=O==="y"?"top":"left",g=O==="y"?"bottom":"right",b=h+u[$],Q=h-u[g];h=ip(b,h,Q)}const p=a.fn({...e,[f]:d,[O]:h});return{...p,data:{x:p.x-n,y:p.y-i,enabled:{[f]:s,[O]:o}}}}}},_A=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Lr(t,e),u={x:n,y:i},O=tr(r),f=ug(O);let d=u[f],h=u[O];const p=Lr(a,e),$=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const Q=f==="y"?"height":"width",y=s.reference[f]-s.floating[Q]+$.mainAxis,v=s.reference[f]+s.reference[Q]-$.mainAxis;d v&&(d=v)}if(c){var g,b;const Q=f==="y"?"width":"height",y=["top","left"].includes(Wr(r)),v=s.reference[O]-s.floating[Q]+(y&&((g=o.offset)==null?void 0:g[O])||0)+(y?0:$.crossAxis),S=s.reference[O]+s.reference[Q]+(y?0:((b=o.offset)==null?void 0:b[O])||0)-(y?$.crossAxis:0);h S&&(h=S)}return{[f]:d,[O]:h}}}},TA=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:r,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...c}=Lr(t,e),u=await Il(e,c),O=Wr(r),f=Xa(r),d=tr(r)==="y",{width:h,height:p}=s.floating;let $,g;O==="top"||O==="bottom"?($=O,g=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=O,$=f==="end"?"top":"bottom");const b=p-u.top-u.bottom,Q=h-u.left-u.right,y=Ps(p-u[$],b),v=Ps(h-u[g],Q),S=!e.middlewareData.shift;let P=y,_=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(_=Q),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(P=b),S&&!f){const q=Hn(u.left,0),U=Hn(u.right,0),A=Hn(u.top,0),K=Hn(u.bottom,0);d?_=h-2*(q!==0||U!==0?q+U:Hn(u.left,u.right)):P=p-2*(A!==0||K!==0?A+K:Hn(u.top,u.bottom))}await l({...e,availableWidth:_,availableHeight:P});const T=await o.getDimensions(a.floating);return h!==T.width||p!==T.height?{reset:{rects:!0}}:{}}}};function Yf(){return typeof window<"u"}function Po(t){return dg(t)?(t.nodeName||"").toLowerCase():"#document"}function Jn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pr(t){var e;return(e=(dg(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function dg(t){return Yf()?t instanceof Node||t instanceof Jn(t).Node:!1}function Vi(t){return Yf()?t instanceof Element||t instanceof Jn(t).Element:!1}function fr(t){return Yf()?t instanceof HTMLElement||t instanceof Jn(t).HTMLElement:!1}function Wy(t){return!Yf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Jn(t).ShadowRoot}function wc(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=Ai(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function kA(t){return["table","td","th"].includes(Po(t))}function If(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function hg(t){const e=pg(),n=Vi(t)?Ai(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function RA(t){let e=xs(t);for(;fr(e)&&!ha(e);){if(hg(e))return e;if(If(e))return null;e=xs(e)}return null}function pg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ha(t){return["html","body","#document"].includes(Po(t))}function Ai(t){return Jn(t).getComputedStyle(t)}function Uf(t){return Vi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xs(t){if(Po(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Wy(t)&&t.host||pr(t);return Wy(e)?e.host:e}function lP(t){const e=xs(t);return ha(e)?t.ownerDocument?t.ownerDocument.body:t.body:fr(e)&&wc(e)?e:lP(e)}function Ul(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=lP(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=Jn(r);if(s){const a=sp(o);return e.concat(o,o.visualViewport||[],wc(r)?r:[],a&&n?Ul(a):[])}return e.concat(r,Ul(r,[],n))}function sp(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function cP(t){const e=Ai(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=fr(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,a=TO(n)!==s||TO(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function mg(t){return Vi(t)?t:t.contextElement}function ta(t){const e=mg(t);if(!fr(e))return or(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=cP(e);let o=(s?TO(n.width):n.width)/i,a=(s?TO(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const CA=or(0);function uP(t){const e=Jn(t);return!pg()||!e.visualViewport?CA:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function XA(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Jn(t)?!1:e}function ho(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=mg(t);let o=or(1);e&&(i?Vi(i)&&(o=ta(i)):o=ta(t));const a=XA(s,n,i)?uP(s):or(0);let l=(r.left+a.x)/o.x,c=(r.top+a.y)/o.y,u=r.width/o.x,O=r.height/o.y;if(s){const f=Jn(s),d=i&&Vi(i)?Jn(i):i;let h=f,p=sp(h);for(;p&&i&&d!==h;){const $=ta(p),g=p.getBoundingClientRect(),b=Ai(p),Q=g.left+(p.clientLeft+parseFloat(b.paddingLeft))*$.x,y=g.top+(p.clientTop+parseFloat(b.paddingTop))*$.y;l*=$.x,c*=$.y,u*=$.x,O*=$.y,l+=Q,c+=y,h=Jn(p),p=sp(h)}}return RO({width:u,height:O,x:l,y:c})}function gg(t,e){const n=Uf(t).scrollLeft;return e?e.left+n:ho(pr(t)).left+n}function OP(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-(n?0:gg(t,i)),s=i.top+e.scrollTop;return{x:r,y:s}}function VA(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",o=pr(i),a=e?If(e.floating):!1;if(i===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=or(1);const u=or(0),O=fr(i);if((O||!O&&!s)&&((Po(i)!=="body"||wc(o))&&(l=Uf(i)),fr(i))){const d=ho(i);c=ta(i),u.x=d.x+i.clientLeft,u.y=d.y+i.clientTop}const f=o&&!O&&!s?OP(o,l,!0):or(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function AA(t){return Array.from(t.getClientRects())}function EA(t){const e=pr(t),n=Uf(t),i=t.ownerDocument.body,r=Hn(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=Hn(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+gg(t);const a=-n.scrollTop;return Ai(i).direction==="rtl"&&(o+=Hn(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}function zA(t,e){const n=Jn(t),i=pr(t),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const c=pg();(!c||c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a,y:l}}function qA(t,e){const n=ho(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=fr(t)?ta(t):or(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=r*s.x,c=i*s.y;return{width:o,height:a,x:l,y:c}}function Ny(t,e,n){let i;if(e==="viewport")i=zA(t,n);else if(e==="document")i=EA(pr(t));else if(Vi(e))i=qA(e,n);else{const r=uP(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return RO(i)}function fP(t,e){const n=xs(t);return n===e||!Vi(n)||ha(n)?!1:Ai(n).position==="fixed"||fP(n,e)}function ZA(t,e){const n=e.get(t);if(n)return n;let i=Ul(t,[],!1).filter(a=>Vi(a)&&Po(a)!=="body"),r=null;const s=Ai(t).position==="fixed";let o=s?xs(t):t;for(;Vi(o)&&!ha(o);){const a=Ai(o),l=hg(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||wc(o)&&!l&&fP(t,o))?i=i.filter(u=>u!==o):r=a,o=xs(o)}return e.set(t,i),i}function MA(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?If(e)?[]:ZA(e,this._c):[].concat(n),i],a=o[0],l=o.reduce((c,u)=>{const O=Ny(e,u,r);return c.top=Hn(O.top,c.top),c.right=Ps(O.right,c.right),c.bottom=Ps(O.bottom,c.bottom),c.left=Hn(O.left,c.left),c},Ny(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function YA(t){const{width:e,height:n}=cP(t);return{width:e,height:n}}function IA(t,e,n){const i=fr(e),r=pr(e),s=n==="fixed",o=ho(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=or(0);function c(){l.x=gg(r)}if(i||!i&&!s)if((Po(e)!=="body"||wc(r))&&(a=Uf(e)),i){const d=ho(e,!0,s,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&c();s&&!i&&r&&c();const u=r&&!i&&!s?OP(r,a):or(0),O=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:O,y:f,width:o.width,height:o.height}}function Vd(t){return Ai(t).position==="static"}function jy(t,e){if(!fr(t)||Ai(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return pr(t)===n&&(n=n.ownerDocument.body),n}function dP(t,e){const n=Jn(t);if(If(t))return n;if(!fr(t)){let r=xs(t);for(;r&&!ha(r);){if(Vi(r)&&!Vd(r))return r;r=xs(r)}return n}let i=jy(t,e);for(;i&&kA(i)&&Vd(i);)i=jy(i,e);return i&&ha(i)&&Vd(i)&&!hg(i)?n:i||RA(t)||n}const UA=async function(t){const e=this.getOffsetParent||dP,n=this.getDimensions,i=await n(t.floating);return{reference:IA(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function DA(t){return Ai(t).direction==="rtl"}const LA={convertOffsetParentRelativeRectToViewportRelativeRect:VA,getDocumentElement:pr,getClippingRect:MA,getOffsetParent:dP,getElementRects:UA,getClientRects:AA,getDimensions:YA,getScale:ta,isElement:Vi,isRTL:DA};function hP(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function WA(t,e){let n=null,i;const r=pr(t);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=t.getBoundingClientRect(),{left:u,top:O,width:f,height:d}=c;if(a||e(),!f||!d)return;const h=su(O),p=su(r.clientWidth-(u+f)),$=su(r.clientHeight-(O+d)),g=su(u),Q={rootMargin:-h+"px "+-p+"px "+-$+"px "+-g+"px",threshold:Hn(0,Ps(1,l))||1};let y=!0;function v(S){const P=S[0].intersectionRatio;if(P!==l){if(!y)return o();P?o(!1,P):i=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!hP(c,t.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(v,{...Q,root:r.ownerDocument})}catch{n=new IntersectionObserver(v,Q)}n.observe(t)}return o(!0),s}function NA(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=mg(t),u=r||s?[...c?Ul(c):[],...Ul(e)]:[];u.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const O=c&&a?WA(c,n):null;let f=-1,d=null;o&&(d=new ResizeObserver(g=>{let[b]=g;b&&b.target===c&&d&&(d.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var Q;(Q=d)==null||Q.observe(e)})),n()}),c&&!l&&d.observe(c),d.observe(e));let h,p=l?ho(t):null;l&&$();function $(){const g=ho(t);p&&!hP(p,g)&&n(),p=g,h=requestAnimationFrame($)}return n(),()=>{var g;u.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),O==null||O(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(h)}}const jA=xA,BA=wA,By=vA,GA=TA,FA=SA,HA=bA,KA=_A,JA=(t,e,n)=>{const i=new Map,r={platform:LA,...n},s={...r.platform,_c:i};return QA(t,e,{...r,platform:s})};function eE(t){return t!=null&&typeof t=="object"&&"$el"in t}function op(t){if(eE(t)){const e=t.$el;return dg(e)&&Po(e)==="#comment"?null:e}return t}function qo(t){return typeof t=="function"?t():m(t)}function tE(t){return{name:"arrow",options:t,fn(e){const n=op(qo(t.element));return n==null?{}:HA({element:n,padding:t.padding}).fn(e)}}}function pP(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Gy(t,e){const n=pP(t);return Math.round(e*n)/n}function nE(t,e,n){n===void 0&&(n={});const i=n.whileElementsMounted,r=j(()=>{var P;return(P=qo(n.open))!=null?P:!0}),s=j(()=>qo(n.middleware)),o=j(()=>{var P;return(P=qo(n.placement))!=null?P:"bottom"}),a=j(()=>{var P;return(P=qo(n.strategy))!=null?P:"absolute"}),l=j(()=>{var P;return(P=qo(n.transform))!=null?P:!0}),c=j(()=>op(t.value)),u=j(()=>op(e.value)),O=H(0),f=H(0),d=H(a.value),h=H(o.value),p=sr({}),$=H(!1),g=j(()=>{const P={position:d.value,left:"0",top:"0"};if(!u.value)return P;const _=Gy(u.value,O.value),T=Gy(u.value,f.value);return l.value?{...P,transform:"translate("+_+"px, "+T+"px)",...pP(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:_+"px",top:T+"px"}});let b;function Q(){if(c.value==null||u.value==null)return;const P=r.value;JA(c.value,u.value,{middleware:s.value,placement:o.value,strategy:a.value}).then(_=>{O.value=_.x,f.value=_.y,d.value=_.strategy,h.value=_.placement,p.value=_.middlewareData,$.value=P!==!1})}function y(){typeof b=="function"&&(b(),b=void 0)}function v(){if(y(),i===void 0){Q();return}if(c.value!=null&&u.value!=null){b=i(c.value,u.value,Q);return}}function S(){r.value||($.value=!1)}return Ze([s,o,a,r],Q,{flush:"sync"}),Ze([c,u],v,{flush:"sync"}),Ze(r,S,{flush:"sync"}),gc()&&Qf(y),{x:Bs(O),y:Bs(f),strategy:Bs(d),placement:Bs(h),middlewareData:Bs(p),isPositioned:Bs($),floatingStyles:g,update:Q}}const iE={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[IK,rE]=Qn("PopperContent");var sE=Y({inheritAttrs:!1,__name:"PopperContent",props:_0({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...iE}),emits:["placed"],setup(t,{emit:e}){const n=t,i=e,r=oP(),{forwardRef:s,currentElement:o}=Ne(),a=H(),l=H(),{width:c,height:u}=d5(l),O=j(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),f=j(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),d=j(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),h=j(()=>({padding:f.value,boundary:d.value.filter(uA),altBoundary:d.value.length>0})),p=j(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),$=IV(()=>[jA({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&By({...h.value,...p.value}),n.avoidCollisions&&BA({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?KA():void 0,...h.value}),!n.prioritizePosition&&n.avoidCollisions&&By({...h.value,...p.value}),GA({...h.value,apply:({elements:A,rects:K,availableWidth:ae,availableHeight:de})=>{const{width:J,height:re}=K.reference,se=A.floating.style;se.setProperty("--reka-popper-available-width",`${ae}px`),se.setProperty("--reka-popper-available-height",`${de}px`),se.setProperty("--reka-popper-anchor-width",`${J}px`),se.setProperty("--reka-popper-anchor-height",`${re}px`)}}),l.value&&tE({element:l.value,padding:n.arrowPadding}),OA({arrowWidth:c.value,arrowHeight:u.value}),n.hideWhenDetached&&FA({strategy:"referenceHidden",...h.value})]),g=j(()=>n.reference??r.anchor.value),{floatingStyles:b,placement:Q,isPositioned:y,middlewareData:v}=nE(g,a,{strategy:n.positionStrategy,placement:O,whileElementsMounted:(...A)=>NA(...A,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:$}),S=j(()=>np(Q.value)[0]),P=j(()=>np(Q.value)[1]);Mm(()=>{y.value&&i("placed")});const _=j(()=>{var K;const A=((K=v.value.arrow)==null?void 0:K.centerOffset)!==0;return n.hideShiftedArrow&&A}),T=H("");It(()=>{o.value&&(T.value=window.getComputedStyle(o.value).zIndex)});const q=j(()=>{var A;return((A=v.value.arrow)==null?void 0:A.x)??0}),U=j(()=>{var A;return((A=v.value.arrow)==null?void 0:A.y)??0});return rE({placedSide:S,onArrowChange:A=>l.value=A,arrowX:q,arrowY:U,shouldHideArrow:_}),(A,K)=>{var ae,de,J;return x(),W("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:ti({...m(b),transform:m(y)?m(b).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T.value,"--reka-popper-transform-origin":[(ae=m(v).transformOrigin)==null?void 0:ae.x,(de=m(v).transformOrigin)==null?void 0:de.y].join(" "),...((J=m(v).hide)==null?void 0:J.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[X(m(Ie),ve({ref:m(s)},A.$attrs,{"as-child":n.asChild,as:A.as,"data-side":S.value,"data-align":P.value,style:{animation:m(y)?void 0:"none"}}),{default:V(()=>[oe(A.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),oE=sE;function mP(t){const e=zf({nonce:H()});return j(()=>{var n;return(t==null?void 0:t.value)||((n=e.nonce)==null?void 0:n.value)})}const[aE,lE]=Qn("RovingFocusGroup");var cE=Y({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const i=t,r=n,{loop:s,orientation:o,dir:a}=On(i),l=Zf(a),c=Ss(i,"currentTabStopId",r,{defaultValue:i.defaultCurrentTabStopId,passive:i.currentTabStopId===void 0}),u=H(!1),O=H(!1),f=H(0),{getItems:d,CollectionSlot:h}=zs({isProvider:!0});function p(g){const b=!O.value;if(g.currentTarget&&g.target===g.currentTarget&&b&&!u.value){const Q=new CustomEvent(J5,eA);if(g.currentTarget.dispatchEvent(Q),r("entryFocus",Q),!Q.defaultPrevented){const y=d().map(T=>T.ref).filter(T=>T.dataset.disabled!==""),v=y.find(T=>T.getAttribute("data-active")===""),S=y.find(T=>T.getAttribute("data-highlighted")===""),P=y.find(T=>T.id===c.value),_=[v,S,P,...y].filter(Boolean);sP(_,i.preventScrollOnEntryFocus)}}O.value=!1}function $(){setTimeout(()=>{O.value=!1},1)}return e({getItems:d}),lE({loop:s,dir:l,orientation:o,currentTabStopId:c,onItemFocus:g=>{c.value=g},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(g,b)=>(x(),I(m(h),null,{default:V(()=>[X(m(Ie),{tabindex:u.value||f.value===0?-1:0,"data-orientation":m(o),as:g.as,"as-child":g.asChild,dir:m(l),style:{outline:"none"},onMousedown:b[0]||(b[0]=Q=>O.value=!0),onMouseup:$,onFocus:p,onBlur:b[1]||(b[1]=Q=>u.value=!1)},{default:V(()=>[oe(g.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),uE=cE,OE=Y({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=aE(),i=Xi(),r=j(()=>e.tabStopId||i),s=j(()=>n.currentTabStopId.value===r.value),{getItems:o,CollectionItem:a}=zs();dt(()=>{e.focusable&&n.onFocusableItemAdd()}),qi(()=>{e.focusable&&n.onFocusableItemRemove()});function l(c){if(c.key==="Tab"&&c.shiftKey){n.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=iA(c,n.orientation.value,n.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!e.allowShiftKey&&c.shiftKey)return;c.preventDefault();let O=[...o().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")O.reverse();else if(u==="prev"||u==="next"){u==="prev"&&O.reverse();const f=O.indexOf(c.currentTarget);O=n.loop.value?rA(O,f+1):O.slice(f+1)}Yt(()=>sP(O))}}return(c,u)=>(x(),I(m(a),null,{default:V(()=>[X(m(Ie),{tabindex:s.value?0:-1,"data-orientation":m(n).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=O=>{c.focusable?m(n).onItemFocus(r.value):O.preventDefault()}),onFocus:u[1]||(u[1]=O=>m(n).onItemFocus(r.value)),onKeydown:l},{default:V(()=>[oe(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),gP=OE;const[fE,UK]=Qn("CheckboxGroupRoot");function $g(t){return t==="indeterminate"}function $P(t){return $g(t)?"indeterminate":t?"checked":"unchecked"}const[dE,hE]=Qn("CheckboxRoot");var pE=Y({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Ne(),o=fE(null),a=Ss(n,"modelValue",i,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),l=j(()=>(o==null?void 0:o.disabled.value)||n.disabled),c=j(()=>Yl(a.value,n.trueValue)),u=j(()=>da(o==null?void 0:o.modelValue.value)?a.value==="indeterminate"?"indeterminate":c.value:Vy(o.modelValue.value,n.value));function O(){if(da(o==null?void 0:o.modelValue.value))a.value==="indeterminate"?a.value=n.trueValue:a.value=c.value?n.falseValue:n.trueValue;else{const h=[...o.modelValue.value||[]];if(Vy(h,n.value)){const p=h.findIndex($=>Yl($,n.value));h.splice(p,1)}else h.push(n.value);o.modelValue.value=h}}const f=lg(s),d=j(()=>{var h;return n.id&&s.value?(h=document.querySelector(`[for="${n.id}"]`))==null?void 0:h.innerText:void 0});return hE({disabled:l,state:u}),(h,p)=>{var $,g;return x(),I(kf(($=m(o))!=null&&$.rovingFocus.value?m(gP):m(Ie)),ve(h.$attrs,{id:h.id,ref:m(r),role:"checkbox","as-child":h.asChild,as:h.as,type:h.as==="button"?"button":void 0,"aria-checked":m($g)(u.value)?"mixed":u.value,"aria-required":h.required,"aria-label":h.$attrs["aria-label"]||d.value,"data-state":m($P)(u.value),"data-disabled":l.value?"":void 0,disabled:l.value,focusable:(g=m(o))!=null&&g.rovingFocus.value?!l.value:void 0,onKeydown:Af(un(()=>{},["prevent"]),["enter"]),onClick:O}),{default:V(()=>[oe(h.$slots,"default",{modelValue:m(a),state:u.value}),m(f)&&h.name&&!m(o)?(x(),I(m(rP),{key:0,type:"checkbox",checked:!!u.value,name:h.name,value:h.value,disabled:l.value,required:h.required},null,8,["checked","name","value","disabled","required"])):ue("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"])}}}),mE=pE,gE=Y({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const{forwardRef:e}=Ne(),n=dE();return(i,r)=>(x(),I(m(xc),{present:i.forceMount||m($g)(m(n).state.value)||m(n).state.value===!0},{default:V(()=>[X(m(Ie),ve({ref:m(e),"data-state":m($P)(m(n).state.value),"data-disabled":m(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":i.asChild,as:i.as},i.$attrs),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),$E=gE,yE=Y({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(t){const e=t;return Ne(),(n,i)=>(x(),I(m(Ie),ve(e,{onMousedown:i[0]||(i[0]=r=>{!r.defaultPrevented&&r.detail>1&&r.preventDefault()})}),{default:V(()=>[oe(n.$slots,"default")]),_:3},16))}}),QE=yE,bE=Y({__name:"PaginationEllipsis",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t;return Ne(),(n,i)=>(x(),I(m(Ie),ve(e,{"data-type":"ellipsis"}),{default:V(()=>[oe(n.$slots,"default",{},()=>[i[0]||(i[0]=Ce("…"))])]),_:3},16))}}),vE=bE;const[Df,SE]=Qn("PaginationRoot");var PE=Y({__name:"PaginationRoot",props:{page:{type:Number,required:!1},defaultPage:{type:Number,required:!1,default:1},itemsPerPage:{type:Number,required:!0},total:{type:Number,required:!1,default:0},siblingCount:{type:Number,required:!1,default:2},disabled:{type:Boolean,required:!1},showEdges:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"nav"}},emits:["update:page"],setup(t,{emit:e}){const n=t,i=e,{siblingCount:r,disabled:s,showEdges:o}=On(n);Ne();const a=Ss(n,"page",i,{defaultValue:n.defaultPage,passive:n.page===void 0}),l=j(()=>Math.max(1,Math.ceil(n.total/(n.itemsPerPage||1))));return SE({page:a,onPageChange(c){a.value=c},pageCount:l,siblingCount:r,disabled:s,showEdges:o}),(c,u)=>(x(),I(m(Ie),{as:c.as,"as-child":c.asChild},{default:V(()=>[oe(c.$slots,"default",{page:m(a),pageCount:l.value})]),_:3},8,["as","as-child"]))}}),xE=PE;function Jr(t,e){const n=e-t+1;return Array.from({length:n},(i,r)=>r+t)}function wE(t){return t.map(e=>typeof e=="number"?{type:"page",value:e}:{type:"ellipsis"})}const ou="ellipsis";function _E(t,e,n,i){const s=e,o=Math.max(t-n,1),a=Math.min(t+n,s);if(i){const c=Math.min(2*n+5,e)-2,u=o>3&&Math.abs(s-c-1+1)>2&&Math.abs(o-1)>2,O=a 2&&Math.abs(s-a)>2;if(!u&&O)return[...Jr(1,c),ou,s];if(u&&!O){const d=Jr(s-c+1,s);return[1,ou,...d]}if(u&&O){const d=Jr(o,a);return[1,ou,...d,ou,s]}return Jr(1,s)}else{const l=n*2+1;return e wE(_E(n.page.value,n.pageCount.value,n.siblingCount.value,n.showEdges.value)));return(r,s)=>(x(),I(m(Ie),bo(Es(e)),{default:V(()=>[oe(r.$slots,"default",{items:i.value})]),_:3},16))}}),kE=TE,RE=Y({__name:"PaginationListItem",props:{value:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Ne();const n=Df(),i=j(()=>n.page.value===e.value),r=j(()=>n.disabled.value);return(s,o)=>(x(),I(m(Ie),ve(e,{"data-type":"page","aria-label":`Page ${s.value}`,"aria-current":i.value?"page":void 0,"data-selected":i.value?"true":void 0,disabled:r.value,type:s.as==="button"?"button":void 0,onClick:o[0]||(o[0]=a=>!r.value&&m(n).onPageChange(s.value))}),{default:V(()=>[oe(s.$slots,"default",{},()=>[Ce(B(s.value),1)])]),_:3},16,["aria-label","aria-current","data-selected","disabled","type"]))}}),CE=RE,XE=Y({__name:"PaginationNext",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Ne();const n=Df(),i=j(()=>n.page.value===n.pageCount.value||n.disabled.value);return(r,s)=>(x(),I(m(Ie),ve(e,{"aria-label":"Next Page",type:r.as==="button"?"button":void 0,disabled:i.value,onClick:s[0]||(s[0]=o=>!i.value&&m(n).onPageChange(m(n).page.value+1))}),{default:V(()=>[oe(r.$slots,"default",{},()=>[s[1]||(s[1]=Ce("Next page"))])]),_:3},16,["type","disabled"]))}}),VE=XE,AE=Y({__name:"PaginationPrev",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t;Ne();const n=Df(),i=j(()=>n.page.value===1||n.disabled.value);return(r,s)=>(x(),I(m(Ie),ve(e,{"aria-label":"Previous Page",type:r.as==="button"?"button":void 0,disabled:i.value,onClick:s[0]||(s[0]=o=>!i.value&&m(n).onPageChange(m(n).page.value-1))}),{default:V(()=>[oe(r.$slots,"default",{},()=>[s[1]||(s[1]=Ce("Prev page"))])]),_:3},16,["type","disabled"]))}}),EE=AE;const zE=[" ","Enter","ArrowUp","ArrowDown"],qE=[" ","Enter"],bi=10;function Dl(t,e,n){return t===void 0?!1:Array.isArray(t)?t.some(i=>ap(i,e,n)):ap(t,e,n)}function ap(t,e,n){return t===void 0||e===void 0?!1:typeof t=="string"?t===e:typeof n=="function"?n(t,e):typeof n=="string"?(t==null?void 0:t[n])===(e==null?void 0:e[n]):Yl(t,e)}function ZE(t){return t==null||t===""||Array.isArray(t)&&t.length===0}const ME={key:0,value:""},[qs,yP]=Qn("SelectRoot");var YE=Y({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,i=e,{required:r,disabled:s,multiple:o,dir:a}=On(n),l=Ss(n,"modelValue",i,{defaultValue:n.defaultValue??(o.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),c=Ss(n,"open",i,{defaultValue:n.defaultOpen,passive:n.open===void 0}),u=H(),O=H(),f=H({x:0,y:0}),d=j(()=>{var y;return o.value&&Array.isArray(l.value)?((y=l.value)==null?void 0:y.length)===0:da(l.value)});zs({isProvider:!0});const h=Zf(a),p=lg(u),$=H(new Set),g=j(()=>Array.from($.value).map(y=>y.value).join(";"));function b(y){if(o.value){const v=Array.isArray(l.value)?[...l.value]:[],S=v.findIndex(P=>ap(P,y,n.by));S===-1?v.push(y):v.splice(S,1),l.value=[...v]}else l.value=y}function Q(y){return Array.from($.value).find(v=>Dl(y,v.value,n.by))}return yP({triggerElement:u,onTriggerChange:y=>{u.value=y},valueElement:O,onValueElementChange:y=>{O.value=y},contentId:"",modelValue:l,onValueChange:b,by:n.by,open:c,multiple:o,required:r,onOpenChange:y=>{c.value=y},dir:h,triggerPointerDownPosRef:f,disabled:s,isEmptyModelValue:d,optionsSet:$,onOptionAdd:y=>{const v=Q(y.value);v&&$.value.delete(v),$.value.add(y)},onOptionRemove:y=>{const v=Q(y.value);v&&$.value.delete(v)}}),(y,v)=>(x(),I(m(aA),null,{default:V(()=>[oe(y.$slots,"default",{modelValue:m(l),open:m(c)}),m(p)?(x(),I(DE,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:m(o),required:m(r),name:y.name,autocomplete:y.autocomplete,disabled:m(s),value:m(l)},{default:V(()=>[m(da)(m(l))?(x(),W("option",ME)):ue("v-if",!0),(x(!0),W(ze,null,kt(Array.from($.value),S=>(x(),W("option",ve({key:S.value??""},{ref_for:!0},S),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):ue("v-if",!0)]),_:3}))}}),IE=YE,UE=Y({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(t){const e=t,n=H(),i=qs();Ze(()=>e.value,(s,o)=>{const a=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==o&&c&&n.value){const u=new Event("change",{bubbles:!0});c.call(n.value,s),n.value.dispatchEvent(u)}});function r(s){i.onValueChange(s.target.value)}return(s,o)=>(x(),I(m(iP),{"as-child":""},{default:V(()=>[M("select",ve({ref_key:"selectElement",ref:n},e,{onInput:r}),[oe(s.$slots,"default")],16)]),_:3}))}}),DE=UE,LE=Y({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:bi},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const n=gi(t);return(i,r)=>(x(),I(m(oE),ve(m(n),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16))}}),WE=LE;const NE={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[xo,QP]=Qn("SelectContent");var jE=Y({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,i=e,r=qs();a5(),Y1(n.bodyLock);const{CollectionSlot:s,getItems:o}=zs(),a=H();D1(a);const{search:l,handleTypeaheadSearch:c}=L1(),u=H(),O=H(),f=H(),d=H(!1),h=H(!1),p=H(!1);function $(){O.value&&a.value&&My([O.value,a.value])}Ze(d,()=>{$()});const{onOpenChange:g,triggerPointerDownPosRef:b}=r;It(S=>{if(!a.value)return;let P={x:0,y:0};const _=q=>{var U,A;P={x:Math.abs(Math.round(q.pageX)-(((U=b.value)==null?void 0:U.x)??0)),y:Math.abs(Math.round(q.pageY)-(((A=b.value)==null?void 0:A.y)??0))}},T=q=>{var U;q.pointerType!=="touch"&&(P.x<=10&&P.y<=10?q.preventDefault():(U=a.value)!=null&&U.contains(q.target)||g(!1),document.removeEventListener("pointermove",_),b.value=null)};b.value!==null&&(document.addEventListener("pointermove",_),document.addEventListener("pointerup",T,{capture:!0,once:!0})),S(()=>{document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",T,{capture:!0})})});function Q(S){const P=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!P&&S.key.length===1&&c(S.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let T=[...o().map(q=>q.ref)];if(["ArrowUp","End"].includes(S.key)&&(T=T.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const q=S.target,U=T.indexOf(q);T=T.slice(U+1)}setTimeout(()=>My(T)),S.preventDefault()}}const y=j(()=>n.position==="popper"?n:{}),v=gi(y.value);return QP({content:a,viewport:u,onViewportChange:S=>{u.value=S},itemRefCallback:(S,P,_)=>{const T=!h.value&&!_,q=Dl(r.modelValue.value,P,r.by);if(r.multiple.value){if(p.value)return;(q||T)&&(O.value=S,q&&(p.value=!0))}else(q||T)&&(O.value=S);T&&(h.value=!0)},selectedItem:O,selectedItemText:f,onItemLeave:()=>{var S;(S=a.value)==null||S.focus()},itemTextRefCallback:(S,P,_)=>{const T=!h.value&&!_;(Dl(r.modelValue.value,P,r.by)||T)&&(f.value=S)},focusSelectedItem:$,position:n.position,isPositioned:d,searchRef:l}),(S,P)=>(x(),I(m(s),null,{default:V(()=>[X(m(G1),{"as-child":"",onMountAutoFocus:P[6]||(P[6]=un(()=>{},["prevent"])),onUnmountAutoFocus:P[7]||(P[7]=_=>{var T;i("closeAutoFocus",_),!_.defaultPrevented&&((T=m(r).triggerElement.value)==null||T.focus({preventScroll:!0}),_.preventDefault())})},{default:V(()=>[X(m(j1),{"as-child":"","disable-outside-pointer-events":S.disableOutsidePointerEvents,onFocusOutside:P[2]||(P[2]=un(()=>{},["prevent"])),onDismiss:P[3]||(P[3]=_=>m(r).onOpenChange(!1)),onEscapeKeyDown:P[4]||(P[4]=_=>i("escapeKeyDown",_)),onPointerDownOutside:P[5]||(P[5]=_=>i("pointerDownOutside",_))},{default:V(()=>[(x(),I(kf(S.position==="popper"?WE:HE),ve({...S.$attrs,...m(v)},{id:m(r).contentId,ref:_=>{const T=m(Or)(_);T!=null&&T.hasAttribute("data-reka-popper-content-wrapper")?a.value=T.firstElementChild:a.value=T},role:"listbox","data-state":m(r).open.value?"open":"closed",dir:m(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:P[0]||(P[0]=un(()=>{},["prevent"])),onPlaced:P[1]||(P[1]=_=>d.value=!0),onKeydown:Q}),{default:V(()=>[oe(S.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),BE=jE;const[yg,GE]=Qn("SelectItemAlignedPosition");var FE=Y({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(t,{emit:e}){const n=t,i=e,{getItems:r}=zs(),s=qs(),o=xo(),a=H(!1),l=H(!0),c=H(),{forwardRef:u,currentElement:O}=Ne(),{viewport:f,selectedItem:d,selectedItemText:h,focusSelectedItem:p}=o;function $(){if(s.triggerElement.value&&s.valueElement.value&&c.value&&O.value&&(f!=null&&f.value)&&(d!=null&&d.value)&&(h!=null&&h.value)){const Q=s.triggerElement.value.getBoundingClientRect(),y=O.value.getBoundingClientRect(),v=s.valueElement.value.getBoundingClientRect(),S=h.value.getBoundingClientRect();if(s.dir.value!=="rtl"){const Se=S.left-y.left,qe=v.left-Se,Ee=Q.left-qe,He=Q.width+Ee,$t=Math.max(He,y.width),yt=window.innerWidth-bi,k=Xy(qe,bi,Math.max(bi,yt-$t));c.value.style.minWidth=`${He}px`,c.value.style.left=`${k}px`}else{const Se=y.right-S.right,qe=window.innerWidth-v.right-Se,Ee=window.innerWidth-Q.right-qe,He=Q.width+Ee,$t=Math.max(He,y.width),yt=window.innerWidth-bi,k=Xy(qe,bi,Math.max(bi,yt-$t));c.value.style.minWidth=`${He}px`,c.value.style.right=`${k}px`}const P=r().map(Se=>Se.ref),_=window.innerHeight-bi*2,T=f.value.scrollHeight,q=window.getComputedStyle(O.value),U=Number.parseInt(q.borderTopWidth,10),A=Number.parseInt(q.paddingTop,10),K=Number.parseInt(q.borderBottomWidth,10),ae=Number.parseInt(q.paddingBottom,10),de=U+A+T+ae+K,J=Math.min(d.value.offsetHeight*5,de),re=window.getComputedStyle(f.value),se=Number.parseInt(re.paddingTop,10),ge=Number.parseInt(re.paddingBottom,10),Oe=Q.top+Q.height/2-bi,te=_-Oe,le=d.value.offsetHeight/2,fe=d.value.offsetTop+le,ye=U+A+fe,he=de-ye;if(ye<=Oe){const Se=d.value===P[P.length-1];c.value.style.bottom="0px";const qe=O.value.clientHeight-f.value.offsetTop-f.value.offsetHeight,Ee=Math.max(te,le+(Se?ge:0)+qe+K),He=ye+Ee;c.value.style.height=`${He}px`}else{const Se=d.value===P[0];c.value.style.top="0px";const Ee=Math.max(Oe,U+f.value.offsetTop+(Se?se:0)+le)+he;c.value.style.height=`${Ee}px`,f.value.scrollTop=ye-Oe+f.value.offsetTop}c.value.style.margin=`${bi}px 0`,c.value.style.minHeight=`${J}px`,c.value.style.maxHeight=`${_}px`,i("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=H("");dt(async()=>{await Yt(),$(),O.value&&(g.value=window.getComputedStyle(O.value).zIndex)});function b(Q){Q&&l.value===!0&&($(),p==null||p(),l.value=!1)}return n5(s.triggerElement,()=>{$()}),GE({contentWrapper:c,shouldExpandOnScrollRef:a,onScrollButtonChange:b}),(Q,y)=>(x(),W("div",{ref_key:"contentWrapperElement",ref:c,style:ti({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[X(m(Ie),ve({ref:m(u),style:{boxSizing:"border-box",maxHeight:"100%"}},{...Q.$attrs,...n}),{default:V(()=>[oe(Q.$slots,"default")]),_:3},16)],4))}}),HE=FE,KE=Y({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(t){return yP(t.context),QP(NE),(n,i)=>oe(n.$slots,"default")}}),JE=KE;const e8={key:1};var t8=Y({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=Dn(n,e),s=qs(),o=H();dt(()=>{o.value=new DocumentFragment});const a=H(),l=j(()=>n.forceMount||s.open.value),c=H(l.value);return Ze(l,()=>{setTimeout(()=>c.value=l.value)}),(u,O)=>{var f;return l.value||c.value||(f=a.value)!=null&&f.present?(x(),I(m(xc),{key:0,ref_key:"presenceRef",ref:a,present:l.value},{default:V(()=>[X(BE,bo(Es({...m(r),...u.$attrs})),{default:V(()=>[oe(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):o.value?(x(),W("div",e8,[(x(),I(Ym,{to:o.value},[X(JE,{context:m(s)},{default:V(()=>[oe(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):ue("v-if",!0)}}}),n8=t8;const[DK,i8]=Qn("SelectGroup");var r8=Y({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,n=Xi(void 0,"reka-select-group");return i8({id:n}),(i,r)=>(x(),I(m(Ie),ve({role:"group"},e,{"aria-labelledby":m(n)}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),s8=r8,o8=Y({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){return(e,n)=>(x(),I(m(Ie),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:V(()=>[oe(e.$slots,"default",{},()=>[n[0]||(n[0]=Ce("▼"))])]),_:3},8,["as","as-child"]))}}),a8=o8;const[bP,l8]=Qn("SelectItem");var c8=Y({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(t,{emit:e}){const n=t,i=e,{disabled:r}=On(n),s=qs(),o=xo(),{forwardRef:a,currentElement:l}=Ne(),{CollectionItem:c}=zs(),u=j(()=>{var y;return Dl((y=s.modelValue)==null?void 0:y.value,n.value,s.by)}),O=H(!1),f=H(n.textValue??""),d=Xi(void 0,"reka-select-item-text"),h="select.select";async function p(y){if(y.defaultPrevented)return;const v={originalEvent:y,value:n.value};sg(h,$,v)}async function $(y){await Yt(),i("select",y),!y.defaultPrevented&&(r.value||(s.onValueChange(n.value),s.multiple.value||s.onOpenChange(!1)))}async function g(y){var v,S;await Yt(),!y.defaultPrevented&&(r.value?(v=o.onItemLeave)==null||v.call(o):(S=y.currentTarget)==null||S.focus({preventScroll:!0}))}async function b(y){var v;await Yt(),!y.defaultPrevented&&y.currentTarget===Tn()&&((v=o.onItemLeave)==null||v.call(o))}async function Q(y){var S;await Yt(),!(y.defaultPrevented||((S=o.searchRef)==null?void 0:S.value)!==""&&y.key===" ")&&(qE.includes(y.key)&&p(y),y.key===" "&&y.preventDefault())}if(n.value==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return dt(()=>{l.value&&o.itemRefCallback(l.value,n.value,n.disabled)}),l8({value:n.value,disabled:r,textId:d,isSelected:u,onItemTextChange:y=>{f.value=((f.value||(y==null?void 0:y.textContent))??"").trim()}}),(y,v)=>(x(),I(m(c),{value:{textValue:f.value}},{default:V(()=>[X(m(Ie),{ref:m(a),role:"option","aria-labelledby":m(d),"data-highlighted":O.value?"":void 0,"aria-selected":u.value,"data-state":u.value?"checked":"unchecked","aria-disabled":m(r)||void 0,"data-disabled":m(r)?"":void 0,tabindex:m(r)?void 0:-1,as:y.as,"as-child":y.asChild,onFocus:v[0]||(v[0]=S=>O.value=!0),onBlur:v[1]||(v[1]=S=>O.value=!1),onPointerup:p,onPointerdown:v[2]||(v[2]=S=>{S.currentTarget.focus({preventScroll:!0})}),onTouchend:v[3]||(v[3]=un(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:b,onKeydown:Q},{default:V(()=>[oe(y.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),u8=c8,O8=Y({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=bP();return(i,r)=>m(n).isSelected.value?(x(),I(m(Ie),ve({key:0,"aria-hidden":"true"},e),{default:V(()=>[oe(i.$slots,"default")]),_:3},16)):ue("v-if",!0)}}),f8=O8,d8=Y({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,n=qs(),i=xo(),r=bP(),{forwardRef:s,currentElement:o}=Ne(),a=j(()=>{var l,c;return{value:r.value,disabled:r.disabled.value,textContent:((l=o.value)==null?void 0:l.textContent)??((c=r.value)==null?void 0:c.toString())??""}});return dt(()=>{o.value&&(r.onItemTextChange(o.value),i.itemTextRefCallback(o.value,r.value,r.disabled.value),n.onOptionAdd(a.value))}),qi(()=>{n.onOptionRemove(a.value)}),(l,c)=>(x(),I(m(Ie),ve({id:m(r).textId,ref:m(s)},{...e,...l.$attrs}),{default:V(()=>[oe(l.$slots,"default")]),_:3},16,["id"]))}}),h8=d8,p8=Y({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(t){const e=t;return(n,i)=>(x(),I(m(eP),bo(Es(e)),{default:V(()=>[oe(n.$slots,"default")]),_:3},16))}}),m8=p8,g8=Y({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(t,{emit:e}){const n=e,{getItems:i}=zs(),r=xo(),s=H(null);function o(){s.value!==null&&(window.clearInterval(s.value),s.value=null)}It(()=>{const c=i().map(u=>u.ref).find(u=>u===Tn());c==null||c.scrollIntoView({block:"nearest"})});function a(){s.value===null&&(s.value=window.setInterval(()=>{n("autoScroll")},50))}function l(){var c;(c=r.onItemLeave)==null||c.call(r),s.value===null&&(s.value=window.setInterval(()=>{n("autoScroll")},50))}return As(()=>o()),(c,u)=>{var O;return x(),I(m(Ie),ve({"aria-hidden":"true",style:{flexShrink:0}},(O=c.$parent)==null?void 0:O.$props,{onPointerdown:a,onPointermove:l,onPointerleave:u[0]||(u[0]=()=>{o()})}),{default:V(()=>[oe(c.$slots,"default")]),_:3},16)}}}),vP=g8,$8=Y({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=xo(),n=e.position==="item-aligned"?yg():void 0,{forwardRef:i,currentElement:r}=Ne(),s=H(!1);return It(o=>{var l,c;if((l=e.viewport)!=null&&l.value&&((c=e.isPositioned)!=null&&c.value)){let O=function(){const f=u.scrollHeight-u.clientHeight;s.value=Math.ceil(u.scrollTop) u.removeEventListener("scroll",O))}}),Ze(r,()=>{r.value&&(n==null||n.onScrollButtonChange(r.value))}),(o,a)=>s.value?(x(),I(vP,{key:0,ref:m(i),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=m(e);l!=null&&l.value&&(c!=null&&c.value)&&(l.value.scrollTop=l.value.scrollTop+c.value.offsetHeight)})},{default:V(()=>[oe(o.$slots,"default")]),_:3},512)):ue("v-if",!0)}}),y8=$8,Q8=Y({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=xo(),n=e.position==="item-aligned"?yg():void 0,{forwardRef:i,currentElement:r}=Ne(),s=H(!1);return It(o=>{var l,c;if((l=e.viewport)!=null&&l.value&&((c=e.isPositioned)!=null&&c.value)){let O=function(){s.value=u.scrollTop>0};var a=O;const u=e.viewport.value;O(),u.addEventListener("scroll",O),o(()=>u.removeEventListener("scroll",O))}}),Ze(r,()=>{r.value&&(n==null||n.onScrollButtonChange(r.value))}),(o,a)=>s.value?(x(),I(vP,{key:0,ref:m(i),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=m(e);l!=null&&l.value&&(c!=null&&c.value)&&(l.value.scrollTop=l.value.scrollTop-c.value.offsetHeight)})},{default:V(()=>[oe(o.$slots,"default")]),_:3},512)):ue("v-if",!0)}}),b8=Q8,v8=Y({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,n=qs(),{forwardRef:i,currentElement:r}=Ne(),s=j(()=>{var f;return((f=n.disabled)==null?void 0:f.value)||e.disabled});n.contentId||(n.contentId=Xi(void 0,"reka-select-content")),dt(()=>{n.onTriggerChange(r.value)});const{getItems:o}=zs(),{search:a,handleTypeaheadSearch:l,resetTypeahead:c}=L1();function u(){s.value||(n.onOpenChange(!0),c())}function O(f){u(),n.triggerPointerDownPosRef.value={x:Math.round(f.pageX),y:Math.round(f.pageY)}}return(f,d)=>(x(),I(m(cA),{"as-child":"",reference:f.reference},{default:V(()=>{var h,p,$,g;return[X(m(Ie),{ref:m(i),role:"combobox",type:f.as==="button"?"button":void 0,"aria-controls":m(n).contentId,"aria-expanded":m(n).open.value||!1,"aria-required":(h=m(n).required)==null?void 0:h.value,"aria-autocomplete":"none",disabled:s.value,dir:(p=m(n))==null?void 0:p.dir.value,"data-state":($=m(n))!=null&&$.open.value?"open":"closed","data-disabled":s.value?"":void 0,"data-placeholder":m(ZE)((g=m(n).modelValue)==null?void 0:g.value)?"":void 0,"as-child":f.asChild,as:f.as,onClick:d[0]||(d[0]=b=>{var Q;(Q=b==null?void 0:b.currentTarget)==null||Q.focus()}),onPointerdown:d[1]||(d[1]=b=>{if(b.pointerType==="touch")return b.preventDefault();const Q=b.target;Q.hasPointerCapture(b.pointerId)&&Q.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(O(b),b.preventDefault())}),onPointerup:d[2]||(d[2]=un(b=>{b.pointerType==="touch"&&O(b)},["prevent"])),onKeydown:d[3]||(d[3]=b=>{const Q=m(a)!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&Q&&b.key===" "||(m(l)(b.key,m(o)()),m(zE).includes(b.key)&&(u(),b.preventDefault()))})},{default:V(()=>[oe(f.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3},8,["reference"]))}}),S8=v8,P8=Y({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=t,{forwardRef:n,currentElement:i}=Ne(),r=qs();dt(()=>{r.valueElement=i});const s=j(()=>{var u;let a=[];const l=Array.from(r.optionsSet.value),c=O=>l.find(f=>Dl(O,f.value,r.by));return Array.isArray(r.modelValue.value)?a=r.modelValue.value.map(O=>{var f;return((f=c(O))==null?void 0:f.textContent)??""}):a=[((u=c(r.modelValue.value))==null?void 0:u.textContent)??""],a.filter(Boolean)}),o=j(()=>s.value.length?s.value.join(", "):e.placeholder);return(a,l)=>(x(),I(m(Ie),{ref:m(n),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":s.value.length?void 0:e.placeholder},{default:V(()=>[oe(a.$slots,"default",{selectedLabel:s.value,modelValue:m(r).modelValue.value},()=>[Ce(B(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),x8=P8,w8=Y({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{nonce:n}=On(e),i=mP(n),r=xo(),s=r.position==="item-aligned"?yg():void 0,{forwardRef:o,currentElement:a}=Ne();dt(()=>{r==null||r.onViewportChange(a.value)});const l=H(0);function c(u){const O=u.currentTarget,{shouldExpandOnScrollRef:f,contentWrapper:d}=s??{};if(f!=null&&f.value&&(d!=null&&d.value)){const h=Math.abs(l.value-O.scrollTop);if(h>0){const p=window.innerHeight-bi*2,$=Number.parseFloat(d.value.style.minHeight),g=Number.parseFloat(d.value.style.height),b=Math.max($,g);if(b 0?v:0,d.value.style.justifyContent="flex-end")}}}l.value=O.scrollTop}return(u,O)=>(x(),W(ze,null,[X(m(Ie),ve({ref:m(o),"data-reka-select-viewport":"",role:"presentation"},{...u.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:V(()=>[oe(u.$slots,"default")]),_:3},16),X(m(Ie),{as:"style",nonce:m(i)},{default:V(()=>O[0]||(O[0]=[Ce(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),_8=w8;function We(t,e="Assertion failed!"){if(!t)throw console.error(e),new Error(e)}function SP(t,e=document){var i;if(!Pc)return null;if(e instanceof HTMLElement&&((i=e==null?void 0:e.dataset)==null?void 0:i.panelGroupId)===t)return e;const n=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return n||null}function Lf(t,e=document){if(!Pc)return null;const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function PP(t,e,n=document){return Pc?Ll(t,n).findIndex(s=>s.getAttribute("data-panel-resize-handle-id")===e)??null:null}function Ll(t,e=document){return Pc?Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`)):[]}function T8(t,e,n,i=document){var c,u;const r=Lf(e,i),s=Ll(t,i),o=r?s.indexOf(r):-1,a=((c=n[o])==null?void 0:c.id)??null,l=((u=n[o+1])==null?void 0:u.id)??null;return[a,l]}function xP(t){return t.type==="keydown"}function wP(t){return t.type.startsWith("mouse")}function _P(t){return t.type.startsWith("touch")}function Wf(t){if(wP(t))return{x:t.clientX,y:t.clientY};if(_P(t)){const e=t.touches[0];if(e&&e.clientX&&e.clientY)return{x:e.clientX,y:e.clientY}}return{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY}}function TP(t,e){const n=t==="horizontal",{x:i,y:r}=Wf(e);return n?i:r}function k8(t,e,n,i,r){const s=n==="horizontal",o=Lf(e,r);We(o);const a=o.getAttribute("data-panel-group-id");We(a);const{initialCursorPosition:l}=i,c=TP(n,t),u=SP(a,r);We(u);const O=u.getBoundingClientRect(),f=s?O.width:O.height;return(c-l)/f*100}function R8(t,e,n,i,r,s){if(xP(t)){const o=n==="horizontal";let a=0;t.shiftKey?a=100:a=r??10;let l=0;switch(t.key){case"ArrowDown":l=o?0:a;break;case"ArrowLeft":l=o?-a:0;break;case"ArrowRight":l=o?a:0;break;case"ArrowUp":l=o?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return i==null?0:k8(t,e,n,i,s)}function C8({layout:t,panelsArray:e,pivotIndices:n}){let i=0,r=100,s=0,o=0;const a=n[0];We(a!=null),e.forEach((O,f)=>{const{constraints:d}=O,{maxSize:h=100,minSize:p=0}=d;f===a?(i=p,r=h):(s+=p,o+=h)});const l=Math.min(r,100-s),c=Math.max(i,100-o),u=t[a];return{valueMax:l,valueMin:c,valueNow:u}}function X8({panelDataArray:t}){const e=Array.from({length:t.length}),n=t.map(s=>s.constraints);let i=0,r=100;for(let s=0;s
{const s=t[r];We(s);const{callbacks:o,constraints:a,id:l}=s,{collapsedSize:c=0,collapsible:u}=a,O=n[l];if(O==null||i!==O){n[l]=i;const{onCollapse:f,onExpand:d,onResize:h}=o;h&&h(i,O),u&&(f||d)&&(d&&(O==null||O===c)&&i!==c&&d(),f&&(O==null||O!==c)&&i===c&&f())}})}const Qg=10;function pa(t,e,n=Qg){t=Number.parseFloat(t.toFixed(n)),e=Number.parseFloat(e.toFixed(n));const i=t-e;return i===0?0:i>0?1:-1}function Gn(t,e,n){return pa(t,e,n)===0}function V8(t,e=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...r)},e)}}function Do({panelConstraints:t,panelIndex:e,size:n}){const i=t[e];We(i!=null);const{collapsedSize:r=0,collapsible:s,maxSize:o=100,minSize:a=0}=i;if(pa(n,a)<0)if(s){const l=(r+a)/2;pa(n,l)<0?n=r:n=a}else n=a;return n=Math.min(o,n),n=Number.parseFloat(n.toFixed(Qg)),n}function Na(t,e){if(t.length!==e.length)return!1;for(let n=0;n 0&&(t=t<0?0-$:$)}}}{const u=t<0?o:a,O=n[u];We(O);const{collapsible:f}=O;if(f){const d=e[u];We(d!=null);const h=n[u];We(h);const{collapsedSize:p=0,minSize:$=0}=h;if(Gn(d,$)){const g=d-p;pa(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const u=t<0?1:-1;let O=t<0?a:o,f=0;for(;;){const h=e[O];We(h!=null);const $=Do({panelConstraints:n,panelIndex:O,size:100})-h;if(f+=$,O+=u,O<0||O>=n.length)break}const d=Math.min(Math.abs(t),Math.abs(f));t=t<0?0-d:d}{let O=t<0?o:a;for(;O>=0&&O =0))break;t<0?O--:O++}}if(Gn(l,0))return e;{const u=t<0?a:o,O=e[u];We(O!=null);const f=O+l,d=Do({panelConstraints:n,panelIndex:u,size:f});if(s[u]=d,!Gn(d,f)){let h=f-d,$=t<0?a:o;for(;$>=0&&$ 0?$--:$++}}}const c=s.reduce((u,O)=>O+u,0);return Gn(c,100)?s:e}function kP(t,e,n){const i=PP(t,e,n);return i!=null?[i,i+1]:[-1,-1]}function A8(t,e,n){return t.x e.x&&t.y e.y}function E8(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:Ky(t),b:Ky(e)};let i;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),i=t;We(i);const r={a:Hy(Fy(n.a)),b:Hy(Fy(n.b))};if(r.a===r.b){const s=i.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const l=s[a];if(l===o.a)return 1;if(l===o.b)return-1}}return Math.sign(r.a-r.b)}const z8=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function q8(t){const e=getComputedStyle(RP(t)).display;return e==="flex"||e==="inline-flex"}function Z8(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||q8(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||z8.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Fy(t){let e=t.length;for(;e--;){const n=t[e];if(We(n),Z8(n))return n}return null}function Hy(t){return t&&Number(getComputedStyle(t).zIndex)||0}function Ky(t){const e=[];for(;t;)e.push(t),t=RP(t);return e}function RP(t){var e;return t.parentNode instanceof DocumentFragment&&((e=t.parentNode)==null?void 0:e.host)||t.parentNode}const CP=1,XP=2,VP=4,AP=8;function M8(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}const Y8=M8()==="coarse",ws=[];let Nf=!1;const hs=new Map,jf=new Map,Wl=new Set;function I8(t,e,n,i,r,s){const{ownerDocument:o}=e,a={direction:n,element:e,hitAreaMargins:i,nonce:r,setResizeHandlerState:s},l=hs.get(o)??0;return hs.set(o,l+1),Wl.add(a),CO(),function(){jf.delete(t),Wl.delete(a);const u=hs.get(o)??1;hs.set(o,u-1),CO(),zP(),u===1&&hs.delete(o)}}function au(t){const{target:e}=t,{x:n,y:i}=Wf(t);Nf=!0,bg({target:e,x:n,y:i}),CO(),ws.length>0&&(vg("down",t),t.preventDefault())}function es(t){const{x:e,y:n}=Wf(t);if(!Nf){const{target:i}=t;bg({target:i,x:e,y:n})}vg("move",t),EP(),ws.length>0&&t.preventDefault()}function ts(t){const{target:e}=t,{x:n,y:i}=Wf(t);jf.clear(),Nf=!1,ws.length>0&&t.preventDefault(),vg("up",t),bg({target:e,x:n,y:i}),EP(),CO()}function bg({target:t,x:e,y:n}){ws.splice(0);let i=null;t instanceof HTMLElement&&(i=t),Wl.forEach(r=>{const{element:s,hitAreaMargins:o}=r,a=s.getBoundingClientRect(),{bottom:l,left:c,right:u,top:O}=a,f=Y8?o.coarse:o.fine;if(e>=c-f&&e<=u+f&&n>=O-f&&n<=l+f){if(i!==null&&s!==i&&!s.contains(i)&&!i.contains(s)&&E8(i,s)>0){let h=i,p=!1;for(;h&&!h.contains(s);){if(A8(h.getBoundingClientRect(),a)){p=!0;break}h=h.parentElement}if(p)return}ws.push(r)}})}function Ad(t,e){jf.set(t,e)}function EP(){let t=!1,e=!1,n;ws.forEach(r=>{const{direction:s,nonce:o}=r;s.value==="horizontal"?t=!0:e=!0,n=o.value});let i=0;jf.forEach(r=>{i|=r}),t&&e?Ed("intersection",i,n):t?Ed("horizontal",i,n):e?Ed("vertical",i,n):zP()}function CO(){hs.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",ts),n.removeEventListener("mousedown",au),n.removeEventListener("mouseleave",es),n.removeEventListener("mousemove",es),n.removeEventListener("touchmove",es),n.removeEventListener("touchstart",au)}),window.removeEventListener("mouseup",ts),window.removeEventListener("touchcancel",ts),window.removeEventListener("touchend",ts),Wl.size>0&&(Nf?(ws.length>0&&hs.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",ts),n.addEventListener("mouseleave",es),n.addEventListener("mousemove",es),n.addEventListener("touchmove",es,{passive:!1}))}),window.addEventListener("mouseup",ts),window.addEventListener("touchcancel",ts),window.addEventListener("touchend",ts)):hs.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("mousedown",au),n.addEventListener("mousemove",es),n.addEventListener("touchmove",es,{passive:!1}),n.addEventListener("touchstart",au))}))}function vg(t,e){Wl.forEach(n=>{const{setResizeHandlerState:i}=n,r=ws.includes(n);i(t,r,e)})}let lp=null,ps=null;function U8(t,e){if(e){const n=(e&CP)!==0,i=(e&XP)!==0,r=(e&VP)!==0,s=(e&AP)!==0;if(n)return r?"se-resize":s?"ne-resize":"e-resize";if(i)return r?"sw-resize":s?"nw-resize":"w-resize";if(r)return"s-resize";if(s)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function zP(){ps!==null&&(document.head.removeChild(ps),lp=null,ps=null)}function Ed(t,e,n){const i=U8(t,e);lp!==i&&(lp=i,ps===null&&(ps=document.createElement("style"),n&&(ps.nonce=n),document.head.appendChild(ps)),ps.innerHTML=`*{cursor: ${i}!important;}`)}function D8({defaultSize:t,dragState:e,layout:n,panelData:i,panelIndex:r,precision:s=3}){const o=n[r];let a;return o==null?a=t!==void 0?t.toPrecision(s):"1":i.length===1?a="1":a=o.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function lu({sizeUnit:t,groupSizeInPixels:e,value:n}){if(n==null||t==="%")return n;if(!(e==null||e===0))return n/e*100}function L8({panelDataArray:t,groupSizeInPixels:e}){return t.some(i=>(i.constraints.sizeUnit??"%")==="px")&&(!e||Number.isNaN(e))?null:t.map(i=>{const r=i.constraints,s=r.sizeUnit??"%",o=lu({groupSizeInPixels:e,sizeUnit:s,value:r.collapsedSize}),a=lu({groupSizeInPixels:e,sizeUnit:s,value:r.defaultSize}),l=lu({groupSizeInPixels:e,sizeUnit:s,value:r.maxSize}),c=lu({groupSizeInPixels:e,sizeUnit:s,value:r.minSize});return{...r,collapsedSize:o??r.collapsedSize??0,defaultSize:a,maxSize:l??100,minSize:c??0,sizeUnit:"%"}})}function qP(t){return t.some(e=>(e.constraints.sizeUnit??"%")==="px")}function W8({layout:t,panelDataArray:e,prevGroupSize:n,nextGroupSize:i}){if(!qP(e)||n==null||i==null||n===0||i===0||Number.isNaN(n)||Number.isNaN(i))return null;const r=e.reduce((f,d,h)=>((d.constraints.sizeUnit??"%")==="px"&&f.push(h),f),[]);if(r.length===0)return null;const s=new Set(r),o=t.map(f=>f??0);r.reduce((f,d)=>f+(t[d]??0),0);const a=r.map(f=>(t[f]??0)/100*n/i*100),l=a.reduce((f,d)=>f+d,0),c=t.reduce((f,d,h)=>s.has(h)?f:f+(d??0),0),u=Math.max(0,100-l),O=c>0?u/c:0;r.forEach((f,d)=>{o[f]=a[d]});for(let f=0;f s+o,0);if(n.length!==e.length)throw new Error(`Invalid ${e.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!Gn(i,100)){console.warn(`WARNING: Invalid layout total size: ${n.map(s=>`${s}%`).join(", ")}. Layout normalization will be applied.`);for(let s=0;s {const l=r.value;if(!l)return;const c=o();if(!c)return;const u=Ll(e,l);for(let O=0;O {u.forEach(O=>{O.removeAttribute("aria-controls"),O.removeAttribute("aria-valuemax"),O.removeAttribute("aria-valuemin"),O.removeAttribute("aria-valuenow")})})}),It(a=>{const l=r.value;if(!l)return;const c=t.value;We(c);const u=o();if(!u)return;const{panelDataArray:O}=c,f=SP(e,l);We(f!=null,`No group found for id "${e}"`);const d=Ll(e,l);We(d);const h=d.map(p=>{const $=p.getAttribute("data-panel-resize-handle-id");We($);const[g,b]=T8(e,$,O,l);if(g==null||b==null)return()=>{};const Q=y=>{if(!y.defaultPrevented)switch(y.key){case"Enter":{y.preventDefault();const v=u.findIndex(S=>S.id===g);if(v>=0){const S=u[v];We(S);const P=n.value[v],{collapsedSize:_=0,collapsible:T,minSize:q=0}=S.constraints;if(P!=null&&T){const U=sl({delta:Gn(P,_)?q-_:_-P,layout:n.value,panelConstraints:u.map(A=>A.constraints),pivotIndices:kP(e,$,l),trigger:"keyboard"});n.value!==U&&s(U)}}break}}};return p.addEventListener("keydown",Q),()=>{p.removeEventListener("keydown",Q)}});a(()=>{h.forEach(p=>p())})})}function eQ(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new TypeError("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function ZP(t){return`reka:${t}`}function MP(t){return t.map(e=>{const{constraints:n,id:i,idIsFromProps:r,order:s}=e;return r?i:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function YP(t,e){try{const n=ZP(t),i=e.getItem(n);if(i){const r=JSON.parse(i);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function j8(t,e,n){const i=YP(t,n)??{},r=MP(e);return i[r]??null}function B8(t,e,n,i,r){const s=ZP(t),o=MP(e),a=YP(t,r)??{},l={};e.forEach((c,u)=>{(c.constraints.sizeUnit??"%")==="px"&&(l[u]="px")}),a[o]={expandToSizes:Object.fromEntries(n.entries()),layout:i,...Object.keys(l).length>0&&{sizeUnits:l}};try{r.setItem(s,JSON.stringify(a))}catch(c){console.error(c)}}const G8=100,ol={getItem:t=>(eQ(ol),ol.getItem(t)),setItem:(t,e)=>{eQ(ol),ol.setItem(t,e)}},[IP,F8]=Qn("PanelGroup");var H8=Y({__name:"SplitterGroup",props:{id:{type:[String,null],required:!1},autoSaveId:{type:[String,null],required:!1,default:null},direction:{type:String,required:!0},keyboardResizeBy:{type:[Number,null],required:!1,default:10},storage:{type:Object,required:!1,default:()=>ol},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,r={},{direction:s}=On(n),o=Xi(n.id,"reka-splitter-group"),a=Zf(),{forwardRef:l,currentElement:c}=Ne(),u=H(null),O=H(null),f=H([]),d=H({}),h=H(new Map),p=H(0),$=j(()=>({autoSaveId:n.autoSaveId,direction:n.direction,dragState:u.value,id:o,keyboardResizeBy:n.keyboardResizeBy,storage:n.storage})),g=H({layout:f.value,panelDataArray:[],panelDataArrayChanged:!1});function b(){if(O.value!=null)return O.value;const te=c.value;if(te&&te instanceof HTMLElement){const le=te.getBoundingClientRect(),fe=s.value==="horizontal"?le.width:le.height;if(!Number.isNaN(fe))return O.value=fe,fe}return null}function Q(te){const le=te??b();return L8({panelDataArray:g.value.panelDataArray,groupSizeInPixels:le})}function y(te){const le=Q(te);return le?g.value.panelDataArray.map((fe,ye)=>({...fe,constraints:le[ye]})):null}const v=te=>f.value=te;N8({eagerValuesRef:g,groupId:o,layout:f,panelDataArray:g.value.panelDataArray,setLayout:v,panelGroupElement:c,getPanelDataWithPercentConstraints:y}),It(te=>{const le=c.value;if(!le||typeof ResizeObserver!="function")return;const fe=new ResizeObserver(ye=>{const he=ye[0];if(!he)return;const{height:Qe,width:Se}=he.contentRect,qe=s.value==="horizontal"?Se:Qe;Number.isNaN(qe)||(O.value=qe)});le instanceof HTMLElement&&fe.observe(le),te(()=>fe.disconnect())}),It(()=>{const{panelDataArray:te}=g.value,{autoSaveId:le}=n;if(le){if(f.value.length===0||f.value.length!==te.length)return;let fe=r[le];fe||(fe=V8(B8,G8),r[le]=fe);const ye=[...te],he=new Map(h.value);fe(le,ye,he,f.value,n.storage)}});function S(te,le){const{panelDataArray:fe}=g.value,ye=ge(fe,te);return D8({defaultSize:le,dragState:u.value,layout:f.value,panelData:fe,panelIndex:ye})}function P(te){const{panelDataArray:le}=g.value;le.push(te),le.sort((fe,ye)=>{const he=fe.order,Qe=ye.order;return he==null&&Qe==null?0:he==null?-1:Qe==null?1:he-Qe}),g.value.panelDataArrayChanged=!0}Ze(()=>g.value.panelDataArrayChanged,()=>{if(g.value.panelDataArrayChanged){g.value.panelDataArrayChanged=!1;const{autoSaveId:te,storage:le}=$.value,{layout:fe,panelDataArray:ye}=g.value;let he=null;if(te){const qe=j8(te,ye,le);qe&&(h.value=new Map(Object.entries(qe.expandToSizes)),he=qe.layout)}if(he===null){const qe=y();if(!qe)return;he=X8({panelDataArray:qe})}const Qe=Q();if(!Qe)return;const Se=Jy({layout:he,panelConstraints:Qe});YV(fe,Se)||(v(Se),g.value.layout=Se,i("layout",Se),Vo(ye,Se,d.value))}}),Ze(O,(te,le)=>{if(le==null||te==null)return;const{layout:fe,panelDataArray:ye}=g.value;if(fe.length===0||!qP(ye))return;const he=W8({layout:fe,panelDataArray:ye,prevGroupSize:le,nextGroupSize:te});if(!he)return;const Qe=Q(te);if(!Qe)return;const Se=Jy({layout:he,panelConstraints:Qe});Na(fe,Se)||(v(Se),g.value.layout=Se,i("layout",Se),Vo(ye,Se,d.value))});function _(te){return function(fe){fe.preventDefault();const ye=c.value;if(!ye)return()=>null;const{direction:he,dragState:Qe,id:Se,keyboardResizeBy:qe}=$.value,{layout:Ee,panelDataArray:He}=g.value,{initialLayout:$t}=Qe??{},yt=kP(Se,te,ye);let k=R8(fe,te,he,Qe,qe,ye);if(k===0)return;const E=he==="horizontal";a.value==="rtl"&&E&&(k=-k);const N=Q();if(!N)return;const ee=sl({delta:k,layout:$t??Ee,panelConstraints:N,pivotIndices:yt,trigger:xP(fe)?"keyboard":"mouse-or-touch"}),ne=!Na(Ee,ee);(wP(fe)||_P(fe))&&p.value!==k&&(p.value=k,ne?Ad(te,0):E?Ad(te,k<0?CP:XP):Ad(te,k<0?VP:AP)),ne&&(v(ee),g.value.layout=ee,i("layout",ee),Vo(He,ee,d.value))}}function T(te,le){const{layout:fe,panelDataArray:ye}=g.value,he=Q();if(!he)return;const Qe=ge(ye,te),Se=te.constraints.sizeUnit??"%";let qe=le;if(Se==="px"){const E=b();E!=null&&(qe=le/E*100)}const{panelSize:Ee,pivotIndices:He}=Oe(ye,te,fe,he);We(Ee!=null);const yt=Qe===ye.length-1?Ee-qe:qe-Ee,k=sl({delta:yt,layout:fe,panelConstraints:he,pivotIndices:He,trigger:"imperative-api"});Na(fe,k)||(v(k),g.value.layout=k,i("layout",k),Vo(ye,k,d.value))}function q(te,le){const{layout:fe,panelDataArray:ye}=g.value,he=ge(ye,te);ye[he]=te,g.value.panelDataArrayChanged=!0;const Qe=Q();if(!Qe)return;const Se=Qe[he],{panelSize:qe}=Oe(ye,te,fe,Qe);if(qe===null)return;const Ee=(Se==null?void 0:Se.collapsedSize)??0,He=(Se==null?void 0:Se.maxSize)??100,$t=(Se==null?void 0:Se.minSize)??0;Se!=null&&Se.collapsible&&re(te)?qe!==Ee&&T(te,Ee):qe<$t?T(te,$t):qe>He&&T(te,He)}function U(te,le){const{direction:fe}=$.value,{layout:ye}=g.value;if(!c.value)return;const he=Lf(te,c.value);We(he);const Qe=TP(fe,le);u.value={dragHandleId:te,dragHandleRect:he.getBoundingClientRect(),initialCursorPosition:Qe,initialLayout:ye}}function A(){u.value=null}function K(te){const{panelDataArray:le}=g.value,fe=ge(le,te);fe>=0&&(le.splice(fe,1),delete d.value[te.id],g.value.panelDataArrayChanged=!0)}function ae(te){const{layout:le,panelDataArray:fe}=g.value;if(te.constraints.collapsible){const ye=Q();if(!ye)return;const{collapsedSize:he=0,panelSize:Qe,pivotIndices:Se}=Oe(fe,te,le,ye);if(We(Qe!=null,`Panel size not found for panel "${te.id}"`),Qe!==he){const qe=te.constraints.sizeUnit??"%",Ee=O.value??b(),He=qe==="px"&&Ee?Qe/100*Ee:Qe;h.value.set(te.id,He);const yt=ge(fe,te)===fe.length-1?Qe-he:he-Qe,k=sl({delta:yt,layout:le,panelConstraints:ye,pivotIndices:Se,trigger:"imperative-api"});Na(le,k)||(v(k),g.value.layout=k,i("layout",k),Vo(fe,k,d.value))}}}function de(te){const{layout:le,panelDataArray:fe}=g.value;if(te.constraints.collapsible){const ye=Q();if(!ye)return;const{collapsedSize:he=0,panelSize:Qe=0,minSize:Se=0,pivotIndices:qe}=Oe(fe,te,le,ye);if(pa(Qe,he)<=0){const Ee=h.value.get(te.id),He=te.constraints.sizeUnit??"%",$t=O.value??b(),yt=He==="px"&&$t?Ee!=null?Ee/$t*100:null:Ee,k=yt!=null&&yt>=Se?yt:Se,N=ge(fe,te)===fe.length-1?Qe-k:k-Qe,ee=sl({delta:N,layout:le,panelConstraints:ye,pivotIndices:qe,trigger:"imperative-api"});Na(le,ee)||(v(ee),g.value.layout=ee,i("layout",ee),Vo(fe,ee,d.value))}}}function J(te){const{layout:le,panelDataArray:fe}=g.value,{panelSize:ye}=Oe(fe,te,le);if(We(ye!=null,`Panel size not found for panel "${te.id}"`),(te.constraints.sizeUnit??"%")==="px"){const Qe=b();if(Qe!=null)return ye/100*Qe}return ye}function re(te){const{layout:le,panelDataArray:fe}=g.value,ye=Q(),{collapsedSize:he=0,collapsible:Qe,panelSize:Se}=Oe(fe,te,le,ye??void 0);if(!Qe)return!1;if(Se===void 0){const qe=ge(fe,te),Ee=(ye==null?void 0:ye[qe])??te.constraints;return Ee.defaultSize===Ee.collapsedSize}else return Se===he}function se(te){const{layout:le,panelDataArray:fe}=g.value,ye=Q(),{collapsedSize:he=0,collapsible:Qe,panelSize:Se}=Oe(fe,te,le,ye??void 0);return We(Se!=null,`Panel size not found for panel "${te.id}"`),!Qe||Se>he}F8({direction:s,dragState:u.value,groupId:o,reevaluatePanelConstraints:q,registerPanel:P,registerResizeHandle:_,resizePanel:T,startDragging:U,stopDragging:A,unregisterPanel:K,panelGroupElement:c,collapsePanel:ae,expandPanel:de,isPanelCollapsed:re,isPanelExpanded:se,getPanelSize:J,getPanelStyle:S});function ge(te,le){return te.findIndex(fe=>fe===le||fe.id===le.id)}function Oe(te,le,fe,ye){const he=ge(te,le),Se=he===te.length-1?[he-1,he]:[he,he+1],qe=ye??Q(),Ee=qe==null?void 0:qe[he],He=fe[he];return{...Ee??le.constraints,panelSize:He,pivotIndices:Se}}return(te,le)=>(x(),I(m(Ie),{ref:m(l),as:te.as,"as-child":te.asChild,style:ti({display:"flex",flexDirection:m(s)==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"}),"data-panel-group":"","data-orientation":m(s),"data-panel-group-id":m(o)},{default:V(()=>[oe(te.$slots,"default",{layout:f.value})]),_:3},8,["as","as-child","style","data-orientation","data-panel-group-id"]))}}),K8=H8,J8=Y({__name:"SplitterPanel",props:{collapsedSize:{type:Number,required:!1},collapsible:{type:Boolean,required:!1},defaultSize:{type:Number,required:!1},id:{type:String,required:!1},maxSize:{type:Number,required:!1},minSize:{type:Number,required:!1},order:{type:Number,required:!1},sizeUnit:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const i=t,r=n,s=IP();if(s===null)throw new Error("SplitterPanel components must be rendered within a SplitterGroup container");const{collapsePanel:o,expandPanel:a,getPanelSize:l,getPanelStyle:c,isPanelCollapsed:u,resizePanel:O,groupId:f,reevaluatePanelConstraints:d,registerPanel:h,unregisterPanel:p}=s,$=Xi(i.id,"reka-splitter-panel"),g=j(()=>({callbacks:{onCollapse:()=>r("collapse"),onExpand:()=>r("expand"),onResize:(..._)=>r("resize",..._)},constraints:{collapsedSize:i.collapsedSize&&Number.parseFloat(i.collapsedSize.toFixed(Qg)),collapsible:i.collapsible,defaultSize:i.defaultSize,maxSize:i.maxSize,minSize:i.minSize,sizeUnit:i.sizeUnit??"%"},id:$,idIsFromProps:i.id!==void 0,order:i.order}));Ze(()=>g.value.constraints,(_,T)=>{(T.collapsedSize!==_.collapsedSize||T.collapsible!==_.collapsible||T.maxSize!==_.maxSize||T.minSize!==_.minSize||T.sizeUnit!==_.sizeUnit)&&d(g.value,T)},{deep:!0}),dt(()=>{h(g.value)}),qi(()=>{p(g.value)});const b=j(()=>c(g.value,i.defaultSize)),Q=j(()=>u(g.value)),y=j(()=>!Q.value);function v(){o(g.value)}function S(){a(g.value)}function P(_){O(g.value,_)}return e({collapse:v,expand:S,getSize(){return l(g.value)},resize:P,isCollapsed:Q,isExpanded:y}),(_,T)=>(x(),I(m(Ie),{id:m($),style:ti(b.value),as:_.as,"as-child":_.asChild,"data-panel":"","data-panel-collapsible":_.collapsible||void 0,"data-panel-group-id":m(f),"data-panel-id":m($),"data-panel-size":Number.parseFloat(`${b.value.flexGrow}`).toFixed(1),"data-state":_.collapsible?Q.value?"collapsed":"expanded":void 0},{default:V(()=>[oe(_.$slots,"default",{isCollapsed:Q.value,isExpanded:y.value,expand:S,collapse:v,resize:P})]),_:3},8,["id","style","as","as-child","data-panel-collapsible","data-panel-group-id","data-panel-id","data-panel-size","data-state"]))}}),e2=J8;function t2({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:i}){It(r=>{const s=i.value;if(t.value||n.value===null||s===null)return;const o=Lf(e,s);if(o==null)return;const a=l=>{var c;if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),(c=n.value)==null||c.call(n,l);break}case"F6":{l.preventDefault();const u=o.getAttribute("data-panel-group-id");We(u);const O=Ll(u,s),f=PP(u,e,s);We(f!==null);const d=l.shiftKey?f>0?f-1:O.length-1:f+1 {o.removeEventListener("keydown",a)})})}var n2=Y({__name:"SplitterResizeHandle",props:{id:{type:String,required:!1},hitAreaMargins:{type:Object,required:!1},tabindex:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,{forwardRef:r,currentElement:s}=Ne(),{disabled:o}=On(n),a=IP();if(a===null)throw new Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:l,groupId:c,registerResizeHandle:u,startDragging:O,stopDragging:f,panelGroupElement:d}=a,h=Xi(n.id,"reka-splitter-resize-handle"),p=H("inactive"),$=H(!1),g=H(null),{nonce:b}=On(n),Q=mP(b);return Ze(o,()=>{Pc&&(o.value?g.value=null:g.value=u(h))},{immediate:!0}),It(y=>{var P,_;if(o.value||g.value===null)return;const v=s.value;if(!v)return;We(v);const S=(T,q,U)=>{var A;if(q)switch(T){case"down":{p.value="drag",O(h,U),i("dragging",!0);break}case"move":{p.value!=="drag"&&(p.value="hover"),(A=g.value)==null||A.call(g,U);break}case"up":{p.value="hover",f(),i("dragging",!1);break}}else p.value="inactive"};y(I8(h,v,l,{coarse:((P=n.hitAreaMargins)==null?void 0:P.coarse)??15,fine:((_=n.hitAreaMargins)==null?void 0:_.fine)??5},Q,S))}),t2({disabled:o,resizeHandler:g,handleId:h,panelGroupElement:d}),(y,v)=>(x(),I(m(Ie),{id:m(h),ref:m(r),style:{touchAction:"none",userSelect:"none"},as:y.as,"as-child":y.asChild,role:"separator","data-resize-handle":"",tabindex:y.tabindex,"data-state":p.value,"data-disabled":m(o)?"":void 0,"data-orientation":m(l),"data-panel-group-id":m(c),"data-resize-handle-active":p.value==="drag"?"pointer":$.value?"keyboard":void 0,"data-resize-handle-state":p.value,"data-panel-resize-handle-enabled":!m(o),"data-panel-resize-handle-id":m(h),onBlur:v[0]||(v[0]=S=>$.value=!1),onFocus:v[1]||(v[1]=S=>$.value=!1)},{default:V(()=>[oe(y.$slots,"default")]),_:3},8,["id","as","as-child","tabindex","data-state","data-disabled","data-orientation","data-panel-group-id","data-resize-handle-active","data-resize-handle-state","data-panel-resize-handle-enabled","data-panel-resize-handle-id"]))}}),i2=n2;const[r2,s2]=Qn("SwitchRoot");var o2=Y({__name:"SwitchRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:"on"},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{disabled:r}=On(n),s=Ss(n,"modelValue",i,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),o=j(()=>s.value===n.trueValue);function a(){r.value||(s.value=o.value?n.falseValue:n.trueValue)}const{forwardRef:l,currentElement:c}=Ne(),u=lg(c),O=j(()=>{var f;return n.id&&c.value?(f=document.querySelector(`[for="${n.id}"]`))==null?void 0:f.innerText:void 0});return s2({checked:o,toggleCheck:a,disabled:r}),(f,d)=>(x(),I(m(Ie),ve(f.$attrs,{id:f.id,ref:m(l),role:"switch",type:f.as==="button"?"button":void 0,value:f.value,"aria-label":f.$attrs["aria-label"]||O.value,"aria-checked":o.value,"aria-required":f.required,"data-state":o.value?"checked":"unchecked","data-disabled":m(r)?"":void 0,"as-child":f.asChild,as:f.as,disabled:m(r),onClick:a,onKeydown:Af(un(a,["prevent"]),["enter"])}),{default:V(()=>[oe(f.$slots,"default",{modelValue:m(s),checked:o.value}),m(u)&&f.name?(x(),I(m(rP),{key:0,type:"checkbox",name:f.name,disabled:m(r),required:f.required,value:f.value,checked:o.value},null,8,["name","disabled","required","value","checked"])):ue("v-if",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),a2=o2,l2=Y({__name:"SwitchThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(t){const e=r2();return Ne(),(n,i)=>(x(),I(m(Ie),{"data-state":m(e).checked.value?"checked":"unchecked","data-disabled":m(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:V(()=>[oe(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"]))}}),c2=l2;const[Sg,u2]=Qn("TabsRoot");var O2=Y({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{orientation:r,unmountOnHide:s,dir:o}=On(n),a=Zf(o);Ne();const l=Ss(n,"modelValue",i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),c=H(),u=sr(new Set);return u2({modelValue:l,changeModelValue:O=>{l.value=O},orientation:r,dir:a,unmountOnHide:s,activationMode:n.activationMode,baseId:Xi(void 0,"reka-tabs"),tabsList:c,contentIds:u,registerContent:O=>{u.value=new Set([...u.value,O])},unregisterContent:O=>{const f=new Set(u.value);f.delete(O),u.value=f}}),(O,f)=>(x(),I(m(Ie),{dir:m(a),"data-orientation":m(r),"as-child":O.asChild,as:O.as},{default:V(()=>[oe(O.$slots,"default",{modelValue:m(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),f2=O2;function UP(t,e){return`${t}-trigger-${e}`}function DP(t,e){return`${t}-content-${e}`}var d2=Y({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n}=Ne(),i=Sg(),r=j(()=>UP(i.baseId,e.value)),s=j(()=>DP(i.baseId,e.value)),o=j(()=>e.value===i.modelValue.value),a=H(o.value);return dt(()=>{i.registerContent(e.value),requestAnimationFrame(()=>{a.value=!1})}),As(()=>{i.unregisterContent(e.value)}),(l,c)=>(x(),I(m(xc),{present:l.forceMount||o.value,"force-mount":""},{default:V(({present:u})=>[X(m(Ie),{id:s.value,ref:m(n),"as-child":l.asChild,as:l.as,role:"tabpanel","data-state":o.value?"active":"inactive","data-orientation":m(i).orientation.value,"aria-labelledby":r.value,hidden:!u,tabindex:"0",style:ti({animationDuration:a.value?"0s":void 0})},{default:V(()=>[!m(i).unmountOnHide.value||u?oe(l.$slots,"default",{key:0}):ue("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),h2=d2,p2=Y({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{loop:n}=On(e),{forwardRef:i,currentElement:r}=Ne(),s=Sg();return s.tabsList=r,(o,a)=>(x(),I(m(uE),{"as-child":"",orientation:m(s).orientation.value,dir:m(s).dir.value,loop:m(n)},{default:V(()=>[X(m(Ie),{ref:m(i),role:"tablist","as-child":o.asChild,as:o.as,"aria-orientation":m(s).orientation.value},{default:V(()=>[oe(o.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),m2=p2,g2=Y({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(t){const e=t,{forwardRef:n}=Ne(),i=Sg(),r=j(()=>UP(i.baseId,e.value)),s=j(()=>i.contentIds.value.has(e.value)?DP(i.baseId,e.value):void 0),o=j(()=>e.value===i.modelValue.value);return(a,l)=>(x(),I(m(gP),{"as-child":"",focusable:!a.disabled,active:o.value},{default:V(()=>[X(m(Ie),{id:r.value,ref:m(n),role:"tab",type:a.as==="button"?"button":void 0,as:a.as,"as-child":a.asChild,"aria-selected":o.value?"true":"false","aria-controls":s.value,"data-state":o.value?"active":"inactive",disabled:a.disabled,"data-disabled":a.disabled?"":void 0,"data-orientation":m(i).orientation.value,onMousedown:l[0]||(l[0]=un(c=>{!a.disabled&&c.ctrlKey===!1?m(i).changeModelValue(a.value):c.preventDefault()},["left"])),onKeydown:l[1]||(l[1]=Af(c=>m(i).changeModelValue(a.value),["enter","space"])),onFocus:l[2]||(l[2]=()=>{const c=m(i).activationMode!=="manual";!o.value&&!a.disabled&&c&&m(i).changeModelValue(a.value)})},{default:V(()=>[oe(a.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),$2=g2;function LP(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e {const n=new Array(t.length+e.length);for(let i=0;i ({classGroupId:t,validator:e}),NP=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),XO="-",tQ=[],b2="arbitrary..",v2=t=>{const e=P2(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return S2(o);const a=o.split(XO),l=a[0]===""&&a.length>1?1:0;return jP(a,l,e)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=i[o],c=n[o];return l?c?y2(c,l):l:c||tQ}return n[o]||tQ}}},jP=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const r=t[e],s=n.nextPart.get(r);if(s){const c=jP(t,e+1,s);if(c)return c}const o=n.validators;if(o===null)return;const a=e===0?t.join(XO):t.slice(e).join(XO),l=o.length;for(let c=0;c t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),i=e.slice(0,n);return i?b2+i:void 0})(),P2=t=>{const{theme:e,classGroups:n}=t;return x2(n,e)},x2=(t,e)=>{const n=NP();for(const i in t){const r=t[i];Pg(r,n,i,e)}return n},Pg=(t,e,n,i)=>{const r=t.length;for(let s=0;s {if(typeof t=="string"){_2(t,e,n);return}if(typeof t=="function"){T2(t,e,n,i);return}k2(t,e,n,i)},_2=(t,e,n)=>{const i=t===""?e:BP(e,t);i.classGroupId=n},T2=(t,e,n,i)=>{if(R2(t)){Pg(t(i),e,n,i);return}e.validators===null&&(e.validators=[]),e.validators.push(Q2(n,t))},k2=(t,e,n,i)=>{const r=Object.entries(t),s=r.length;for(let o=0;o {let n=t;const i=e.split(XO),r=i.length;for(let s=0;s"isThemeGetter"in t&&t.isThemeGetter===!0,C2=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),i=Object.create(null);const r=(s,o)=>{n[s]=o,e++,e>t&&(e=0,i=n,n=Object.create(null))};return{get(s){let o=n[s];if(o!==void 0)return o;if((o=i[s])!==void 0)return r(s,o),o},set(s,o){s in n?n[s]=o:r(s,o)}}},cp="!",nQ=":",X2=[],iQ=(t,e,n,i,r)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:i,isExternal:r}),V2=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=r=>{const s=[];let o=0,a=0,l=0,c;const u=r.length;for(let p=0;pl?c-l:void 0;return iQ(s,d,f,h)};if(e){const r=e+nQ,s=i;i=o=>o.startsWith(r)?s(o.slice(r.length)):iQ(X2,!1,o,void 0,!0)}if(n){const r=i;i=s=>n({className:s,parseClassName:r})}return i},A2=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,i)=>{e.set(n,1e6+i)}),n=>{const i=[];let r=[];for(let s=0;s 0&&(r.sort(),i.push(...r),r=[]),i.push(o)):r.push(o)}return r.length>0&&(r.sort(),i.push(...r)),i}},E2=t=>({cache:C2(t.cacheSize),parseClassName:V2(t),sortModifiers:A2(t),...v2(t)}),z2=/\s+/,q2=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:s}=e,o=[],a=t.trim().split(z2);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:O,modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(u);if(O){l=u+(l.length>0?" "+l:l);continue}let $=!!p,g=i($?h.substring(0,p):h);if(!g){if(!$){l=u+(l.length>0?" "+l:l);continue}if(g=i(h),!g){l=u+(l.length>0?" "+l:l);continue}$=!1}const b=f.length===0?"":f.length===1?f[0]:s(f).join(":"),Q=d?b+cp:b,y=Q+g;if(o.indexOf(y)>-1)continue;o.push(y);const v=r(g,$);for(let S=0;S 0?" "+l:l)}return l},Z2=(...t)=>{let e=0,n,i,r="";for(;e {if(typeof t=="string")return t;let e,n="";for(let i=0;i {let n,i,r,s;const o=l=>{const c=e.reduce((u,O)=>O(u),t());return n=E2(c),i=n.cache.get,r=n.cache.set,s=a,a(l)},a=l=>{const c=i(l);if(c)return c;const u=q2(l,n);return r(l,u),u};return s=o,(...l)=>s(Z2(...l))},Y2=[],jt=t=>{const e=n=>n[t]||Y2;return e.isThemeGetter=!0,e},FP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,HP=/^\((?:(\w[\w-]*):)?(.+)\)$/i,I2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,U2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,D2=/\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$/,L2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,W2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,N2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ns=t=>I2.test(t),Le=t=>!!t&&!Number.isNaN(Number(t)),is=t=>!!t&&Number.isInteger(Number(t)),zd=t=>t.endsWith("%")&&Le(t.slice(0,-1)),br=t=>U2.test(t),KP=()=>!0,j2=t=>D2.test(t)&&!L2.test(t),xg=()=>!1,B2=t=>W2.test(t),G2=t=>N2.test(t),F2=t=>!Te(t)&&!ke(t),H2=t=>Zs(t,tx,xg),Te=t=>FP.test(t),Ns=t=>Zs(t,nx,j2),rQ=t=>Zs(t,sz,Le),K2=t=>Zs(t,rx,KP),J2=t=>Zs(t,ix,xg),sQ=t=>Zs(t,JP,xg),ez=t=>Zs(t,ex,G2),cu=t=>Zs(t,sx,B2),ke=t=>HP.test(t),ja=t=>wo(t,nx),tz=t=>wo(t,ix),oQ=t=>wo(t,JP),nz=t=>wo(t,tx),iz=t=>wo(t,ex),uu=t=>wo(t,sx,!0),rz=t=>wo(t,rx,!0),Zs=(t,e,n)=>{const i=FP.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},wo=(t,e,n=!1)=>{const i=HP.exec(t);return i?i[1]?e(i[1]):n:!1},JP=t=>t==="position"||t==="percentage",ex=t=>t==="image"||t==="url",tx=t=>t==="length"||t==="size"||t==="bg-size",nx=t=>t==="length",sz=t=>t==="number",ix=t=>t==="family-name",rx=t=>t==="number"||t==="weight",sx=t=>t==="shadow",oz=()=>{const t=jt("color"),e=jt("font"),n=jt("text"),i=jt("font-weight"),r=jt("tracking"),s=jt("leading"),o=jt("breakpoint"),a=jt("container"),l=jt("spacing"),c=jt("radius"),u=jt("shadow"),O=jt("inset-shadow"),f=jt("text-shadow"),d=jt("drop-shadow"),h=jt("blur"),p=jt("perspective"),$=jt("aspect"),g=jt("ease"),b=jt("animate"),Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...y(),ke,Te],S=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],_=()=>[ke,Te,l],T=()=>[ns,"full","auto",..._()],q=()=>[is,"none","subgrid",ke,Te],U=()=>["auto",{span:["full",is,ke,Te]},is,ke,Te],A=()=>[is,"auto",ke,Te],K=()=>["auto","min","max","fr",ke,Te],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],de=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",..._()],re=()=>[ns,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],se=()=>[ns,"screen","full","dvw","lvw","svw","min","max","fit",..._()],ge=()=>[ns,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],Oe=()=>[t,ke,Te],te=()=>[...y(),oQ,sQ,{position:[ke,Te]}],le=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",nz,H2,{size:[ke,Te]}],ye=()=>[zd,ja,Ns],he=()=>["","none","full",c,ke,Te],Qe=()=>["",Le,ja,Ns],Se=()=>["solid","dashed","dotted","double"],qe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>[Le,zd,oQ,sQ],He=()=>["","none",h,ke,Te],$t=()=>["none",Le,ke,Te],yt=()=>["none",Le,ke,Te],k=()=>[Le,ke,Te],E=()=>[ns,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[br],breakpoint:[br],color:[KP],container:[br],"drop-shadow":[br],ease:["in","out","in-out"],font:[F2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[br],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[br],shadow:[br],spacing:["px",Le],text:[br],"text-shadow":[br],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ns,Te,ke,$]}],container:["container"],columns:[{columns:[Le,Te,ke,a]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:v()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[is,"auto",ke,Te]}],basis:[{basis:[ns,"full","auto",a,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,ns,"auto","initial","none",Te]}],grow:[{grow:["",Le,ke,Te]}],shrink:[{shrink:["",Le,ke,Te]}],order:[{order:[is,"first","last","none",ke,Te]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:U()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:U()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...de(),"normal"]}],"justify-self":[{"justify-self":["auto",...de()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...de(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...de(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...de(),"baseline"]}],"place-self":[{"place-self":["auto",...de()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mbs:[{mbs:J()}],mbe:[{mbe:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],"inline-size":[{inline:["auto",...se()]}],"min-inline-size":[{"min-inline":["auto",...se()]}],"max-inline-size":[{"max-inline":["none",...se()]}],"block-size":[{block:["auto",...ge()]}],"min-block-size":[{"min-block":["auto",...ge()]}],"max-block-size":[{"max-block":["none",...ge()]}],w:[{w:[a,"screen",...re()]}],"min-w":[{"min-w":[a,"screen","none",...re()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",n,ja,Ns]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,rz,K2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zd,Te]}],"font-family":[{font:[tz,J2,e]}],"font-features":[{"font-features":[Te]}],"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:[r,ke,Te]}],"line-clamp":[{"line-clamp":[Le,"none",ke,rQ]}],leading:[{leading:[s,..._()]}],"list-image":[{"list-image":["none",ke,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Oe()}],"text-color":[{text:Oe()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ke,Ns]}],"text-decoration-color":[{decoration:Oe()}],"underline-offset":[{"underline-offset":[Le,"auto",ke,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,Te]}],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",ke,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},is,ke,Te],radial:["",ke,Te],conic:[is,ke,Te]},iz,ez]}],"bg-color":[{bg:Oe()}],"gradient-from-pos":[{from:ye()}],"gradient-via-pos":[{via:ye()}],"gradient-to-pos":[{to:ye()}],"gradient-from":[{from:Oe()}],"gradient-via":[{via:Oe()}],"gradient-to":[{to:Oe()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:Qe()}],"border-w-x":[{"border-x":Qe()}],"border-w-y":[{"border-y":Qe()}],"border-w-s":[{"border-s":Qe()}],"border-w-e":[{"border-e":Qe()}],"border-w-bs":[{"border-bs":Qe()}],"border-w-be":[{"border-be":Qe()}],"border-w-t":[{"border-t":Qe()}],"border-w-r":[{"border-r":Qe()}],"border-w-b":[{"border-b":Qe()}],"border-w-l":[{"border-l":Qe()}],"divide-x":[{"divide-x":Qe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Qe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:Oe()}],"border-color-x":[{"border-x":Oe()}],"border-color-y":[{"border-y":Oe()}],"border-color-s":[{"border-s":Oe()}],"border-color-e":[{"border-e":Oe()}],"border-color-bs":[{"border-bs":Oe()}],"border-color-be":[{"border-be":Oe()}],"border-color-t":[{"border-t":Oe()}],"border-color-r":[{"border-r":Oe()}],"border-color-b":[{"border-b":Oe()}],"border-color-l":[{"border-l":Oe()}],"divide-color":[{divide:Oe()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ke,Te]}],"outline-w":[{outline:["",Le,ja,Ns]}],"outline-color":[{outline:Oe()}],shadow:[{shadow:["","none",u,uu,cu]}],"shadow-color":[{shadow:Oe()}],"inset-shadow":[{"inset-shadow":["none",O,uu,cu]}],"inset-shadow-color":[{"inset-shadow":Oe()}],"ring-w":[{ring:Qe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Oe()}],"ring-offset-w":[{"ring-offset":[Le,Ns]}],"ring-offset-color":[{"ring-offset":Oe()}],"inset-ring-w":[{"inset-ring":Qe()}],"inset-ring-color":[{"inset-ring":Oe()}],"text-shadow":[{"text-shadow":["none",f,uu,cu]}],"text-shadow-color":[{"text-shadow":Oe()}],opacity:[{opacity:[Le,ke,Te]}],"mix-blend":[{"mix-blend":[...qe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":qe()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ee()}],"mask-image-linear-from-color":[{"mask-linear-from":Oe()}],"mask-image-linear-to-color":[{"mask-linear-to":Oe()}],"mask-image-t-from-pos":[{"mask-t-from":Ee()}],"mask-image-t-to-pos":[{"mask-t-to":Ee()}],"mask-image-t-from-color":[{"mask-t-from":Oe()}],"mask-image-t-to-color":[{"mask-t-to":Oe()}],"mask-image-r-from-pos":[{"mask-r-from":Ee()}],"mask-image-r-to-pos":[{"mask-r-to":Ee()}],"mask-image-r-from-color":[{"mask-r-from":Oe()}],"mask-image-r-to-color":[{"mask-r-to":Oe()}],"mask-image-b-from-pos":[{"mask-b-from":Ee()}],"mask-image-b-to-pos":[{"mask-b-to":Ee()}],"mask-image-b-from-color":[{"mask-b-from":Oe()}],"mask-image-b-to-color":[{"mask-b-to":Oe()}],"mask-image-l-from-pos":[{"mask-l-from":Ee()}],"mask-image-l-to-pos":[{"mask-l-to":Ee()}],"mask-image-l-from-color":[{"mask-l-from":Oe()}],"mask-image-l-to-color":[{"mask-l-to":Oe()}],"mask-image-x-from-pos":[{"mask-x-from":Ee()}],"mask-image-x-to-pos":[{"mask-x-to":Ee()}],"mask-image-x-from-color":[{"mask-x-from":Oe()}],"mask-image-x-to-color":[{"mask-x-to":Oe()}],"mask-image-y-from-pos":[{"mask-y-from":Ee()}],"mask-image-y-to-pos":[{"mask-y-to":Ee()}],"mask-image-y-from-color":[{"mask-y-from":Oe()}],"mask-image-y-to-color":[{"mask-y-to":Oe()}],"mask-image-radial":[{"mask-radial":[ke,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ee()}],"mask-image-radial-from-color":[{"mask-radial-from":Oe()}],"mask-image-radial-to-color":[{"mask-radial-to":Oe()}],"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":y()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ee()}],"mask-image-conic-from-color":[{"mask-conic-from":Oe()}],"mask-image-conic-to-color":[{"mask-conic-to":Oe()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,Te]}],filter:[{filter:["","none",ke,Te]}],blur:[{blur:He()}],brightness:[{brightness:[Le,ke,Te]}],contrast:[{contrast:[Le,ke,Te]}],"drop-shadow":[{"drop-shadow":["","none",d,uu,cu]}],"drop-shadow-color":[{"drop-shadow":Oe()}],grayscale:[{grayscale:["",Le,ke,Te]}],"hue-rotate":[{"hue-rotate":[Le,ke,Te]}],invert:[{invert:["",Le,ke,Te]}],saturate:[{saturate:[Le,ke,Te]}],sepia:[{sepia:["",Le,ke,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,Te]}],"backdrop-blur":[{"backdrop-blur":He()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ke,Te]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ke,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ke,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ke,Te]}],"backdrop-invert":[{"backdrop-invert":["",Le,ke,Te]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ke,Te]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ke,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ke,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ke,Te]}],ease:[{ease:["linear","initial",g,ke,Te]}],delay:[{delay:[Le,ke,Te]}],animate:[{animate:["none",b,ke,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,ke,Te]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:$t()}],"rotate-x":[{"rotate-x":$t()}],"rotate-y":[{"rotate-y":$t()}],"rotate-z":[{"rotate-z":$t()}],scale:[{scale:yt()}],"scale-x":[{"scale-x":yt()}],"scale-y":[{"scale-y":yt()}],"scale-z":[{"scale-z":yt()}],"scale-3d":["scale-3d"],skew:[{skew:k()}],"skew-x":[{"skew-x":k()}],"skew-y":[{"skew-y":k()}],transform:[{transform:[ke,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:E()}],"translate-x":[{"translate-x":E()}],"translate-y":[{"translate-y":E()}],"translate-z":[{"translate-z":E()}],"translate-none":["translate-none"],accent:[{accent:Oe()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Oe()}],"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",ke,Te]}],"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":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",ke,Te]}],fill:[{fill:["none",...Oe()]}],"stroke-w":[{stroke:[Le,ja,Ns,rQ]}],stroke:[{stroke:["none",...Oe()]}],"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"]}},az=M2(oz);function Fe(...t){return az(WP(t))}const lz={key:0,class:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border"},al=Y({__name:"ResizableHandle",props:{id:{},hitAreaMargins:{},tabindex:{},disabled:{type:Boolean},nonce:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},withHandle:{type:Boolean}},emits:["dragging"],setup(t,{emit:e}){const n=t,i=e,r=ht(n,"class","withHandle"),s=Dn(r,i);return(o,a)=>(x(),I(m(i2),ve({"data-slot":"resizable-handle"},m(s),{class:m(Fe)("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",n.class)}),{default:V(()=>[n.withHandle?(x(),W("div",lz,[X(m(PV),{class:"size-2.5"})])):ue("",!0)]),_:1},16,["class"]))}}),Os=Y({__name:"ResizablePanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},sizeUnit:{},asChild:{type:Boolean},as:{}},emits:["collapse","expand","resize"],setup(t,{expose:e,emit:n}){const s=Dn(t,n),o=H();function a(){return o.value}return e({collapse:()=>{var l;return(l=a())==null?void 0:l.collapse()},expand:()=>{var l;return(l=a())==null?void 0:l.expand()},resize:l=>{var c;return(c=a())==null?void 0:c.resize(l)},getSize:()=>{var l;return(l=a())==null?void 0:l.getSize()},isCollapsed:()=>{var l,c;return((c=(l=a())==null?void 0:l.isCollapsed)==null?void 0:c.value)??!1},isExpanded:()=>{var l,c;return((c=(l=a())==null?void 0:l.isExpanded)==null?void 0:c.value)??!0}}),(l,c)=>(x(),I(m(e2),ve({ref_key:"splitterRef",ref:o,"data-slot":"resizable-panel"},m(s)),{default:V(()=>[oe(l.$slots,"default")]),_:3},16))}}),up=Y({__name:"ResizablePanelGroup",props:{id:{},autoSaveId:{},direction:{},keyboardResizeBy:{},storage:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["layout"],setup(t,{emit:e}){const n=t,i=e,r=ht(n,"class"),s=Dn(r,i);return(o,a)=>(x(),I(m(K8),ve({"data-slot":"resizable-panel-group"},m(s),{class:m(Fe)("flex h-full w-full data-[orientation=vertical]:flex-col",n.class)}),{default:V(()=>[oe(o.$slots,"default")]),_:3},16,["class"]))}}),cz=Y({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=ht(n,"class"),s=Dn(r,i);return(o,a)=>(x(),I(m(f2),ve({"data-slot":"tabs"},m(s),{class:m(Fe)("flex flex-col gap-2",n.class)}),{default:V(()=>[oe(o.$slots,"default")]),_:3},16,["class"]))}}),Ou=Y({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(x(),I(m(h2),ve({"data-slot":"tabs-content",class:m(Fe)("flex-1 outline-none",e.class)},m(n)),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}}),uz=Y({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(x(),I(m(m2),ve({"data-slot":"tabs-list"},m(n),{class:m(Fe)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-b-lg p-[3px]",e.class)}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}}),fu=Y({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class"),i=gi(n);return(r,s)=>(x(),I(m($2),ve({"data-slot":"tabs-trigger"},m(i),{class:m(Fe)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:V(()=>[oe(r.$slots,"default")]),_:3},16,["class"]))}}),aQ=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,lQ=WP,Oz=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return lQ(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=e,o=Object.keys(r).map(c=>{const u=n==null?void 0:n[c],O=s==null?void 0:s[c];if(u===null)return null;const f=aQ(u)||aQ(O);return r[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[O,f]=u;return f===void 0||(c[O]=f),c},{}),l=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:O,className:f,...d}=u;return Object.entries(d).every(h=>{let[p,$]=h;return Array.isArray($)?$.includes({...s,...a}[p]):{...s,...a}[p]===$})?[...c,O,f]:c},[]);return lQ(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},Et=Y({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;return(n,i)=>(x(),I(m(Ie),{"data-slot":"button",as:t.as,"as-child":t.asChild,class:vt(m(Fe)(m(Bf)({variant:t.variant,size:t.size}),e.class))},{default:V(()=>[oe(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),Bf=Oz("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),tn=[];for(let t=0;t<256;++t)tn.push((t+256).toString(16).slice(1));function fz(t,e=0){return(tn[t[e+0]]+tn[t[e+1]]+tn[t[e+2]]+tn[t[e+3]]+"-"+tn[t[e+4]]+tn[t[e+5]]+"-"+tn[t[e+6]]+tn[t[e+7]]+"-"+tn[t[e+8]]+tn[t[e+9]]+"-"+tn[t[e+10]]+tn[t[e+11]]+tn[t[e+12]]+tn[t[e+13]]+tn[t[e+14]]+tn[t[e+15]]).toLowerCase()}let qd;const dz=new Uint8Array(16);function hz(){if(!qd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");qd=crypto.getRandomValues.bind(crypto)}return qd(dz)}const pz=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),cQ={randomUUID:pz};function ma(t,e,n){var r;if(cQ.randomUUID&&!t)return cQ.randomUUID();t=t||{};const i=t.random??((r=t.rng)==null?void 0:r.call(t))??hz();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,fz(i)}class ox{constructor(){pe(this,"uuid","");pe(this,"formula","");pe(this,"calcValue","");pe(this,"calcValue1","");pe(this,"calcValue2","");pe(this,"calcValue3","");pe(this,"calcValue4","");pe(this,"calcValue5","");pe(this,"calcValue6","");pe(this,"calcValue7","");pe(this,"calcValue8","");pe(this,"calcValue9","");pe(this,"calcValue10","");pe(this,"flatRate","");pe(this,"value","");pe(this,"dependencys",[]);this.uuid=ma()}addDependency(e){this.dependencys.push(e)}toJSON(){return{formula:this.formula,calcValue:this.calcValue,calcValue1:this.calcValue1,calcValue2:this.calcValue2,calcValue3:this.calcValue3,calcValue4:this.calcValue4,calcValue5:this.calcValue5,calcValue6:this.calcValue6,calcValue7:this.calcValue7,calcValue8:this.calcValue8,calcValue9:this.calcValue9,calcValue10:this.calcValue10,flatRate:this.flatRate,value:this.value,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.formula=e.formula,this.value=e.value,this.flatRate=e.flatRate,this.calcValue=e.calcValue,this.calcValue1=e.calcValue1,this.calcValue2=e.calcValue2,this.calcValue3=e.calcValue3,this.calcValue4=e.calcValue4,this.calcValue5=e.calcValue5,this.calcValue6=e.calcValue6,this.calcValue7=e.calcValue7,this.calcValue8=e.calcValue8,this.calcValue9=e.calcValue9,this.calcValue10=e.calcValue10,e.dependencys.map(n=>{const i=new Va;i.fromJSON(n),this.dependencys.push(i)})}}class Va{constructor(){pe(this,"uuid","");pe(this,"relation","");pe(this,"formula","");pe(this,"borders",[]);this.uuid=ma()}addBorder(e){this.borders.push(e)}toJSON(){return{formula:this.formula,relation:this.relation,borders:this.borders.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.relation=e.relation,this.formula=e.formula,e.borders.map(n=>{const i=new ox;i.fromJSON(n),this.borders.push(i)})}}class mr{constructor(){pe(this,"uuid","");pe(this,"id","");pe(this,"type",1);pe(this,"isFocused",!1);pe(this,"dependencys",[]);this.uuid=ma(),this.id=this.uuid}hasDependencys(){return this.dependencys.length>0}toJSON(){return{id:this.id,type:this.type,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}getIdRecursiv(e){}fromJSON(e){this.id=e.id,this.type=e.type,e.dependencys.map(n=>{const i=new Va;i.fromJSON(n),this.dependencys.push(i)})}changeFocus(e){this.uuid==e?this.isFocused=!0:this.isFocused=!1}addDependency(e){this.dependencys.push(e)}insertItem(e,n){return!1}cutItem(e){return null}deleteItem(e){return!1}}var Hi=(t=>(t[t.Product=1]="Product",t[t.CMS=2]="CMS",t[t.News=3]="News",t))(Hi||{});class Op extends Error{constructor(n,i,r){const s=n.status||n.status===0?n.status:"",o=n.statusText??"",a=`${s} ${o}`.trim(),l=a?`status code ${a}`:"an unknown error";super(`Request failed with ${l}: ${i.method} ${i.url}`);pe(this,"response");pe(this,"request");pe(this,"options");this.name="HTTPError",this.response=n,this.request=i,this.options=r}}class ax extends Error{constructor(n){let i="Non-error value was thrown";try{typeof n=="string"?i=n:n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"&&(i=n.message)}catch{}super(i);pe(this,"name","NonError");pe(this,"value");this.value=n}}class Zd extends Error{constructor(n){const i=n!=null&&n.cause?n.cause instanceof Error?n.cause:new ax(n.cause):void 0;super(n!=null&&n.code?`Forced retry: ${n.code}`:"Forced retry",i?{cause:i}:void 0);pe(this,"name","ForceRetryError");pe(this,"customDelay");pe(this,"code");pe(this,"customRequest");this.customDelay=n==null?void 0:n.delay,this.code=n==null?void 0:n.code,this.customRequest=n==null?void 0:n.request}}const uQ=(()=>{let t=!1,e=!1;const n=typeof globalThis.ReadableStream=="function",i=typeof globalThis.Request=="function";if(n&&i)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type")}catch(r){if(r instanceof Error&&r.message==="unsupported BodyInit type")return!1;throw r}return t&&!e})(),mz=typeof globalThis.AbortController=="function",lx=typeof globalThis.AbortSignal=="function"&&typeof globalThis.AbortSignal.any=="function",gz=typeof globalThis.ReadableStream=="function",$z=typeof globalThis.FormData=="function",cx=["get","post","put","patch","head","delete"],yz={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Md=2147483647,Qz=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,ux=Symbol("stop");class Ox{constructor(e){pe(this,"options");this.options=e}}const bz=t=>new Ox(t),vz={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},Sz={next:!0},Pz={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},xz=t=>{if(!t)return 0;if(t instanceof FormData){let e=0;for(const[n,i]of t)e+=Qz,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,e+=typeof i=="string"?new TextEncoder().encode(i).length:i.size;return e}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength;if(typeof t=="string")return new TextEncoder().encode(t).length;if(t instanceof URLSearchParams)return new TextEncoder().encode(t.toString()).length;if("byteLength"in t)return t.byteLength;if(typeof t=="object"&&t!==null)try{const e=JSON.stringify(t);return new TextEncoder().encode(e).length}catch{return 0}return 0},fx=(t,e,n)=>{let i,r=0;return t.pipeThrough(new TransformStream({transform(s,o){if(o.enqueue(s),i){r+=i.byteLength;let a=e===0?0:r/e;a>=1&&(a=1-Number.EPSILON),n==null||n({percent:a,totalBytes:Math.max(e,r),transferredBytes:r},i)}i=s},flush(){i&&(r+=i.byteLength,n==null||n({percent:1,totalBytes:Math.max(e,r),transferredBytes:r},i))}}))},wz=(t,e)=>{if(!t.body)return t;if(t.status===204)return new Response(null,{status:t.status,statusText:t.statusText,headers:t.headers});const n=Math.max(0,Number(t.headers.get("content-length"))||0);return new Response(fx(t.body,n,e),{status:t.status,statusText:t.statusText,headers:t.headers})},_z=(t,e,n)=>{if(!t.body)return t;const i=xz(n??t.body);return new Request(t,{duplex:"half",body:fx(t.body,i,e)})},Gs=t=>t!==null&&typeof t=="object",du=(...t)=>{for(const e of t)if((!Gs(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return wg({},...t)},dx=(t={},e={})=>{const n=new globalThis.Headers(t),i=e instanceof globalThis.Headers,r=new globalThis.Headers(e);for(const[s,o]of r.entries())i&&o==="undefined"||o===void 0?n.delete(s):n.set(s,o);return n};function hu(t,e,n){return Object.hasOwn(e,n)&&e[n]===void 0?[]:wg(t[n]??[],e[n]??[])}const hx=(t={},e={})=>({beforeRequest:hu(t,e,"beforeRequest"),beforeRetry:hu(t,e,"beforeRetry"),afterResponse:hu(t,e,"afterResponse"),beforeError:hu(t,e,"beforeError")}),Tz=(t,e)=>{const n=new URLSearchParams;for(const i of[t,e])if(i!==void 0)if(i instanceof URLSearchParams)for(const[r,s]of i.entries())n.append(r,s);else if(Array.isArray(i))for(const r of i){if(!Array.isArray(r)||r.length!==2)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");n.append(String(r[0]),String(r[1]))}else if(Gs(i))for(const[r,s]of Object.entries(i))s!==void 0&&n.append(r,String(s));else{const r=new URLSearchParams(i);for(const[s,o]of r.entries())n.append(s,o)}return n},wg=(...t)=>{let e={},n={},i={},r;const s=[];for(const o of t)if(Array.isArray(o))Array.isArray(e)||(e=[]),e=[...e,...o];else if(Gs(o)){for(let[a,l]of Object.entries(o)){if(a==="signal"&&l instanceof globalThis.AbortSignal){s.push(l);continue}if(a==="context"){if(l!=null&&(!Gs(l)||Array.isArray(l)))throw new TypeError("The `context` option must be an object");e={...e,context:l==null?{}:{...e.context,...l}};continue}if(a==="searchParams"){l==null?r=void 0:r=r===void 0?l:Tz(r,l);continue}Gs(l)&&a in e&&(l=wg(e[a],l)),e={...e,[a]:l}}Gs(o.hooks)&&(i=hx(i,o.hooks),e.hooks=i),Gs(o.headers)&&(n=dx(n,o.headers),e.headers=n)}return r!==void 0&&(e.searchParams=r),s.length>0&&(s.length===1?e.signal=s[0]:lx?e.signal=AbortSignal.any(s):e.signal=s.at(-1)),e},kz=t=>cx.includes(t)?t.toUpperCase():t,Rz=["get","put","head","delete","options","trace"],Cz=[408,413,429,500,502,503,504],Xz=[413,429,503],OQ={limit:2,methods:Rz,statusCodes:Cz,afterStatusCodes:Xz,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:t=>.3*2**(t-1)*1e3,jitter:void 0,retryOnTimeout:!1},Vz=(t={})=>{if(typeof t=="number")return{...OQ,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.methods&&(t.methods=t.methods.map(n=>n.toLowerCase())),t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");const e=Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0));return{...OQ,...e}};class fp extends Error{constructor(n){super(`Request timed out: ${n.method} ${n.url}`);pe(this,"request");this.name="TimeoutError",this.request=n}}async function Az(t,e,n,i){return new Promise((r,s)=>{const o=setTimeout(()=>{n&&n.abort(),s(new fp(t))},i.timeout);i.fetch(t,e).then(r).catch(s).then(()=>{clearTimeout(o)})})}async function Ez(t,{signal:e}){return new Promise((n,i)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",r,{once:!0}));function r(){clearTimeout(s),i(e.reason)}const s=setTimeout(()=>{e==null||e.removeEventListener("abort",r),n()},t)})}const zz=(t,e)=>{const n={};for(const i in e)Object.hasOwn(e,i)&&!(i in Pz)&&!(i in vz)&&(!(i in t)||i in Sz)&&(n[i]=e[i]);return n},qz=t=>t===void 0?!1:Array.isArray(t)?t.length>0:t instanceof URLSearchParams?t.size>0:typeof t=="object"?Object.keys(t).length>0:typeof t=="string"?t.trim().length>0:!!t;function Zz(t){return t instanceof Op||(t==null?void 0:t.name)===Op.name}function Mz(t){return t instanceof fp||(t==null?void 0:t.name)===fp.name}var ff,px,vi,si,dn,xe,gs,Fi,no,Ue,Bu,mx,dp,Gu,as,hp,gx,ll,Fu,pp;const kl=class kl{constructor(e,n={}){yi(this,Ue);pe(this,"request");yi(this,vi);yi(this,si,0);yi(this,dn);yi(this,xe);yi(this,gs);yi(this,Fi);yi(this,no);var r,s,o;if(Qi(this,dn,e),Qi(this,xe,{...n,headers:dx(ie(this,dn).headers,n.headers),hooks:hx({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:kz(n.method??ie(this,dn).method??"GET"),prefixUrl:String(n.prefixUrl||""),retry:Vz(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}}),typeof ie(this,dn)!="string"&&!(ie(this,dn)instanceof URL||ie(this,dn)instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(ie(this,xe).prefixUrl&&typeof ie(this,dn)=="string"){if(ie(this,dn).startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");ie(this,xe).prefixUrl.endsWith("/")||(ie(this,xe).prefixUrl+="/"),Qi(this,dn,ie(this,xe).prefixUrl+ie(this,dn))}mz&&lx&&(Qi(this,Fi,ie(this,xe).signal??ie(this,dn).signal),Qi(this,vi,new globalThis.AbortController),ie(this,xe).signal=ie(this,Fi)?AbortSignal.any([ie(this,Fi),ie(this,vi).signal]):ie(this,vi).signal),uQ&&(ie(this,xe).duplex="half"),ie(this,xe).json!==void 0&&(ie(this,xe).body=((s=(r=ie(this,xe)).stringifyJson)==null?void 0:s.call(r,ie(this,xe).json))??JSON.stringify(ie(this,xe).json),ie(this,xe).headers.set("content-type",ie(this,xe).headers.get("content-type")??"application/json"));const i=n.headers&&new globalThis.Headers(n.headers).has("content-type");if(ie(this,dn)instanceof globalThis.Request&&($z&&ie(this,xe).body instanceof globalThis.FormData||ie(this,xe).body instanceof URLSearchParams)&&!i&&ie(this,xe).headers.delete("content-type"),this.request=new globalThis.Request(ie(this,dn),ie(this,xe)),qz(ie(this,xe).searchParams)){const l="?"+(typeof ie(this,xe).searchParams=="string"?ie(this,xe).searchParams.replace(/^\?/,""):new URLSearchParams(ct(o=kl,ff,px).call(o,ie(this,xe).searchParams)).toString()),c=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,l);this.request=new globalThis.Request(c,ie(this,xe))}if(ie(this,xe).onUploadProgress){if(typeof ie(this,xe).onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!uQ)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=ct(this,Ue,pp).call(this,this.request,ie(this,xe).body??void 0)}}static create(e,n){var o,a,l;const i=new kl(e,n),r=async()=>{var u,O,f,d,h,p,$,g,b,Q,y,v;if(typeof ie(i,xe).timeout=="number"&&ie(i,xe).timeout>Md)throw new RangeError(`The \`timeout\` option cannot be greater than ${Md}`);await Promise.resolve();let c=await ct(u=i,Ue,gx).call(u);for(const S of ie(i,xe).hooks.afterResponse){const P=ct(O=i,Ue,dp).call(O,c.clone());let _;try{_=await S(i.request,ct(f=i,Ue,ll).call(f),P,{retryCount:ie(i,si)})}catch(q){throw ct(d=i,Ue,as).call(d,P),ct(h=i,Ue,as).call(h,c),q}if(_ instanceof Ox)throw ct(p=i,Ue,as).call(p,P),ct($=i,Ue,as).call($,c),new Zd(_.options);const T=_ instanceof globalThis.Response?_:c;P!==T&&ct(g=i,Ue,as).call(g,P),c!==T&&ct(b=i,Ue,as).call(b,c),c=T}if(ct(Q=i,Ue,dp).call(Q,c),!c.ok&&(typeof ie(i,xe).throwHttpErrors=="function"?ie(i,xe).throwHttpErrors(c.status):ie(i,xe).throwHttpErrors)){let S=new Op(c,i.request,ct(y=i,Ue,ll).call(y));for(const P of ie(i,xe).hooks.beforeError)S=await P(S,{retryCount:ie(i,si)});throw S}if(ie(i,xe).onDownloadProgress){if(typeof ie(i,xe).onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!gz)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const S=c.clone();return ct(v=i,Ue,as).call(v,c),wz(S,ie(i,xe).onDownloadProgress)}return c},s=ct(o=i,Ue,hp).call(o,r).finally(()=>{var u,O;const c=ie(i,gs);ct(u=i,Ue,Gu).call(u,(c==null?void 0:c.body)??void 0),ct(O=i,Ue,Gu).call(O,i.request.body??void 0)});for(const[c,u]of Object.entries(yz))c==="bytes"&&typeof((l=(a=globalThis.Response)==null?void 0:a.prototype)==null?void 0:l.bytes)!="function"||(s[c]=async()=>{i.request.headers.set("accept",i.request.headers.get("accept")||u);const O=await s;if(c==="json"){if(O.status===204)return"";const f=await O.text();return f===""?"":n.parseJson?n.parseJson(f):JSON.parse(f)}return O[c]()});return s}};ff=new WeakSet,px=function(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0)):e},vi=new WeakMap,si=new WeakMap,dn=new WeakMap,xe=new WeakMap,gs=new WeakMap,Fi=new WeakMap,no=new WeakMap,Ue=new WeakSet,Bu=function(){const e=ie(this,xe).retry.delay(ie(this,si));let n=e;ie(this,xe).retry.jitter===!0?n=Math.random()*e:typeof ie(this,xe).retry.jitter=="function"&&(n=ie(this,xe).retry.jitter(e),(!Number.isFinite(n)||n<0)&&(n=e));const i=ie(this,xe).retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(i,n)},mx=async function(e){if(Z$(this,si)._++,ie(this,si)>ie(this,xe).retry.limit)throw e;const n=e instanceof Error?e:new ax(e);if(n instanceof Zd)return n.customDelay??ct(this,Ue,Bu).call(this);if(!ie(this,xe).retry.methods.includes(this.request.method.toLowerCase()))throw e;if(ie(this,xe).retry.shouldRetry!==void 0){const i=await ie(this,xe).retry.shouldRetry({error:n,retryCount:ie(this,si)});if(i===!1)throw e;if(i===!0)return ct(this,Ue,Bu).call(this)}if(Mz(e)&&!ie(this,xe).retry.retryOnTimeout)throw e;if(Zz(e)){if(!ie(this,xe).retry.statusCodes.includes(e.response.status))throw e;const i=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(i&&ie(this,xe).retry.afterStatusCodes.includes(e.response.status)){let r=Number(i)*1e3;Number.isNaN(r)?r=Date.parse(i)-Date.now():r>=Date.parse("2024-01-01")&&(r-=Date.now());const s=ie(this,xe).retry.maxRetryAfter??r;return r ie(this,xe).parseJson(await e.text())),e},Gu=function(e){e&&e.cancel().catch(()=>{})},as=function(e){ct(this,Ue,Gu).call(this,e.body??void 0)},hp=async function(e){try{return await e()}catch(n){const i=Math.min(await ct(this,Ue,mx).call(this,n),Md);if(ie(this,si)<1)throw n;if(await Ez(i,ie(this,Fi)?{signal:ie(this,Fi)}:{}),n instanceof Zd&&n.customRequest){const r=ie(this,xe).signal?new globalThis.Request(n.customRequest,{signal:ie(this,xe).signal}):new globalThis.Request(n.customRequest);ct(this,Ue,Fu).call(this,r)}for(const r of ie(this,xe).hooks.beforeRetry){const s=await r({request:this.request,options:ct(this,Ue,ll).call(this),error:n,retryCount:ie(this,si)});if(s instanceof globalThis.Request){ct(this,Ue,Fu).call(this,s);break}if(s instanceof globalThis.Response)return s;if(s===ux)return}return ct(this,Ue,hp).call(this,e)}},gx=async function(){var n;(n=ie(this,vi))!=null&&n.signal.aborted&&(Qi(this,vi,new globalThis.AbortController),ie(this,xe).signal=ie(this,Fi)?AbortSignal.any([ie(this,Fi),ie(this,vi).signal]):ie(this,vi).signal,this.request=new globalThis.Request(this.request,{signal:ie(this,xe).signal}));for(const i of ie(this,xe).hooks.beforeRequest){const r=await i(this.request,ct(this,Ue,ll).call(this),{retryCount:ie(this,si)});if(r instanceof Response)return r;if(r instanceof globalThis.Request){ct(this,Ue,Fu).call(this,r);break}}const e=zz(this.request,ie(this,xe));return Qi(this,gs,this.request),this.request=ie(this,gs).clone(),ie(this,xe).timeout===!1?ie(this,xe).fetch(ie(this,gs),e):Az(ie(this,gs),e,ie(this,vi),ie(this,xe))},ll=function(){if(!ie(this,no)){const{hooks:e,...n}=ie(this,xe);Qi(this,no,Object.freeze(n))}return ie(this,no)},Fu=function(e){Qi(this,no,void 0),this.request=ct(this,Ue,pp).call(this,e)},pp=function(e,n){return!ie(this,xe).onUploadProgress||!e.body?e:_z(e,ie(this,xe).onUploadProgress,n??ie(this,xe).body??void 0)},yi(kl,ff);let VO=kl;/*! MIT License © Sindre Sorhus */const mp=t=>{const e=(n,i)=>VO.create(n,du(t,i));for(const n of cx)e[n]=(i,r)=>VO.create(i,du(t,r,{method:n}));return e.create=n=>mp(du(n)),e.extend=n=>(typeof n=="function"&&(n=n(t??{})),mp(du(t,n))),e.stop=ux,e.retry=bz,e},Yd=mp(),Nt=Yd.create({prefixUrl:"/apps",timeout:1e4,hooks:{afterResponse:[(t,e,n)=>(console.log(n),n),async(t,e,n)=>{if(n.status===403){const i=await Yd("https://example.com/token").text();return t.headers.set("Authorization",`token ${i}`),Yd(t)}}]}}),Yz=async t=>{try{return await(await Nt.post("api/plugin/system/psc/xmlcalc/product/config",{json:{product:t}})).json()}catch(e){throw console.error("Error loading JSON from API:",e),e}},Iz=async t=>{try{return await(await Nt.post("api/plugin/system/psc/xmlcalc/price",{json:{product:t}})).json()}catch(e){throw console.error("Error loading price from API:",e),e}},Uz=async(t,e,n)=>{try{return await(await Nt.post("api/plugin/system/psc/xmlcalc/product/design",{json:{product:t,shop:e,jsonProduct:n}})).json()}catch(i){throw console.error("Error saving design to API:",i),i}},Id=async(t,e)=>{try{return await(await Nt.post("api/plugin/system/psc/xmlcalc/product/xml",{json:{product:t,xml:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},Dz=async(t,e)=>{try{return await(await Nt.put("api/plugin/system/psc/xmlcalc/product/"+t,{json:{calcXml:e}})).json()}catch(n){throw console.error("Error XML to PRODUCT API:",n),n}},fQ=async(t,e,n)=>{try{return await(await Nt.put("api/plugin/system/psc/xmlcalc/shop/"+t,{json:{formel:e,parameter:n}})).json()}catch(i){throw console.error("Error saving design to API:",i),i}},Lz=async(t,e)=>{try{return await(await Nt.put("api/system/papercontainer",{json:{content:e}})).json()}catch(n){throw console.error("Error saving design to API:",n),n}},Wz=async(t,e,n)=>{const i=new FormData;i.append("file",t),i.append("folder",e);try{return await(await Nt.post("api/media/create",{body:i,onDownloadProgress:s=>{n(Math.round(s.percent*100))}})).json()}catch(r){throw console.error("Error uploading file:",r),r}},$x=async()=>{try{return await(await Nt.get("api/media/folder/all")).json()}catch(t){throw console.error("Error fetching media directories:",t),t}},Nz=async(t,e=1)=>{try{return await(await Nt.get(`api/media/folder/${t}/page/${e}/12`)).json()}catch(n){throw console.error(`Error fetching media for folder ${t}:`,n),n}},jz=async(t,e,n)=>{try{return await(await Nt.post("api/plugin/custom/psc/formbuilder/layouts/add",{json:{title:t,data:n,shop:e}})).json()}catch(i){throw console.error("Error saving layout:",i),i}},Bz=async t=>{try{return await(await Nt.get("api/plugin/custom/psc/formbuilder/layouts/all/"+t)).json()}catch(e){throw console.error("Error fetching layouts:",e),e}},Gz=async(t,e,n)=>{try{return await(await Nt.post("api/plugin/system/psc/xmlcalc/product/pd",{json:{shop:t,json:e,values:n}})).json()}catch(i){throw console.error("Error fetching preview:",i),i}},Fz=async(t,e,n,i,r,s)=>await(await Nt.post("api/plugin/custom/psc/formbuilder/ai/chat",{json:{message:t,xml:e,formulas:n,parameter:i,paperDb:r,history:s},timeout:18e4})).json(),Hz=async(t,e)=>{try{return await(await Nt.post("api/content-engine/config",{json:{id:t,module:e}})).json()}catch(n){throw console.error("Error loading content config:",n),n}},Kz=async(t,e,n)=>{try{return await(await Nt.post("api/content-engine/design",{json:{id:t,module:e,json:n}})).json()}catch(i){throw console.error("Error saving content design:",i),i}},Ud=async(t,e,n)=>{try{return await(await Nt.post("api/content-engine/xml",{json:{id:t,module:e,xml:n}})).json()}catch(i){throw console.error("Error saving content XML:",i),i}},Jz=async(t,e,n)=>{try{return await(await Nt.put("api/content-engine/save",{json:{id:t,module:e,xml:n}})).json()}catch(i){throw console.error("Error saving content:",i),i}},eq=async(t,e)=>{try{return await(await Nt.post("api/content-engine/preview",{json:{json:t,values:e}})).json()}catch(n){throw console.error("Error fetching content preview:",n),n}},yx=async t=>{try{return(await(await Nt.get(`api/media/${t}`)).json()).url}catch(e){throw console.error(`Error fetching media url for ${t}:`,e),e}};class dQ extends mr{constructor(){super();pe(this,"default","");pe(this,"placeHolder","Placeholder");pe(this,"required",!1);pe(this,"name","");pe(this,"xmlType","input");pe(this,"minValue",0);pe(this,"minCalc","");pe(this,"maxCalc","");pe(this,"maxValue",0);this.type=2}toJSON(){return Object.assign(super.toJSON(),{placeHolder:this.placeHolder,default:this.default,name:this.name,minValue:this.minValue,minCalc:this.minCalc,maxValue:this.maxValue,maxCalc:this.maxCalc,required:this.required})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.required=n.required,this.placeHolder=n.placeHolder,this.minValue=n.minValue,this.minCalc=n.minCalc,this.maxValue=n.maxValue,this.maxCalc=n.maxCalc}}class ao extends mr{constructor(){super();pe(this,"items",[]);this.type=8}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{options:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),n.options.map(i=>{const r=_o.getModelForType(i.type);r.fromJSON(i),this.items.push(r)})}getIdRecursiv(n){this.items.forEach(i=>{n.push(i.id),i.getIdRecursiv(n)})}cutItem(n){let i=null;return this.items.forEach((r,s)=>{if(r.uuid===n)return i=this.items.splice(s,1)[0],!0;i===null&&(i=r.cutItem(n))}),i}insertItem(n,i){let r=!1;for(let s=0;s{if(i.uuid===n.uuid)return n=this.items.splice(r,1)[0],!0;if(i.deleteItem(n))return!0})}}class Qx extends mr{constructor(){super();pe(this,"columns",[]);this.type=7}addColumnAtTheEnd(n){this.columns.push(n)}addColumnAtTheBeginning(n){this.columns.unshift(n)}getIdRecursiv(n){this.columns.forEach(i=>{i.getIdRecursiv(n)})}deleteColumnAt(n){return this.columns.some((i,r)=>{if(i.uuid===n)return this.columns.splice(r,1)[0],!0})}addColumnAt(n,i){let r=!1;for(let s=0;s (n.push(i.toJSON()),n),[])})}cutItem(n){let i=null;return this.columns.some(r=>{if(i=r.cutItem(n),i!==null)return!0}),i}insertItem(n,i){return this.columns.some(r=>{if(r.insertItem(n,i))return!0}),!1}deleteItem(n){return this.columns.some(i=>{if(i.deleteItem(n))return!0}),!1}insertItemInEmptyColumn(n,i,r){return this.uuid==i?(r.items.push(n),!0):!1}fromJSON(n){super.fromJSON(n),n.columns.map(i=>{const r=new ao;r.fromJSON(i),this.columns.push(r)})}}class bx extends mr{constructor(){super();pe(this,"default","");pe(this,"name","");pe(this,"xmlType","img");pe(this,"url","");this.type=9}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class vx extends mr{constructor(){super();pe(this,"items",[]);pe(this,"label","");this.type=12}addItem(n){this.items.push(n)}toJSON(){return Object.assign(super.toJSON(),{label:this.label,options:this.items.reduce((n,i)=>(n.push(i.toJSON()),n),[])})}fromJSON(n){super.fromJSON(n),this.label=n.label,n.options.map(i=>{const r=_o.getModelForType(i.type);r.fromJSON(i),this.items.push(r)})}getIdRecursiv(n){this.items.forEach(i=>{n.push(i.id),i.getIdRecursiv(n)})}cutItem(n){let i=null;return this.items.forEach((r,s)=>{if(r.uuid===n)return i=this.items.splice(s,1)[0],!0;i===null&&(i=r.cutItem(n))}),i}insertItem(n,i){let r=!1;for(let s=0;s {if(i.uuid===n.uuid)return n=this.items.splice(r,1)[0],!0;if(i.deleteItem(n))return!0})}}class Sx extends mr{constructor(){super();pe(this,"default","");pe(this,"name","");pe(this,"xmlType","hidden");this.type=1,this.name="hidden"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}let Px=class{constructor(e){pe(this,"uuid","");pe(this,"id","");pe(this,"name","");pe(this,"dependencys",[]);this.uuid=ma(),this.id=e}addDependency(e){this.dependencys.push(e)}toJSON(){return{id:this.id,name:this.name,dependencys:this.dependencys.reduce((e,n)=>(e.push(n.toJSON()),e),[])}}fromJSON(e){this.name=e.name,this.id=e.id,e.dependencys.map(n=>{const i=new Va;i.fromJSON(n),this.dependencys.push(i)})}};class xx extends mr{constructor(){super();pe(this,"default","");pe(this,"name","");pe(this,"xmlType","select");pe(this,"options",[]);pe(this,"mode","normal");pe(this,"container","");this.type=3}addOption(n){this.options.push(n)}hasDependencys(){return this.options.reduce((i,r)=>(r.dependencys.length>0&&(i=!0),i),!1)||super.hasDependencys()}toJSON(){return Object.assign(super.toJSON(),{default:this.default,mode:this.mode,container:this.container,options:this.options.reduce((n,i)=>(n.push(i.toJSON()),n),[]),name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.mode=n.mode,this.container=n.container,this.default=n.default,n.options.map(i=>{const r=new Px("");r.fromJSON(i),this.options.push(r)})}}class tq extends mr{constructor(){super();pe(this,"default","");pe(this,"name","");pe(this,"xmlType","text");this.type=4,this.default="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class nq extends mr{constructor(){super();pe(this,"default","");pe(this,"name","");pe(this,"xmlType","text");this.type=5}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default}}class wx extends mr{constructor(){super();pe(this,"default","");pe(this,"variant","1");pe(this,"name","");pe(this,"xmlType","text");this.type=6,this.default="Headline"}toJSON(){return Object.assign(super.toJSON(),{default:this.default,name:this.name,variant:this.variant})}fromJSON(n){super.fromJSON(n),this.name=n.name,this.default=n.default,this.variant=n.variant}}let _o=class{static getModelForType(e){switch(e){case 12:return new vx;case 9:return new bx;case 8:return new ao;case 7:return new Qx;case 6:return new wx;case 5:return new nq;case 4:return new tq;case 3:return new xx;case 2:return new dQ;case 1:return new Sx;default:return new dQ}}};const Ti=V1("items",{state:()=>({uuid:ma(),items:[],name:ma()}),getters:{getCount:t=>t.items.length,getIdRecursiv(t){let e=[];return t.items.forEach(n=>{e.push(n.id),n.getIdRecursiv(e)}),e},getItems:t=>t.items,getUuid:t=>t.uuid},actions:{loadJSON(){let t=this.items.reduce((e,n)=>(e.push(n.toJSON()),e),[]);return[{uuid:this.uuid,name:this.name,options:t}]},parseJSON(t){this.items=[];let e=JSON.parse(t);this.name=e[0].name,e[0].uuid&&(this.uuid=e[0].uuid),e[0].options.map(n=>{const i=_o.getModelForType(n.type);i.fromJSON(n),this.addElement(i)})},addElement(t){this.items.push(t)},deleteItem(t){return this.items.some((e,n)=>{if(e.uuid===t.uuid)return t=this.items.splice(n,1)[0],!0;if(e.deleteItem(t))return!0})},moveItemBefore(t,e){const n=this.cutItem(t);return n?this.insertItem(this.items,n,e):!1},addElementAfter(t,e){this.insertItem(this.items,t,e)},cutItem(t){let e=null;return this.items.some((n,i)=>{if(n.uuid===t)return e=this.items.splice(i,1)[0],!0;if(e===null&&(e=n.cutItem(t),e!==null))return!0}),e},insertItem(t,e,n){let i=!1;for(let r=0;r ({activeItem:{},formulaData:[],formulaError:"",productUuid:"",isFormulaLoading:!1,showProperties:!1,showDependency:!1,showOptions:!1,showPreview:!1,showSaveLayoutDialog:!1,showLoadLayoutDialog:!1,showFormel:!1,showParameter:!1,showAi:!1,aiSnapshots:[],sourceDragUuid:"",dragMode:"",json:"",xml:"",formulas:"",paperContainer:"",parameter:"",shopUuid:"",mode:Hi.Product,saving:!1,syncing:!1,currentTab:"designer",previewData:null,isPreviewLoading:!1,previewError:""}),getters:{getActiveItem:t=>t.activeItem,isShowPropierties:t=>t.showProperties,isShowDependency:t=>t.showDependency,isShowOptions:t=>t.showOptions,isShowPreview:t=>t.showPreview,getSourceDragUuid:t=>t.sourceDragUuid,getShopUuid:t=>t.shopUuid,getDragMode:t=>t.dragMode,getFormulaData:t=>t.formulaData,getFormulaError:t=>t.formulaError,getPreviewData:t=>t.previewData,isProductMode:t=>t.mode===Hi.Product,isContentMode:t=>t.mode===Hi.CMS||t.mode===Hi.News,contentModule:t=>t.mode===Hi.CMS?"cms":t.mode===Hi.News?"news":"",contentId:t=>parseInt(t.productUuid)||0},actions:{setXml(t){this.xml=t},setFormulas(t){this.formulas=t},setPaperContainer(t){this.paperContainer=t},setParameter(t){this.parameter=t},setMode(t){this.mode=t},setJson(t){this.json=t},setShowDependency(t){this.showDependency=t},setShowOptions(t){this.showOptions=t},setShowProperties(t){this.showProperties=t},setProductUuid(t){this.productUuid=t},setShowPreview(t){this.showPreview=t},setActiveItem(t){this.activeItem=t},setSourceDragUuid(t){this.sourceDragUuid=t},setDragMode(t){this.dragMode=t},setShowSaveLayoutDialog(t){this.showSaveLayoutDialog=t},setShowLoadLayoutDialog(t){this.showLoadLayoutDialog=t},setShowFormel(t){this.showFormel=t},setShowParameter(t){this.showParameter=t},setShowAi(t){this.showAi=t},saveAiSnapshot(){this.aiSnapshots.push({xml:this.xml,formulas:this.formulas,parameter:this.parameter}),this.aiSnapshots.length>10&&this.aiSnapshots.shift()},undoAiSnapshot(){const t=this.aiSnapshots.pop();if(!t)return!1;this.xml=t.xml,this.formulas=t.formulas,this.parameter=t.parameter;const e=Ti();return(this.isContentMode?Ud(this.contentId,this.contentModule,t.xml):Id(this.productUuid,t.xml)).then(i=>{this.setXML(i.xml),this.setJSON(i.json),i.jsonGraph&&(this.formulaData=JSON.parse(i.jsonGraph)),e.parseJSON(i.json)})},async applyAiResult(t){if(this.saveAiSnapshot(),t.xml){const e=Ti();this.syncing=!0;try{const n=this.isContentMode?await Ud(this.contentId,this.contentModule,t.xml):await Id(this.productUuid,t.xml);this.setXML(n.xml),this.setJSON(n.json),n.jsonGraph&&(this.formulaData=JSON.parse(n.jsonGraph)),e.parseJSON(n.json)}finally{this.syncing=!1}}t.formulas&&(this.formulas=t.formulas),t.parameter&&(this.parameter=t.parameter)},syncFormulasAndParameter(){this.syncing=!0,fQ(this.shopUuid,this.formulas,this.parameter).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1})},setShopUuid(t){this.shopUuid=t},async loadConfigFromProductApi(t){if(this.isContentMode){const n=await Hz(this.contentId,this.contentModule);return this.json=n.json,this.xml=n.xml,n.json}const e=await Yz(t);return this.json=e.json,this.xml=e.xml,this.parameter=e.parameter,this.formulas=e.formulas,this.paperContainer=e.paperContainer,this.shopUuid=e.shopUuid,e.json},async loadFormulaAnalyserDataFromApi(t){if(!(this.formulaData&&this.formulaData.length>0)){this.isFormulaLoading=!0,this.formulaError="";try{const e=await Iz(t);if(e&&e.debug&&e.debug.graphJson)this.formulaData=JSON.parse(e.debug.graphJson);else throw new Error("Invalid or empty response format from API.")}catch(e){this.formulaError=`Failed to load formula data: ${e.message}`,console.error(e)}finally{this.isFormulaLoading=!1}}},setXML(t){this.xml=t},setJSON(t){this.json=t},saveDesign(t){(this.isContentMode?Kz(this.contentId,this.contentModule,t):Uz(this.productUuid,this.shopUuid,t)).then(n=>{this.setXML(n.xml),this.setJSON(n.json),n.jsonGraph&&(this.formulaData=JSON.parse(n.jsonGraph))})},manualSave(){this.saving=!0,(this.isContentMode?Jz(this.contentId,this.contentModule,this.xml):Dz(this.productUuid,this.xml)).then(e=>{this.saving=!1})},manualSync(){this.syncing=!0,this.currentTab=="xml"&&(this.isContentMode?Ud(this.contentId,this.contentModule,this.xml):Id(this.productUuid,this.xml)).then(e=>{this.setXML(e.xml),this.setJSON(e.json),e.jsonGraph&&(this.formulaData=JSON.parse(e.jsonGraph)),this.syncing=!1,Ti().parseJSON(e.json)}),(this.currentTab=="formulas"||this.currentTab=="parameter")&&fQ(this.shopUuid,this.formulas,this.parameter).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1}),this.currentTab=="paperdb"&&Lz(this.shopUuid,this.paperContainer).then(t=>{this.loadConfigFromProductApi(this.productUuid),this.syncing=!1})},setCurrentTab(t){this.currentTab=t},async loadPreview(t,e){this.previewError="";try{const n=this.isContentMode?await eq(t,e):await Gz(this.shopUuid,t,e);this.previewData=n}catch(n){this.previewError=`Failed to load preview data: ${n.message}`,console.error(n)}finally{this.isPreviewLoading=!1}}}}),iq={class:"w-full p-2 flex gap-2 flex-wrap"},rq=Y({__name:"TopBar",setup(t){const e=zt();function n(){e.manualSave()}function i(){e.setShowSaveLayoutDialog(!0)}return(r,s)=>(x(),W("div",iq,[X(m(Et),{onClick:n,disabled:m(e).saving},{default:V(()=>[Ce(B(m(e).saving?r.$t("saving"):r.$t("save")),1)]),_:1},8,["disabled"]),X(m(Et),{onClick:i,variant:"outline"},{default:V(()=>[Ce(B(r.$t("save_layout")),1)]),_:1})]))}}),sq=Y({__name:"Switch",props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},id:{},value:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=ht(n,"class"),s=Dn(r,i);return(o,a)=>(x(),I(m(a2),ve({"data-slot":"switch"},m(s),{class:m(Fe)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:V(()=>[X(m(c2),{"data-slot":"switch-thumb",class:vt(m(Fe)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"))},{default:V(()=>[oe(o.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),_g=Y({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(x(),I(m(QE),ve({"data-slot":"label"},m(n),{class:m(Fe)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e.class)}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}});/*! * shared v11.2.8 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function tq(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const VO=typeof window<"u",Zs=(t,e=!1)=>e?Symbol.for(t):Symbol(t),nq=(t,e,n)=>iq({l:t,k:e,s:n}),iq=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Lt=t=>typeof t=="number"&&isFinite(t),rq=t=>wg(t)==="[object Date]",ma=t=>wg(t)==="[object RegExp]",Bf=t=>je(t)&&Object.keys(t).length===0,Gt=Object.assign,sq=Object.create,ft=(t=null)=>sq(t);let fy;const Ks=()=>fy||(fy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:ft());function dy(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function hy(t){return t.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function oq(t){return t=t.replace(/(\w+)\s*=\s*"([^"]*)"/g,(i,r,s)=>`${r}="${hy(s)}"`),t=t.replace(/(\w+)\s*=\s*'([^']*)'/g,(i,r,s)=>`${r}='${hy(s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(t)&&(t=t.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(i=>{t=t.replace(i,"$1javascript:")}),t}const aq=Object.prototype.hasOwnProperty;function Pi(t,e){return aq.call(t,e)}const Vt=Array.isArray,Pt=t=>typeof t=="function",_e=t=>typeof t=="string",st=t=>typeof t=="boolean",at=t=>t!==null&&typeof t=="object",lq=t=>at(t)&&Pt(t.then)&&Pt(t.catch),wx=Object.prototype.toString,wg=t=>wx.call(t),je=t=>wg(t)==="[object Object]",cq=t=>t==null?"":Vt(t)||je(t)&&t.toString===wx?JSON.stringify(t,null,2):String(t);function _g(t,e=""){return t.reduce((n,i,r)=>r===0?n+i:n+e+i,"")}const hu=t=>!at(t)||Vt(t);function Fu(t,e){if(hu(t)||hu(e))throw new Error("Invalid value");const n=[{src:t,des:e}];for(;n.length;){const{src:i,des:r}=n.pop();Object.keys(i).forEach(s=>{s!=="__proto__"&&(at(i[s])&&!at(r[s])&&(r[s]=Array.isArray(i[s])?[]:ft()),hu(r[s])||hu(i[s])?r[s]=i[s]:n.push({src:i[s],des:r[s]}))})}}/*! + */function oq(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const AO=typeof window<"u",Ms=(t,e=!1)=>e?Symbol.for(t):Symbol(t),aq=(t,e,n)=>lq({l:t,k:e,s:n}),lq=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Lt=t=>typeof t=="number"&&isFinite(t),cq=t=>Tg(t)==="[object Date]",ga=t=>Tg(t)==="[object RegExp]",Gf=t=>je(t)&&Object.keys(t).length===0,Ft=Object.assign,uq=Object.create,ft=(t=null)=>uq(t);let hQ;const Js=()=>hQ||(hQ=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:ft());function pQ(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function mQ(t){return t.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function Oq(t){return t=t.replace(/(\w+)\s*=\s*"([^"]*)"/g,(i,r,s)=>`${r}="${mQ(s)}"`),t=t.replace(/(\w+)\s*=\s*'([^']*)'/g,(i,r,s)=>`${r}='${mQ(s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(t)&&(t=t.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(i=>{t=t.replace(i,"$1javascript:")}),t}const fq=Object.prototype.hasOwnProperty;function Pi(t,e){return fq.call(t,e)}const Vt=Array.isArray,xt=t=>typeof t=="function",_e=t=>typeof t=="string",st=t=>typeof t=="boolean",at=t=>t!==null&&typeof t=="object",dq=t=>at(t)&&xt(t.then)&&xt(t.catch),_x=Object.prototype.toString,Tg=t=>_x.call(t),je=t=>Tg(t)==="[object Object]",hq=t=>t==null?"":Vt(t)||je(t)&&t.toString===_x?JSON.stringify(t,null,2):String(t);function kg(t,e=""){return t.reduce((n,i,r)=>r===0?n+i:n+e+i,"")}const pu=t=>!at(t)||Vt(t);function Hu(t,e){if(pu(t)||pu(e))throw new Error("Invalid value");const n=[{src:t,des:e}];for(;n.length;){const{src:i,des:r}=n.pop();Object.keys(i).forEach(s=>{s!=="__proto__"&&(at(i[s])&&!at(r[s])&&(r[s]=Array.isArray(i[s])?[]:ft()),pu(r[s])||pu(i[s])?r[s]=i[s]:n.push({src:i[s],des:r[s]}))})}}/*! * message-compiler v11.2.8 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function uq(t,e,n){return{line:t,column:e,offset:n}}function pp(t,e,n){return{start:t,end:e}}const ut={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},Oq=17;function Gf(t,e,n={}){const{domain:i,messages:r,args:s}=n,o=t,a=new SyntaxError(String(o));return a.code=t,e&&(a.location=e),a.domain=i,a}function fq(t){throw t}const Mi=" ",dq="\r",On=` -`,hq="\u2028",pq="\u2029";function mq(t){const e=t;let n=0,i=1,r=1,s=0;const o=P=>e[P]===dq&&e[P+1]===On,a=P=>e[P]===On,l=P=>e[P]===pq,c=P=>e[P]===hq,u=P=>o(P)||a(P)||l(P)||c(P),O=()=>n,f=()=>i,d=()=>r,h=()=>s,p=P=>o(P)||l(P)||c(P)?On:e[P],$=()=>p(n),g=()=>p(n+s);function b(){return s=0,u(n)&&(i++,r=0),o(n)&&n++,n++,r++,e[n]}function y(){return o(n+s)&&s++,s++,e[n+s]}function Q(){n=0,i=1,r=1,s=0}function v(P=0){s=P}function S(){const P=n+s;for(;P!==n;)b();s=0}return{index:O,line:f,column:d,peekOffset:h,charAt:p,currentChar:$,currentPeek:g,next:b,peek:y,reset:Q,resetPeek:v,skipToPeek:S}}const br=void 0,gq=".",py="'",$q="tokenizer";function Qq(t,e={}){const n=e.location!==!1,i=mq(t),r=()=>i.index(),s=()=>uq(i.line(),i.column(),i.index()),o=s(),a=r(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function O(x,R,Z,...L){const G=c();if(R.column+=Z,R.offset+=Z,u){const ce=n?pp(G.startLoc,R):null,z=Gf(x,ce,{domain:$q,args:L});u(z)}}function f(x,R,Z){x.endLoc=s(),x.currentType=R;const L={type:R};return n&&(L.loc=pp(x.startLoc,x.endLoc)),Z!=null&&(L.value=Z),L}const d=x=>f(x,13);function h(x,R){return x.currentChar()===R?(x.next(),R):(O(ut.EXPECTED_TOKEN,s(),0,R),"")}function p(x){let R="";for(;x.currentPeek()===Mi||x.currentPeek()===On;)R+=x.currentPeek(),x.peek();return R}function $(x){const R=p(x);return x.skipToPeek(),R}function g(x){if(x===br)return!1;const R=x.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R===95}function b(x){if(x===br)return!1;const R=x.charCodeAt(0);return R>=48&&R<=57}function y(x,R){const{currentType:Z}=R;if(Z!==2)return!1;p(x);const L=g(x.currentPeek());return x.resetPeek(),L}function Q(x,R){const{currentType:Z}=R;if(Z!==2)return!1;p(x);const L=x.currentPeek()==="-"?x.peek():x.currentPeek(),G=b(L);return x.resetPeek(),G}function v(x,R){const{currentType:Z}=R;if(Z!==2)return!1;p(x);const L=x.currentPeek()===py;return x.resetPeek(),L}function S(x,R){const{currentType:Z}=R;if(Z!==7)return!1;p(x);const L=x.currentPeek()===".";return x.resetPeek(),L}function P(x,R){const{currentType:Z}=R;if(Z!==8)return!1;p(x);const L=g(x.currentPeek());return x.resetPeek(),L}function w(x,R){const{currentType:Z}=R;if(!(Z===7||Z===11))return!1;p(x);const L=x.currentPeek()===":";return x.resetPeek(),L}function T(x,R){const{currentType:Z}=R;if(Z!==9)return!1;const L=()=>{const ce=x.currentPeek();return ce==="{"?g(x.peek()):ce==="@"||ce==="|"||ce===":"||ce==="."||ce===Mi||!ce?!1:ce===On?(x.peek(),L()):U(x,!1)},G=L();return x.resetPeek(),G}function q(x){p(x);const R=x.currentPeek()==="|";return x.resetPeek(),R}function U(x,R=!0){const Z=(G=!1,ce="")=>{const z=x.currentPeek();return z==="{"||z==="@"||!z?G:z==="|"?!(ce===Mi||ce===On):z===Mi?(x.peek(),Z(!0,Mi)):z===On?(x.peek(),Z(!0,On)):!0},L=Z();return R&&x.resetPeek(),L}function A(x,R){const Z=x.currentChar();return Z===br?br:R(Z)?(x.next(),Z):null}function K(x){const R=x.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36}function ae(x){return A(x,K)}function fe(x){const R=x.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36||R===45}function J(x){return A(x,fe)}function re(x){const R=x.charCodeAt(0);return R>=48&&R<=57}function se(x){return A(x,re)}function ge(x){const R=x.charCodeAt(0);return R>=48&&R<=57||R>=65&&R<=70||R>=97&&R<=102}function ue(x){return A(x,ge)}function te(x){let R="",Z="";for(;R=se(x);)Z+=R;return Z}function le(x){let R="";for(;;){const Z=x.currentChar();if(Z==="{"||Z==="}"||Z==="@"||Z==="|"||!Z)break;if(Z===Mi||Z===On)if(U(x))R+=Z,x.next();else{if(q(x))break;R+=Z,x.next()}else R+=Z,x.next()}return R}function Oe(x){$(x);let R="",Z="";for(;R=J(x);)Z+=R;const L=x.currentChar();if(L&&L!=="}"&&L!==br&&L!==Mi&&L!==On&&L!==" "){const G=He(x);return O(ut.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,Z+G),Z+G}return x.currentChar()===br&&O(ut.UNTERMINATED_CLOSING_BRACE,s(),0),Z}function Qe(x){$(x);let R="";return x.currentChar()==="-"?(x.next(),R+=`-${te(x)}`):R+=te(x),x.currentChar()===br&&O(ut.UNTERMINATED_CLOSING_BRACE,s(),0),R}function he(x){return x!==py&&x!==On}function ye(x){$(x),h(x,"'");let R="",Z="";for(;R=A(x,he);)R==="\\"?Z+=Se(x):Z+=R;const L=x.currentChar();return L===On||L===br?(O(ut.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),L===On&&(x.next(),h(x,"'")),Z):(h(x,"'"),Z)}function Se(x){const R=x.currentChar();switch(R){case"\\":case"'":return x.next(),`\\${R}`;case"u":return qe(x,R,4);case"U":return qe(x,R,6);default:return O(ut.UNKNOWN_ESCAPE_SEQUENCE,s(),0,R),""}}function qe(x,R,Z){h(x,R);let L="";for(let G=0;G {const L=x.currentChar();return L==="{"||L==="@"||L==="|"||L==="("||L===")"||!L||L===Mi?Z:(Z+=L,x.next(),R(Z))};return R("")}function k(x){$(x);const R=h(x,"|");return $(x),R}function E(x,R){let Z=null;switch(x.currentChar()){case"{":return R.braceNest>=1&&O(ut.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),x.next(),Z=f(R,2,"{"),$(x),R.braceNest++,Z;case"}":return R.braceNest>0&&R.currentType===2&&O(ut.EMPTY_PLACEHOLDER,s(),0),x.next(),Z=f(R,3,"}"),R.braceNest--,R.braceNest>0&&$(x),R.inLinked&&R.braceNest===0&&(R.inLinked=!1),Z;case"@":return R.braceNest>0&&O(ut.UNTERMINATED_CLOSING_BRACE,s(),0),Z=N(x,R)||d(R),R.braceNest=0,Z;default:{let G=!0,ce=!0,z=!0;if(q(x))return R.braceNest>0&&O(ut.UNTERMINATED_CLOSING_BRACE,s(),0),Z=f(R,1,k(x)),R.braceNest=0,R.inLinked=!1,Z;if(R.braceNest>0&&(R.currentType===4||R.currentType===5||R.currentType===6))return O(ut.UNTERMINATED_CLOSING_BRACE,s(),0),R.braceNest=0,ee(x,R);if(G=y(x,R))return Z=f(R,4,Oe(x)),$(x),Z;if(ce=Q(x,R))return Z=f(R,5,Qe(x)),$(x),Z;if(z=v(x,R))return Z=f(R,6,ye(x)),$(x),Z;if(!G&&!ce&&!z)return Z=f(R,12,He(x)),O(ut.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,Z.value),$(x),Z;break}}return Z}function N(x,R){const{currentType:Z}=R;let L=null;const G=x.currentChar();switch((Z===7||Z===8||Z===11||Z===9)&&(G===On||G===Mi)&&O(ut.INVALID_LINKED_FORMAT,s(),0),G){case"@":return x.next(),L=f(R,7,"@"),R.inLinked=!0,L;case".":return $(x),x.next(),f(R,8,".");case":":return $(x),x.next(),f(R,9,":");default:return q(x)?(L=f(R,1,k(x)),R.braceNest=0,R.inLinked=!1,L):S(x,R)||w(x,R)?($(x),N(x,R)):P(x,R)?($(x),f(R,11,$t(x))):T(x,R)?($(x),G==="{"?E(x,R)||L:f(R,10,Qt(x))):(Z===7&&O(ut.INVALID_LINKED_FORMAT,s(),0),R.braceNest=0,R.inLinked=!1,ee(x,R))}}function ee(x,R){let Z={type:13};if(R.braceNest>0)return E(x,R)||d(R);if(R.inLinked)return N(x,R)||d(R);switch(x.currentChar()){case"{":return E(x,R)||d(R);case"}":return O(ut.UNBALANCED_CLOSING_BRACE,s(),0),x.next(),f(R,3,"}");case"@":return N(x,R)||d(R);default:{if(q(x))return Z=f(R,1,k(x)),R.braceNest=0,R.inLinked=!1,Z;if(U(x))return f(R,0,le(x));break}}return Z}function ne(){const{currentType:x,offset:R,startLoc:Z,endLoc:L}=l;return l.lastType=x,l.lastOffset=R,l.lastStartLoc=Z,l.lastEndLoc=L,l.offset=r(),l.startLoc=s(),i.currentChar()===br?f(l,13):ee(i,l)}return{nextToken:ne,currentOffset:r,currentPosition:s,context:c}}const yq="parser",bq=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function vq(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function Sq(t={}){const e=t.location!==!1,{onError:n}=t;function i(g,b,y,Q,...v){const S=g.currentPosition();if(S.offset+=Q,S.column+=Q,n){const P=e?pp(y,S):null,w=Gf(b,P,{domain:yq,args:v});n(w)}}function r(g,b,y){const Q={type:g};return e&&(Q.start=b,Q.end=b,Q.loc={start:y,end:y}),Q}function s(g,b,y,Q){e&&(g.end=b,g.loc&&(g.loc.end=y))}function o(g,b){const y=g.context(),Q=r(3,y.offset,y.startLoc);return Q.value=b,s(Q,g.currentOffset(),g.currentPosition()),Q}function a(g,b){const y=g.context(),{lastOffset:Q,lastStartLoc:v}=y,S=r(5,Q,v);return S.index=parseInt(b,10),g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function l(g,b){const y=g.context(),{lastOffset:Q,lastStartLoc:v}=y,S=r(4,Q,v);return S.key=b,g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function c(g,b){const y=g.context(),{lastOffset:Q,lastStartLoc:v}=y,S=r(9,Q,v);return S.value=b.replace(bq,vq),g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function u(g){const b=g.nextToken(),y=g.context(),{lastOffset:Q,lastStartLoc:v}=y,S=r(8,Q,v);return b.type!==11?(i(g,ut.UNEXPECTED_EMPTY_LINKED_MODIFIER,y.lastStartLoc,0),S.value="",s(S,Q,v),{nextConsumeToken:b,node:S}):(b.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Ii(b)),S.value=b.value||"",s(S,g.currentOffset(),g.currentPosition()),{node:S})}function O(g,b){const y=g.context(),Q=r(7,y.offset,y.startLoc);return Q.value=b,s(Q,g.currentOffset(),g.currentPosition()),Q}function f(g){const b=g.context(),y=r(6,b.offset,b.startLoc);let Q=g.nextToken();if(Q.type===8){const v=u(g);y.modifier=v.node,Q=v.nextConsumeToken||g.nextToken()}switch(Q.type!==9&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(Q)),Q=g.nextToken(),Q.type===2&&(Q=g.nextToken()),Q.type){case 10:Q.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(Q)),y.key=O(g,Q.value||"");break;case 4:Q.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(Q)),y.key=l(g,Q.value||"");break;case 5:Q.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(Q)),y.key=a(g,Q.value||"");break;case 6:Q.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(Q)),y.key=c(g,Q.value||"");break;default:{i(g,ut.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const v=g.context(),S=r(7,v.offset,v.startLoc);return S.value="",s(S,v.offset,v.startLoc),y.key=S,s(y,v.offset,v.startLoc),{nextConsumeToken:Q,node:y}}}return s(y,g.currentOffset(),g.currentPosition()),{node:y}}function d(g){const b=g.context(),y=b.currentType===1?g.currentOffset():b.offset,Q=b.currentType===1?b.endLoc:b.startLoc,v=r(2,y,Q);v.items=[];let S=null;do{const T=S||g.nextToken();switch(S=null,T.type){case 0:T.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(T)),v.items.push(o(g,T.value||""));break;case 5:T.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(T)),v.items.push(a(g,T.value||""));break;case 4:T.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(T)),v.items.push(l(g,T.value||""));break;case 6:T.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(T)),v.items.push(c(g,T.value||""));break;case 7:{const q=f(g);v.items.push(q.node),S=q.nextConsumeToken||null;break}}}while(b.currentType!==13&&b.currentType!==1);const P=b.currentType===1?b.lastOffset:g.currentOffset(),w=b.currentType===1?b.lastEndLoc:g.currentPosition();return s(v,P,w),v}function h(g,b,y,Q){const v=g.context();let S=Q.items.length===0;const P=r(1,b,y);P.cases=[],P.cases.push(Q);do{const w=d(g);S||(S=w.items.length===0),P.cases.push(w)}while(v.currentType!==13);return S&&i(g,ut.MUST_HAVE_MESSAGES_IN_PLURAL,y,0),s(P,g.currentOffset(),g.currentPosition()),P}function p(g){const b=g.context(),{offset:y,startLoc:Q}=b,v=d(g);return b.currentType===13?v:h(g,y,Q,v)}function $(g){const b=Qq(g,Gt({},t)),y=b.context(),Q=r(0,y.offset,y.startLoc);return e&&Q.loc&&(Q.loc.source=g),Q.body=p(b),t.onCacheKey&&(Q.cacheKey=t.onCacheKey(g)),y.currentType!==13&&i(b,ut.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,g[y.offset]||""),s(Q,b.currentOffset(),b.currentPosition()),Q}return{parse:$}}function Ii(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function Pq(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function my(t,e){for(let n=0;n gy(n)),t}function gy(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;n o;function l(p,$){o.code+=p}function c(p,$=!0){const g=$?i:"";l(r?g+" ".repeat(p):g)}function u(p=!0){const $=++o.indentLevel;p&&c($)}function O(p=!0){const $=--o.indentLevel;p&&c($)}function f(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:O,newline:f,helper:p=>`_${p}`,needIndent:()=>o.needIndent}}function Tq(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),ga(t,e.key),e.modifier?(t.push(", "),ga(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function kq(t,e){const{helper:n,needIndent:i}=t;t.push(`${n("normalize")}([`),t.indent(i());const r=e.items.length;for(let s=0;s 1){t.push(`${n("plural")}([`),t.indent(i());const r=e.cases.length;for(let s=0;s {const n=_e(e.mode)?e.mode:"normal",i=_e(e.filename)?e.filename:"message.intl";e.sourceMap;const r=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":` -`,s=e.needIndent?e.needIndent:n!=="arrow",o=t.helpers||[],a=_q(t,{filename:i,breakLineCode:r,needIndent:s});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(s),o.length>0&&(a.push(`const { ${_g(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),ga(a,t),a.deindent(s),a.push("}"),delete t.helpers;const{code:l,map:c}=a.context();return{ast:t,code:l,map:c?c.toJSON():void 0}};function Vq(t,e={}){const n=Gt({},e),i=!!n.jit,r=!!n.minify,s=n.optimize==null?!0:n.optimize,a=Sq(n).parse(t);return i?(s&&wq(a),r&&qo(a),{ast:a,code:""}):(xq(a,n),Xq(a,n))}/*! + */function pq(t,e,n){return{line:t,column:e,offset:n}}function gp(t,e,n){return{start:t,end:e}}const ut={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},mq=17;function Ff(t,e,n={}){const{domain:i,messages:r,args:s}=n,o=t,a=new SyntaxError(String(o));return a.code=t,e&&(a.location=e),a.domain=i,a}function gq(t){throw t}const Yi=" ",$q="\r",fn=` +`,yq="\u2028",Qq="\u2029";function bq(t){const e=t;let n=0,i=1,r=1,s=0;const o=P=>e[P]===$q&&e[P+1]===fn,a=P=>e[P]===fn,l=P=>e[P]===Qq,c=P=>e[P]===yq,u=P=>o(P)||a(P)||l(P)||c(P),O=()=>n,f=()=>i,d=()=>r,h=()=>s,p=P=>o(P)||l(P)||c(P)?fn:e[P],$=()=>p(n),g=()=>p(n+s);function b(){return s=0,u(n)&&(i++,r=0),o(n)&&n++,n++,r++,e[n]}function Q(){return o(n+s)&&s++,s++,e[n+s]}function y(){n=0,i=1,r=1,s=0}function v(P=0){s=P}function S(){const P=n+s;for(;P!==n;)b();s=0}return{index:O,line:f,column:d,peekOffset:h,charAt:p,currentChar:$,currentPeek:g,next:b,peek:Q,reset:y,resetPeek:v,skipToPeek:S}}const vr=void 0,vq=".",gQ="'",Sq="tokenizer";function Pq(t,e={}){const n=e.location!==!1,i=bq(t),r=()=>i.index(),s=()=>pq(i.line(),i.column(),i.index()),o=s(),a=r(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function O(w,R,Z,...L){const G=c();if(R.column+=Z,R.offset+=Z,u){const ce=n?gp(G.startLoc,R):null,z=Ff(w,ce,{domain:Sq,args:L});u(z)}}function f(w,R,Z){w.endLoc=s(),w.currentType=R;const L={type:R};return n&&(L.loc=gp(w.startLoc,w.endLoc)),Z!=null&&(L.value=Z),L}const d=w=>f(w,13);function h(w,R){return w.currentChar()===R?(w.next(),R):(O(ut.EXPECTED_TOKEN,s(),0,R),"")}function p(w){let R="";for(;w.currentPeek()===Yi||w.currentPeek()===fn;)R+=w.currentPeek(),w.peek();return R}function $(w){const R=p(w);return w.skipToPeek(),R}function g(w){if(w===vr)return!1;const R=w.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R===95}function b(w){if(w===vr)return!1;const R=w.charCodeAt(0);return R>=48&&R<=57}function Q(w,R){const{currentType:Z}=R;if(Z!==2)return!1;p(w);const L=g(w.currentPeek());return w.resetPeek(),L}function y(w,R){const{currentType:Z}=R;if(Z!==2)return!1;p(w);const L=w.currentPeek()==="-"?w.peek():w.currentPeek(),G=b(L);return w.resetPeek(),G}function v(w,R){const{currentType:Z}=R;if(Z!==2)return!1;p(w);const L=w.currentPeek()===gQ;return w.resetPeek(),L}function S(w,R){const{currentType:Z}=R;if(Z!==7)return!1;p(w);const L=w.currentPeek()===".";return w.resetPeek(),L}function P(w,R){const{currentType:Z}=R;if(Z!==8)return!1;p(w);const L=g(w.currentPeek());return w.resetPeek(),L}function _(w,R){const{currentType:Z}=R;if(!(Z===7||Z===11))return!1;p(w);const L=w.currentPeek()===":";return w.resetPeek(),L}function T(w,R){const{currentType:Z}=R;if(Z!==9)return!1;const L=()=>{const ce=w.currentPeek();return ce==="{"?g(w.peek()):ce==="@"||ce==="|"||ce===":"||ce==="."||ce===Yi||!ce?!1:ce===fn?(w.peek(),L()):U(w,!1)},G=L();return w.resetPeek(),G}function q(w){p(w);const R=w.currentPeek()==="|";return w.resetPeek(),R}function U(w,R=!0){const Z=(G=!1,ce="")=>{const z=w.currentPeek();return z==="{"||z==="@"||!z?G:z==="|"?!(ce===Yi||ce===fn):z===Yi?(w.peek(),Z(!0,Yi)):z===fn?(w.peek(),Z(!0,fn)):!0},L=Z();return R&&w.resetPeek(),L}function A(w,R){const Z=w.currentChar();return Z===vr?vr:R(Z)?(w.next(),Z):null}function K(w){const R=w.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36}function ae(w){return A(w,K)}function de(w){const R=w.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===95||R===36||R===45}function J(w){return A(w,de)}function re(w){const R=w.charCodeAt(0);return R>=48&&R<=57}function se(w){return A(w,re)}function ge(w){const R=w.charCodeAt(0);return R>=48&&R<=57||R>=65&&R<=70||R>=97&&R<=102}function Oe(w){return A(w,ge)}function te(w){let R="",Z="";for(;R=se(w);)Z+=R;return Z}function le(w){let R="";for(;;){const Z=w.currentChar();if(Z==="{"||Z==="}"||Z==="@"||Z==="|"||!Z)break;if(Z===Yi||Z===fn)if(U(w))R+=Z,w.next();else{if(q(w))break;R+=Z,w.next()}else R+=Z,w.next()}return R}function fe(w){$(w);let R="",Z="";for(;R=J(w);)Z+=R;const L=w.currentChar();if(L&&L!=="}"&&L!==vr&&L!==Yi&&L!==fn&&L!==" "){const G=He(w);return O(ut.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,Z+G),Z+G}return w.currentChar()===vr&&O(ut.UNTERMINATED_CLOSING_BRACE,s(),0),Z}function ye(w){$(w);let R="";return w.currentChar()==="-"?(w.next(),R+=`-${te(w)}`):R+=te(w),w.currentChar()===vr&&O(ut.UNTERMINATED_CLOSING_BRACE,s(),0),R}function he(w){return w!==gQ&&w!==fn}function Qe(w){$(w),h(w,"'");let R="",Z="";for(;R=A(w,he);)R==="\\"?Z+=Se(w):Z+=R;const L=w.currentChar();return L===fn||L===vr?(O(ut.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),L===fn&&(w.next(),h(w,"'")),Z):(h(w,"'"),Z)}function Se(w){const R=w.currentChar();switch(R){case"\\":case"'":return w.next(),`\\${R}`;case"u":return qe(w,R,4);case"U":return qe(w,R,6);default:return O(ut.UNKNOWN_ESCAPE_SEQUENCE,s(),0,R),""}}function qe(w,R,Z){h(w,R);let L="";for(let G=0;G {const L=w.currentChar();return L==="{"||L==="@"||L==="|"||L==="("||L===")"||!L||L===Yi?Z:(Z+=L,w.next(),R(Z))};return R("")}function k(w){$(w);const R=h(w,"|");return $(w),R}function E(w,R){let Z=null;switch(w.currentChar()){case"{":return R.braceNest>=1&&O(ut.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),w.next(),Z=f(R,2,"{"),$(w),R.braceNest++,Z;case"}":return R.braceNest>0&&R.currentType===2&&O(ut.EMPTY_PLACEHOLDER,s(),0),w.next(),Z=f(R,3,"}"),R.braceNest--,R.braceNest>0&&$(w),R.inLinked&&R.braceNest===0&&(R.inLinked=!1),Z;case"@":return R.braceNest>0&&O(ut.UNTERMINATED_CLOSING_BRACE,s(),0),Z=N(w,R)||d(R),R.braceNest=0,Z;default:{let G=!0,ce=!0,z=!0;if(q(w))return R.braceNest>0&&O(ut.UNTERMINATED_CLOSING_BRACE,s(),0),Z=f(R,1,k(w)),R.braceNest=0,R.inLinked=!1,Z;if(R.braceNest>0&&(R.currentType===4||R.currentType===5||R.currentType===6))return O(ut.UNTERMINATED_CLOSING_BRACE,s(),0),R.braceNest=0,ee(w,R);if(G=Q(w,R))return Z=f(R,4,fe(w)),$(w),Z;if(ce=y(w,R))return Z=f(R,5,ye(w)),$(w),Z;if(z=v(w,R))return Z=f(R,6,Qe(w)),$(w),Z;if(!G&&!ce&&!z)return Z=f(R,12,He(w)),O(ut.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,Z.value),$(w),Z;break}}return Z}function N(w,R){const{currentType:Z}=R;let L=null;const G=w.currentChar();switch((Z===7||Z===8||Z===11||Z===9)&&(G===fn||G===Yi)&&O(ut.INVALID_LINKED_FORMAT,s(),0),G){case"@":return w.next(),L=f(R,7,"@"),R.inLinked=!0,L;case".":return $(w),w.next(),f(R,8,".");case":":return $(w),w.next(),f(R,9,":");default:return q(w)?(L=f(R,1,k(w)),R.braceNest=0,R.inLinked=!1,L):S(w,R)||_(w,R)?($(w),N(w,R)):P(w,R)?($(w),f(R,11,$t(w))):T(w,R)?($(w),G==="{"?E(w,R)||L:f(R,10,yt(w))):(Z===7&&O(ut.INVALID_LINKED_FORMAT,s(),0),R.braceNest=0,R.inLinked=!1,ee(w,R))}}function ee(w,R){let Z={type:13};if(R.braceNest>0)return E(w,R)||d(R);if(R.inLinked)return N(w,R)||d(R);switch(w.currentChar()){case"{":return E(w,R)||d(R);case"}":return O(ut.UNBALANCED_CLOSING_BRACE,s(),0),w.next(),f(R,3,"}");case"@":return N(w,R)||d(R);default:{if(q(w))return Z=f(R,1,k(w)),R.braceNest=0,R.inLinked=!1,Z;if(U(w))return f(R,0,le(w));break}}return Z}function ne(){const{currentType:w,offset:R,startLoc:Z,endLoc:L}=l;return l.lastType=w,l.lastOffset=R,l.lastStartLoc=Z,l.lastEndLoc=L,l.offset=r(),l.startLoc=s(),i.currentChar()===vr?f(l,13):ee(i,l)}return{nextToken:ne,currentOffset:r,currentPosition:s,context:c}}const xq="parser",wq=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function _q(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function Tq(t={}){const e=t.location!==!1,{onError:n}=t;function i(g,b,Q,y,...v){const S=g.currentPosition();if(S.offset+=y,S.column+=y,n){const P=e?gp(Q,S):null,_=Ff(b,P,{domain:xq,args:v});n(_)}}function r(g,b,Q){const y={type:g};return e&&(y.start=b,y.end=b,y.loc={start:Q,end:Q}),y}function s(g,b,Q,y){e&&(g.end=b,g.loc&&(g.loc.end=Q))}function o(g,b){const Q=g.context(),y=r(3,Q.offset,Q.startLoc);return y.value=b,s(y,g.currentOffset(),g.currentPosition()),y}function a(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(5,y,v);return S.index=parseInt(b,10),g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function l(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(4,y,v);return S.key=b,g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function c(g,b){const Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(9,y,v);return S.value=b.replace(wq,_q),g.nextToken(),s(S,g.currentOffset(),g.currentPosition()),S}function u(g){const b=g.nextToken(),Q=g.context(),{lastOffset:y,lastStartLoc:v}=Q,S=r(8,y,v);return b.type!==11?(i(g,ut.UNEXPECTED_EMPTY_LINKED_MODIFIER,Q.lastStartLoc,0),S.value="",s(S,y,v),{nextConsumeToken:b,node:S}):(b.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,Q.lastStartLoc,0,Ii(b)),S.value=b.value||"",s(S,g.currentOffset(),g.currentPosition()),{node:S})}function O(g,b){const Q=g.context(),y=r(7,Q.offset,Q.startLoc);return y.value=b,s(y,g.currentOffset(),g.currentPosition()),y}function f(g){const b=g.context(),Q=r(6,b.offset,b.startLoc);let y=g.nextToken();if(y.type===8){const v=u(g);Q.modifier=v.node,y=v.nextConsumeToken||g.nextToken()}switch(y.type!==9&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(y)),y=g.nextToken(),y.type===2&&(y=g.nextToken()),y.type){case 10:y.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(y)),Q.key=O(g,y.value||"");break;case 4:y.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(y)),Q.key=l(g,y.value||"");break;case 5:y.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(y)),Q.key=a(g,y.value||"");break;case 6:y.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(y)),Q.key=c(g,y.value||"");break;default:{i(g,ut.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const v=g.context(),S=r(7,v.offset,v.startLoc);return S.value="",s(S,v.offset,v.startLoc),Q.key=S,s(Q,v.offset,v.startLoc),{nextConsumeToken:y,node:Q}}}return s(Q,g.currentOffset(),g.currentPosition()),{node:Q}}function d(g){const b=g.context(),Q=b.currentType===1?g.currentOffset():b.offset,y=b.currentType===1?b.endLoc:b.startLoc,v=r(2,Q,y);v.items=[];let S=null;do{const T=S||g.nextToken();switch(S=null,T.type){case 0:T.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(T)),v.items.push(o(g,T.value||""));break;case 5:T.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(T)),v.items.push(a(g,T.value||""));break;case 4:T.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(T)),v.items.push(l(g,T.value||""));break;case 6:T.value==null&&i(g,ut.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Ii(T)),v.items.push(c(g,T.value||""));break;case 7:{const q=f(g);v.items.push(q.node),S=q.nextConsumeToken||null;break}}}while(b.currentType!==13&&b.currentType!==1);const P=b.currentType===1?b.lastOffset:g.currentOffset(),_=b.currentType===1?b.lastEndLoc:g.currentPosition();return s(v,P,_),v}function h(g,b,Q,y){const v=g.context();let S=y.items.length===0;const P=r(1,b,Q);P.cases=[],P.cases.push(y);do{const _=d(g);S||(S=_.items.length===0),P.cases.push(_)}while(v.currentType!==13);return S&&i(g,ut.MUST_HAVE_MESSAGES_IN_PLURAL,Q,0),s(P,g.currentOffset(),g.currentPosition()),P}function p(g){const b=g.context(),{offset:Q,startLoc:y}=b,v=d(g);return b.currentType===13?v:h(g,Q,y,v)}function $(g){const b=Pq(g,Ft({},t)),Q=b.context(),y=r(0,Q.offset,Q.startLoc);return e&&y.loc&&(y.loc.source=g),y.body=p(b),t.onCacheKey&&(y.cacheKey=t.onCacheKey(g)),Q.currentType!==13&&i(b,ut.UNEXPECTED_LEXICAL_ANALYSIS,Q.lastStartLoc,0,g[Q.offset]||""),s(y,b.currentOffset(),b.currentPosition()),y}return{parse:$}}function Ii(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function kq(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function $Q(t,e){for(let n=0;n yQ(n)),t}function yQ(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;n o;function l(p,$){o.code+=p}function c(p,$=!0){const g=$?i:"";l(r?g+" ".repeat(p):g)}function u(p=!0){const $=++o.indentLevel;p&&c($)}function O(p=!0){const $=--o.indentLevel;p&&c($)}function f(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:O,newline:f,helper:p=>`_${p}`,needIndent:()=>o.needIndent}}function Vq(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),$a(t,e.key),e.modifier?(t.push(", "),$a(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function Aq(t,e){const{helper:n,needIndent:i}=t;t.push(`${n("normalize")}([`),t.indent(i());const r=e.items.length;for(let s=0;s 1){t.push(`${n("plural")}([`),t.indent(i());const r=e.cases.length;for(let s=0;s {const n=_e(e.mode)?e.mode:"normal",i=_e(e.filename)?e.filename:"message.intl";e.sourceMap;const r=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":` +`,s=e.needIndent?e.needIndent:n!=="arrow",o=t.helpers||[],a=Xq(t,{filename:i,breakLineCode:r,needIndent:s});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(s),o.length>0&&(a.push(`const { ${kg(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),$a(a,t),a.deindent(s),a.push("}"),delete t.helpers;const{code:l,map:c}=a.context();return{ast:t,code:l,map:c?c.toJSON():void 0}};function Zq(t,e={}){const n=Ft({},e),i=!!n.jit,r=!!n.minify,s=n.optimize==null?!0:n.optimize,a=Tq(n).parse(t);return i?(s&&Cq(a),r&&Zo(a),{ast:a,code:""}):(Rq(a,n),qq(a,n))}/*! * core-base v11.2.8 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function Aq(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ks().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ks().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function or(t){return at(t)&&kg(t)===0&&(Pi(t,"b")||Pi(t,"body"))}const _x=["b","body"];function Eq(t){return Ys(t,_x)}const Tx=["c","cases"];function zq(t){return Ys(t,Tx,[])}const kx=["s","static"];function qq(t){return Ys(t,kx)}const Rx=["i","items"];function Zq(t){return Ys(t,Rx,[])}const Cx=["t","type"];function kg(t){return Ys(t,Cx)}const Xx=["v","value"];function pu(t,e){const n=Ys(t,Xx);if(n!=null)return n;throw Wl(e)}const Vx=["m","modifier"];function Yq(t){return Ys(t,Vx)}const Ax=["k","key"];function Mq(t){const e=Ys(t,Ax);if(e)return e;throw Wl(6)}function Ys(t,e,n){for(let i=0;i Iq(n,t)}function Iq(t,e){const n=Eq(e);if(n==null)throw Wl(0);if(kg(n)===1){const s=zq(n);return t.plural(s.reduce((o,a)=>[...o,$y(t,a)],[]))}else return $y(t,n)}function $y(t,e){const n=qq(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const i=Zq(e).reduce((r,s)=>[...r,mp(t,s)],[]);return t.normalize(i)}}function mp(t,e){const n=kg(e);switch(n){case 3:return pu(e,n);case 9:return pu(e,n);case 4:{const i=e;if(Pi(i,"k")&&i.k)return t.interpolate(t.named(i.k));if(Pi(i,"key")&&i.key)return t.interpolate(t.named(i.key));throw Wl(n)}case 5:{const i=e;if(Pi(i,"i")&&Lt(i.i))return t.interpolate(t.list(i.i));if(Pi(i,"index")&&Lt(i.index))return t.interpolate(t.list(i.index));throw Wl(n)}case 6:{const i=e,r=Yq(i),s=Mq(i);return t.linked(mp(t,s),r?mp(t,r):void 0,t.type)}case 7:return pu(e,n);case 8:return pu(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Uq=t=>t;let mu=ft();function Dq(t,e={}){let n=!1;const i=e.onError||fq;return e.onError=r=>{n=!0,i(r)},{...Vq(t,e),detectError:n}}function Lq(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&_e(t)){st(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||Uq)(t),r=mu[i];if(r)return r;const{ast:s,detectError:o}=Dq(t,{...e,location:!1,jit:!0}),a=Id(s);return o?a:mu[i]=a}else{const n=t.cacheKey;if(n){const i=mu[n];return i||(mu[n]=Id(t))}else return Id(t)}}let Nl=null;function Wq(t){Nl=t}function Nq(t,e,n){Nl&&Nl.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const jq=Bq("function:translate");function Bq(t){return e=>Nl&&Nl.emit(t,e)}const Cr={INVALID_ARGUMENT:Oq,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Gq=24;function Xr(t){return Gf(t,null,void 0)}function Rg(t,e){return e.locale!=null?Qy(e.locale):Qy(t.locale)}let Ud;function Qy(t){if(_e(t))return t;if(Pt(t)){if(t.resolvedOnce&&Ud!=null)return Ud;if(t.constructor.name==="Function"){const e=t();if(lq(e))throw Xr(Cr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ud=e}else throw Xr(Cr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Xr(Cr.NOT_SUPPORT_LOCALE_TYPE)}function Fq(t,e,n){return[...new Set([n,...Vt(e)?e:at(e)?Object.keys(e):_e(e)?[e]:[n]])]}function zx(t,e,n){const i=_e(n)?n:jl,r=t;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(i);if(!s){s=[];let o=[n];for(;Vt(o);)o=yy(s,o,e);const a=Vt(e)||!je(e)?e:e.default?e.default:null;o=_e(a)?[a]:a,Vt(o)&&yy(s,o,!1),r.__localeChainCache.set(i,s)}return s}function yy(t,e,n){let i=!0;for(let r=0;r {o===void 0?o=a:o+=a},f[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},f[2]=()=>{f[0](),r++},f[3]=()=>{if(r>0)r--,i=4,f[0]();else{if(r=0,o===void 0||(o=iZ(o),o===!1))return!1;f[1]()}};function d(){const h=t[n+1];if(i===5&&h==="'"||i===6&&h==='"')return n++,a="\\"+h,f[0](),!0}for(;i!==null;)if(n++,s=t[n],!(s==="\\"&&d())){if(l=nZ(s),O=Ms[i],c=O[l]||O.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(a=s,u()===!1))))return;if(i===7)return e}}const by=new Map;function sZ(t,e){return at(t)?t[e]:null}function oZ(t,e){if(!at(t))return null;let n=by.get(e);if(n||(n=rZ(e),n&&by.set(e,n)),!n)return null;const i=n.length;let r=t,s=0;for(;s`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function lZ(){return{upper:(t,e)=>e==="text"&&_e(t)?t.toUpperCase():e==="vnode"&&at(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&_e(t)?t.toLowerCase():e==="vnode"&&at(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&_e(t)?Sy(t):e==="vnode"&&at(t)&&"__v_isVNode"in t?Sy(t.children):t}}let qx;function cZ(t){qx=t}let Zx;function uZ(t){Zx=t}let Yx;function OZ(t){Yx=t}let Mx=null;const fZ=t=>{Mx=t},dZ=()=>Mx;let Ix=null;const Py=t=>{Ix=t},hZ=()=>Ix;let xy=0;function pZ(t={}){const e=Pt(t.onWarn)?t.onWarn:tq,n=_e(t.version)?t.version:aZ,i=_e(t.locale)||Pt(t.locale)?t.locale:jl,r=Pt(i)?jl:i,s=Vt(t.fallbackLocale)||je(t.fallbackLocale)||_e(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:r,o=je(t.messages)?t.messages:Dd(r),a=je(t.datetimeFormats)?t.datetimeFormats:Dd(r),l=je(t.numberFormats)?t.numberFormats:Dd(r),c=Gt(ft(),t.modifiers,lZ()),u=t.pluralRules||ft(),O=Pt(t.missing)?t.missing:null,f=st(t.missingWarn)||ma(t.missingWarn)?t.missingWarn:!0,d=st(t.fallbackWarn)||ma(t.fallbackWarn)?t.fallbackWarn:!0,h=!!t.fallbackFormat,p=!!t.unresolving,$=Pt(t.postTranslation)?t.postTranslation:null,g=je(t.processor)?t.processor:null,b=st(t.warnHtmlMessage)?t.warnHtmlMessage:!0,y=!!t.escapeParameter,Q=Pt(t.messageCompiler)?t.messageCompiler:qx,v=Pt(t.messageResolver)?t.messageResolver:Zx||sZ,S=Pt(t.localeFallbacker)?t.localeFallbacker:Yx||Fq,P=at(t.fallbackContext)?t.fallbackContext:void 0,w=t,T=at(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,q=at(w.__numberFormatters)?w.__numberFormatters:new Map,U=at(w.__meta)?w.__meta:{};xy++;const A={version:n,cid:xy,locale:i,fallbackLocale:s,messages:o,modifiers:c,pluralRules:u,missing:O,missingWarn:f,fallbackWarn:d,fallbackFormat:h,unresolving:p,postTranslation:$,processor:g,warnHtmlMessage:b,escapeParameter:y,messageCompiler:Q,messageResolver:v,localeFallbacker:S,fallbackContext:P,onWarn:e,__meta:U};return A.datetimeFormats=a,A.numberFormats=l,A.__datetimeFormatters=T,A.__numberFormatters=q,__INTLIFY_PROD_DEVTOOLS__&&Nq(A,n,U),A}const Dd=t=>({[t]:ft()});function Cg(t,e,n,i,r){const{missing:s,onWarn:o}=t;if(s!==null){const a=s(t,n,e,r);return _e(a)?a:e}else return e}function ja(t,e,n){const i=t;i.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function mZ(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function gZ(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let i=n+1;i {Ux.includes(l)?o[l]=n[l]:s[l]=n[l]}),_e(i)?s.locale=i:je(i)&&(o=i),je(r)&&(o=r),[s.key||"",a,s,o]}function _y(t,e,n){const i=t;for(const r in n){const s=`${e}__${r}`;i.__datetimeFormatters.has(s)&&i.__datetimeFormatters.delete(s)}}function Ty(t,...e){const{numberFormats:n,unresolving:i,fallbackLocale:r,onWarn:s,localeFallbacker:o}=t,{__numberFormatters:a}=t,[l,c,u,O]=$p(...e),f=st(u.missingWarn)?u.missingWarn:t.missingWarn;st(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const d=!!u.part,h=Rg(t,u),p=o(t,r,h);if(!_e(l)||l==="")return new Intl.NumberFormat(h,O).format(c);let $={},g,b=null;const y="number format";for(let S=0;S {Dx.includes(l)?o[l]=n[l]:s[l]=n[l]}),_e(i)?s.locale=i:je(i)&&(o=i),je(r)&&(o=r),[s.key||"",a,s,o]}function ky(t,e,n){const i=t;for(const r in n){const s=`${e}__${r}`;i.__numberFormatters.has(s)&&i.__numberFormatters.delete(s)}}const $Z=t=>t,QZ=t=>"",yZ="text",bZ=t=>t.length===0?"":_g(t),vZ=cq;function Ry(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function SZ(t){const e=Lt(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(Lt(t.named.count)||Lt(t.named.n))?Lt(t.named.count)?t.named.count:Lt(t.named.n)?t.named.n:e:e}function PZ(t,e){e.count||(e.count=t),e.n||(e.n=t)}function xZ(t={}){const e=t.locale,n=SZ(t),i=at(t.pluralRules)&&_e(e)&&Pt(t.pluralRules[e])?t.pluralRules[e]:Ry,r=at(t.pluralRules)&&_e(e)&&Pt(t.pluralRules[e])?Ry:void 0,s=g=>g[i(n,g.length,r)],o=t.list||[],a=g=>o[g],l=t.named||ft();Lt(t.pluralIndex)&&PZ(n,l);const c=g=>l[g];function u(g,b){const y=Pt(t.messages)?t.messages(g,!!b):at(t.messages)?t.messages[g]:!1;return y||(t.parent?t.parent.message(g):QZ)}const O=g=>t.modifiers?t.modifiers[g]:$Z,f=je(t.processor)&&Pt(t.processor.normalize)?t.processor.normalize:bZ,d=je(t.processor)&&Pt(t.processor.interpolate)?t.processor.interpolate:vZ,h=je(t.processor)&&_e(t.processor.type)?t.processor.type:yZ,$={list:a,named:c,plural:s,linked:(g,...b)=>{const[y,Q]=b;let v="text",S="";b.length===1?at(y)?(S=y.modifier||S,v=y.type||v):_e(y)&&(S=y||S):b.length===2&&(_e(y)&&(S=y||S),_e(Q)&&(v=Q||v));const P=u(g,!0)($),w=v==="vnode"&&Vt(P)&&S?P[0]:P;return S?O(S)(w,v):w},message:u,type:h,interpolate:d,normalize:f,values:Gt(ft(),o,l)};return $}const Cy=()=>"",oi=t=>Pt(t);function Xy(t,...e){const{fallbackFormat:n,postTranslation:i,unresolving:r,messageCompiler:s,fallbackLocale:o,messages:a}=t,[l,c]=Qp(...e),u=st(c.missingWarn)?c.missingWarn:t.missingWarn,O=st(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,f=st(c.escapeParameter)?c.escapeParameter:t.escapeParameter,d=!!c.resolvedMessage,h=_e(c.default)||st(c.default)?st(c.default)?s?l:()=>l:c.default:n?s?l:()=>l:null,p=n||h!=null&&(_e(h)||Pt(h)),$=Rg(t,c);f&&wZ(c);let[g,b,y]=d?[l,$,a[$]||ft()]:Lx(t,l,$,o,O,u),Q=g,v=l;if(!d&&!(_e(Q)||or(Q)||oi(Q))&&p&&(Q=h,v=Q),!d&&(!(_e(Q)||or(Q)||oi(Q))||!_e(b)))return r?Ff:l;let S=!1;const P=()=>{S=!0},w=oi(Q)?Q:Wx(t,l,b,Q,v,P);if(S)return Q;const T=kZ(t,b,y,c),q=xZ(T),U=_Z(t,w,q);let A=i?i(U,l):U;if(f&&_e(A)&&(A=oq(A)),__INTLIFY_PROD_DEVTOOLS__){const K={timestamp:Date.now(),key:_e(l)?l:oi(Q)?Q.key:"",locale:b||(oi(Q)?Q.locale:""),format:_e(Q)?Q:oi(Q)?Q.source:"",message:A};K.meta=Gt({},t.__meta,dZ()||{}),jq(K)}return A}function wZ(t){Vt(t.list)?t.list=t.list.map(e=>_e(e)?dy(e):e):at(t.named)&&Object.keys(t.named).forEach(e=>{_e(t.named[e])&&(t.named[e]=dy(t.named[e]))})}function Lx(t,e,n,i,r,s){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=t,u=c(t,i,n);let O=ft(),f,d=null;const h="translate";for(let p=0;p i;return c.locale=n,c.key=e,c}const l=o(i,TZ(t,n,r,i,a,s));return l.locale=n,l.key=e,l.source=i,l}function _Z(t,e,n){return e(n)}function Qp(...t){const[e,n,i]=t,r=ft();if(!_e(e)&&!Lt(e)&&!oi(e)&&!or(e))throw Xr(Cr.INVALID_ARGUMENT);const s=Lt(e)?String(e):(oi(e),e);return Lt(n)?r.plural=n:_e(n)?r.default=n:je(n)&&!Bf(n)?r.named=n:Vt(n)&&(r.list=n),Lt(i)?r.plural=i:_e(i)?r.default=i:je(i)&&Gt(r,i),[s,r]}function TZ(t,e,n,i,r,s){return{locale:e,key:n,warnHtmlMessage:r,onError:o=>{throw s&&s(o),o},onCacheKey:o=>nq(e,n,o)}}function kZ(t,e,n,i){const{modifiers:r,pluralRules:s,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=t,f={locale:e,modifiers:r,pluralRules:s,messages:(d,h)=>{let p=o(n,d);if(p==null&&(u||h)){const[,,$]=Lx(u||t,d,e,a,l,c);p=o($,d)}if(_e(p)||or(p)){let $=!1;const b=Wx(t,d,e,p,d,()=>{$=!0});return $?Cy:b}else return oi(p)?p:Cy}};return t.processor&&(f.processor=t.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),Lt(i.plural)&&(f.pluralIndex=i.plural),f}Aq();/*! + */function Mq(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Js().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Js().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ar(t){return at(t)&&Cg(t)===0&&(Pi(t,"b")||Pi(t,"body"))}const Tx=["b","body"];function Yq(t){return Ys(t,Tx)}const kx=["c","cases"];function Iq(t){return Ys(t,kx,[])}const Rx=["s","static"];function Uq(t){return Ys(t,Rx)}const Cx=["i","items"];function Dq(t){return Ys(t,Cx,[])}const Xx=["t","type"];function Cg(t){return Ys(t,Xx)}const Vx=["v","value"];function mu(t,e){const n=Ys(t,Vx);if(n!=null)return n;throw Nl(e)}const Ax=["m","modifier"];function Lq(t){return Ys(t,Ax)}const Ex=["k","key"];function Wq(t){const e=Ys(t,Ex);if(e)return e;throw Nl(6)}function Ys(t,e,n){for(let i=0;i Nq(n,t)}function Nq(t,e){const n=Yq(e);if(n==null)throw Nl(0);if(Cg(n)===1){const s=Iq(n);return t.plural(s.reduce((o,a)=>[...o,QQ(t,a)],[]))}else return QQ(t,n)}function QQ(t,e){const n=Uq(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const i=Dq(e).reduce((r,s)=>[...r,$p(t,s)],[]);return t.normalize(i)}}function $p(t,e){const n=Cg(e);switch(n){case 3:return mu(e,n);case 9:return mu(e,n);case 4:{const i=e;if(Pi(i,"k")&&i.k)return t.interpolate(t.named(i.k));if(Pi(i,"key")&&i.key)return t.interpolate(t.named(i.key));throw Nl(n)}case 5:{const i=e;if(Pi(i,"i")&&Lt(i.i))return t.interpolate(t.list(i.i));if(Pi(i,"index")&&Lt(i.index))return t.interpolate(t.list(i.index));throw Nl(n)}case 6:{const i=e,r=Lq(i),s=Wq(i);return t.linked($p(t,s),r?$p(t,r):void 0,t.type)}case 7:return mu(e,n);case 8:return mu(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const jq=t=>t;let gu=ft();function Bq(t,e={}){let n=!1;const i=e.onError||gq;return e.onError=r=>{n=!0,i(r)},{...Zq(t,e),detectError:n}}function Gq(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&_e(t)){st(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||jq)(t),r=gu[i];if(r)return r;const{ast:s,detectError:o}=Bq(t,{...e,location:!1,jit:!0}),a=Dd(s);return o?a:gu[i]=a}else{const n=t.cacheKey;if(n){const i=gu[n];return i||(gu[n]=Dd(t))}else return Dd(t)}}let jl=null;function Fq(t){jl=t}function Hq(t,e,n){jl&&jl.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const Kq=Jq("function:translate");function Jq(t){return e=>jl&&jl.emit(t,e)}const Xr={INVALID_ARGUMENT:mq,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},eZ=24;function Vr(t){return Ff(t,null,void 0)}function Xg(t,e){return e.locale!=null?bQ(e.locale):bQ(t.locale)}let Ld;function bQ(t){if(_e(t))return t;if(xt(t)){if(t.resolvedOnce&&Ld!=null)return Ld;if(t.constructor.name==="Function"){const e=t();if(dq(e))throw Vr(Xr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ld=e}else throw Vr(Xr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Vr(Xr.NOT_SUPPORT_LOCALE_TYPE)}function tZ(t,e,n){return[...new Set([n,...Vt(e)?e:at(e)?Object.keys(e):_e(e)?[e]:[n]])]}function qx(t,e,n){const i=_e(n)?n:Bl,r=t;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(i);if(!s){s=[];let o=[n];for(;Vt(o);)o=vQ(s,o,e);const a=Vt(e)||!je(e)?e:e.default?e.default:null;o=_e(a)?[a]:a,Vt(o)&&vQ(s,o,!1),r.__localeChainCache.set(i,s)}return s}function vQ(t,e,n){let i=!0;for(let r=0;r {o===void 0?o=a:o+=a},f[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},f[2]=()=>{f[0](),r++},f[3]=()=>{if(r>0)r--,i=4,f[0]();else{if(r=0,o===void 0||(o=lZ(o),o===!1))return!1;f[1]()}};function d(){const h=t[n+1];if(i===5&&h==="'"||i===6&&h==='"')return n++,a="\\"+h,f[0](),!0}for(;i!==null;)if(n++,s=t[n],!(s==="\\"&&d())){if(l=aZ(s),O=Is[i],c=O[l]||O.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(a=s,u()===!1))))return;if(i===7)return e}}const SQ=new Map;function uZ(t,e){return at(t)?t[e]:null}function OZ(t,e){if(!at(t))return null;let n=SQ.get(e);if(n||(n=cZ(e),n&&SQ.set(e,n)),!n)return null;const i=n.length;let r=t,s=0;for(;s`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function dZ(){return{upper:(t,e)=>e==="text"&&_e(t)?t.toUpperCase():e==="vnode"&&at(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&_e(t)?t.toLowerCase():e==="vnode"&&at(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&_e(t)?xQ(t):e==="vnode"&&at(t)&&"__v_isVNode"in t?xQ(t.children):t}}let Zx;function hZ(t){Zx=t}let Mx;function pZ(t){Mx=t}let Yx;function mZ(t){Yx=t}let Ix=null;const gZ=t=>{Ix=t},$Z=()=>Ix;let Ux=null;const wQ=t=>{Ux=t},yZ=()=>Ux;let _Q=0;function QZ(t={}){const e=xt(t.onWarn)?t.onWarn:oq,n=_e(t.version)?t.version:fZ,i=_e(t.locale)||xt(t.locale)?t.locale:Bl,r=xt(i)?Bl:i,s=Vt(t.fallbackLocale)||je(t.fallbackLocale)||_e(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:r,o=je(t.messages)?t.messages:Wd(r),a=je(t.datetimeFormats)?t.datetimeFormats:Wd(r),l=je(t.numberFormats)?t.numberFormats:Wd(r),c=Ft(ft(),t.modifiers,dZ()),u=t.pluralRules||ft(),O=xt(t.missing)?t.missing:null,f=st(t.missingWarn)||ga(t.missingWarn)?t.missingWarn:!0,d=st(t.fallbackWarn)||ga(t.fallbackWarn)?t.fallbackWarn:!0,h=!!t.fallbackFormat,p=!!t.unresolving,$=xt(t.postTranslation)?t.postTranslation:null,g=je(t.processor)?t.processor:null,b=st(t.warnHtmlMessage)?t.warnHtmlMessage:!0,Q=!!t.escapeParameter,y=xt(t.messageCompiler)?t.messageCompiler:Zx,v=xt(t.messageResolver)?t.messageResolver:Mx||uZ,S=xt(t.localeFallbacker)?t.localeFallbacker:Yx||tZ,P=at(t.fallbackContext)?t.fallbackContext:void 0,_=t,T=at(_.__datetimeFormatters)?_.__datetimeFormatters:new Map,q=at(_.__numberFormatters)?_.__numberFormatters:new Map,U=at(_.__meta)?_.__meta:{};_Q++;const A={version:n,cid:_Q,locale:i,fallbackLocale:s,messages:o,modifiers:c,pluralRules:u,missing:O,missingWarn:f,fallbackWarn:d,fallbackFormat:h,unresolving:p,postTranslation:$,processor:g,warnHtmlMessage:b,escapeParameter:Q,messageCompiler:y,messageResolver:v,localeFallbacker:S,fallbackContext:P,onWarn:e,__meta:U};return A.datetimeFormats=a,A.numberFormats=l,A.__datetimeFormatters=T,A.__numberFormatters=q,__INTLIFY_PROD_DEVTOOLS__&&Hq(A,n,U),A}const Wd=t=>({[t]:ft()});function Vg(t,e,n,i,r){const{missing:s,onWarn:o}=t;if(s!==null){const a=s(t,n,e,r);return _e(a)?a:e}else return e}function Ba(t,e,n){const i=t;i.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function bZ(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function vZ(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let i=n+1;i {Dx.includes(l)?o[l]=n[l]:s[l]=n[l]}),_e(i)?s.locale=i:je(i)&&(o=i),je(r)&&(o=r),[s.key||"",a,s,o]}function kQ(t,e,n){const i=t;for(const r in n){const s=`${e}__${r}`;i.__datetimeFormatters.has(s)&&i.__datetimeFormatters.delete(s)}}function RQ(t,...e){const{numberFormats:n,unresolving:i,fallbackLocale:r,onWarn:s,localeFallbacker:o}=t,{__numberFormatters:a}=t,[l,c,u,O]=Qp(...e),f=st(u.missingWarn)?u.missingWarn:t.missingWarn;st(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const d=!!u.part,h=Xg(t,u),p=o(t,r,h);if(!_e(l)||l==="")return new Intl.NumberFormat(h,O).format(c);let $={},g,b=null;const Q="number format";for(let S=0;S {Lx.includes(l)?o[l]=n[l]:s[l]=n[l]}),_e(i)?s.locale=i:je(i)&&(o=i),je(r)&&(o=r),[s.key||"",a,s,o]}function CQ(t,e,n){const i=t;for(const r in n){const s=`${e}__${r}`;i.__numberFormatters.has(s)&&i.__numberFormatters.delete(s)}}const SZ=t=>t,PZ=t=>"",xZ="text",wZ=t=>t.length===0?"":kg(t),_Z=hq;function XQ(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function TZ(t){const e=Lt(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(Lt(t.named.count)||Lt(t.named.n))?Lt(t.named.count)?t.named.count:Lt(t.named.n)?t.named.n:e:e}function kZ(t,e){e.count||(e.count=t),e.n||(e.n=t)}function RZ(t={}){const e=t.locale,n=TZ(t),i=at(t.pluralRules)&&_e(e)&&xt(t.pluralRules[e])?t.pluralRules[e]:XQ,r=at(t.pluralRules)&&_e(e)&&xt(t.pluralRules[e])?XQ:void 0,s=g=>g[i(n,g.length,r)],o=t.list||[],a=g=>o[g],l=t.named||ft();Lt(t.pluralIndex)&&kZ(n,l);const c=g=>l[g];function u(g,b){const Q=xt(t.messages)?t.messages(g,!!b):at(t.messages)?t.messages[g]:!1;return Q||(t.parent?t.parent.message(g):PZ)}const O=g=>t.modifiers?t.modifiers[g]:SZ,f=je(t.processor)&&xt(t.processor.normalize)?t.processor.normalize:wZ,d=je(t.processor)&&xt(t.processor.interpolate)?t.processor.interpolate:_Z,h=je(t.processor)&&_e(t.processor.type)?t.processor.type:xZ,$={list:a,named:c,plural:s,linked:(g,...b)=>{const[Q,y]=b;let v="text",S="";b.length===1?at(Q)?(S=Q.modifier||S,v=Q.type||v):_e(Q)&&(S=Q||S):b.length===2&&(_e(Q)&&(S=Q||S),_e(y)&&(v=y||v));const P=u(g,!0)($),_=v==="vnode"&&Vt(P)&&S?P[0]:P;return S?O(S)(_,v):_},message:u,type:h,interpolate:d,normalize:f,values:Ft(ft(),o,l)};return $}const VQ=()=>"",oi=t=>xt(t);function AQ(t,...e){const{fallbackFormat:n,postTranslation:i,unresolving:r,messageCompiler:s,fallbackLocale:o,messages:a}=t,[l,c]=bp(...e),u=st(c.missingWarn)?c.missingWarn:t.missingWarn,O=st(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,f=st(c.escapeParameter)?c.escapeParameter:t.escapeParameter,d=!!c.resolvedMessage,h=_e(c.default)||st(c.default)?st(c.default)?s?l:()=>l:c.default:n?s?l:()=>l:null,p=n||h!=null&&(_e(h)||xt(h)),$=Xg(t,c);f&&CZ(c);let[g,b,Q]=d?[l,$,a[$]||ft()]:Wx(t,l,$,o,O,u),y=g,v=l;if(!d&&!(_e(y)||ar(y)||oi(y))&&p&&(y=h,v=y),!d&&(!(_e(y)||ar(y)||oi(y))||!_e(b)))return r?Hf:l;let S=!1;const P=()=>{S=!0},_=oi(y)?y:Nx(t,l,b,y,v,P);if(S)return y;const T=AZ(t,b,Q,c),q=RZ(T),U=XZ(t,_,q);let A=i?i(U,l):U;if(f&&_e(A)&&(A=Oq(A)),__INTLIFY_PROD_DEVTOOLS__){const K={timestamp:Date.now(),key:_e(l)?l:oi(y)?y.key:"",locale:b||(oi(y)?y.locale:""),format:_e(y)?y:oi(y)?y.source:"",message:A};K.meta=Ft({},t.__meta,$Z()||{}),Kq(K)}return A}function CZ(t){Vt(t.list)?t.list=t.list.map(e=>_e(e)?pQ(e):e):at(t.named)&&Object.keys(t.named).forEach(e=>{_e(t.named[e])&&(t.named[e]=pQ(t.named[e]))})}function Wx(t,e,n,i,r,s){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=t,u=c(t,i,n);let O=ft(),f,d=null;const h="translate";for(let p=0;p i;return c.locale=n,c.key=e,c}const l=o(i,VZ(t,n,r,i,a,s));return l.locale=n,l.key=e,l.source=i,l}function XZ(t,e,n){return e(n)}function bp(...t){const[e,n,i]=t,r=ft();if(!_e(e)&&!Lt(e)&&!oi(e)&&!ar(e))throw Vr(Xr.INVALID_ARGUMENT);const s=Lt(e)?String(e):(oi(e),e);return Lt(n)?r.plural=n:_e(n)?r.default=n:je(n)&&!Gf(n)?r.named=n:Vt(n)&&(r.list=n),Lt(i)?r.plural=i:_e(i)?r.default=i:je(i)&&Ft(r,i),[s,r]}function VZ(t,e,n,i,r,s){return{locale:e,key:n,warnHtmlMessage:r,onError:o=>{throw s&&s(o),o},onCacheKey:o=>aq(e,n,o)}}function AZ(t,e,n,i){const{modifiers:r,pluralRules:s,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=t,f={locale:e,modifiers:r,pluralRules:s,messages:(d,h)=>{let p=o(n,d);if(p==null&&(u||h)){const[,,$]=Wx(u||t,d,e,a,l,c);p=o($,d)}if(_e(p)||ar(p)){let $=!1;const b=Nx(t,d,e,p,d,()=>{$=!0});return $?VQ:b}else return oi(p)?p:VQ}};return t.processor&&(f.processor=t.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),Lt(i.plural)&&(f.pluralIndex=i.plural),f}Mq();/*! * vue-i18n v11.2.8 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const RZ="11.2.8";function CZ(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ks().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ks().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ks().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ks().__INTLIFY_PROD_DEVTOOLS__=!1)}const Un={UNEXPECTED_RETURN_TYPE:Gq,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function ei(t,...e){return Gf(t,null,void 0)}const yp=Zs("__translateVNode"),bp=Zs("__datetimeParts"),vp=Zs("__numberParts"),Nx=Zs("__setPluralRules"),jx=Zs("__injectWithOption"),Sp=Zs("__dispose");function Bl(t){if(!at(t)||or(t))return t;for(const e in t)if(Pi(t,e))if(!e.includes("."))at(t[e])&&Bl(t[e]);else{const n=e.split("."),i=n.length-1;let r=t,s=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||ft(),Fu(c,o[l])):Fu(c,o)}else _e(a)&&Fu(JSON.parse(a),o)}),r==null&&s)for(const a in o)Pi(o,a)&&Bl(o[a]);return o}function Bx(t){return t.type}function Gx(t,e,n){let i=at(e.messages)?e.messages:ft();"__i18nGlobal"in n&&(i=Xg(t.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const r=Object.keys(i);r.length&&r.forEach(s=>{t.mergeLocaleMessage(s,i[s])});{if(at(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(o=>{t.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(at(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(o=>{t.mergeNumberFormat(o,e.numberFormats[o])})}}}function Vy(t){return X(Ar,null,t,0)}function Gl(){const t="currentInstance";return t in jh?jh[t]:Rt()}const Ay="__INTLIFY_META__",Ey=()=>[],XZ=()=>!1;let zy=0;function qy(t){return(e,n,i,r)=>t(n,i,Gl()||void 0,r)}const VZ=()=>{const t=Gl();let e=null;return t&&(e=Bx(t)[Ay])?{[Ay]:e}:null};function Vg(t={}){const{__root:e,__injectWithOption:n}=t,i=e===void 0,r=t.flatJson,s=VO?H:rr;let o=st(t.inheritLocale)?t.inheritLocale:!0;const a=s(e&&o?e.locale.value:_e(t.locale)?t.locale:jl),l=s(e&&o?e.fallbackLocale.value:_e(t.fallbackLocale)||Vt(t.fallbackLocale)||je(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:a.value),c=s(Xg(a.value,t)),u=s(je(t.datetimeFormats)?t.datetimeFormats:{[a.value]:{}}),O=s(je(t.numberFormats)?t.numberFormats:{[a.value]:{}});let f=e?e.missingWarn:st(t.missingWarn)||ma(t.missingWarn)?t.missingWarn:!0,d=e?e.fallbackWarn:st(t.fallbackWarn)||ma(t.fallbackWarn)?t.fallbackWarn:!0,h=e?e.fallbackRoot:st(t.fallbackRoot)?t.fallbackRoot:!0,p=!!t.fallbackFormat,$=Pt(t.missing)?t.missing:null,g=Pt(t.missing)?qy(t.missing):null,b=Pt(t.postTranslation)?t.postTranslation:null,y=e?e.warnHtmlMessage:st(t.warnHtmlMessage)?t.warnHtmlMessage:!0,Q=!!t.escapeParameter;const v=e?e.modifiers:je(t.modifiers)?t.modifiers:{};let S=t.pluralRules||e&&e.pluralRules,P;P=(()=>{i&&Py(null);const z={version:RZ,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:v,pluralRules:S,missing:g===null?void 0:g,missingWarn:f,fallbackWarn:d,fallbackFormat:p,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:y,escapeParameter:Q,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};z.datetimeFormats=u.value,z.numberFormats=O.value,z.__datetimeFormatters=je(P)?P.__datetimeFormatters:void 0,z.__numberFormatters=je(P)?P.__numberFormatters:void 0;const D=pZ(z);return i&&Py(D),D})(),ja(P,a.value,l.value);function T(){return[a.value,l.value,c.value,u.value,O.value]}const q=j({get:()=>a.value,set:z=>{P.locale=z,a.value=z}}),U=j({get:()=>l.value,set:z=>{P.fallbackLocale=z,l.value=z,ja(P,a.value,z)}}),A=j(()=>c.value),K=j(()=>u.value),ae=j(()=>O.value);function fe(){return Pt(b)?b:null}function J(z){b=z,P.postTranslation=z}function re(){return $}function se(z){z!==null&&(g=qy(z)),$=z,P.missing=g}const ge=(z,D,be,Ae,tt,nt)=>{T();let qt;try{__INTLIFY_PROD_DEVTOOLS__,i||(P.fallbackContext=e?hZ():void 0),qt=z(P)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(P.fallbackContext=void 0)}if(be!=="translate exists"&&Lt(qt)&&qt===Ff||be==="translate exists"&&!qt){const[Ht,ni]=D();return e&&h?Ae(e):tt(Ht)}else{if(nt(qt))return qt;throw ei(Un.UNEXPECTED_RETURN_TYPE)}};function ue(...z){return ge(D=>Reflect.apply(Xy,null,[D,...z]),()=>Qp(...z),"translate",D=>Reflect.apply(D.t,D,[...z]),D=>D,D=>_e(D))}function te(...z){const[D,be,Ae]=z;if(Ae&&!at(Ae))throw ei(Un.INVALID_ARGUMENT);return ue(D,be,Gt({resolvedMessage:!0},Ae||{}))}function le(...z){return ge(D=>Reflect.apply(wy,null,[D,...z]),()=>gp(...z),"datetime format",D=>Reflect.apply(D.d,D,[...z]),()=>vy,D=>_e(D)||Vt(D))}function Oe(...z){return ge(D=>Reflect.apply(Ty,null,[D,...z]),()=>$p(...z),"number format",D=>Reflect.apply(D.n,D,[...z]),()=>vy,D=>_e(D)||Vt(D))}function Qe(z){return z.map(D=>_e(D)||Lt(D)||st(D)?Vy(String(D)):D)}const ye={normalize:Qe,interpolate:z=>z,type:"vnode"};function Se(...z){return ge(D=>{let be;const Ae=D;try{Ae.processor=ye,be=Reflect.apply(Xy,null,[Ae,...z])}finally{Ae.processor=null}return be},()=>Qp(...z),"translate",D=>D[yp](...z),D=>[Vy(D)],D=>Vt(D))}function qe(...z){return ge(D=>Reflect.apply(Ty,null,[D,...z]),()=>$p(...z),"number format",D=>D[vp](...z),Ey,D=>_e(D)||Vt(D))}function Ee(...z){return ge(D=>Reflect.apply(wy,null,[D,...z]),()=>gp(...z),"datetime format",D=>D[bp](...z),Ey,D=>_e(D)||Vt(D))}function He(z){S=z,P.pluralRules=S}function $t(z,D){return ge(()=>{if(!z)return!1;const be=_e(D)?D:a.value,Ae=E(be),tt=P.messageResolver(Ae,z);return or(tt)||oi(tt)||_e(tt)},()=>[z],"translate exists",be=>Reflect.apply(be.te,be,[z,D]),XZ,be=>st(be))}function Qt(z){let D=null;const be=zx(P,l.value,a.value);for(let Ae=0;Ae {o&&(a.value=z,P.locale=z,ja(P,a.value,l.value))}),Ze(e.fallbackLocale,z=>{o&&(l.value=z,P.fallbackLocale=z,ja(P,a.value,l.value))}));const ce={id:zy,locale:q,fallbackLocale:U,get inheritLocale(){return o},set inheritLocale(z){o=z,z&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,ja(P,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:A,get modifiers(){return v},get pluralRules(){return S||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(z){f=z,P.missingWarn=f},get fallbackWarn(){return d},set fallbackWarn(z){d=z,P.fallbackWarn=d},get fallbackRoot(){return h},set fallbackRoot(z){h=z},get fallbackFormat(){return p},set fallbackFormat(z){p=z,P.fallbackFormat=p},get warnHtmlMessage(){return y},set warnHtmlMessage(z){y=z,P.warnHtmlMessage=z},get escapeParameter(){return Q},set escapeParameter(z){Q=z,P.escapeParameter=z},t:ue,getLocaleMessage:E,setLocaleMessage:N,mergeLocaleMessage:ee,getPostTranslationHandler:fe,setPostTranslationHandler:J,getMissingHandler:re,setMissingHandler:se,[Nx]:He};return ce.datetimeFormats=K,ce.numberFormats=ae,ce.rt=te,ce.te=$t,ce.tm=k,ce.d=le,ce.n=Oe,ce.getDateTimeFormat=ne,ce.setDateTimeFormat=x,ce.mergeDateTimeFormat=R,ce.getNumberFormat=Z,ce.setNumberFormat=L,ce.mergeNumberFormat=G,ce[jx]=n,ce[yp]=Se,ce[bp]=Ee,ce[vp]=qe,ce}function AZ(t){const e=_e(t.locale)?t.locale:jl,n=_e(t.fallbackLocale)||Vt(t.fallbackLocale)||je(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,i=Pt(t.missing)?t.missing:void 0,r=st(t.silentTranslationWarn)||ma(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,s=st(t.silentFallbackWarn)||ma(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,o=st(t.fallbackRoot)?t.fallbackRoot:!0,a=!!t.formatFallbackMessages,l=je(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,u=Pt(t.postTranslation)?t.postTranslation:void 0,O=_e(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,f=!!t.escapeParameterHtml,d=st(t.sync)?t.sync:!0;let h=t.messages;if(je(t.sharedMessages)){const v=t.sharedMessages;h=Object.keys(v).reduce((P,w)=>{const T=P[w]||(P[w]={});return Gt(T,v[w]),P},h||{})}const{__i18n:p,__root:$,__injectWithOption:g}=t,b=t.datetimeFormats,y=t.numberFormats,Q=t.flatJson;return{locale:e,fallbackLocale:n,messages:h,flatJson:Q,datetimeFormats:b,numberFormats:y,missing:i,missingWarn:r,fallbackWarn:s,fallbackRoot:o,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:O,escapeParameter:f,messageResolver:t.messageResolver,inheritLocale:d,__i18n:p,__root:$,__injectWithOption:g}}function Pp(t={}){const e=Vg(AZ(t)),{__extender:n}=t,i={id:e.id,get locale(){return e.locale.value},set locale(r){e.locale.value=r},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(r){e.fallbackLocale.value=r},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(r){e.setMissingHandler(r)},get silentTranslationWarn(){return st(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(r){e.missingWarn=st(r)?!r:r},get silentFallbackWarn(){return st(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(r){e.fallbackWarn=st(r)?!r:r},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(r){e.fallbackFormat=r},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(r){e.setPostTranslationHandler(r)},get sync(){return e.inheritLocale},set sync(r){e.inheritLocale=r},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){e.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(r){e.escapeParameter=r},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...r){return Reflect.apply(e.t,e,[...r])},rt(...r){return Reflect.apply(e.rt,e,[...r])},te(r,s){return e.te(r,s)},tm(r){return e.tm(r)},getLocaleMessage(r){return e.getLocaleMessage(r)},setLocaleMessage(r,s){e.setLocaleMessage(r,s)},mergeLocaleMessage(r,s){e.mergeLocaleMessage(r,s)},d(...r){return Reflect.apply(e.d,e,[...r])},getDateTimeFormat(r){return e.getDateTimeFormat(r)},setDateTimeFormat(r,s){e.setDateTimeFormat(r,s)},mergeDateTimeFormat(r,s){e.mergeDateTimeFormat(r,s)},n(...r){return Reflect.apply(e.n,e,[...r])},getNumberFormat(r){return e.getNumberFormat(r)},setNumberFormat(r,s){e.setNumberFormat(r,s)},mergeNumberFormat(r,s){e.mergeNumberFormat(r,s)}};return i.__extender=n,i}function EZ(t,e,n){return{beforeCreate(){const i=Gl();if(!i)throw ei(Un.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const s=r.i18n;if(r.__i18n&&(s.__i18n=r.__i18n),s.__root=e,this===this.$root)this.$i18n=Zy(t,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Pp(s);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=Zy(t,r);else{this.$i18n=Pp({__i18n:r.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=t;r.__i18nGlobal&&Gx(e,r,r),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,o)=>this.$i18n.te(s,o),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=Gl();if(!i)throw ei(Un.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),n.__deleteInstance(i),delete this.$i18n}}}function Zy(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[Nx](e.pluralizationRules||t.pluralizationRules);const n=Xg(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(i=>t.mergeLocaleMessage(i,n[i])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(i=>t.mergeDateTimeFormat(i,e.datetimeFormats[i])),e.numberFormats&&Object.keys(e.numberFormats).forEach(i=>t.mergeNumberFormat(i,e.numberFormats[i])),t}const Ag={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function zZ({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((i,r)=>[...i,...r.type===ze?r.children:[r]],[]):e.reduce((n,i)=>{const r=t[i];return r&&(n[i]=r()),n},ft())}function Fx(){return ze}const qZ=M({name:"i18n-t",props:Gt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>Lt(t)||!isNaN(t)}},Ag),setup(t,e){const{slots:n,attrs:i}=e,r=t.i18n||_o({useScope:t.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(O=>O[0]!=="_"),o=ft();t.locale&&(o.locale=t.locale),t.plural!==void 0&&(o.plural=_e(t.plural)?+t.plural:t.plural);const a=zZ(e,s),l=r[yp](t.keypath,a,o),c=Gt(ft(),i),u=_e(t.tag)||at(t.tag)?t.tag:Fx();return wn(u,c,l)}}}),Yy=qZ;function ZZ(t){return Vt(t)&&!_e(t[0])}function Hx(t,e,n,i){const{slots:r,attrs:s}=e;return()=>{const o={part:!0};let a=ft();t.locale&&(o.locale=t.locale),_e(t.format)?o.key=t.format:at(t.format)&&(_e(t.format.key)&&(o.key=t.format.key),a=Object.keys(t.format).reduce((f,d)=>n.includes(d)?Gt(ft(),f,{[d]:t.format[d]}):f,ft()));const l=i(t.value,o,a);let c=[o.key];Vt(l)?c=l.map((f,d)=>{const h=r[f.type],p=h?h({[f.type]:f.value,index:d,parts:l}):[f.value];return ZZ(p)&&(p[0].key=`${f.type}-${d}`),p}):_e(l)&&(c=[l]);const u=Gt(ft(),s),O=_e(t.tag)||at(t.tag)?t.tag:Fx();return wn(O,u,c)}}const YZ=M({name:"i18n-n",props:Gt({value:{type:Number,required:!0},format:{type:[String,Object]}},Ag),setup(t,e){const n=t.i18n||_o({useScope:t.scope,__useComponent:!0});return Hx(t,e,Dx,(...i)=>n[vp](...i))}}),My=YZ;function MZ(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const i=n.__getInstance(e);return i!=null?i.__composer:t.global.__composer}}function IZ(t){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw ei(Un.UNEXPECTED_ERROR);const c=MZ(t,a.$),u=Iy(l);return[Reflect.apply(c.t,c,[...Uy(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);VO&&t.global===c&&(o.__i18nWatcher=Ze(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{VO&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=Iy(a);o.textContent=Reflect.apply(l.t,l,[...Uy(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function Iy(t){if(_e(t))return{path:t};if(je(t)){if(!("path"in t))throw ei(Un.REQUIRED_VALUE,"path");return t}else throw ei(Un.INVALID_VALUE)}function Uy(t){const{path:e,locale:n,args:i,choice:r,plural:s}=t,o={},a=i||{};return _e(n)&&(o.locale=n),Lt(r)&&(o.plural=r),Lt(s)&&(o.plural=s),[e,a,o]}function UZ(t,e,...n){const i=je(n[0])?n[0]:{};(st(i.globalInstall)?i.globalInstall:!0)&&([Yy.name,"I18nT"].forEach(s=>t.component(s,Yy)),[My.name,"I18nN"].forEach(s=>t.component(s,My)),[Ly.name,"I18nD"].forEach(s=>t.component(s,Ly))),t.directive("t",IZ(e))}const DZ=Zs("global-vue-i18n");function LZ(t={}){const e=__VUE_I18N_LEGACY_API__&&st(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,n=st(t.globalInjection)?t.globalInjection:!0,i=new Map,[r,s]=WZ(t,e),o=Zs("");function a(O){return i.get(O)||null}function l(O,f){i.set(O,f)}function c(O){i.delete(O)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&e?"legacy":"composition"},async install(O,...f){if(O.__VUE_I18N_SYMBOL__=o,O.provide(O.__VUE_I18N_SYMBOL__,u),je(f[0])){const p=f[0];u.__composerExtend=p.__composerExtend,u.__vueI18nExtend=p.__vueI18nExtend}let d=null;!e&&n&&(d=JZ(O,u.global)),__VUE_I18N_FULL_INSTALL__&&UZ(O,u,...f),__VUE_I18N_LEGACY_API__&&e&&O.mixin(EZ(s,s.__composer,u));const h=O.unmount;O.unmount=()=>{d&&d(),u.dispose(),h()}},get global(){return s},dispose(){r.stop()},__instances:i,__getInstance:a,__setInstance:l,__deleteInstance:c};return u}function _o(t={}){const e=Gl();if(e==null)throw ei(Un.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw ei(Un.NOT_INSTALLED);const n=NZ(e),i=BZ(n),r=Bx(e),s=jZ(t,r);if(s==="global")return Gx(i,t,r),i;if(s==="parent"){let l=GZ(n,e,t.__useComponent);return l==null&&(l=i),l}const o=n;let a=o.__getInstance(e);if(a==null){const l=Gt({},t);"__i18n"in r&&(l.__i18n=r.__i18n),i&&(l.__root=i),a=Vg(l),o.__composerExtend&&(a[Sp]=o.__composerExtend(a)),HZ(o,e,a),o.__setInstance(e,a)}return a}function WZ(t,e){const n=ka(),i=__VUE_I18N_LEGACY_API__&&e?n.run(()=>Pp(t)):n.run(()=>Vg(t));if(i==null)throw ei(Un.UNEXPECTED_ERROR);return[n,i]}function NZ(t){const e=xn(t.isCE?DZ:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw ei(t.isCE?Un.NOT_INSTALLED_WITH_PROVIDE:Un.UNEXPECTED_ERROR);return e}function jZ(t,e){return Bf(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function BZ(t){return t.mode==="composition"?t.global:t.global.__composer}function GZ(t,e,n=!1){let i=null;const r=e.root;let s=FZ(e,n);for(;s!=null;){const o=t;if(t.mode==="composition")i=o.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(s);a!=null&&(i=a.__composer,n&&i&&!i[jx]&&(i=null))}if(i!=null||r===s)break;s=s.parent}return i}function FZ(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function HZ(t,e,n){dt(()=>{},e),qi(()=>{const i=n;t.__deleteInstance(e);const r=i[Sp];r&&(r(),delete i[Sp])},e)}const KZ=["locale","fallbackLocale","availableLocales"],Dy=["t","rt","d","n","tm","te"];function JZ(t,e){const n=Object.create(null);return KZ.forEach(r=>{const s=Object.getOwnPropertyDescriptor(e,r);if(!s)throw ei(Un.UNEXPECTED_ERROR);const o=et(s.value)?{get(){return s.value.value},set(a){s.value.value=a}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,r,o)}),t.config.globalProperties.$i18n=n,Dy.forEach(r=>{const s=Object.getOwnPropertyDescriptor(e,r);if(!s||!s.value)throw ei(Un.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${r}`,s)}),()=>{delete t.config.globalProperties.$i18n,Dy.forEach(r=>{delete t.config.globalProperties[`$${r}`]})}}const eY=M({name:"i18n-d",props:Gt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Ag),setup(t,e){const n=t.i18n||_o({useScope:t.scope,__useComponent:!0});return Hx(t,e,Ux,(...i)=>n[bp](...i))}}),Ly=eY;CZ();cZ(Lq);uZ(oZ);OZ(zx);if(__INTLIFY_PROD_DEVTOOLS__){const t=Ks();t.__INTLIFY__=!0,Wq(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const tY={class:"flex flex-col p-3 gap-3 overflow-y-auto"},nY={class:"flex flex-row gap-2"},iY={class:"flex items-center space-x-2"},rY={class:"flex items-center space-x-2"},sY={class:"font-bold my-2"},oY=["onDragstart"],aY=M({__name:"Library",setup(t){const{locale:e}=_o(),n=zt();let i=H(!1);function r(l,c){l.dataTransfer&&(l.dataTransfer.dropEffect="move",l.dataTransfer.effectAllowed="move",l.dataTransfer.setData("itemId",c)),n.setDragMode("insert")}function s(){n.setShowLoadLayoutDialog(!0)}Ze(i,l=>{l===!1?n.setShowPreview(!1):n.setShowPreview(!0)});const o=H([{category:"cms_elements",elements:[{id:"6",name:"headline",icon:XV},{id:"4",name:"text",icon:AV},{id:"9",name:"media",icon:xV}]},{category:"form_elements",elements:[{id:"5",name:"textarea",icon:VV},{id:"2",name:"input",icon:EV},{id:"3",name:"select",icon:RV},{id:"1",name:"hidden",icon:CV}]},{category:"structure_elements",elements:[{id:"12",name:"fieldset",icon:TV},{id:"7",name:"row",icon:zV}]}]),a=l=>wn(l,{class:"w-5 h-5"});return(l,c)=>(_(),W("div",tY,[Y("div",nY,[Y("div",iY,[vo(Y("select",{"onUpdate:modelValue":c[0]||(c[0]=u=>et(e)?e.value=u:null)},[...c[4]||(c[4]=[Y("option",{value:"de"},"DE",-1),Y("option",{value:"en"},"EN",-1)])],512),[[Xf,m(e)]])]),Y("div",rY,[X(m(eq),{id:"preview-mode",modelValue:m(i),"onUpdate:modelValue":c[1]||(c[1]=u=>et(i)?i.value=u:i=u)},null,8,["modelValue"]),X(m(xg),{for:"preview-mode"},{default:V(()=>[Ce(B(l.$t("preview_mode")),1)]),_:1})])]),Y("div",null,[X(m(Et),{onClick:s,class:"w-full"},{default:V(()=>[Ce(B(l.$t("load_layout")),1)]),_:1})]),(_(!0),W(ze,null,kt(o.value,u=>(_(),W("div",{key:u.category},[Y("h3",sY,B(l.$t(u.category)),1),(_(!0),W(ze,null,kt(u.elements,O=>(_(),W("div",{key:O.id,class:"border-1 p-2 w-full flex flex-row gap-2 cursor-grab",draggable:"true",onDragstart:f=>r(f,O.id),onDragenter:c[2]||(c[2]=cn(()=>{},["prevent"])),onDragover:c[3]||(c[3]=cn(()=>{},["prevent"]))},[(_(),I(Tf(a(O.icon)))),Y("span",null,B(l.$t(O.name)),1)],40,oY))),128))]))),128))]))}}),Je=M({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=X1(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue});return(s,o)=>vo((_(),W("input",{"onUpdate:modelValue":o[0]||(o[0]=a=>et(r)?r.value=a:null),"data-slot":"input",class:wt(m(Fe)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n.class))},null,2)),[[Oo,m(r)]])}}),lY=M({__name:"Checkbox",props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},value:{},id:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,r=ht(n,"class"),s=Dn(r,i);return(o,a)=>(_(),I(m(pE),ve({"data-slot":"checkbox"},m(s),{class:m(Fe)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:V(()=>[X(m(gE),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:V(()=>[oe(o.$slots,"default",{},()=>[X(m(V1),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),cY={class:"form-check-label",for:"flexSwitchCheckDefault"},uY=M({__name:"InputElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(_(),W(ze,null,[Y("label",null,B(s.$t("id")),1),X(m(Je),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("placeholder")),1),X(m(Je),{modelValue:r.value.placeHolder,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.placeHolder=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("default")),1),X(m(Je),{modelValue:r.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.default=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("name")),1),X(m(Je),{modelValue:r.value.name,"onUpdate:modelValue":o[3]||(o[3]=a=>r.value.name=a)},null,8,["modelValue"]),X(m(lY),{modelValue:r.value.required,"onUpdate:modelValue":o[4]||(o[4]=a=>r.value.required=a)},null,8,["modelValue"]),Y("label",cY,B(s.$t("required")),1),Y("label",null,B(s.$t("min")),1),X(m(Je),{modelValue:r.value.minValue,"onUpdate:modelValue":o[5]||(o[5]=a=>r.value.minValue=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("max")),1),X(m(Je),{modelValue:r.value.maxValue,"onUpdate:modelValue":o[6]||(o[6]=a=>r.value.maxValue=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("min_calc")),1),X(m(Je),{modelValue:r.value.minCalc,"onUpdate:modelValue":o[7]||(o[7]=a=>r.value.minCalc=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("max_calc")),1),X(m(Je),{modelValue:r.value.maxCalc,"onUpdate:modelValue":o[8]||(o[8]=a=>r.value.maxCalc=a)},null,8,["modelValue"])],64))}}),wc=M({__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:e}){const r=Dn(t,e);return(s,o)=>(_(),I(m(ME),ve({"data-slot":"select"},m(r)),{default:V(()=>[oe(s.$slots,"default")]),_:3},16))}}),_c=M({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:e}){const n=t,i=e,r=ht(n,"class"),s=Dn(r,i);return(o,a)=>(_(),I(m(p8),null,{default:V(()=>[X(m(t8),ve({"data-slot":"select-content"},{...m(s),...o.$attrs},{class:m(Fe)("bg-popover text-popover-foreground 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 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",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:V(()=>[X(m(dY)),X(m(w8),{class:wt(m(Fe)("p-1",t.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:V(()=>[oe(o.$slots,"default")]),_:3},8,["class"]),X(m(fY))]),_:3},16,["class"])]),_:3}))}}),Hf=M({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,i)=>(_(),I(m(r8),ve({"data-slot":"select-group"},e),{default:V(()=>[oe(n.$slots,"default")]),_:3},16))}}),OY={class:"absolute right-2 flex size-3.5 items-center justify-center"},ai=M({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class"),i=gi(n);return(r,s)=>(_(),I(m(c8),ve({"data-slot":"select-item"},m(i),{class:m(Fe)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e.class)}),{default:V(()=>[Y("span",OY,[X(m(O8),null,{default:V(()=>[X(m(V1),{class:"size-4"})]),_:1})]),X(m(d8),null,{default:V(()=>[oe(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),fY=M({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class"),i=gi(n);return(r,s)=>(_(),I(m($8),ve({"data-slot":"select-scroll-down-button"},m(i),{class:m(Fe)("flex cursor-default items-center justify-center py-1",e.class)}),{default:V(()=>[oe(r.$slots,"default",{},()=>[X(m(tg),{class:"size-4"})])]),_:3},16,["class"]))}}),dY=M({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class"),i=gi(n);return(r,s)=>(_(),I(m(y8),ve({"data-slot":"select-scroll-up-button"},m(i),{class:m(Fe)("flex cursor-default items-center justify-center py-1",e.class)}),{default:V(()=>[oe(r.$slots,"default",{},()=>[X(m(yV),{class:"size-4"})])]),_:3},16,["class"]))}}),Tc=M({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},size:{default:"default"}},setup(t){const e=t,n=ht(e,"class","size"),i=gi(n);return(r,s)=>(_(),I(m(v8),ve({"data-slot":"select-trigger","data-size":t.size},m(i),{class:m(Fe)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)}),{default:V(()=>[oe(r.$slots,"default"),X(m(o8),{"as-child":""},{default:V(()=>[X(m(tg),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),kc=M({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,i)=>(_(),I(m(P8),ve({"data-slot":"select-value"},e),{default:V(()=>[oe(n.$slots,"default")]),_:3},16))}}),hY=M({__name:"SelectElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=zt(),s=j({get:()=>n.modelValue,set:o=>i("update:modelValue",o)});return(o,a)=>(_(),W(ze,null,[Y("label",null,B(o.$t("id")),1),X(m(Je),{modelValue:s.value.id,"onUpdate:modelValue":a[0]||(a[0]=l=>s.value.id=l)},null,8,["modelValue"]),Y("label",null,B(o.$t("default")),1),X(m(Je),{modelValue:s.value.default,"onUpdate:modelValue":a[1]||(a[1]=l=>s.value.default=l)},null,8,["modelValue"]),Y("label",null,B(o.$t("name")),1),X(m(Je),{modelValue:s.value.name,"onUpdate:modelValue":a[2]||(a[2]=l=>s.value.name=l)},null,8,["modelValue"]),Y("label",null,B(o.$t("mode")),1),X(m(wc),{modelValue:s.value.mode,"onUpdate:modelValue":a[3]||(a[3]=l=>s.value.mode=l)},{default:V(()=>[X(m(Tc),null,{default:V(()=>[X(m(kc))]),_:1}),X(m(_c),null,{default:V(()=>[X(m(Hf),null,{default:V(()=>[X(m(ai),{value:"normal"},{default:V(()=>[Ce(B(o.$t("normal")),1)]),_:1}),X(m(ai),{value:"paperdb"},{default:V(()=>[Ce(B(o.$t("paperdb")),1)]),_:1}),X(m(ai),{value:"colordb"},{default:V(()=>[Ce(B(o.$t("colordb")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),Y("label",null,B(o.$t("container")),1),X(m(Je),{modelValue:s.value.container,"onUpdate:modelValue":a[4]||(a[4]=l=>s.value.container=l)},null,8,["modelValue"]),X(m(Et),{class:"mt-2",onClick:a[5]||(a[5]=l=>m(r).setShowOptions(!0))},{default:V(()=>[Ce(B(o.$t("edit_options")),1)]),_:1})],64))}}),Rc=M({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const r=Dn(t,e);return(s,o)=>(_(),I(m(D1),ve({"data-slot":"dialog"},m(r)),{default:V(()=>[oe(s.$slots,"default")]),_:3},16))}}),pY=M({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,i)=>(_(),I(m(ag),ve({"data-slot":"dialog-close"},e),{default:V(()=>[oe(n.$slots,"default")]),_:3},16))}}),mY=M({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(_(),I(m(H1),ve({"data-slot":"dialog-overlay"},m(n),{class:m(Fe)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e.class)}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}}),Cc=M({__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:e}){const n=t,i=e,r=ht(n,"class"),s=Dn(r,i);return(o,a)=>(_(),I(m(J1),null,{default:V(()=>[X(mY),X(m(G1),ve({"data-slot":"dialog-content"},m(s),{class:m(Fe)("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",n.class)}),{default:V(()=>[oe(o.$slots,"default"),X(m(ag),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},{default:V(()=>[X(m(E1)),a[0]||(a[0]=Y("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["class"])]),_:3}))}}),Kf=M({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class"),i=gi(n);return(r,s)=>(_(),I(m(F1),ve({"data-slot":"dialog-description"},m(i),{class:m(Fe)("text-muted-foreground text-sm",e.class)}),{default:V(()=>[oe(r.$slots,"default")]),_:3},16,["class"]))}}),Eg=M({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(_(),W("div",{"data-slot":"dialog-footer",class:wt(m(Fe)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e.class))},[oe(n.$slots,"default")],2))}}),Jf=M({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(_(),W("div",{"data-slot":"dialog-header",class:wt(m(Fe)("flex flex-col gap-2 text-center sm:text-left",e.class))},[oe(n.$slots,"default")],2))}}),ed=M({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class"),i=gi(n);return(r,s)=>(_(),I(m(eP),ve({"data-slot":"dialog-title"},m(i),{class:m(Fe)("text-lg leading-none font-semibold",e.class)}),{default:V(()=>[oe(r.$slots,"default")]),_:3},16,["class"]))}}),gY=M({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,i)=>(_(),I(m(B5),ve({"data-slot":"dialog-trigger"},e),{default:V(()=>[oe(n.$slots,"default")]),_:3},16))}}),$Y=M({__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:e}){const n=t,i=e,r=ht(n,"class"),s=Dn(r,i);return(o,a)=>(_(),I(m(PE),ve({"data-slot":"pagination"},m(s),{class:m(Fe)("mx-auto flex w-full justify-center",n.class)}),{default:V(l=>[oe(o.$slots,"default",yo(As(l)))]),_:3},16,["class"]))}}),QY=M({__name:"PaginationContent",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(_(),I(m(TE),ve({"data-slot":"pagination-content"},m(n),{class:m(Fe)("flex flex-row items-center gap-1",e.class)}),{default:V(s=>[oe(i.$slots,"default",yo(As(s)))]),_:3},16,["class"]))}}),yY=M({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(_(),I(m(bE),ve({"data-slot":"pagination-ellipsis"},m(n),{class:m(Fe)("flex size-9 items-center justify-center",e.class)}),{default:V(()=>[oe(i.$slots,"default",{},()=>[X(m(vV),{class:"size-4"}),r[0]||(r[0]=Y("span",{class:"sr-only"},"More pages",-1))])]),_:3},16,["class"]))}}),bY=M({__name:"PaginationItem",props:{value:{},asChild:{type:Boolean},as:{},size:{default:"icon"},class:{type:[Boolean,null,String,Object,Array]},isActive:{type:Boolean}},setup(t){const e=t,n=ht(e,"class","size","isActive");return(i,r)=>(_(),I(m(RE),ve({"data-slot":"pagination-item"},m(n),{class:m(Fe)(m(jf)({variant:t.isActive?"outline":"ghost",size:t.size}),e.class)}),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}}),vY=M({__name:"PaginationNext",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class","size"),i=gi(n);return(r,s)=>(_(),I(m(XE),ve({"data-slot":"pagination-next",class:m(Fe)(m(jf)({variant:"ghost",size:t.size}),"gap-1 px-2.5 sm:pr-2.5",e.class)},m(i)),{default:V(()=>[oe(r.$slots,"default",{},()=>[s[0]||(s[0]=Y("span",{class:"hidden sm:block"},"Next",-1)),X(m(A1))])]),_:3},16,["class"]))}}),SY=M({__name:"PaginationPrevious",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class","size"),i=gi(n);return(r,s)=>(_(),I(m(AE),ve({"data-slot":"pagination-previous",class:m(Fe)(m(jf)({variant:"ghost",size:t.size}),"gap-1 px-2.5 sm:pr-2.5",e.class)},m(i)),{default:V(()=>[oe(r.$slots,"default",{},()=>[X(m(QV)),s[0]||(s[0]=Y("span",{class:"hidden sm:block"},"Previous",-1))])]),_:3},16,["class"]))}}),PY={class:"w-full"},xY={key:0,class:"ml-4"},wY=M({__name:"FolderTree",props:{folders:{},selectedFolderId:{}},emits:["select-folder"],setup(t,{emit:e}){const n=e,i=r=>{n("select-folder",r)};return(r,s)=>{const o=_f("FolderTree",!0);return _(),W("ul",PY,[(_(!0),W(ze,null,kt(t.folders,a=>(_(),W("li",{key:a.uuid},[X(m(Et),{variant:a.uuid===t.selectedFolderId?"secondary":"ghost",onClick:l=>i(a.uuid),class:"w-full justify-start"},{default:V(()=>[Ce(B(a.title),1)]),_:2},1032,["variant","onClick"]),a.subFolders&&a.subFolders.length>0?(_(),W("div",xY,[X(o,{folders:a.subFolders,"selected-folder-id":t.selectedFolderId,onSelectFolder:i},null,8,["folders","selected-folder-id"])])):de("",!0)]))),128))])}}}),_Y={class:"h-[70vh] flex flex-col"},TY={class:"h-full overflow-y-auto p-6"},kY={class:"flex flex-col h-full p-6"},RY={class:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4 flex-grow"},CY=["onClick"],XY=["src","alt"],VY={class:"mt-4 flex justify-center"},AY=M({__name:"MediaBrowser",emits:["select-media"],setup(t,{emit:e}){const n=e,i=H([]),r=d=>{console.log(d),n("select-media",d)},s=H([]),o=H(null),a=H(1),l=H(0),c=async()=>{try{const d=await gx();i.value=d.data,i.value.length>0&&O(i.value[0].uuid)}catch(d){console.error("Failed to fetch folders",d)}},u=async(d,h=1)=>{try{const p=await Wz(d,h);s.value=p.data,a.value=p.currentPage,l.value=p.count}catch(p){console.error(`Failed to fetch media for folder ${d}`,p)}},O=d=>{o.value=d,u(d,1)},f=d=>{o.value&&u(o.value,d)};return dt(()=>{c()}),(d,h)=>(_(),W("div",_Y,[h[0]||(h[0]=Y("h1",{class:"text-2xl font-bold mb-4"},"Media Browser",-1)),X(m(lp),{direction:"horizontal",class:"flex-grow rounded-lg border"},{default:V(()=>[X(m(us),{"default-size":25},{default:V(()=>[Y("div",TY,[X(wY,{folders:i.value,"selected-folder-id":o.value,onSelectFolder:O},null,8,["folders","selected-folder-id"])])]),_:1}),X(m(ol)),X(m(us),{"default-size":75},{default:V(()=>[Y("div",kY,[Y("div",RY,[(_(!0),W(ze,null,kt(s.value,p=>(_(),W("div",{key:p.uuid,class:"aspect-square bg-gray-100 rounded-lg overflow-hidden cursor-pointer",onClick:$=>r(p)},[Y("img",{src:p.url,alt:p.name,class:"w-full h-full object-cover"},null,8,XY)],8,CY))),128))]),Y("div",VY,[l.value>12?(_(),I(m($Y),{key:0,"items-per-page":12,total:l.value,"sibling-count":1,"show-edges":"","default-page":a.value,"onUpdate:page":f},{default:V(()=>[X(m(QY),{class:"flex items-center gap-1"},{default:V(({items:p})=>[X(m(SY)),(_(!0),W(ze,null,kt(p,($,g)=>(_(),W(ze,null,[$.type==="page"?(_(),I(m(bY),{key:g,value:$.value,"as-child":""},{default:V(()=>[X(m(Et),{class:"w-10 h-10 p-0",variant:$.value===a.value?"default":"outline"},{default:V(()=>[Ce(B($.value),1)]),_:2},1032,["variant"])]),_:2},1032,["value"])):(_(),I(m(yY),{key:$.type,index:g},null,8,["index"]))],64))),256)),X(m(vY))]),_:1})]),_:1},8,["total","default-page"])):de("",!0)])])]),_:1})]),_:1})]))}}),EY={for:"dropzone-file",class:"flex flex-col items-center justify-center w-full h-32 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"},zY={class:"flex items-center justify-center w-full"},qY=["value"],ZY={key:0,class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},YY=M({__name:"MediaElement",props:{modelValue:yx},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:$=>i("update:modelValue",$)}),s=H(!1),o=H(0),a=$=>{r.value.default=$.uuid,r.value.url=$.url,s.value=!1},l=H(!1),c=H([]),u=H(""),O=()=>{l.value=!0},f=()=>{l.value=!1},d=$=>{var b;l.value=!1;const g=(b=$.dataTransfer)==null?void 0:b.files;g&&g.length>0&&p(g[0])},h=$=>{const b=$.target.files;b&&b.length>0&&p(b[0])};dt(async()=>{try{let $=await gx();c.value=$.data,$.data.length>0&&(u.value=c.value[0].uuid)}catch($){console.error("Failed to fetch directories",$)}});const p=async $=>{if(o.value=0,u)try{let g=await Lz($,u.value,b=>{o.value=b});r.value.url=g.url,r.value.default=g.uuid}catch(g){console.error("Upload failed",g)}finally{setTimeout(()=>o.value=0,2e3)}};return($,g)=>(_(),W("div",null,[Y("label",null,B($.$t("id")),1),X(m(Je),{modelValue:r.value.id,"onUpdate:modelValue":g[0]||(g[0]=b=>r.value.id=b)},null,8,["modelValue"]),X(m(Rc),{open:s.value,"onUpdate:open":g[1]||(g[1]=b=>s.value=b)},{default:V(()=>[X(m(gY),{"as-child":""},{default:V(()=>[X(m(Et),{class:"my-2 w-full"},{default:V(()=>[...g[3]||(g[3]=[Ce("Mediabrowser",-1)])]),_:1})]),_:1}),X(m(Cc),{class:"sm:max-w-5xl max-h-[80vh] overflow-y-auto"},{default:V(()=>[X(AY,{onSelectMedia:a})]),_:1})]),_:1},8,["open"]),Y("div",{class:wt(["flex items-center justify-center w-full",{"border-blue-500":l.value}]),onDragover:cn(O,["prevent"]),onDragleave:cn(f,["prevent"]),onDrop:cn(d,["prevent"])},[Y("label",EY,[g[4]||(g[4]=Fm(' ',1)),Y("input",{id:"dropzone-file",type:"file",class:"hidden",onChange:h},null,32)])],34),Y("div",zY,[vo(Y("select",{"onUpdate:modelValue":g[2]||(g[2]=b=>u.value=b),class:"w-full p-2 border rounded-md"},[(_(!0),W(ze,null,kt(c.value,b=>(_(),W("option",{key:b.uuid,value:b.uuid},B(b.title),9,qY))),128))],512),[[Xf,u.value]])]),o.value>0?(_(),W("div",ZY,[Y("div",{class:"bg-blue-600 h-2.5 rounded-full",style:ti({width:o.value+"%"})},null,4)])):de("",!0)]))}}),MY=M({__name:"FieldsetElement",props:{modelValue:bx},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(_(),W(ze,null,[Y("label",null,B(s.$t("id")),1),X(m(Je),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("label")),1),X(m(Je),{modelValue:r.value.label,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.label=a)},null,8,["modelValue"])],64))}}),IY=M({__name:"HiddenElement",props:{modelValue:vx},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(_(),W(ze,null,[Y("label",null,B(s.$t("id")),1),X(m(Je),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("default")),1),X(m(Je),{modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("name")),1),X(m(Je),{modelValue:r.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.name=a)},null,8,["modelValue"])],64))}}),zg=M({__name:"Textarea",props:{class:{type:[Boolean,null,String,Object,Array]},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=X1(n,"modelValue",e,{passive:!0,defaultValue:n.defaultValue});return(s,o)=>vo((_(),W("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>et(r)?r.value=a:null),"data-slot":"textarea",class:wt(m(Fe)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n.class))},null,2)),[[Oo,m(r)]])}}),UY=M({__name:"TextElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(_(),W(ze,null,[Y("label",null,B(s.$t("id")),1),X(m(Je),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("name")),1),X(m(Je),{modelValue:r.value.name,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.name=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("default")),1),X(m(zg),{modelValue:r.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.default=a)},null,8,["modelValue"])],64))}}),DY=M({__name:"TextareaElement",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(_(),W(ze,null,[Y("label",null,B(s.$t("id")),1),X(m(Je),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("name")),1),X(m(Je),{modelValue:r.value.name,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.name=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("default")),1),X(m(zg),{modelValue:r.value.default,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.default=a)},null,8,["modelValue"])],64))}}),LY=M({__name:"HeadlineElement",props:{modelValue:xx},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(_(),W(ze,null,[Y("label",null,B(s.$t("id")),1),X(m(Je),{modelValue:r.value.id,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value.id=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("default")),1),X(m(Je),{modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("name")),1),X(m(Je),{modelValue:r.value.name,"onUpdate:modelValue":o[2]||(o[2]=a=>r.value.name=a)},null,8,["modelValue"]),Y("label",null,B(s.$t("variant")),1),X(m(wc),{modelValue:r.value.variant,"onUpdate:modelValue":o[3]||(o[3]=a=>r.value.variant=a)},{default:V(()=>[X(m(Tc),null,{default:V(()=>[X(m(kc))]),_:1}),X(m(_c),null,{default:V(()=>[X(m(Hf),null,{default:V(()=>[X(m(ai),{value:"1"},{default:V(()=>[Ce(B(s.$t("headline1")),1)]),_:1}),X(m(ai),{value:"2"},{default:V(()=>[Ce(B(s.$t("headline2")),1)]),_:1}),X(m(ai),{value:"3"},{default:V(()=>[Ce(B(s.$t("headline3")),1)]),_:1}),X(m(ai),{value:"4"},{default:V(()=>[Ce(B(s.$t("headline4")),1)]),_:1}),X(m(ai),{value:"5"},{default:V(()=>[Ce(B(s.$t("headline5")),1)]),_:1}),X(m(ai),{value:"6"},{default:V(()=>[Ce(B(s.$t("headline6")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),WY=M({__name:"RowElement",props:{modelValue:Qx},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:o=>i("update:modelValue",o)});function s(o){o!==null&&o.addColumnAtTheEnd(new oo)}return(o,a)=>(_(),I(m(Et),{onClick:a[0]||(a[0]=l=>s(r.value))},{default:V(()=>[Ce(B(o.$t("add_column")),1)]),_:1}))}}),NY=M({__name:"Sheet",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const r=Dn(t,e);return(s,o)=>(_(),I(m(D1),ve({"data-slot":"sheet"},m(r)),{default:V(()=>[oe(s.$slots,"default")]),_:3},16))}}),jY=M({__name:"SheetOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(_(),I(m(H1),ve({"data-slot":"sheet-overlay",class:m(Fe)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e.class)},m(n)),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}}),BY=M({inheritAttrs:!1,__name:"SheetContent",props:{class:{type:[Boolean,null,String,Object,Array]},side:{default:"right"},forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,i=e,r=ht(n,"class","side"),s=Dn(r,i);return(o,a)=>(_(),I(m(J1),null,{default:V(()=>[X(jY),X(m(G1),ve({"data-slot":"sheet-content",class:m(Fe)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",t.side==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",t.side==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",t.side==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",t.side==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",n.class)},{...m(s),...o.$attrs}),{default:V(()=>[oe(o.$slots,"default"),X(m(ag),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"},{default:V(()=>[X(m(E1),{class:"size-4"}),a[0]||(a[0]=Y("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["class"])]),_:3}))}}),GY=M({__name:"SheetDescription",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(_(),I(m(F1),ve({"data-slot":"sheet-description",class:m(Fe)("text-muted-foreground text-sm",e.class)},m(n)),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}}),FY=M({__name:"SheetHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(_(),W("div",{"data-slot":"sheet-header",class:wt(m(Fe)("flex flex-col gap-1.5 p-4",e.class))},[oe(n.$slots,"default")],2))}}),HY=M({__name:"SheetTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=ht(e,"class");return(i,r)=>(_(),I(m(eP),ve({"data-slot":"sheet-title",class:m(Fe)("text-foreground font-semibold",e.class)},m(n)),{default:V(()=>[oe(i.$slots,"default")]),_:3},16,["class"]))}}),KY={class:"flex flex-col w-full p-2"},JY=M({__name:"ElementProperties",emits:["update:modelValue"],setup(t,{emit:e}){let n=H(!1);const i=zt();return i.$subscribe((r,s)=>{s.showProperties&&(n.value=!0)}),Ze(n,r=>{r===!1&&i.setShowProperties(!1)}),(r,s)=>(_(),I(m(NY),{open:m(n),"onUpdate:open":s[9]||(s[9]=o=>et(n)?n.value=o:n=o)},{default:V(()=>[X(m(BY),null,{default:V(()=>[X(m(FY),null,{default:V(()=>[X(m(HY),null,{default:V(()=>[...s[10]||(s[10]=[Ce("Properties",-1)])]),_:1}),X(m(GY))]),_:1}),Y("div",KY,[m(i).getActiveItem.type===6?(_(),I(LY,{key:0,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[0]||(s[0]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):de("",!0),m(i).getActiveItem.type===9?(_(),I(YY,{key:1,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[1]||(s[1]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):de("",!0),m(i).getActiveItem.type===7?(_(),I(WY,{key:2,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[2]||(s[2]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):de("",!0),m(i).getActiveItem.type===5?(_(),I(DY,{key:3,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[3]||(s[3]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):de("",!0),m(i).getActiveItem.type===4?(_(),I(UY,{key:4,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[4]||(s[4]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):de("",!0),m(i).getActiveItem.type===12?(_(),I(MY,{key:5,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[5]||(s[5]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):de("",!0),m(i).getActiveItem.type===3?(_(),I(hY,{key:6,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[6]||(s[6]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):de("",!0),m(i).getActiveItem.type===2?(_(),I(uY,{key:7,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[7]||(s[7]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):de("",!0),m(i).getActiveItem.type===1?(_(),I(IY,{key:8,modelValue:m(i).getActiveItem,"onUpdate:modelValue":s[8]||(s[8]=o=>m(i).getActiveItem=o)},null,8,["modelValue"])):de("",!0)])]),_:1})]),_:1},8,["open"]))}}),eM={class:"overflow-auto h-full w-full"},tM=M({__name:"ElementDependency",setup(t){const e=zt();let n=H(!1);function i(){e.getActiveItem.addDependency(new Xa)}return e.$subscribe((r,s)=>{s.showDependency&&(n.value=!0)}),Ze(n,r=>{r===!1&&e.setShowDependency(!1)}),(r,s)=>(_(),I(m(Rc),{class:"w-full h-full",open:m(n),"onUpdate:open":s[1]||(s[1]=o=>et(n)?n.value=o:n=o)},{default:V(()=>[X(m(Cc),{class:"h-full"},{default:V(()=>[X(m(Jf),null,{default:V(()=>[X(m(ed),null,{default:V(()=>[...s[2]||(s[2]=[Ce("Dependencys",-1)])]),_:1}),X(m(Kf))]),_:1}),Y("div",eM,[X(m(Et),{onClick:s[0]||(s[0]=o=>i())},{default:V(()=>[...s[3]||(s[3]=[Ce("Add Dependency",-1)])]),_:1}),X(m(qg),{dependencys:m(e).getActiveItem.dependencys},null,8,["dependencys"])]),X(m(Eg))]),_:1})]),_:1},8,["open"]))}}),nM={class:"w-full"},iM=M({__name:"ElementBorder",props:{dependency:{}},setup(t){return(e,n)=>(_(),W("div",nM,[X(m(sM),{borders:t.dependency.borders},null,8,["borders"])]))}}),rM={class:"flex flex-row items-center gap-2 border-l-3 border-black pt-1"},sM=M({__name:"Border",props:{borders:{}},setup(t){function e(n){n.addDependency(new Xa)}return(n,i)=>(_(!0),W(ze,null,kt(t.borders,r=>(_(),W("div",{class:"flex flex-col",key:r.uuid},[Y("div",rM,[i[1]||(i[1]=Y("span",{class:"w-5 flex-none"},[Y("hr",{class:"bg-black h-1 border-0"})],-1)),X(m(Je),{modelValue:r.formula,"onUpdate:modelValue":s=>r.formula=s,placeholder:"Formula"},null,8,["modelValue","onUpdate:modelValue"]),X(m(Je),{modelValue:r.calcValue,"onUpdate:modelValue":s=>r.calcValue=s,placeholder:"CalcValue"},null,8,["modelValue","onUpdate:modelValue"]),X(m(Je),{modelValue:r.value,"onUpdate:modelValue":s=>r.value=s,placeholder:"Value"},null,8,["modelValue","onUpdate:modelValue"]),X(m(Et),{onClick:s=>e(r)},{default:V(()=>[...i[0]||(i[0]=[Ce("Add Dependency",-1)])]),_:1},8,["onClick"])]),X(m(qg),{dependencys:r.dependencys},null,8,["dependencys"])]))),128))}}),oM={class:"flex flex-row gap-2 border-l-3 border-black pt-1"},qg=M({__name:"Dependency",props:{dependencys:{}},setup(t){const e=Ti();function n(i){i.addBorder(new rx)}return(i,r)=>(_(!0),W(ze,null,kt(t.dependencys,s=>(_(),W("div",{class:"d-flex flex-wrap relative ml-5 mr-5",key:s.uuid},[Y("div",oM,[r[2]||(r[2]=Y("span",{class:"w-2 flex-none"},null,-1)),X(m(wc),{modelValue:s.relation,"onUpdate:modelValue":o=>s.relation=o},{default:V(()=>[X(m(Tc),{class:"w-[180px]"},{default:V(()=>[X(m(kc),{placeholder:"Select Relation"})]),_:1}),X(m(_c),null,{default:V(()=>[(_(!0),W(ze,null,kt(m(e).getIdRecursiv,o=>(_(),I(m(ai),{value:o},{default:V(()=>[Ce(B(o),1)]),_:2},1032,["value"]))),256))]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),X(m(xg),{for:"formula"},{default:V(()=>[...r[0]||(r[0]=[Ce("Formula",-1)])]),_:1}),X(m(Je),{name:"formula",modelValue:s.formula,"onUpdate:modelValue":o=>s.formula=o},null,8,["modelValue","onUpdate:modelValue"]),X(m(Et),{onClick:o=>n(s)},{default:V(()=>[...r[1]||(r[1]=[Ce("Add Border",-1)])]),_:1},8,["onClick"])]),X(m(iM),{dependency:s},null,8,["dependency"])]))),128))}}),aM={class:"flex flex-row gap-1"},lM=M({__name:"OptionElement",props:{option:{}},emits:["update:option"],setup(t,{emit:e}){const n=t;function i(o){o.addDependency(new Xa)}let r=e;const s=j({get:()=>n.option,set:o=>r("update:option",o)});return(o,a)=>(_(),W(ze,null,[Y("div",aM,[Y("label",null,B(o.$t("id")),1),X(m(Je),{modelValue:s.value.id,"onUpdate:modelValue":a[0]||(a[0]=l=>s.value.id=l)},null,8,["modelValue"]),Y("label",null,B(o.$t("name")),1),X(m(Je),{modelValue:s.value.name,"onUpdate:modelValue":a[1]||(a[1]=l=>s.value.name=l)},null,8,["modelValue"]),X(m(Et),{onClick:a[2]||(a[2]=l=>i(s.value))},{default:V(()=>[Ce(B(o.$t("add_dependency")),1)]),_:1})]),X(m(qg),{dependencys:s.value.dependencys},null,8,["dependencys"])],64))}}),cM={class:"w-full grid overflow-y-auto px-6"},uM=M({__name:"SelectSpecial",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e,r=H(!1);const s=j({get:()=>n.modelValue,set:l=>i("update:modelValue",l)});function o(l){l.addOption(new Sx(String(l.options.length+1)))}const a=zt();return a.$subscribe((l,c)=>{c.showOptions&&(r.value=!0)},{detached:!0}),Ze(r,l=>{l===!1&&a.setShowOptions(!1)}),(l,c)=>{const u=_f("Button");return m(a).getActiveItem.type===3?(_(),I(m(Rc),{key:0,open:m(r),"onUpdate:open":c[1]||(c[1]=O=>et(r)?r.value=O:r=O)},{default:V(()=>[X(m(Cc),{class:"min-w-full grid-rows-[auto_minmax(0,1fr)_auto] p-4 max-h-[90dvh]"},{default:V(()=>[X(m(Jf),null,{default:V(()=>[X(m(ed),null,{default:V(()=>[Ce(B(l.$t("edit_options")),1)]),_:1}),X(m(Kf),null,{default:V(()=>[X(u,{onClick:c[0]||(c[0]=O=>o(s.value))},{default:V(()=>[Ce(B(l.$t("add_option")),1)]),_:1})]),_:1})]),_:1}),Y("div",cM,[(_(!0),W(ze,null,kt(s.value.options,O=>(_(),W("div",{class:"d-flex flex-wrap p-2 relative",key:O.uuid},[X(lM,{option:O},null,8,["option"])]))),128))]),X(m(Eg),null,{default:V(()=>[X(m(pY),{"as-child":""},{default:V(()=>[X(u,{type:"button",variant:"secondary"},{default:V(()=>[Ce(B(l.$t("close")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):de("",!0)}}}),OM={class:""},fM=M({__name:"SpecialProperties",emits:["update:modelValue"],setup(t,{emit:e}){const n=zt();return(i,r)=>(_(),W("div",OM,[X(uM,{modelValue:m(n).getActiveItem,"onUpdate:modelValue":r[0]||(r[0]=s=>m(n).getActiveItem=s)},null,8,["modelValue"])]))}}),dM={class:"flex gap-2 flex-row items-center"},hM={class:"w-60 flex-inital"},pM=M({__name:"InputElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(_(),W("div",dM,[Y("label",hM,B(r.value.name),1),X(m(Je),{placeholder:r.value.placeHolder,"onUpdate:placeholder":o[0]||(o[0]=a=>r.value.placeHolder=a),modelValue:r.value.default,"onUpdate:modelValue":o[1]||(o[1]=a=>r.value.default=a),name:r.value.name,"onUpdate:name":o[2]||(o[2]=a=>r.value.name=a),id:r.value.id,"onUpdate:id":o[3]||(o[3]=a=>r.value.id=a),required:r.value.required,"onUpdate:required":o[4]||(o[4]=a=>r.value.required=a)},null,8,["placeholder","modelValue","name","id","required"])]))}}),mM={class:"flex gap-2 flex-row"},gM={class:"w-60 flex-inital"},$M=M({__name:"HiddenElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>(_(),W("div",mM,[Y("label",gM,B(r.value.id),1)]))}}),QM={class:"flex gap-2 flex-row items-center content-center"},yM={key:0,class:"text-4xl"},bM={key:1,class:"text-base"},vM={key:2,class:"text-lg"},SM={key:3,class:"text-xl"},PM={key:4,class:"text-2xl"},xM={key:5,class:"text-3xl"},wM={key:6,class:"text-4xl"},_M=M({__name:"HeadlineElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a,l,c,u,O,f,d,h,p,$,g,b,y;return _(),W("div",QM,[((a=r.value)==null?void 0:a.variant)=="1"?(_(),W("h1",yM,B((l=r.value)==null?void 0:l.default),1)):((c=r.value)==null?void 0:c.variant)=="6"?(_(),W("h6",bM,B((u=r.value)==null?void 0:u.default),1)):((O=r.value)==null?void 0:O.variant)=="5"?(_(),W("h5",vM,B((f=r.value)==null?void 0:f.default),1)):((d=r.value)==null?void 0:d.variant)=="4"?(_(),W("h4",SM,B((h=r.value)==null?void 0:h.default),1)):((p=r.value)==null?void 0:p.variant)=="3"?(_(),W("h3",PM,B(($=r.value)==null?void 0:$.default),1)):((g=r.value)==null?void 0:g.variant)=="2"?(_(),W("h2",xM,B((b=r.value)==null?void 0:b.default),1)):(_(),W("h1",wM,B((y=r.value)==null?void 0:y.default),1))])}}}),TM={class:"flex gap-2 flex-row"},kM={style:{"white-space":"pre-line"}},RM=M({__name:"TextElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a;return _(),W("div",TM,[Y("p",kM,B((a=r.value)==null?void 0:a.default),1)])}}}),CM={class:"flex gap-2 flex-row"},XM={key:0,class:"w-full rounded bg-gray-300 justify-center content-center flex"},VM=["src"],AM=M({__name:"MediaElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return dt(async()=>{if(r.value.default&&!r.value.url)try{r.value.url=await $x(r.value.default)}catch(s){console.error("Failed to fetch media URL",s)}}),(s,o)=>(_(),W("div",CM,[r.value.url==""?(_(),W("div",XM,[X(m(PV),{class:"size-20 m-10 place-self-center"})])):de("",!0),r.value.url!=""?(_(),W("img",{key:1,class:"",src:r.value.url},null,8,VM)):de("",!0)]))}}),EM={class:"flex gap-2 flex-row"},zM={class:"w-60 flex-inital"},qM=M({__name:"TextareaElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a,l,c,u;return _(),W("div",EM,[Y("label",zM,B((a=r.value)==null?void 0:a.name),1),X(m(zg),{value:(l=r.value)==null?void 0:l.default,name:(c=r.value)==null?void 0:c.name,id:(u=r.value)==null?void 0:u.id},null,8,["value","name","id"])])}}}),ZM={class:"flex gap-2 flex-row items-center"},YM={class:"w-60 flex-inital"},MM={class:"w-full"},IM=M({__name:"SelectElementForm",props:{modelValue:Px},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=j({get:()=>n.modelValue,set:s=>i("update:modelValue",s)});return(s,o)=>{var a;return _(),W("div",ZM,[Y("label",YM,B((a=r.value)==null?void 0:a.name),1),Y("div",MM,[X(m(wc),{modelValue:r.value.default,"onUpdate:modelValue":o[0]||(o[0]=l=>r.value.default=l)},{default:V(()=>[X(m(Tc),null,{default:V(()=>[X(m(kc))]),_:1}),X(m(_c),null,{default:V(()=>[X(m(Hf),null,{default:V(()=>{var l;return[(_(!0),W(ze,null,kt((l=r.value)==null?void 0:l.options,c=>(_(),I(m(ai),{key:c.uuid,value:c.id},{default:V(()=>[Ce(B(c.name),1)]),_:2},1032,["value"]))),128))]}),_:1})]),_:1})]),_:1},8,["modelValue"])])])}}}),UM={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},DM=M({__name:"EmptyElementForm",props:{row:{}},setup(t){const e=t;function n(i){i.addColumnAtTheEnd(new oo)}return(i,r)=>(_(),W("div",{onClick:r[0]||(r[0]=s=>n(e.row)),class:"flex h-full justify-center"},[Y("span",UM,[X(m(Fh))])]))}}),LM={class:"flex gap-2 flex-col"},WM={key:0,class:"w-full flex flex-row gap-1 h-full"},NM={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},jM={class:"flex w-full h-auto"},BM=["onDrop","onDragleave","onDragenter"],GM={class:"inline-flex items-center justify-center w-full pointer-events-none"},FM={class:"absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},HM=["onClick"],KM={class:"font-medium text-red-500 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},JM=["onClick"],eI={class:"font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},tI=M({__name:"RowElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=H("");let s=H(!1);const o=Ti(),a=zt(),l=j({get:()=>n.modelValue,set:h=>i("update:modelValue",h)}),c=(h,p,$)=>{var g,b;if(r.value="",((g=h.dataTransfer)==null?void 0:g.getData("mode"))=="sort"){let y=o.cutItem(a.getSourceDragUuid);y!==null&&$.items.push(y),a.setDragMode(""),h.stopImmediatePropagation()}if(a.getDragMode=="insert"){const y=Number((b=h.dataTransfer)==null?void 0:b.getData("itemId"));$.items.push(wo.getModelForType(y)),a.setDragMode(""),h.stopImmediatePropagation()}},u=(h,p)=>{r.value="",h.stopImmediatePropagation()};a.$subscribe((h,p)=>{p.showPreview?s.value=!0:s.value=!1});const O=(h,p)=>{r.value=p,h.stopImmediatePropagation(),a.getDragMode=="sort"&&p!=a.getSourceDragUuid&&h.stopImmediatePropagation()},f=(h,p,$)=>{h==1&&p.addColumnAtTheBeginning(new oo),h==2&&p.addColumnAtTheEnd(new oo),h==3&&p.addColumnAt(new oo,$)},d=(h,p)=>{h.deleteColumnAt(p)};return(h,p)=>(_(),W("div",LM,[l.value.columns.length>0?(_(),W("div",WM,[m(s)?de("",!0):(_(),W("div",{key:0,onClick:p[0]||(p[0]=$=>f(1,l.value,"")),class:"flex h-full justify-center place-self-center"},[Y("span",NM,[X(m(Fh))])])),(_(!0),W(ze,null,kt(l.value.columns,$=>(_(),W("div",jM,[Y("div",{class:wt([{border:!m(s)},"flex-1 p-1 bg-white"])},[!m(s)&&$.items.length==0?(_(),W("div",{key:0,class:"h-8 group items-center content-justify w-full mb-2",onDrop:g=>c(g,l.value.uuid,$),onDragleave:g=>u(g,$.uuid),onDragenter:g=>O(g,$.uuid)},[Y("div",GM,[Y("hr",{class:wt(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":r.value==$.uuid}])},null,2),Y("span",FM,[X(m(ng),{class:wt([{"text-orange-500":r.value==$.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],40,BM)):de("",!0),$.items.length>0?(_(),I(m(Zg),{key:1,onDrop:g=>c(g,l.value.uuid,$),items:$.items},null,8,["onDrop","items"])):de("",!0)],2),m(s)?de("",!0):(_(),W("div",{key:0,onClick:g=>d(l.value,$.uuid),class:"flex h-auto justify-center place-self-center"},[Y("span",KM,[X(m(bV))])],8,HM)),m(s)?de("",!0):(_(),W("div",{key:1,onClick:g=>f(3,l.value,$.uuid),class:"flex h-auto justify-center place-self-center"},[Y("span",eI,[X(m(Fh))])],8,JM))]))),256))])):de("",!0),l.value.columns.length==0?(_(),I(DM,{key:1,row:l.value},null,8,["row"])):de("",!0)]))}}),nI={class:"fieldset bg-base-200 border-base-300 rounded-box w-full border p-4"},iI={key:0,class:"fieldset-legend"},rI={class:"inline-flex items-center justify-center w-full pointer-events-none"},sI={class:"absolute px-3 font-medium text-gray-900 bg-white dark:text-white dark:bg-gray-900 pointer-events-none"},oI=M({__name:"FieldsetElementForm",props:{modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t;let i=e;const r=H("");let s=H(!1);const o=zt(),a=j({get:()=>n.modelValue,set:O=>i("update:modelValue",O)}),l=(O,f,d)=>{var h;if(o.getDragMode=="insert"){const p=Number((h=O.dataTransfer)==null?void 0:h.getData("itemId"));d.items.push(wo.getModelForType(p)),o.setDragMode(""),O.stopImmediatePropagation()}},c=O=>{r.value="",O.stopImmediatePropagation()};o.$subscribe((O,f)=>{f.showPreview?s.value=!0:s.value=!1});const u=(O,f)=>{r.value=f,O.stopImmediatePropagation(),o.getDragMode=="sort"&&f!=o.getSourceDragUuid&&O.stopImmediatePropagation()};return(O,f)=>(_(),W("fieldset",nI,[a.value.label!=""?(_(),W("legend",iI,B(a.value.label),1)):de("",!0),a.value.items.length==0?(_(),W("div",{key:1,class:"h-8 group items-center content-justify w-full mb-2",onDrop:f[0]||(f[0]=d=>l(d,a.value.uuid,a.value)),onDragleave:f[1]||(f[1]=d=>c(d)),onDragenter:f[2]||(f[2]=d=>u(d,a.value.uuid))},[Y("div",rI,[Y("hr",{class:wt(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":r.value==a.value.uuid}])},null,2),Y("span",sI,[X(m(ng),{class:wt([{"text-orange-500":r.value==a.value.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],32)):de("",!0),a.value.items.length>0?(_(),I(m(Zg),{key:2,items:a.value.items},null,8,["items"])):de("",!0)]))}}),aI={class:"overflow-auto h-full"},lI={class:"flex flex-col gap-2"},cI={key:0,class:"w-full"},uI=["onDragleave","onDragenter","onDrop"],OI={class:"inline-flex items-center justify-center w-full pointer-events-none"},fI={class:"absolute px-3 font-medium text-gray-900 -translate-x-1/2 bg-white left-1/2 dark:text-white dark:bg-gray-900 pointer-events-none"},dI=["onDragstart"],hI={class:"grow content-center items-center"},pI={class:"buttons absolute rounded-sm invisible right-0 bg-slate-100/70 flex flex-row gap-2"},mI=["onClick","title"],gI=["onClick","title"],$I=["onClick","title"],QI=["onClick"],yI=M({__name:"RenderElements",props:{items:{}},setup(t){const e=Ti(),n=zt(),i=H(""),r=(f,d)=>{var h;f.dataTransfer.dropEffect="move",f.dataTransfer.effectAllowed="move",(h=f.dataTransfer)==null||h.setData("mode","sort"),n.setDragMode("sort"),n.setSourceDragUuid(d),f.stopImmediatePropagation()},s=(f,d)=>{i.value="",f.stopImmediatePropagation()},o=(f,d)=>{i.value=d,n.getDragMode=="sort"&&d!=n.getSourceDragUuid&&f.stopImmediatePropagation()},a=(f,d)=>{var h,p;if(((h=f.dataTransfer)==null?void 0:h.getData("mode"))=="sort"){if(i.value="",n.getSourceDragUuid==d){n.setDragMode(""),f.stopImmediatePropagation();return}e.moveItemBefore(n.getSourceDragUuid,d),n.setDragMode(""),f.stopImmediatePropagation()}if(n.dragMode=="insert"){const $=Number((p=f.dataTransfer)==null?void 0:p.getData("itemId"));e.addElementAfter(wo.getModelForType($),d),f.stopImmediatePropagation()}},l=f=>{e.deleteItem(f)},c=f=>{n.setActiveItem(f),n.setShowProperties(!0)},u=f=>{n.setActiveItem(f),n.setShowOptions(!0)},O=f=>{n.setActiveItem(f),n.setShowDependency(!0)};return(f,d)=>(_(),W("div",aI,[Y("div",lI,[t.items.length>0?(_(!0),W(ze,{key:0},kt(t.items,h=>(_(),W("div",{class:"d-flex flex flex-col relative items-center",key:h.uuid},[h.type!==1||h.type===1?(_(),W("div",cI,[Y("div",{class:"h-8 group w-full",onDragleave:cn(p=>s(p,h.uuid),["self"]),onDragenter:cn(p=>o(p,h.uuid),["self"]),onDrop:p=>a(p,h.uuid)},[Y("div",OI,[Y("hr",{class:wt(["w-64 h-px my-2 bg-gray-200 border-0 dark:bg-gray-700 transition duration-200 pointer-events-none",{"bg-orange-500":i.value==h.uuid}])},null,2),Y("span",fI,[X(m(ng),{class:wt([{"text-orange-500":i.value==h.uuid},"transition duration-200 pointer-events-none"])},null,8,["class"])])])],40,uI),Y("div",{class:wt([{"border-white":!h.hasDependencys(),"border-blue-500":h.hasDependencys()},"element w-full flex flex-row border-l-2 hover:border-orange-500 pl-2 transition duration-500 min-h-5",{" bg-slate-50":h.isFocused===!0}]),onDragstart:p=>r(p,h.uuid),draggable:"true"},[Y("div",hI,[h.type===2?(_(),I(pM,{key:0,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):de("",!0),h.type===1?(_(),I($M,{key:1,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):de("",!0),h.type===3?(_(),I(IM,{key:2,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):de("",!0),h.type===4?(_(),I(RM,{key:3,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):de("",!0),h.type===5?(_(),I(qM,{key:4,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):de("",!0),h.type===6?(_(),I(_M,{key:5,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):de("",!0),h.type===12?(_(),I(oI,{key:6,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):de("",!0),h.type===7?(_(),I(tI,{key:7,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):de("",!0),h.type===9?(_(),I(AM,{key:8,modelValue:h,"onUpdate:modelValue":p=>h=p},null,8,["modelValue","onUpdate:modelValue"])):de("",!0)]),Y("div",pI,[Y("div",{onClick:p=>O(h),title:f.$t("dependencies"),class:"m-2 cursor-pointer"},[X(m(_V))],8,mI),h.type===3?(_(),W("div",{key:0,onClick:p=>u(h),title:f.$t("options"),class:"m-2 cursor-pointer"},[X(m(wV))],8,gI)):de("",!0),Y("div",{onClick:p=>c(h),title:f.$t("settings"),class:"m-2 cursor-pointer"},[X(m(kV))],8,$I),Y("div",{onClick:p=>l(h),class:"text-red-500 m-2 cursor-pointer"},[X(m(qV))],8,QI)])],42,dI)])):de("",!0)]))),128)):de("",!0)])]))}}),bI=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},Zg=bI(yI,[["__scopeId","data-v-766fa5f5"]]),vI=M({__name:"Main",setup(t){const e=zt(),n=Ti();function i(r){var s;if(e.dragMode=="insert"){const o=Number((s=r.dataTransfer)==null?void 0:s.getData("itemId"));n.addElement(wo.getModelForType(o))}}return(r,s)=>(_(),W("div",{class:"border m-1 p-4 rounded-xl w-full h-full shadow bg-white",onDrop:s[0]||(s[0]=o=>i(o)),onDragover:s[1]||(s[1]=cn(()=>{},["prevent"]))},[X(m(Zg),{items:m(n).getItems},null,8,["items"])],32))}}),SI={class:"mb-2"},PI={key:0,class:"mr-2"},xI={class:"font-medium"},wI={class:"ml-2 text-xs bg-white px-2 py-1 rounded opacity-75"},_I={key:1,class:"ml-2 text-xs bg-green-200 px-2 py-1 rounded font-mono"},TI={key:0,class:"mt-2 ml-6 space-y-1"},kI={class:"p-2 bg-gray-50 rounded text-sm font-mono"},RI={class:"font-semibold text-gray-700"},CI={key:0,class:"p-2 bg-blue-50 rounded text-sm font-mono"},XI={class:"text-blue-800"},VI={key:0,class:"mt-2"},AI=M({__name:"NodeRenderer",props:{node:{},level:{},parentId:{},index:{}},setup(t){const e=t,n=xn("expandedNodes"),i=xn("toggleNode"),r=xn("getNodeType"),s=xn("getNodeColor"),o=xn("getColoredFormulaParts"),a=j(()=>`${e.parentId}-${e.index}`),l=j(()=>e.node.parts&&e.node.parts.length>0),c=j(()=>n==null?void 0:n.value.has(a.value)),u=j(()=>r?r(e.node.name):""),O=j(()=>s&&u.value?s(u.value):""),f=j(()=>e.node.unParsed),d=()=>{l.value&&i&&i(a.value)};return(h,p)=>{const $=_f("NodeRenderer",!0);return _(),W("div",SI,[Y("div",{class:wt(["p-3 rounded-lg border-2 transition-all hover:shadow-md",O.value]),style:ti({marginLeft:t.level*20+"px"})},[Y("div",{class:"flex items-center cursor-pointer",onClick:d},[l.value?(_(),W("span",PI,[c.value?(_(),I(m(tg),{key:0,size:16})):(_(),I(m(A1),{key:1,size:16}))])):de("",!0),Y("span",xI,B(t.node.name),1),Y("span",wI,B(u.value),1),t.node.result!==void 0?(_(),W("span",_I," = "+B(t.node.result),1)):de("",!0)]),f.value?(_(),W("div",TI,[Y("div",kI,[Y("span",RI,B(t.node.name)+" = ",1),m(o)?(_(!0),W(ze,{key:0},kt(m(o)(f.value),(g,b)=>(_(),W("span",{key:b,class:wt(g.colorClass)},B(g.text),3))),128)):de("",!0)]),t.node.parsed&&t.node.parsed!==t.node.unParsed?(_(),W("div",CI,[p[0]||(p[0]=Y("span",{class:"font-semibold text-blue-700"},"Aufgelöst: ",-1)),Y("span",XI,B(t.node.parsed),1)])):de("",!0)])):de("",!0)],6),l.value&&c.value?(_(),W("div",VI,[(_(!0),W(ze,null,kt(t.node.parts,(g,b)=>(_(),I($,{key:b,node:g,level:t.level+1,"parent-id":a.value,index:b},null,8,["node","level","parent-id","index"]))),128))])):de("",!0)])}}}),EI={class:"w-full p-6 min-h-screen"},zI={key:0,class:"mb-4 bg-red-100 border-l-4 border-red-500 text-red-700 p-4",role:"alert"},qI={key:1,class:"text-center py-10"},ZI={key:2,class:"grid grid-cols-1 gap-6"},YI={class:"p-4 border m-1 p-4 rounded-xl w-full h-full shadow bg-white"},MI={class:"p-4 border m-1 p-4 rounded-xl w-full h-full shadow bg-white border-l-4 border-green-500"},II={class:"flex items-center justify-between bg-green-50 p-4 rounded-lg"},UI={class:"flex items-center space-x-3"},DI={class:"text-lg font-medium text-gray-800"},LI={class:"text-2xl font-bold text-green-600"},WI={class:"text-sm text-gray-500"},NI=M({__name:"FormulaVisualizer",setup(t){const e=H(new Set),n=zt(),i=j(()=>n.getFormulaData),r=j(()=>n.getFormulaError),s=j(()=>n.isFormulaLoading),o=O=>{const f=new Set(e.value);f.has(O)?f.delete(O):f.add(O),e.value=f},a=O=>O.startsWith("$F")&&O.endsWith("$F")?"formula":O.startsWith("$P")&&O.endsWith("$P")?"parameter":O.startsWith("$V")&&O.endsWith("$V")?"variable":O.startsWith("$CV")&&O.endsWith("$CV")?"calc-variable":/^[0-9.]+$/.test(O)?"value":O.startsWith("calc")?"main":"function",l=O=>{switch(O){case"formula":return"bg-purple-100 border-purple-300 text-purple-800";case"parameter":return"bg-blue-100 border-blue-300 text-blue-800";case"variable":return"bg-orange-100 border-orange-300 text-orange-800";case"calc-variable":return"bg-teal-100 border-teal-300 text-teal-800";case"value":return"bg-lime-100 border-lime-400 text-lime-800";case"main":return"bg-red-100 border-red-300 text-red-800";case"function":return"bg-yellow-100 border-yellow-300 text-yellow-800";default:return"bg-gray-100 border-gray-300 text-gray-800"}},c=O=>{const f=[];let d=0;const h=/(\$F[^$]*\$F|\$P[^$]*\$P|\$CV[^$]*\$CV|\$V[^$]*\$V)/g;let p;for(;(p=h.exec(O))!==null;){p.index>d&&f.push({text:O.substring(d,p.index),colorClass:"text-gray-800"});const $=p[0];let g="";$.startsWith("$F")?g="text-purple-600 font-semibold":$.startsWith("$P")?g="text-blue-600 font-semibold":$.startsWith("$CV")?g="text-teal-600 font-semibold":$.startsWith("$V")&&(g="text-orange-600 font-semibold"),f.push({text:$,colorClass:g}),d=p.index+$.length}return dClick to upload or drag and drop
SVG, PNG, JPG or GIF (MAX. 800x400px)
i.value?i.value.reduce((O,f)=>O+(f.result||0),0):0;return Tr("expandedNodes",e),Tr("toggleNode",o),Tr("getNodeType",a),Tr("getNodeColor",l),Tr("getColoredFormulaParts",c),(O,f)=>(_(),W("div",EI,[r.value?(_(),W("div",zI,[f[0]||(f[0]=Y("p",{class:"font-bold"},"Fehler",-1)),Y("p",null,B(r.value),1)])):de("",!0),s.value?(_(),W("div",qI,[...f[1]||(f[1]=[Y("p",null,"Lade Formeldaten...",-1)])])):de("",!0),!s.value&&i.value?(_(),W("div",ZI,[Y("div",YI,[f[2]||(f[2]=Y("h2",{class:"text-xl font-semibold mb-4 text-gray-700"},"Baum-Struktur",-1)),Y("div",null,[(_(!0),W(ze,null,kt(i.value,(d,h)=>(_(),I(AI,{key:h,node:d,level:0,"parent-id":"root",index:h},null,8,["node","index"]))),128))])]),Y("div",MI,[f[4]||(f[4]=Y("h2",{class:"text-xl font-semibold mb-3 text-gray-700"},"Gesamtsumme",-1)),Y("div",II,[Y("div",UI,[Y("span",DI,B(i.value.map(d=>d.result||0).join(" + ")),1),f[3]||(f[3]=Y("span",{class:"text-gray-500"},"=",-1)),Y("span",LI,B(u()),1)]),Y("div",WI," ("+B(i.value.length)+" Formel"+B(i.value.length!==1?"n":"")+") ",1)])]),f[5]||(f[5]=Fm(' ',1))])):de("",!0)]))}});let xp=[],Kx=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;eLegende
Formel ($F...$F)Parameter ($P...$P)Variable ($V...$V)Kalk-Variable ($CV...$CV)Wert (Zahlen)Hauptformel>1;if(t =Kx[i])e=i+1;else return!0;if(e==n)return!1}}function Wy(t){return t>=127462&&t<=127487}const Ny=8205;function BI(t,e,n=!0,i=!0){return(n?Jx:GI)(t,e,i)}function Jx(t,e,n){if(e==t.length)return e;e&&ew(t.charCodeAt(e))&&tw(t.charCodeAt(e-1))&&e--;let i=Ld(t,e);for(e+=jy(i);e =0&&Wy(Ld(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function GI(t,e,n){for(;e>0;){let i=Jx(t,e-2,n);if(i =56320&&t<57344}function tw(t){return t>=55296&&t<56320}function jy(t){return t<65536?1:2}class it{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=$a(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Hi.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=$a(this,e,n);let i=[];return this.decompose(e,n,i,0),Hi.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new bl(this),s=new bl(e);for(let o=n,a=n;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}iter(e=1){return new bl(this,e)}iterRange(e,n=this.length){return new nw(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new iw(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?it.empty:e.length<=32?new Yt(e):Hi.from(Yt.split(e,[]))}}class Yt extends it{constructor(e,n=FI(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.text[s],a=r+o.length;if((n?i:a)>=e)return new HI(r,a,i,o);r=a+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new Yt(By(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),a=Hu(s.text,o.text.slice(),0,s.length);if(a.length<=32)i.push(new Yt(a,o.length+s.length));else{let l=a.length>>1;i.push(new Yt(a.slice(0,l)),new Yt(a.slice(l)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof Yt))return super.replace(e,n,i);[e,n]=$a(this,e,n);let r=Hu(this.text,Hu(i.text,By(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new Yt(r,s):Hi.from(Yt.split(r,[]),s)}sliceString(e,n=this.length,i=` -`){[e,n]=$a(this,e,n);let r="";for(let s=0,o=0;s<=n&&o e&&o&&(r+=i),e s&&(r+=a.slice(Math.max(0,e-s),n-s)),s=l+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(n.push(new Yt(i,r)),i=[],r=-1);return r>-1&&n.push(new Yt(i,r)),n}}class Hi extends it{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.children[s],a=r+o.length,l=i+o.lines-1;if((n?l:a)>=e)return o.lineInner(e,n,i,r);r=a+1,i=l+1}}decompose(e,n,i,r){for(let s=0,o=0;o<=n&&s =o){let c=r&((o<=e?1:0)|(l>=n?2:0));o>=e&&l<=n&&!c?i.push(a):a.decompose(e-o,n-o,i,c)}o=l+1}}replace(e,n,i){if([e,n]=$a(this,e,n),i.lines =s&&n<=a){let l=o.replace(e-s,n-s,i),c=this.lines-o.lines+l.lines;if(l.lines >4&&l.lines>c>>6){let u=this.children.slice();return u[r]=l,new Hi(u,this.length-(n-e)+i.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` -`){[e,n]=$a(this,e,n);let r="";for(let s=0,o=0;s e&&s&&(r+=i),e o&&(r+=a.sliceString(e-o,n-o,i)),o=l+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Hi))return 0;let i=0,[r,s,o,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==o||s==a)return i;let l=this.children[r],c=e.children[s];if(l!=c)return i+l.scanIdentical(c,n);i+=l.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let h of e)h.flatten(d);return new Yt(d,n)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,a=[],l=0,c=-1,u=[];function O(d){let h;if(d.lines>s&&d instanceof Hi)for(let p of d.children)O(p);else d.lines>o&&(l>o||!l)?(f(),a.push(d)):d instanceof Yt&&l&&(h=u[u.length-1])instanceof Yt&&d.lines+h.lines<=32?(l+=d.lines,c+=d.length+1,u[u.length-1]=new Yt(h.text.concat(d.text),h.length+1+d.length)):(l+d.lines>r&&f(),l+=d.lines,c+=d.length+1,u.push(d))}function f(){l!=0&&(a.push(u.length==1?u[0]:Hi.from(u,c)),c=-1,l=u.length=0)}for(let d of e)O(d);return f(),a.length==1?a[0]:new Hi(a,n)}}it.empty=new Yt([""],0);function FI(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Hu(t,e,n=0,i=1e9){for(let r=0,s=0,o=!0;s =n&&(l>i&&(a=a.slice(0,i-r)),r 0?1:(e instanceof Yt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,a=r instanceof Yt?r.text.length:r.children.length;if(o==(n>0?a:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(r instanceof Yt){let l=r.text[o+(n<0?-1:0)];if(this.offsets[i]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=r.children[o+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Yt?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class nw{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new bl(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class iw{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(it.prototype[Symbol.iterator]=function(){return this.iter()},bl.prototype[Symbol.iterator]=nw.prototype[Symbol.iterator]=iw.prototype[Symbol.iterator]=function(){return this});class HI{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}}function $a(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function an(t,e,n=!0,i=!0){return BI(t,e,n,i)}function KI(t){return t>=56320&&t<57344}function JI(t){return t>=55296&&t<56320}function En(t,e){let n=t.charCodeAt(e);if(!JI(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return KI(i)?(n-55296<<10)+(i-56320)+65536:n}function Yg(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Ki(t){return t<65536?1:2}const wp=/\r\n?|\n/;var sn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(sn||(sn={}));class ar{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n e)return s+(e-r);s+=a}else{if(i!=sn.Simple&&c>=e&&(i==sn.TrackDel&&r e||i==sn.TrackBefore&&r e))return null;if(c>e||c==e&&n<0&&!a)return e==r||n<0?s:s+l;s+=l}r=c}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i =0&&r<=n&&a>=e)return r n?"cover":!0;r=a}return!1}toString(){let e="";for(let n=0;n =0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ar(e)}static create(e){return new ar(e)}}class jt extends ar{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return _p(this,(n,i,r,s,o)=>e=e.replace(r,r+(i-n),o),!1),e}mapDesc(e,n=!1){return Tp(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r =0){n[r]=a,n[r+1]=o;let l=r>>1;for(;i.length 0&&gs(i,n,s.text),s.forward(u),a+=u}let c=e[o++];for(;a >1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],o=0,a=null;function l(u=!1){if(!u&&!r.length)return;o f||O<0||f>n)throw new RangeError(`Invalid change range ${O} to ${f} (in doc of length ${n})`);let h=d?typeof d=="string"?it.of(d.split(i||wp)):d:it.empty,p=h.length;if(O==f&&p==0)return;O o&&hn(r,O-o,-1),hn(r,f-O,p),gs(s,r,h),o=f}}return c(e),l(!a),a}static empty(e){return new jt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;r a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length =0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function gs(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i >1])),!(n||o==t.sections.length||t.sections[o+1]<0);)a=t.sections[o++],l=t.sections[o++];e(r,c,s,u,O),r=c,s=u}}}function Tp(t,e,n,i=!1){let r=[],s=i?[]:null,o=new Fl(t),a=new Fl(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let c=Math.min(o.len,a.len);hn(r,c,-1),o.forward(c),a.forward(c)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len =0&&l =0){let c=0,u=o.len;for(;u;)if(a.ins==-1){let O=Math.min(u,a.len);c+=O,u-=O,a.forward(O)}else if(a.ins==0&&a.lenl||o.ins>=0&&o.len>l)&&(a||i.length>c),s.forward2(l),o.forward(l)}}}}class Fl{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i >1;return n>=e.length?it.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?it.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Js{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Js(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return F.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return F.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return F.range(e.anchor,e.head)}static create(e,n,i){return new Js(e,n,i)}}class F{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:F.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new F(e.ranges.map(n=>Js.fromJSON(n)),e.main)}static single(e,n=e){return new F([F.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r e?8:0)|s)}static normalized(e,n=0){let i=e[n];e.sort((r,s)=>r.from-s.from),n=e.indexOf(i);for(let r=1;r s.head?F.range(l,a):F.range(a,l))}}return new F(e,n)}}function sw(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Mg=0;class Pe{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=Mg++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Pe(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:Ig),!!e.static,e.enables)}of(e){return new Ku([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ku(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ku(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function Ig(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class Ku{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=Mg++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,c=!1,u=[];for(let O of this.dependencies)O=="doc"?l=!0:O=="selection"?c=!0:(((n=e[O.id])!==null&&n!==void 0?n:1)&1)==0&&u.push(e[O.id]);return{create(O){return O.values[o]=i(O),1},update(O,f){if(l&&f.docChanged||c&&(f.docChanged||f.selection)||kp(O,u)){let d=i(O);if(a?!Gy(d,O.values[o],r):!r(d,O.values[o]))return O.values[o]=d,1}return 0},reconfigure:(O,f)=>{let d,h=f.config.address[s];if(h!=null){let p=EO(f,h);if(this.dependencies.every($=>$ instanceof Pe?f.facet($)===O.facet($):$ instanceof Jt?f.field($,!1)==O.field($,!1):!0)||(a?Gy(d=i(O),p,r):r(d=i(O),p)))return O.values[o]=p,0}else d=i(O);return O.values[o]=d,1}}}}function Gy(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i t[l.id]),r=n.map(l=>l.type),s=i.filter(l=>!(l&1)),o=t[e.id]>>1;function a(l){let c=[];for(let u=0;u