uidl-runtime 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +175 -0
- package/bin/validate.mjs +44 -0
- package/dist/actions/eventBus.d.ts +7 -0
- package/dist/actions/index.d.ts +5 -0
- package/dist/actions/interpreter.d.ts +54 -0
- package/dist/compiler/dashboard.d.ts +10 -0
- package/dist/compiler/form.d.ts +22 -0
- package/dist/compiler/index.d.ts +16 -0
- package/dist/compiler/list.d.ts +20 -0
- package/dist/compiler/report.d.ts +10 -0
- package/dist/compiler/settings.d.ts +10 -0
- package/dist/compiler/tree.d.ts +10 -0
- package/dist/compiler/types.d.ts +315 -0
- package/dist/compiler/wizard.d.ts +10 -0
- package/dist/components/BarcodeAndQRCode.d.ts +29 -0
- package/dist/components/charts.d.ts +66 -0
- package/dist/components/iconPaths.d.ts +5 -0
- package/dist/components/icons.d.ts +31 -0
- package/dist/components/primitives.d.ts +411 -0
- package/dist/data/adapters/http.d.ts +37 -0
- package/dist/data/adapters/inMemory.d.ts +62 -0
- package/dist/data/errors.d.ts +15 -0
- package/dist/data/index.d.ts +7 -0
- package/dist/data/testing/mockHttpServer.d.ts +16 -0
- package/dist/data/types.d.ts +74 -0
- package/dist/editor/Canvas.d.ts +22 -0
- package/dist/editor/Editor.d.ts +18 -0
- package/dist/editor/LayerTree.d.ts +12 -0
- package/dist/editor/PropertyPanel.d.ts +7 -0
- package/dist/editor/StylePanel.d.ts +7 -0
- package/dist/editor/ValidationStatus.d.ts +9 -0
- package/dist/editor/WidgetPalette.d.ts +6 -0
- package/dist/editor/document.d.ts +10 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/editor/store.d.ts +46 -0
- package/dist/expr/evaluate.d.ts +51 -0
- package/dist/hooks/useElementWidth.d.ts +14 -0
- package/dist/index.d.ts +61 -0
- package/dist/registry/defaults.d.ts +2 -0
- package/dist/registry/registry.d.ts +4 -0
- package/dist/renderer/RenderNode.d.ts +16 -0
- package/dist/renderer/UIDocumentRenderer.d.ts +13 -0
- package/dist/renderer/instantiateComponent.d.ts +18 -0
- package/dist/renderer/renderDocument.d.ts +63 -0
- package/dist/schema/action.schema.json +515 -0
- package/dist/schema/design-tokens.schema.json +51 -0
- package/dist/schema/jsonSchema.d.ts +11 -0
- package/dist/schema/theme-presets.schema.json +952 -0
- package/dist/schema/uidl-document.schema.json +187 -0
- package/dist/schemas/actions.d.ts +5 -0
- package/dist/schemas/document.d.ts +35 -0
- package/dist/schemas/theme.d.ts +260 -0
- package/dist/services/aiPromptGenerator.d.ts +11 -0
- package/dist/state/createDocumentState.d.ts +18 -0
- package/dist/state/dataSources.d.ts +58 -0
- package/dist/state/index.d.ts +4 -0
- package/dist/style.css +2 -0
- package/dist/theme/engine.d.ts +9 -0
- package/dist/theme/index.d.ts +7 -0
- package/dist/theme/meridianPreset.d.ts +5 -0
- package/dist/theme/presets.d.ts +5 -0
- package/dist/theme/registry.d.ts +15 -0
- package/dist/theme/serialize.d.ts +5 -0
- package/dist/theme/tailwind.d.ts +11 -0
- package/dist/types/actions.d.ts +116 -0
- package/dist/types/editor.d.ts +45 -0
- package/dist/types/index.d.ts +82 -0
- package/dist/types/theme.d.ts +95 -0
- package/dist/uidl-runtime.js +98 -0
- package/dist/uidl-runtime.js.map +1 -0
- package/dist/uidl-runtime.mjs +17779 -0
- package/dist/uidl-runtime.mjs.map +1 -0
- package/dist/utils/chart.d.ts +12 -0
- package/dist/utils/cn.d.ts +1 -0
- package/dist/utils/formLayout.d.ts +93 -0
- package/dist/utils/i18n.d.ts +132 -0
- package/dist/utils/listCell.d.ts +21 -0
- package/dist/utils/responsive.d.ts +3 -0
- package/dist/utils/tailwind.d.ts +23 -0
- package/dist/validate/validateResponsive.d.ts +7 -0
- package/dist/version.d.ts +10 -0
- package/package.json +109 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";var zc=Object.defineProperty;var Pc=(e,t,r)=>t in e?zc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ae=(e,t,r)=>Pc(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),Kt=require("react-dom");var fr={exports:{}},Vt={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Fo;function Oc(){if(Fo)return Vt;Fo=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,s){var i=null;if(s!==void 0&&(i=""+s),o.key!==void 0&&(i=""+o.key),"key"in o){s={};for(var a in o)a!=="key"&&(s[a]=o[a])}else s=o;return o=s.ref,{$$typeof:e,type:n,key:i,ref:o!==void 0?o:null,props:s}}return Vt.Fragment=t,Vt.jsx=r,Vt.jsxs=r,Vt}var Bt={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Lo;function Ic(){return Lo||(Lo=1,process.env.NODE_ENV!=="production"&&(function(){function e(_){if(_==null)return null;if(typeof _=="function")return _.$$typeof===O?null:_.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case x:return"Fragment";case k:return"Profiler";case w:return"StrictMode";case M:return"Suspense";case b:return"SuspenseList";case E:return"Activity"}if(typeof _=="object")switch(typeof _.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),_.$$typeof){case y:return"Portal";case N:return _.displayName||"Context";case T:return(_._context.displayName||"Context")+".Consumer";case C:var V=_.render;return _=_.displayName,_||(_=V.displayName||V.name||"",_=_!==""?"ForwardRef("+_+")":"ForwardRef"),_;case g:return V=_.displayName||null,V!==null?V:e(_.type)||"Memo";case R:V=_._payload,_=_._init;try{return e(_(V))}catch{}}return null}function t(_){return""+_}function r(_){try{t(_);var V=!1}catch{V=!0}if(V){V=console;var K=V.error,ne=typeof Symbol=="function"&&Symbol.toStringTag&&_[Symbol.toStringTag]||_.constructor.name||"Object";return K.call(V,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ne),t(_)}}function n(_){if(_===x)return"<>";if(typeof _=="object"&&_!==null&&_.$$typeof===R)return"<...>";try{var V=e(_);return V?"<"+V+">":"<...>"}catch{return"<...>"}}function o(){var _=j.A;return _===null?null:_.getOwner()}function s(){return Error("react-stack-top-frame")}function i(_){if(D.call(_,"key")){var V=Object.getOwnPropertyDescriptor(_,"key").get;if(V&&V.isReactWarning)return!1}return _.key!==void 0}function a(_,V){function K(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",V))}K.isReactWarning=!0,Object.defineProperty(_,"key",{get:K,configurable:!0})}function c(){var _=e(this.type);return U[_]||(U[_]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),_=this.props.ref,_!==void 0?_:null}function l(_,V,K,ne,ie,te){var se=K.ref;return _={$$typeof:v,type:_,key:V,props:K,_owner:ne},(se!==void 0?se:null)!==null?Object.defineProperty(_,"ref",{enumerable:!1,get:c}):Object.defineProperty(_,"ref",{enumerable:!1,value:null}),_._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(_,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(_,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ie}),Object.defineProperty(_,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_}function d(_,V,K,ne,ie,te){var se=V.children;if(se!==void 0)if(ne)if(P(se)){for(ne=0;ne<se.length;ne++)u(se[ne]);Object.freeze&&Object.freeze(se)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(se);if(D.call(V,"key")){se=e(_);var ve=Object.keys(V).filter(function(X){return X!=="key"});ne=0<ve.length?"{key: someKey, "+ve.join(": ..., ")+": ...}":"{key: someKey}",z[se+ne]||(ve=0<ve.length?"{"+ve.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,ne,se,ve,se),z[se+ne]=!0)}if(se=null,K!==void 0&&(r(K),se=""+K),i(V)&&(r(V.key),se=""+V.key),"key"in V){K={};for(var re in V)re!=="key"&&(K[re]=V[re])}else K=V;return se&&a(K,typeof _=="function"?_.displayName||_.name||"Unknown":_),l(_,se,K,o(),ie,te)}function u(_){h(_)?_._store&&(_._store.validated=1):typeof _=="object"&&_!==null&&_.$$typeof===R&&(_._payload.status==="fulfilled"?h(_._payload.value)&&_._payload.value._store&&(_._payload.value._store.validated=1):_._store&&(_._store.validated=1))}function h(_){return typeof _=="object"&&_!==null&&_.$$typeof===v}var f=m,v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),N=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),j=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.prototype.hasOwnProperty,P=Array.isArray,B=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(_){return _()}};var L,U={},I=f.react_stack_bottom_frame.bind(f,s)(),W=B(n(s)),z={};Bt.Fragment=x,Bt.jsx=function(_,V,K){var ne=1e4>j.recentlyCreatedOwnerStacks++;return d(_,V,K,!1,ne?Error("react-stack-top-frame"):I,ne?B(n(_)):W)},Bt.jsxs=function(_,V,K){var ne=1e4>j.recentlyCreatedOwnerStacks++;return d(_,V,K,!0,ne?Error("react-stack-top-frame"):I,ne?B(n(_)):W)}})()),Bt}var Vo;function Dc(){return Vo||(Vo=1,process.env.NODE_ENV==="production"?fr.exports=Oc():fr.exports=Ic()),fr.exports}var p=Dc();function Ks(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Ks(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Zc(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Ks(e))&&(n&&(n+=" "),n+=t);return n}const Fc=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Lc=(e,t)=>({classGroupId:e,validator:t}),qs=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Rr="-",Bo=[],Vc="arbitrary..",Bc=e=>{const t=Wc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Hc(i);const a=i.split(Rr),c=a[0]===""&&a.length>1?1:0;return Ys(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=n[i],l=r[i];return c?l?Fc(l,c):c:l||Bo}return r[i]||Bo}}},Ys=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const l=Ys(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const a=t===0?e.join(Rr):e.slice(t).join(Rr),c=i.length;for(let l=0;l<c;l++){const d=i[l];if(d.validator(a))return d.classGroupId}},Hc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?Vc+n:void 0})(),Wc=e=>{const{theme:t,classGroups:r}=e;return Uc(r,t)},Uc=(e,t)=>{const r=qs();for(const n in e){const o=e[n];Hn(o,r,n,t)}return r},Hn=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];Gc(i,t,r,n)}},Gc=(e,t,r,n)=>{if(typeof e=="string"){Jc(e,t,r);return}if(typeof e=="function"){Kc(e,t,r,n);return}qc(e,t,r,n)},Jc=(e,t,r)=>{const n=e===""?t:Xs(t,e);n.classGroupId=r},Kc=(e,t,r,n)=>{if(Yc(e)){Hn(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Lc(r,e))},qc=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,c]=o[i];Hn(c,Xs(t,a),r,n)}},Xs=(e,t)=>{let r=e;const n=t.split(Rr),o=n.length;for(let s=0;s<o;s++){const i=n[s];let a=r.nextPart.get(i);a||(a=qs(),r.nextPart.set(i,a)),r=a}return r},Yc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},$n="!",Ho=":",Qc=[],Wo=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),el=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,a=0,c=0,l;const d=o.length;for(let y=0;y<d;y++){const x=o[y];if(i===0&&a===0){if(x===Ho){s.push(o.slice(c,y)),c=y+1;continue}if(x==="/"){l=y;continue}}x==="["?i++:x==="]"?i--:x==="("?a++:x===")"&&a--}const u=s.length===0?o:o.slice(c);let h=u,f=!1;u.endsWith($n)?(h=u.slice(0,-1),f=!0):u.startsWith($n)&&(h=u.slice(1),f=!0);const v=l&&l>c?l-c:void 0;return Wo(s,f,h,v)};if(t){const o=t+Ho,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Wo(Qc,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},tl=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],a=i[0]==="[",c=t.has(i);a||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},rl=e=>({cache:Xc(e.cacheSize),parseClassName:el(e),sortModifiers:tl(e),postfixLookupClassGroupIds:nl(e),...Bc(e)}),nl=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)t[r[n]]=!0;return t},ol=/\s+/,sl=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(ol);let l="";for(let d=c.length-1;d>=0;d-=1){const u=c[d],{isExternal:h,modifiers:f,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:x}=r(u);if(h){l=u+(l.length>0?" "+l:l);continue}let w=!!x,k;if(w){const b=y.substring(0,x);k=n(b);const g=k&&i[k]?n(y):void 0;g&&g!==k&&(k=g,w=!1)}else k=n(y);if(!k){if(!w){l=u+(l.length>0?" "+l:l);continue}if(k=n(y),!k){l=u+(l.length>0?" "+l:l);continue}w=!1}const T=f.length===0?"":f.length===1?f[0]:s(f).join(":"),N=v?T+$n:T,C=N+k;if(a.indexOf(C)>-1)continue;a.push(C);const M=o(k,w);for(let b=0;b<M.length;++b){const g=M[b];a.push(N+g)}l=u+(l.length>0?" "+l:l)}return l},il=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Qs(r))&&(o&&(o+=" "),o+=n);return o},Qs=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Qs(e[n]))&&(r&&(r+=" "),r+=t);return r},Uo=(e,...t)=>{let r,n,o,s;const i=c=>{const l=t.reduce((d,u)=>u(d),e());return r=rl(l),n=r.cache.get,o=r.cache.set,s=a,a(c)},a=c=>{const l=n(c);if(l)return l;const d=sl(c,r);return o(c,d),d};return s=i,(...c)=>s(il(...c))},al=[],ge=e=>{const t=r=>r[e]||al;return t.isThemeGetter=!0,t},ei=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ti=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cl=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ll=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dl=/\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$/,ul=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,at=e=>cl.test(e),J=e=>!!e&&!Number.isNaN(Number(e)),He=e=>!!e&&Number.isInteger(Number(e)),hn=e=>e.endsWith("%")&&J(e.slice(0,-1)),qe=e=>ll.test(e),ri=()=>!0,hl=e=>dl.test(e)&&!ul.test(e),Wn=()=>!1,ml=e=>pl.test(e),gl=e=>fl.test(e),bl=e=>!Z(e)&&!F(e),vl=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),yl=e=>lt(e,si,Wn),Z=e=>ei.test(e),pt=e=>lt(e,ii,hl),Go=e=>lt(e,Ml,J),xl=e=>lt(e,ci,ri),wl=e=>lt(e,ai,Wn),Jo=e=>lt(e,ni,Wn),kl=e=>lt(e,oi,gl),hr=e=>lt(e,li,ml),F=e=>ti.test(e),Ht=e=>gt(e,ii),Sl=e=>gt(e,ai),Ko=e=>gt(e,ni),_l=e=>gt(e,si),Cl=e=>gt(e,oi),mr=e=>gt(e,li,!0),$l=e=>gt(e,ci,!0),lt=(e,t,r)=>{const n=ei.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},gt=(e,t,r=!1)=>{const n=ti.exec(e);return n?n[1]?t(n[1]):r:!1},ni=e=>e==="position"||e==="percentage",oi=e=>e==="image"||e==="url",si=e=>e==="length"||e==="size"||e==="bg-size",ii=e=>e==="length",Ml=e=>e==="number",ai=e=>e==="family-name",ci=e=>e==="number"||e==="weight",li=e=>e==="shadow",qo=()=>{const e=ge("color"),t=ge("font"),r=ge("text"),n=ge("font-weight"),o=ge("tracking"),s=ge("leading"),i=ge("breakpoint"),a=ge("container"),c=ge("spacing"),l=ge("radius"),d=ge("shadow"),u=ge("inset-shadow"),h=ge("text-shadow"),f=ge("drop-shadow"),v=ge("blur"),y=ge("perspective"),x=ge("aspect"),w=ge("ease"),k=ge("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...N(),F,Z],M=()=>["auto","hidden","clip","visible","scroll"],b=()=>["auto","contain","none"],g=()=>[F,Z,c],R=()=>[at,"full","auto",...g()],E=()=>[He,"none","subgrid",F,Z],O=()=>["auto",{span:["full",He,F,Z]},He,F,Z],j=()=>[He,"auto",F,Z],D=()=>["auto","min","max","fr",F,Z],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...g()],U=()=>[at,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],I=()=>[at,"screen","full","dvw","lvw","svw","min","max","fit",...g()],W=()=>[at,"screen","full","lh","dvh","lvh","svh","min","max","fit",...g()],z=()=>[e,F,Z],_=()=>[...N(),Ko,Jo,{position:[F,Z]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],K=()=>["auto","cover","contain",_l,yl,{size:[F,Z]}],ne=()=>[hn,Ht,pt],ie=()=>["","none","full",l,F,Z],te=()=>["",J,Ht,pt],se=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[J,hn,Ko,Jo],X=()=>["","none",v,F,Z],Fe=()=>["none",J,F,Z],Ce=()=>["none",J,F,Z],Le=()=>[J,F,Z],Ae=()=>[at,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qe],breakpoint:[qe],color:[ri],container:[qe],"drop-shadow":[qe],ease:["in","out","in-out"],font:[bl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qe],shadow:[qe],spacing:["px",J],text:[qe],"text-shadow":[qe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",at,Z,F,x]}],container:["container"],"container-type":[{"@container":["","normal","size",F,Z]}],"container-named":[vl],columns:[{columns:[J,Z,F,a]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:C()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[He,"auto",F,Z]}],basis:[{basis:[at,"full","auto",a,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[J,at,"auto","initial","none",Z]}],grow:[{grow:["",J,F,Z]}],shrink:[{shrink:["",J,F,Z]}],order:[{order:[He,"first","last","none",F,Z]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:g()}],px:[{px:g()}],py:[{py:g()}],ps:[{ps:g()}],pe:[{pe:g()}],pbs:[{pbs:g()}],pbe:[{pbe:g()}],pt:[{pt:g()}],pr:[{pr:g()}],pb:[{pb:g()}],pl:[{pl:g()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...W()]}],"min-block-size":[{"min-block":["auto",...W()]}],"max-block-size":[{"max-block":["none",...W()]}],w:[{w:[a,"screen",...U()]}],"min-w":[{"min-w":[a,"screen","none",...U()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,Ht,pt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,$l,xl]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hn,Z]}],"font-family":[{font:[Sl,wl,t]}],"font-features":[{"font-features":[Z]}],"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:[o,F,Z]}],"line-clamp":[{"line-clamp":[J,"none",F,Go]}],leading:[{leading:[s,...g()]}],"list-image":[{"list-image":["none",F,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",F,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[J,"from-font","auto",F,pt]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[J,"auto",F,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"tab-size":[{tab:[He,F,Z]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F,Z]}],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",F,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:K()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},He,F,Z],radial:["",F,Z],conic:[He,F,Z]},Cl,kl]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-bs":[{"border-bs":te()}],"border-w-be":[{"border-be":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[J,F,Z]}],"outline-w":[{outline:["",J,Ht,pt]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",d,mr,hr]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",u,mr,hr]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[J,pt]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",h,mr,hr]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[J,F,Z]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"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":[J]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[F,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[J]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:K()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",F,Z]}],filter:[{filter:["","none",F,Z]}],blur:[{blur:X()}],brightness:[{brightness:[J,F,Z]}],contrast:[{contrast:[J,F,Z]}],"drop-shadow":[{"drop-shadow":["","none",f,mr,hr]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",J,F,Z]}],"hue-rotate":[{"hue-rotate":[J,F,Z]}],invert:[{invert:["",J,F,Z]}],saturate:[{saturate:[J,F,Z]}],sepia:[{sepia:["",J,F,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",F,Z]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[J,F,Z]}],"backdrop-contrast":[{"backdrop-contrast":[J,F,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",J,F,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[J,F,Z]}],"backdrop-invert":[{"backdrop-invert":["",J,F,Z]}],"backdrop-opacity":[{"backdrop-opacity":[J,F,Z]}],"backdrop-saturate":[{"backdrop-saturate":[J,F,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",J,F,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":g()}],"border-spacing-x":[{"border-spacing-x":g()}],"border-spacing-y":[{"border-spacing-y":g()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",F,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[J,"initial",F,Z]}],ease:[{ease:["linear","initial",w,F,Z]}],delay:[{delay:[J,F,Z]}],animate:[{animate:["none",k,F,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,F,Z]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Fe()}],"rotate-x":[{"rotate-x":Fe()}],"rotate-y":[{"rotate-y":Fe()}],"rotate-z":[{"rotate-z":Fe()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:Le()}],"skew-x":[{"skew-x":Le()}],"skew-y":[{"skew-y":Le()}],transform:[{transform:[F,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ae()}],"translate-x":[{"translate-x":Ae()}],"translate-y":[{"translate-y":Ae()}],"translate-z":[{"translate-z":Ae()}],"translate-none":["translate-none"],zoom:[{zoom:[He,F,Z]}],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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",F,Z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":z()}],"scrollbar-track-color":[{"scrollbar-track":z()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mbs":[{"scroll-mbs":g()}],"scroll-mbe":[{"scroll-mbe":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pbs":[{"scroll-pbs":g()}],"scroll-pbe":[{"scroll-pbe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"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",F,Z]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[J,Ht,pt,Go]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Al=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:o={},override:s={}})=>(_t(e,"cacheSize",t),_t(e,"prefix",r),_t(e,"experimentalParseClassName",n),gr(e.theme,s.theme),gr(e.classGroups,s.classGroups),gr(e.conflictingClassGroups,s.conflictingClassGroups),gr(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),_t(e,"postfixLookupClassGroups",s.postfixLookupClassGroups),_t(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),br(e.theme,o.theme),br(e.classGroups,o.classGroups),br(e.conflictingClassGroups,o.conflictingClassGroups),br(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Mn(e,o,"postfixLookupClassGroups"),Mn(e,o,"orderSensitiveModifiers"),e),_t=(e,t,r)=>{r!==void 0&&(e[t]=r)},gr=(e,t)=>{if(t)for(const r in t)_t(e,r,t[r])},br=(e,t)=>{if(t)for(const r in t)Mn(e,t,r)},Mn=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},Nl=(e,...t)=>typeof e=="function"?Uo(qo,e,...t):Uo(()=>Al(qo(),e),...t),mn=["row-smallest","row-small","row-mid","row-large","row-largest"],gn=["form","app","sidebar","desk","desk-fixed","quick-edit","dialog","toast","scrollbar"],jl=Nl({extend:{classGroups:{h:[{h:mn}],"min-h":[{"min-h":mn}],"max-h":[{"max-h":mn}],w:[{w:gn}],"min-w":[{"min-w":gn}],"max-w":[{"max-w":gn}]}}});function q(...e){return jl(Zc(e))}const Rl={draft:"gray",cancelled:"red",outstanding:"orange","not transferred":"orange","not saved":"orange","not submitted":"orange",paid:"green",lunas:"green",saved:"blue",submitted:"blue",return:"gray","return issued":"gray",unpaid:"red","belum bayar":"red",overdue:"red","partly paid":"yellow","partially paid":"yellow",pending:"yellow",expired:"red",active:"green",maxed:"orange",open:"blue",won:"green",lost:"red",fulfilled:"green",closed:"gray",archived:"gray"};function di(e){return Rl[e.trim().toLowerCase()]??"gray"}function Un(e){return e==="currency"||e==="number"||e==="integer"}function El(e,t,r){if(t==="currency"){const n=r.locale??"en-US";return r.currency?new Intl.NumberFormat(n,{style:"currency",currency:r.currency}).format(e):new Intl.NumberFormat(n,{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}return t==="integer"?String(Math.trunc(e)):e.toFixed(r.precision??Tl)}const Tl=2;function Gn(e,t,r={}){if(e==null)return"";if(t==="check")return e?"True":"False";if(t==="date"){const n=e instanceof Date?e:new Date(String(e));return Number.isNaN(n.getTime())?String(e):new Intl.DateTimeFormat(r.locale??"en-US",{dateStyle:"medium"}).format(n)}if(Un(t)){const n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?El(n,t,r):String(e)}return typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e)}const Jr={"academic-cap":["M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5"],adjustments:["M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"],archive:["m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"],"arrow-down":["M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"],"arrow-left":["M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"],"arrow-long-down":["M15.75 17.25 12 21m0 0-3.75-3.75M12 21V3"],"arrow-long-up":["M8.25 6.75 12 3m0 0 3.75 3.75M12 3v18"],"arrow-right":["M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"],"arrow-turn-down-left":["m7.49 12-3.75 3.75m0 0 3.75 3.75m-3.75-3.75h16.5V4.499"],"arrow-up":["M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"],"arrow-uturn-left":["M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"],"arrows-right-left":["M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"],banknotes:["M2.25 18.75a60.07 60.07 0 0 1 15.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 0 1 3 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 0 0-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 0 1-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 0 0 3 15h-.75M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm3 0h.008v.008H18V10.5Zm-12 0h.008v.008H6V10.5Z"],beaker:["M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0 1 12 15a9.065 9.065 0 0 0-6.23-.693L5 14.5m14.8.8 1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0 1 12 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5"],bell:["M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"],"bell-alert":["M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0M3.124 7.5A8.969 8.969 0 0 1 5.292 3m13.416 0a8.969 8.969 0 0 1 2.168 4.5"],bolt:["m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"],"book-open":["M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"],bookmark:["M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0Z"],briefcase:["M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 0 0 .75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 0 0-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0 1 12 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 0 1-.673-.38m0 0A2.18 2.18 0 0 1 3 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 0 1 3.413-.387m7.5 0V5.25A2.25 2.25 0 0 0 13.5 3h-3a2.25 2.25 0 0 0-2.25 2.25v.894m7.5 0a48.667 48.667 0 0 0-7.5 0M12 12.75h.008v.008H12v-.008Z"],"building-library":["M12 21v-8.25M15.75 21v-8.25M8.25 21v-8.25M3 9l9-6 9 6m-1.5 12V10.332A48.36 48.36 0 0 0 12 9.75c-2.551 0-5.056.2-7.5.582V21M3 21h18M12 6.75h.008v.008H12V6.75Z"],"building-office":["M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z"],calculator:["M15.75 15.75V18m-7.5-6.75h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V13.5Zm0 2.25h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V18Zm2.498-6.75h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V13.5Zm0 2.25h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V18Zm2.504-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5Zm0 2.25h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V18Zm2.498-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5ZM8.25 6h7.5v2.25h-7.5V6ZM12 2.25c-1.892 0-3.758.11-5.593.322C5.307 2.7 4.5 3.65 4.5 4.757V19.5a2.25 2.25 0 0 0 2.25 2.25h10.5a2.25 2.25 0 0 0 2.25-2.25V4.757c0-1.108-.806-2.057-1.907-2.185A48.507 48.507 0 0 0 12 2.25Z"],calendar:["M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"],"calendar-range":["M6.75 2.994v2.25m10.5-2.25v2.25m-14.252 13.5V7.491a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v11.251m-18 0a2.25 2.25 0 0 0 2.25 2.25h13.5a2.25 2.25 0 0 0 2.25-2.25m-18 0v-7.5a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v7.5m-6.75-6h2.25m-9 2.25h4.5m.002-2.25h.005v.006H12v-.006Zm-.001 4.5h.006v.006h-.006v-.005Zm-2.25.001h.005v.006H9.75v-.006Zm-2.25 0h.005v.005h-.006v-.005Zm6.75-2.247h.005v.005h-.005v-.005Zm0 2.247h.006v.006h-.006v-.006Zm2.25-2.248h.006V15H16.5v-.005Z"],"chart-bar":["M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"],"chart-bar-square":["M7.5 14.25v2.25m3-4.5v4.5m3-6.75v6.75m3-9v9M6 20.25h12A2.25 2.25 0 0 0 20.25 18V6A2.25 2.25 0 0 0 18 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25Z"],"chart-line":["M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5m.75-9 3-3 2.148 2.148A12.061 12.061 0 0 1 16.5 7.605"],"chart-pie":["M10.5 6a7.5 7.5 0 1 0 7.5 7.5h-7.5V6Z","M13.5 10.5H21A7.5 7.5 0 0 0 13.5 3v7.5Z"],"chat-bubble":["M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 0 1-.825-.242m9.345-8.334a2.126 2.126 0 0 0-.476-.095 48.64 48.64 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"],check:["m4.5 12.75 6 6 9-13.5"],"check-badge":["M9 12.75 11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 0 1-1.043 3.296 3.745 3.745 0 0 1-3.296 1.043A3.745 3.745 0 0 1 12 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 0 1-3.296-1.043 3.745 3.745 0 0 1-1.043-3.296A3.745 3.745 0 0 1 3 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 0 1 1.043-3.296 3.746 3.746 0 0 1 3.296-1.043A3.746 3.746 0 0 1 12 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 0 1 3.296 1.043 3.746 3.746 0 0 1 1.043 3.296A3.745 3.745 0 0 1 21 12Z"],"check-circle":["M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"],"chevron-down":["m19.5 8.25-7.5 7.5-7.5-7.5"],"chevron-left":["M15.75 19.5 8.25 12l7.5-7.5"],"chevron-right":["m8.25 4.5 7.5 7.5-7.5 7.5"],"chevron-up":["m4.5 15.75 7.5-7.5 7.5 7.5"],"chevron-up-down":["M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"],"chevrons-left":["m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5"],"chevrons-right":["m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5"],"circle-stack":["M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"],clipboard:["M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"],"clipboard-check":["M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"],"clipboard-copy":["M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"],"clipboard-list":["M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"],clock:["M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"],close:["M6 18 18 6M6 6l12 12"],code:["M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"],cog:["M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z","M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"],"command-line":["m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"],"computer-desktop":["M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"],"cpu-chip":["M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"],"credit-card":["M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"],cube:["m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"],"cube-transparent":["m21 7.5-2.25-1.313M21 7.5v2.25m0-2.25-2.25 1.313M3 7.5l2.25-1.313M3 7.5l2.25 1.313M3 7.5v2.25m9 3 2.25-1.313M12 12.75l-2.25-1.313M12 12.75V15m0 6.75 2.25-1.313M12 21.75V19.5m0 2.25-2.25-1.313m0-16.875L12 2.25l2.25 1.313M21 14.25v2.25l-2.25 1.313m-13.5 0L3 16.5v-2.25"],"currency-dollar":["M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"],"cursor-arrow":["M15.042 21.672 13.684 16.6m0 0-2.51 2.225.569-9.47 5.227 7.917-3.286-.672ZM12 2.25V4.5m5.834.166-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243-1.59-1.59"],"device-phone":["M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"],document:["M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"],"document-chart":["M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25M9 16.5v.75m3-3v3M15 12v5.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"],"document-check":["M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"],"document-plus":["M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"],"document-search":["M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"],"document-text":["M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"],download:["M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"],duplicate:["M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"],ellipsis:["M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"],envelope:["M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75"],"exclamation-circle":["M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"],"exclamation-triangle":["M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"],"external-link":["M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"],eye:["M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z","M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"],"face-smile":["M15.182 15.182a4.5 4.5 0 0 1-6.364 0M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Z"],film:["M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h1.5C5.496 19.5 6 18.996 6 18.375m-3.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-1.5A1.125 1.125 0 0 1 18 18.375M20.625 4.5H3.375m17.25 0c.621 0 1.125.504 1.125 1.125M20.625 4.5h-1.5C18.504 4.5 18 5.004 18 5.625m3.75 0v1.5c0 .621-.504 1.125-1.125 1.125M3.375 4.5c-.621 0-1.125.504-1.125 1.125M3.375 4.5h1.5C5.496 4.5 6 5.004 6 5.625m-3.75 0v1.5c0 .621.504 1.125 1.125 1.125m0 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m1.5-3.75C5.496 8.25 6 7.746 6 7.125v-1.5M4.875 8.25C5.496 8.25 6 8.754 6 9.375v1.5m0-5.25v5.25m0-5.25C6 5.004 6.504 4.5 7.125 4.5h9.75c.621 0 1.125.504 1.125 1.125m1.125 2.625h1.5m-1.5 0A1.125 1.125 0 0 1 18 7.125v-1.5m1.125 2.625c-.621 0-1.125.504-1.125 1.125v1.5m2.625-2.625c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125M18 5.625v5.25M7.125 12h9.75m-9.75 0A1.125 1.125 0 0 1 6 10.875M7.125 12C6.504 12 6 12.504 6 13.125m0-2.25C6 11.496 5.496 12 4.875 12M18 10.875c0 .621-.504 1.125-1.125 1.125M18 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m-12 5.25v-5.25m0 5.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125m-12 0v-1.5c0-.621-.504-1.125-1.125-1.125M18 18.375v-5.25m0 5.25v-1.5c0-.621.504-1.125 1.125-1.125M18 13.125v1.5c0 .621.504 1.125 1.125 1.125M18 13.125c0-.621.504-1.125 1.125-1.125M6 13.125v1.5c0 .621-.504 1.125-1.125 1.125M6 13.125C6 12.504 5.496 12 4.875 12m-1.5 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M19.125 12h1.5m0 0c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h1.5m14.25 0h1.5"],filter:["M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"],fingerprint:["M7.864 4.243A7.5 7.5 0 0 1 19.5 10.5c0 2.92-.556 5.709-1.568 8.268M5.742 6.364A7.465 7.465 0 0 0 4.5 10.5a7.464 7.464 0 0 1-1.15 3.993m1.989 3.559A11.209 11.209 0 0 0 8.25 10.5a3.75 3.75 0 1 1 7.5 0c0 .527-.021 1.049-.064 1.565M12 10.5a14.94 14.94 0 0 1-3.6 9.75m6.633-4.596a18.666 18.666 0 0 1-2.485 5.33"],fire:["M15.362 5.214A8.252 8.252 0 0 1 12 21 8.25 8.25 0 0 1 6.038 7.047 8.287 8.287 0 0 0 9 9.601a8.983 8.983 0 0 1 3.361-6.867 8.21 8.21 0 0 0 3 2.48Z","M12 18a3.75 3.75 0 0 0 .495-7.468 5.99 5.99 0 0 0-1.925 3.547 5.975 5.975 0 0 1-2.133-1.001A3.75 3.75 0 0 0 12 18Z"],flag:["M3 3v1.5M3 21v-6m0 0 2.77-.693a9 9 0 0 1 6.208.682l.108.054a9 9 0 0 0 6.086.71l3.114-.732a48.524 48.524 0 0 1-.005-10.499l-3.11.732a9 9 0 0 1-6.085-.711l-.108-.054a9 9 0 0 0-6.208-.682L3 4.5M3 15V4.5"],folder:["M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"],"folder-open":["M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"],gift:["M21 11.25v8.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5v-8.25M12 4.875A2.625 2.625 0 1 0 9.375 7.5H12m0-2.625V7.5m0-2.625A2.625 2.625 0 1 1 14.625 7.5H12m0 0V21m-8.625-9.75h18c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125h-18c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"],globe:["M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"],"hand-raised":["M10.05 4.575a1.575 1.575 0 1 0-3.15 0v3m3.15-3v-1.5a1.575 1.575 0 0 1 3.15 0v1.5m-3.15 0 .075 5.925m3.075.75V4.575m0 0a1.575 1.575 0 0 1 3.15 0V15M6.9 7.575a1.575 1.575 0 1 0-3.15 0v8.175a6.75 6.75 0 0 0 6.75 6.75h2.018a5.25 5.25 0 0 0 3.712-1.538l1.732-1.732a5.25 5.25 0 0 0 1.538-3.712l.003-2.024a.668.668 0 0 1 .198-.471 1.575 1.575 0 1 0-2.228-2.228 3.818 3.818 0 0 0-1.12 2.687M6.9 7.575V12m6.27 4.318A4.49 4.49 0 0 1 16.35 15m.002 0h-.002"],hashtag:["M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"],heart:["M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z"],home:["m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"],identification:["M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z"],inbox:["M9 3.75H6.912a2.25 2.25 0 0 0-2.15 1.588L2.35 13.177a2.25 2.25 0 0 0-.1.661V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 0 0-2.15-1.588H15M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859M12 3v8.25m0 0-3-3m3 3 3-3"],"inbox-stack":["m7.875 14.25 1.214 1.942a2.25 2.25 0 0 0 1.908 1.058h2.006c.776 0 1.497-.4 1.908-1.058l1.214-1.942M2.41 9h4.636a2.25 2.25 0 0 1 1.872 1.002l.164.246a2.25 2.25 0 0 0 1.872 1.002h2.092a2.25 2.25 0 0 0 1.872-1.002l.164-.246A2.25 2.25 0 0 1 16.954 9h4.636M2.41 9a2.25 2.25 0 0 0-.16.832V12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 12V9.832c0-.287-.055-.57-.16-.832M2.41 9a2.25 2.25 0 0 1 .382-.632l3.285-3.832a2.25 2.25 0 0 1 1.708-.786h8.43c.657 0 1.281.287 1.709.786l3.284 3.832c.163.19.291.404.382.632M4.5 20.25h15A2.25 2.25 0 0 0 21.75 18v-2.625c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125V18a2.25 2.25 0 0 0 2.25 2.25Z"],"information-circle":["m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"],key:["M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"],language:["m10.5 21 5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 0 1 6-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 0 1-3.827-5.802"],lifebuoy:["M16.712 4.33a9.027 9.027 0 0 1 1.652 1.306c.51.51.944 1.064 1.306 1.652M16.712 4.33l-3.448 4.138m3.448-4.138a9.014 9.014 0 0 0-9.424 0M19.67 7.288l-4.138 3.448m4.138-3.448a9.014 9.014 0 0 1 0 9.424m-4.138-5.976a3.736 3.736 0 0 0-.88-1.388 3.737 3.737 0 0 0-1.388-.88m2.268 2.268a3.765 3.765 0 0 1 0 2.528m-2.268-4.796a3.765 3.765 0 0 0-2.528 0m4.796 4.796c-.181.506-.475.982-.88 1.388a3.736 3.736 0 0 1-1.388.88m2.268-2.268 4.138 3.448m0 0a9.027 9.027 0 0 1-1.306 1.652c-.51.51-1.064.944-1.652 1.306m0 0-3.448-4.138m3.448 4.138a9.014 9.014 0 0 1-9.424 0m5.976-4.138a3.765 3.765 0 0 1-2.528 0m0 0a3.736 3.736 0 0 1-1.388-.88 3.737 3.737 0 0 1-.88-1.388m2.268 2.268L7.288 19.67m0 0a9.024 9.024 0 0 1-1.652-1.306 9.027 9.027 0 0 1-1.306-1.652m0 0 4.138-3.448M4.33 16.712a9.014 9.014 0 0 1 0-9.424m4.138 5.976a3.765 3.765 0 0 1 0-2.528m0 0c.181-.506.475-.982.88-1.388a3.736 3.736 0 0 1 1.388-.88m-2.268 2.268L4.33 7.288m6.406 1.18L7.288 4.33m0 0a9.024 9.024 0 0 0-1.652 1.306A9.025 9.025 0 0 0 4.33 7.288"],"light-bulb":["M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"],link:["M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"],"list-bullet":["M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"],"lock-closed":["M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"],"lock-open":["M13.5 10.5V6.75a4.5 4.5 0 1 1 9 0v3.75M3.75 21.75h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H3.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"],map:["M9 6.75V15m6-6v8.25m.503 3.498 4.875-2.437c.381-.19.622-.58.622-1.006V4.82c0-.836-.88-1.38-1.628-1.006l-3.869 1.934c-.317.159-.69.159-1.006 0L9.503 3.252a1.125 1.125 0 0 0-1.006 0L3.622 5.689C3.24 5.88 3 6.27 3 6.695V19.18c0 .836.88 1.38 1.628 1.006l3.869-1.934c.317-.159.69-.159 1.006 0l4.994 2.497c.317.158.69.158 1.006 0Z"],"map-pin":["M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z","M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z"],megaphone:["M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 1 1 0-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 0 1-1.44-4.282m3.102.069a18.03 18.03 0 0 1-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 0 1 8.835 2.535M10.34 6.66a23.847 23.847 0 0 0 8.835-2.535m0 0A23.74 23.74 0 0 0 18.795 3m.38 1.125a23.91 23.91 0 0 1 1.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 0 0 1.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 0 1 0 3.46"],menu:["M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"],minus:["M5 12h14"],moon:["M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"],newspaper:["M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z"],"no-symbol":["M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636"],"numbered-list":["M8.242 5.992h12m-12 6.003H20.24m-12 5.999h12M4.117 7.495v-3.75H2.99m1.125 3.75H2.99m1.125 0H5.24m-1.92 2.577a1.125 1.125 0 1 1 1.591 1.59l-1.83 1.83h2.16M2.99 15.745h1.125a1.125 1.125 0 0 1 0 2.25H3.74m0-.002h.375a1.125 1.125 0 0 1 0 2.25H2.99"],"paint-brush":["M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42"],pause:["M14.25 9v6m-4.5 0V9M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"],pencil:["m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"],"percent-badge":["m8.99 14.993 6-6m6 3.001c0 1.268-.63 2.39-1.593 3.069a3.746 3.746 0 0 1-1.043 3.296 3.745 3.745 0 0 1-3.296 1.043 3.745 3.745 0 0 1-3.068 1.593c-1.268 0-2.39-.63-3.068-1.593a3.745 3.745 0 0 1-3.296-1.043 3.746 3.746 0 0 1-1.043-3.297 3.746 3.746 0 0 1-1.593-3.068c0-1.268.63-2.39 1.593-3.068a3.746 3.746 0 0 1 1.043-3.297 3.745 3.745 0 0 1 3.296-1.042 3.745 3.745 0 0 1 3.068-1.594c1.268 0 2.39.63 3.068 1.593a3.745 3.745 0 0 1 3.296 1.043 3.746 3.746 0 0 1 1.043 3.297 3.746 3.746 0 0 1 1.593 3.068ZM9.74 9.743h.008v.007H9.74v-.007Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm4.125 4.5h.008v.008h-.008v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"],phone:["M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z"],photo:["m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"],play:["M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z","M15.91 11.672a.375.375 0 0 1 0 .656l-5.603 3.113a.375.375 0 0 1-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112Z"],plus:["M12 4.5v15m7.5-7.5h-15"],"presentation-chart":["M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5M9 11.25v1.5M12 9v3.75m3-6v6"],printer:["M6.72 13.829c-.24.03-.48.062-.72.096m.72-.096a42.415 42.415 0 0 1 10.56 0m-10.56 0L6.34 18m10.94-4.171c.24.03.48.062.72.096m-.72-.096L17.66 18m0 0 .229 2.523a1.125 1.125 0 0 1-1.12 1.227H7.231c-.662 0-1.18-.568-1.12-1.227L6.34 18m11.318 0h1.091A2.25 2.25 0 0 0 21 15.75V9.456c0-1.081-.768-2.015-1.837-2.175a48.055 48.055 0 0 0-1.913-.247M6.34 18H5.25A2.25 2.25 0 0 1 3 15.75V9.456c0-1.081.768-2.015 1.837-2.175a48.041 48.041 0 0 1 1.913-.247m10.5 0a48.536 48.536 0 0 0-10.5 0m10.5 0V3.375c0-.621-.504-1.125-1.125-1.125h-8.25c-.621 0-1.125.504-1.125 1.125v3.659M18 10.5h.008v.008H18V10.5Zm-3 0h.008v.008H15V10.5Z"],"puzzle-piece":["M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"],"qr-code":["M3.75 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 3.75 9.375v-4.5ZM3.75 14.625c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5a1.125 1.125 0 0 1-1.125-1.125v-4.5ZM13.5 4.875c0-.621.504-1.125 1.125-1.125h4.5c.621 0 1.125.504 1.125 1.125v4.5c0 .621-.504 1.125-1.125 1.125h-4.5A1.125 1.125 0 0 1 13.5 9.375v-4.5Z","M6.75 6.75h.75v.75h-.75v-.75ZM6.75 16.5h.75v.75h-.75v-.75ZM16.5 6.75h.75v.75h-.75v-.75ZM13.5 13.5h.75v.75h-.75v-.75ZM13.5 19.5h.75v.75h-.75v-.75ZM19.5 13.5h.75v.75h-.75v-.75ZM19.5 19.5h.75v.75h-.75v-.75ZM16.5 16.5h.75v.75h-.75v-.75Z"],"question-circle":["M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"],"queue-list":["M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"],"receipt-percent":["m9 14.25 6-6m4.5-3.493V21.75l-3.75-1.5-3.75 1.5-3.75-1.5-3.75 1.5V4.757c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0c1.1.128 1.907 1.077 1.907 2.185ZM9.75 9h.008v.008H9.75V9Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm4.125 4.5h.008v.008h-.008V13.5Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"],"receipt-refund":["M8.25 9.75h4.875a2.625 2.625 0 0 1 0 5.25H12M8.25 9.75 10.5 7.5M8.25 9.75 10.5 12m9-7.243V21.75l-3.75-1.5-3.75 1.5-3.75-1.5-3.75 1.5V4.757c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0c1.1.128 1.907 1.077 1.907 2.185Z"],"rectangle-group":["M2.25 7.125C2.25 6.504 2.754 6 3.375 6h6c.621 0 1.125.504 1.125 1.125v3.75c0 .621-.504 1.125-1.125 1.125h-6a1.125 1.125 0 0 1-1.125-1.125v-3.75ZM14.25 8.625c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v8.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-8.25ZM3.75 16.125c0-.621.504-1.125 1.125-1.125h5.25c.621 0 1.125.504 1.125 1.125v2.25c0 .621-.504 1.125-1.125 1.125h-5.25a1.125 1.125 0 0 1-1.125-1.125v-2.25Z"],"rectangle-stack":["M6 6.878V6a2.25 2.25 0 0 1 2.25-2.25h7.5A2.25 2.25 0 0 1 18 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 0 0 4.5 9v.878m13.5-3A2.25 2.25 0 0 1 19.5 9v.878m0 0a2.246 2.246 0 0 0-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0 1 21 12v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6c0-.98.626-1.813 1.5-2.122"],refresh:["M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"],"rocket-launch":["M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"],scale:["M12 3v17.25m0 0c-1.472 0-2.882.265-4.185.75M12 20.25c1.472 0 2.882.265 4.185.75M18.75 4.97A48.416 48.416 0 0 0 12 4.5c-2.291 0-4.545.16-6.75.47m13.5 0c1.01.143 2.01.317 3 .52m-3-.52 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.988 5.988 0 0 1-2.031.352 5.988 5.988 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L18.75 4.971Zm-16.5.52c.99-.203 1.99-.377 3-.52m0 0 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.989 5.989 0 0 1-2.031.352 5.989 5.989 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L5.25 4.971Z"],scissors:["m7.848 8.25 1.536.887M7.848 8.25a3 3 0 1 1-5.196-3 3 3 0 0 1 5.196 3Zm1.536.887a2.165 2.165 0 0 1 1.083 1.839c.005.351.054.695.14 1.024M9.384 9.137l2.077 1.199M7.848 15.75l1.536-.887m-1.536.887a3 3 0 1 1-5.196 3 3 3 0 0 1 5.196-3Zm1.536-.887a2.165 2.165 0 0 0 1.083-1.838c.005-.352.054-.695.14-1.025m-1.223 2.863 2.077-1.199m0-3.328a4.323 4.323 0 0 1 2.068-1.379l5.325-1.628a4.5 4.5 0 0 1 2.48-.044l.803.215-7.794 4.5m-2.882-1.664A4.33 4.33 0 0 0 10.607 12m3.736 0 7.794 4.5-.802.215a4.5 4.5 0 0 1-2.48-.043l-5.326-1.629a4.324 4.324 0 0 1-2.068-1.379M14.343 12l-2.882 1.664"],search:["m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"],send:["M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5"],server:["M5.25 14.25h13.5m-13.5 0a3 3 0 0 1-3-3m3 3a3 3 0 1 0 0 6h13.5a3 3 0 1 0 0-6m-16.5-3a3 3 0 0 1 3-3h13.5a3 3 0 0 1 3 3m-19.5 0a4.5 4.5 0 0 1 .9-2.7L5.737 5.1a3.375 3.375 0 0 1 2.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 0 1 .9 2.7m0 0a3 3 0 0 1-3 3m0 3h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Zm-3 6h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Z"],share:["M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z"],"shield-check":["M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"],"shield-exclamation":["M12 9v3.75m0-10.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.75c0 5.592 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.57-.598-3.75h-.152c-3.196 0-6.1-1.25-8.25-3.286Zm0 13.036h.008v.008H12v-.008Z"],"shopping-bag":["M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"],"shopping-cart":["M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"],sort:["M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"],sparkles:["M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"],"square-3-stack":["M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"],squares:["M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"],"squares-plus":["M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z"],star:["M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"],storefront:["M13.5 21v-7.5a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 .75.75V21m-4.5 0H2.36m11.14 0H18m0 0h3.64m-1.39 0V9.349M3.75 21V9.349m0 0a3.001 3.001 0 0 0 3.75-.615A2.993 2.993 0 0 0 9.75 9.75c.896 0 1.7-.393 2.25-1.016a2.993 2.993 0 0 0 2.25 1.016c.896 0 1.7-.393 2.25-1.015a3.001 3.001 0 0 0 3.75.614m-16.5 0a3.004 3.004 0 0 1-.621-4.72l1.189-1.19A1.5 1.5 0 0 1 5.378 3h13.243a1.5 1.5 0 0 1 1.06.44l1.19 1.189a3 3 0 0 1-.621 4.72M6.75 18h3.75a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75H6.75a.75.75 0 0 0-.75.75v3.75c0 .414.336.75.75.75Z"],sun:["M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"],swatch:["M4.098 19.902a3.75 3.75 0 0 0 5.304 0l6.401-6.402M6.75 21A3.75 3.75 0 0 1 3 17.25V4.125C3 3.504 3.504 3 4.125 3h5.25c.621 0 1.125.504 1.125 1.125v4.072M6.75 21a3.75 3.75 0 0 0 3.75-3.75V8.197M6.75 21h13.125c.621 0 1.125-.504 1.125-1.125v-5.25c0-.621-.504-1.125-1.125-1.125h-4.072M10.5 8.197l2.88-2.88c.438-.439 1.15-.439 1.59 0l3.712 3.713c.44.44.44 1.152 0 1.59l-2.879 2.88M6.75 17.25h.008v.008H6.75v-.008Z"],"table-cells":["M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0 1 12 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5"],tag:["M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z","M6 6h.008v.008H6V6Z"],"thumb-up":["M6.633 10.25c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 0 1 2.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 0 0 .322-1.672V2.75a.75.75 0 0 1 .75-.75 2.25 2.25 0 0 1 2.25 2.25c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282m0 0h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 0 1-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 0 0-1.423-.23H5.904m10.598-9.75H14.25M5.904 18.5c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 0 1-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 9.953 4.167 9.5 5 9.5h1.053c.472 0 .745.556.5.96a8.958 8.958 0 0 0-1.302 4.665c0 1.194.232 2.333.654 3.375Z"],ticket:["M16.5 6v.75m0 3v.75m0 3v.75m0 3V18m-9-5.25h5.25M7.5 15h3M3.375 5.25c-.621 0-1.125.504-1.125 1.125v3.026a2.999 2.999 0 0 1 0 5.198v3.026c0 .621.504 1.125 1.125 1.125h17.25c.621 0 1.125-.504 1.125-1.125v-3.026a2.999 2.999 0 0 1 0-5.198V6.375c0-.621-.504-1.125-1.125-1.125H3.375Z"],trash:["m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"],"trending-down":["M2.25 6 9 12.75l4.286-4.286a11.948 11.948 0 0 1 4.306 6.43l.776 2.898m0 0 3.182-5.511m-3.182 5.51-5.511-3.181"],"trending-up":["M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941"],trophy:["M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0"],truck:["M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"],upload:["M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"],user:["M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"],"user-circle":["M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"],"user-group":["M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"],"user-plus":["M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z"],users:["M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"],variable:["M4.745 3A23.933 23.933 0 0 0 3 12c0 3.183.62 6.22 1.745 9M19.5 3c.967 2.78 1.5 5.817 1.5 9s-.533 6.22-1.5 9M8.25 8.885l1.444-.89a.75.75 0 0 1 1.105.402l2.402 7.206a.75.75 0 0 0 1.104.401l1.445-.889m-8.25.75.213.09a1.687 1.687 0 0 0 2.062-.617l4.45-6.676a1.688 1.688 0 0 1 2.062-.618l.213.09"],"view-columns":["M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z"],wallet:["M21 12a2.25 2.25 0 0 0-2.25-2.25H15a3 3 0 1 1-6 0H5.25A2.25 2.25 0 0 0 3 12m18 0v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6m18 0V9M3 12V9m18 0a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 9m18 0V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v3"],window:["M3 8.25V18a2.25 2.25 0 0 0 2.25 2.25h13.5A2.25 2.25 0 0 0 21 18V8.25m-18 0V6a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 6v2.25m-18 0h18M5.25 6h.008v.008H5.25V6ZM7.5 6h.008v.008H7.5V6Zm2.25 0h.008v.008H9.75V6Z"],wrench:["M11.42 15.17 17.25 21A2.652 2.652 0 0 0 21 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 1 1-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 0 0 4.486-6.336l-3.276 3.277a3.004 3.004 0 0 1-2.25-2.25l3.276-3.276a4.5 4.5 0 0 0-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437 1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008Z"],"x-circle":["m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"]},zl=Object.keys(Jr);function Pl(e){return Object.prototype.hasOwnProperty.call(Jr,e)}function jt({name:e,className:t,style:r,title:n,strokeWidth:o=1.5}){const s=Jr[e];return s?p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round",className:t??"h-4 w-4 flex-shrink-0",style:r,role:n?"img":void 0,"aria-label":n,"aria-hidden":n?void 0:"true","data-icon":e,children:s.map(i=>p.jsx("path",{d:i},i))}):null}function ui({name:e,size:t,title:r,className:n,strokeWidth:o}){if(!e)return null;const s=t??"1.15em";return p.jsx(jt,{name:e,title:r,strokeWidth:o,className:n??"inline-block flex-shrink-0 align-[-0.15em]",style:{width:typeof s=="number"?`${s}px`:s,height:typeof s=="number"?`${s}px`:s}})}function pi(){const e=m.useRef(null),[t,r]=m.useState(0);return m.useEffect(()=>{const n=e.current;if(!n||(r(n.getBoundingClientRect().width),typeof ResizeObserver>"u"))return;const o=new ResizeObserver(s=>{const i=s[0];i&&r(i.contentRect.width)});return o.observe(n),()=>o.disconnect()},[]),[e,t]}function Jn(e){if(Math.abs(e)<1)return Math.round(e).toString();const t=Math.floor(Math.log10(Math.abs(e))),r=Math.floor(t/3),n=Math.round(e/Math.pow(10,r*3)),o=["","K","M","B","T","Q","P"][r]??"";return`${n} ${o}`.trim()}const qt=["#df9eb8","#e9c4da","#f2d4e6","#f8e2f0","#feeef8"],An=["#33a1ff","#df9eb8","#59ba8b","#f2d14b","#9c45e3","#36baad"];function fi({points:e,viewBoxHeight:t,aspectRatio:r,axisPadding:n,pointsPadding:o,left:s,bottom:i,yLabelDivisions:a,extendGridX:c,yMin:l,yMax:d}){return m.useMemo(()=>{const u=r*t,h=n+o,f=e.flat(),v=f.length?Math.min(...f):0,y=f.length?Math.max(...f):0,x=Math.min(l??v,0);let w=Math.max(d??y,0);w===x&&(w=w+1e3);const k=Math.max(...e.map(B=>B.length),0),T=Array.from({length:k},(B,L)=>h+s+L*(u-s-2*h)/(k-1||1)),N=B=>{let L=1-(B-x)/(w-x);return Number.isFinite(L)||(L=0),h+L*(t-2*h-i)},C=e.map(B=>B.map(N)),M=T.map((B,L)=>[B,C.map(U=>U[L])]),b=N(0),g=B=>(a-B)*(t-h*2-i)/a+h,R=B=>B*(w-x)/a+x,E=h+s,O=u-h,j=E+c,D=O-c,P=Array.from({length:a+1},(B,L)=>g(L)).map(B=>`M ${j} ${B} H ${D}`).join(" ");return{viewBoxWidth:u,padding:h,count:k,xs:T,ys:C,xy:M,zeroY:b,yScalerLocation:g,yScalerValue:R,xGrid:P,gridLeft:j,gridRight:D}},[e,t,r,n,o,s,i,a,c,l,d])}function hi({points:e,xLabels:t=[],colors:r=[],className:n,viewBoxHeight:o=500,aspectRatio:s=2.1,axisPadding:i=30,pointsPadding:a=40,xLabelOffset:c=20,yLabelOffset:l=0,yLabelDivisions:d=4,gridColor:u="rgba(0, 0, 0, 0.2)",zeroLineColor:h="rgba(0, 0, 0, 0.2)",fontColor:f="#415668",fontSize:v=22,gridThickness:y=.5,left:x=65,bottom:w=0,extendGridX:k=-20,barWidth:T=28,radius:N=17,skipXLabel:C=1,yMin:M=null,yMax:b=null,formatY:g=Jn,formatX:R=P=>P,drawXGrid:E=!0,drawLabels:O=!0,drawZeroLine:j=!0,ariaLabel:D}){const P=fi({points:e,viewBoxHeight:o,aspectRatio:s,axisPadding:i,pointsPadding:a,left:x,bottom:w,yLabelDivisions:d,extendGridX:k,yMin:M,yMax:b}),B=e.length,L=P.xy.flatMap(([I,W],z)=>W.map((_,V)=>{const K=_<=P.zeroY;return{key:`${z}-${V}`,x:I-T*B/2+V*T,y:K?_:P.zeroY-N,height:Math.abs(_-P.zeroY)+N,color:r[V]??"#33A1FF",isPositive:K}})),U=`meridian-bar-clip-${B}-${P.count}`;return p.jsx("div",{className:n,children:p.jsxs("svg",{viewBox:`0 0 ${P.viewBoxWidth} ${o}`,xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":D??"bar chart",children:[E&&p.jsx("path",{d:P.xGrid,stroke:u,strokeWidth:y,strokeLinecap:"round",fill:"transparent"}),j&&p.jsx("path",{d:`M ${P.gridLeft} ${P.zeroY} H ${P.gridRight}`,stroke:h,strokeWidth:y,strokeLinecap:"round",fill:"transparent"}),O&&t.length>0&&P.xs.map((I,W)=>p.jsx("text",{style:{fontSize:v,fill:f},y:o-i+l+v/2-w,x:I,textAnchor:"middle",children:W%C===0?R(t[W]??""):""},`x-${W}`)),O&&d>0&&Array.from({length:d+1},(I,W)=>p.jsx("text",{style:{fontSize:v,fill:f},y:P.yScalerLocation(W),x:i-c+x,textAnchor:"end",children:g(P.yScalerValue(W))},`y-${W}`)),p.jsxs("defs",{children:[p.jsx("clipPath",{id:`${U}-pos`,children:p.jsx("rect",{x:"0",y:"0",width:P.viewBoxWidth,height:P.zeroY})}),p.jsx("clipPath",{id:`${U}-neg`,children:p.jsx("rect",{x:"0",y:P.zeroY,width:P.viewBoxWidth,height:o-P.zeroY})})]}),L.map(I=>p.jsx("rect",{rx:N,ry:N,x:I.x,y:I.y,width:T,height:I.height,fill:I.color,clipPath:`url(#${U}-${I.isPositive?"pos":"neg"})`},I.key))]})})}function mi({points:e,xLabels:t=[],colors:r=[],className:n,viewBoxHeight:o=500,aspectRatio:s=4,axisPadding:i=30,pointsPadding:a=24,xLabelOffset:c=20,yLabelOffset:l=5,yLabelDivisions:d=4,gridColor:u="rgba(0, 0, 0, 0.2)",fontColor:h="#415668",fontSize:f=20,gridThickness:v=.5,thickness:y=5,left:x=55,bottom:w=0,extendGridX:k=-20,yMin:T=null,yMax:N=null,formatY:C=Jn,formatX:M=E=>E,drawXGrid:b=!0,drawLabels:g=!0,ariaLabel:R}){const E=fi({points:e,viewBoxHeight:o,aspectRatio:s,axisPadding:i,pointsPadding:a,left:x,bottom:w,yLabelDivisions:d,extendGridX:k,yMin:T,yMax:N}),O=`meridian-line-grad-${e.length}-${E.count}`,j=o-E.padding-w,D=B=>E.xy.map(([L,U],I)=>`${I===0?"M":"L"} ${L} ${U[B]} `).join(""),P=B=>`M ${E.padding+x} ${j}`+E.xy.map(([L,U])=>`L ${L} ${U[B]} `).join("")+` V ${j} Z`;return p.jsx("div",{className:n,children:p.jsxs("svg",{viewBox:`0 0 ${E.viewBoxWidth} ${o}`,xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":R??"line chart",children:[b&&p.jsx("path",{d:E.xGrid,stroke:u,strokeWidth:v,strokeLinecap:"round",fill:"transparent"}),g&&t.length>0&&E.xs.map((B,L)=>p.jsx("text",{style:{fontSize:f,fill:h},y:o-i+l+f/2-w,x:B,textAnchor:"middle",children:M(t[L]??"")},`x-${L}`)),g&&d>0&&Array.from({length:d+1},(B,L)=>p.jsx("text",{style:{fontSize:f,fill:h},y:E.yScalerLocation(L),x:i-c+x,textAnchor:"end",children:C(E.yScalerValue(L))},`y-${L}`)),p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:O,x1:"0",y1:"0",x2:"0",y2:"85%",children:[p.jsx("stop",{offset:"0%",stopColor:"rgba(255, 255, 255, 0.5)"}),p.jsx("stop",{offset:"40%",stopColor:"rgba(255, 255, 255, 0.1)"}),p.jsx("stop",{offset:"70%",stopColor:"rgba(255, 255, 255, 0)"})]}),e.map((B,L)=>{var U,I;return p.jsx("mask",{id:`${O}-mask-${L}`,children:p.jsx("rect",{x:"0",y:(U=E.ys[L])!=null&&U.length?Math.min(...E.ys[L]):0,height:o-((I=E.ys[L])!=null&&I.length?Math.min(...E.ys[L]):0),width:"100%",fill:`url('#${O}')`})},`mask-${L}`)})]}),e.map((B,L)=>p.jsxs("g",{children:[p.jsx("path",{strokeLinejoin:"round",d:P(L),strokeWidth:y,strokeLinecap:"round",fill:r[L]??"#33A1FF",mask:`url('#${O}-mask-${L}')`}),p.jsx("path",{strokeLinejoin:"round",d:D(L),stroke:r[L]??"#33A1FF",strokeWidth:y,strokeLinecap:"round",fill:"transparent"})]},`series-${L}`))]})})}function gi({sectors:e,className:t,totalLabel:r="Total",radius:n=36,startAngle:o=Math.PI,thickness:s=10,offsetX:i=0,offsetY:a=0,textOffsetX:c=0,textOffsetY:l=0,valueFormatter:d=h=>h.toString(),ariaLabel:u}){var k;const h=50+i,f=50+a,v=e.reduce((T,N)=>T+Math.max(N.value,0),0),y=v>0,x=`meridian-donut-hole-${e.length}`,w=[];if(y&&e.length>1){let T=o;e.forEach((N,C)=>{const M=2*Math.PI*Math.max(N.value,0)/v;M>0&&w.push({key:C,color:N.color,d:Ol(h,f,n,T,M)}),T+=M})}return p.jsx("div",{className:t,children:p.jsxs("svg",{viewBox:"0 0 100 100",version:"1.1",role:"img","aria-label":u??"donut chart",children:[p.jsx("defs",{children:p.jsx("clipPath",{id:x,children:p.jsx("circle",{cx:h,cy:f,r:n+s/2,fill:"black",strokeWidth:"0"})})}),(!y||e.length<=1)&&p.jsx("circle",{clipPath:`url(#${x})`,cx:h,cy:f,r:n,strokeWidth:s,stroke:y?((k=e[0])==null?void 0:k.color)??"#f4f4f6":"#f4f4f6",fill:"transparent"}),w.map(T=>p.jsx("path",{clipPath:`url(#${x})`,d:T.d,stroke:T.color,strokeWidth:s,fill:"transparent"},T.key)),p.jsx("text",{x:h+c,y:f+l,textAnchor:"middle",style:{fontSize:7,fill:"#7c7c7c"},children:r}),p.jsx("text",{x:h+c,y:f+l+9,textAnchor:"middle",style:{fontSize:8,fontWeight:600,fill:"#1e293b"},children:d(v)})]})})}function Ol(e,t,r,n,o){const s=n+o,i=e+r*Math.cos(n),a=t+r*Math.sin(n),c=e+r*Math.cos(s),l=t+r*Math.sin(s),d=o>Math.PI?1:0;return`M ${i} ${a} A ${r} ${r} 0 ${d} 1 ${c} ${l}`}function Kr({error:e}){return e?p.jsx("span",{className:"text-sm text-red-600 dark:text-red-400",children:e}):null}const qr="mb-1 text-sm text-gray-600 dark:text-gray-500",Kn="w-full rounded bg-transparent text-base text-gray-900 placeholder-gray-500 focus:outline-none dark:text-gray-100",qn="border border-gray-200 bg-gray-25 dark:border-gray-800 dark:bg-gray-875";function Yn(e){return e==="small"?"px-2 py-1":"px-3 py-2"}function Il({children:e,...t}){return p.jsx("div",{...t,children:e})}function Dl({children:e,...t}){return p.jsx("div",{...t,children:e})}function Zl({children:e,...t}){return p.jsx("div",{...t,children:e})}function Fl({children:e,...t}){return p.jsx("div",{...t,children:e})}function Ll(e){return p.jsx("div",{...e,className:q("flex-1",e.className)})}function Vl({children:e,...t}){return p.jsx("hr",{...t,className:q("border-t border-gray-200 dark:border-gray-800",t.className)})}function Bl({value:e,heading:t,format:r,locale:n,currency:o,...s}){const i=r?Gn(e,r,{...n?{locale:n}:{},...o?{currency:o}:{}}):e;if(t){const a=`h${t}`;return p.jsx(a,{...s,children:i})}return p.jsx("p",{...s,children:i})}function Hl({src:e,alt:t,children:r,...n}){return p.jsx("img",{src:e,alt:t,...n})}function Xn({label:e,children:t,variant:r="secondary",icon:n=!1,iconName:o,iconPosition:s="start",background:i=!0,padding:a=!0,...c}){const l=r==="primary";return p.jsxs("button",{type:c.type??"button",...c,className:q("flex items-center justify-center gap-1.5 rounded-md text-sm",i&&"h-8",l?"text-white dark:text-black":"text-gray-700 dark:text-gray-200",i&&(l?"bg-black dark:bg-gray-300 dark:font-semibold":"bg-gray-200 dark:bg-gray-900"),a&&(n?"px-3":"px-6"),c.disabled&&"pointer-events-none cursor-not-allowed opacity-50",c.className),children:[o&&s==="start"&&p.jsx(jt,{name:o,className:"h-4 w-4 flex-shrink-0"}),e??t,o&&s==="end"&&p.jsx(jt,{name:o,className:"h-4 w-4 flex-shrink-0"})]})}const Yo={gray:"bg-gray-200 dark:bg-gray-800 text-gray-700 dark:text-gray-200",orange:"bg-orange-200 dark:bg-orange-800 text-orange-700 dark:text-orange-200",green:"bg-green-200 dark:bg-green-800 text-green-700 dark:text-green-200",red:"bg-red-200 dark:bg-red-800 text-red-700 dark:text-red-200",yellow:"bg-yellow-200 dark:bg-yellow-800 text-yellow-700 dark:text-yellow-200",blue:"bg-blue-200 dark:bg-blue-800 text-blue-700 dark:text-blue-200",indigo:"bg-indigo-200 dark:bg-indigo-800 text-indigo-700 dark:text-indigo-200",pink:"bg-pink-200 dark:bg-pink-800 text-pink-700 dark:text-pink-200",purple:"bg-purple-200 dark:bg-purple-800 text-purple-700 dark:text-purple-200",teal:"bg-teal-200 dark:bg-teal-800 text-teal-700 dark:text-teal-200"};function Wl(e){return Yo[e in Yo?e:"gray"]}function Qn({children:e,color:t="gray",variant:r="badge",label:n,iconName:o,...s}){return p.jsxs("span",{...s,className:q(r==="pill"?"pill truncate font-medium select-none":"truncate rounded-md px-2 py-1 select-none",o?"inline-flex items-center gap-1":"inline-block",Wl(t),s.className),children:[o&&p.jsx(jt,{name:o,className:"h-3.5 w-3.5 flex-shrink-0",strokeWidth:2}),n??e]})}function Ul({label:e,value:t,error:r,children:n,id:o,size:s="large",border:i=!0,...a}){const c=m.useId(),l=o??c;return p.jsxs("div",{className:"flex flex-col",children:[e&&p.jsx("label",{htmlFor:l,className:qr,children:e}),p.jsx("input",{id:l,type:"text",spellCheck:!1,value:t??"","aria-invalid":r?!0:void 0,...a,className:q(Kn,Yn(s),i&&qn,"focus:bg-gray-100 dark:focus:bg-gray-850",r&&"border-red-300 dark:border-red-800",a.className)}),p.jsx(Kr,{error:r})]})}function Gl({label:e,checked:t,children:r,...n}){return p.jsxs("label",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"checkbox",checked:t,...n,style:{width:14,height:14,accentColor:"#A1ABB4",...n.style??{}},className:q("cursor-pointer rounded-sm",n.className)}),e&&p.jsx("span",{className:"text-base text-gray-600 dark:text-gray-400",children:e})]})}function Jl({checked:e,...t}){return p.jsx("div",{role:"switch","aria-checked":e,...t,className:q("relative h-5 w-9 rounded-full bg-gray-300 transition-colors dark:bg-gray-700",e&&"bg-blue-500 dark:bg-blue-600",t.className),children:p.jsx("span",{className:q("absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white shadow-button transition-transform",e&&"translate-x-4")})})}function Kl({value:e=0,min:t=0,max:r=100,children:n,...o}){return p.jsx("input",{type:"range",value:e,min:t,max:r,...o,style:{accentColor:"#33A1FF",...o.style??{}},className:q("vb-slider w-full cursor-pointer",o.className)})}function ql({optionValueKey:e="value",optionLabelKey:t="label",label:r,value:n,placeholder:o,options:s=[],error:i,children:a,id:c,size:l="large",border:d=!0,...u}){const h=m.useId(),f=c??h;return p.jsxs("div",{className:"flex flex-col",children:[r&&p.jsx("label",{htmlFor:f,className:qr,children:r}),p.jsxs("select",{id:f,value:n??"","aria-invalid":i?!0:void 0,...u,className:q(Kn,Yn(l),d&&qn,"cursor-pointer appearance-none focus:bg-gray-100 dark:focus:bg-gray-850",i&&"border-red-300 dark:border-red-800",u.className),style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 10' fill='none' stroke='%23C7C7C7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 2.636L2.636 1l1.637 1.636M1 7.364L2.636 9l1.637-1.636'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 0.5rem center",backgroundSize:"0.5rem 1rem",paddingInlineEnd:"1.5rem",...u.style??{}},children:[o&&p.jsx("option",{value:"",disabled:!0,children:o}),s.map((v,y)=>{const x=v,w=String(x[e]??x.value??""),k=String(x[t]??x.label??w);return p.jsx("option",{value:w,disabled:v.disabled,children:k},`${w}-${y}`)})]}),p.jsx(Kr,{error:i})]})}function Yl({label:e,value:t,rows:r=4,error:n,children:o,id:s,size:i="large",border:a=!0,...c}){const l=m.useId(),d=s??l;return p.jsxs("div",{className:"flex flex-col",children:[e&&p.jsx("label",{htmlFor:d,className:qr,children:e}),p.jsx("textarea",{id:d,value:t??"",rows:r,"aria-invalid":n?!0:void 0,...c,className:q(Kn,Yn(i),a&&qn,"resize-none focus:bg-gray-100 dark:focus:bg-gray-850",n&&"border-red-300 dark:border-red-800",c.className)}),p.jsx(Kr,{error:n})]})}function Xl({label:e,name:t,value:r,options:n=[],error:o,onChange:s,children:i,...a}){const c=t??e??"radio-group";return p.jsxs("div",{role:"radiogroup","aria-label":e,"aria-invalid":o?!0:void 0,...a,className:q("flex flex-col",a.className),children:[e&&p.jsx("span",{className:qr,children:e}),p.jsx("div",{className:"flex flex-col gap-2",children:n.map(l=>p.jsxs("label",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"radio",name:c,value:l.value,checked:r===l.value,disabled:l.disabled,onChange:s,style:{width:14,height:14,accentColor:"#A1ABB4"},className:"cursor-pointer"}),p.jsx("span",{className:"text-base text-gray-600 dark:text-gray-400",children:l.label})]},l.value))}),p.jsx(Kr,{error:o})]})}function Ql({children:e,onSubmit:t,...r}){return p.jsx("form",{...r,onSubmit:n=>{n.preventDefault(),t==null||t(n)},children:e})}function ed({children:e,...t}){return p.jsx("div",{...t,children:e})}function td({children:e,...t}){return p.jsx("div",{...t,children:e})}function rd({title:e,dataSource:t,columns:r=[],rows:n=[],rowActions:o=[],emptyMessage:s="No entries found",showIndex:i=!0,paginate:a=!0,pageSizes:c=[50,100,500,-1],onRowAction:l,onRowOpen:d,locale:u,currency:h,...f}){const[v,y]=m.useState(1),[x,w]=m.useState(c[0]??50),k=x===-1?Math.max(n.length,1):x,T=Math.max(Math.ceil(n.length/k),1),N=Math.min(v,T),C=(N-1)*k,M=a?n.slice(C,C+k):n,b=r.length+(o.length>0?1:0),g={display:"grid",gridTemplateColumns:`repeat(${Math.max(b,1)}, minmax(0, 1fr))`,gridGap:"1rem"},R=j=>j===b-1,E=j=>j.align??(Un(j.format)?"right":void 0),O={...u?{locale:u}:{},...h?{currency:h}:{}};return p.jsxs("section",{...f,className:q("flex flex-col overflow-hidden text-base",f.className),children:[e&&p.jsxs(p.Fragment,{children:[p.jsx("h3",{className:"flex h-row-mid flex-shrink-0 items-center px-4 text-base font-semibold text-gray-900 dark:text-white",children:e}),p.jsx("hr",{className:"border-gray-200 dark:border-gray-800"})]}),p.jsxs("div",{className:"flex items-center",children:[i&&p.jsx("div",{className:"me-2 w-8 text-end text-gray-700 dark:text-gray-400",children:"#"}),p.jsxs("div",{className:"h-row-mid flex-1 text-gray-700 dark:text-gray-400",style:g,children:[r.map((j,D)=>p.jsx("div",{title:j.label,className:q("flex h-full items-center truncate",E(j)==="right"&&"justify-end",E(j)==="center"&&"justify-center",R(D)&&"pe-4"),children:j.label},j.key)),o.length>0&&p.jsx("div",{className:"flex h-full items-center justify-end pe-4","aria-hidden":"true"})]})]}),p.jsx("hr",{className:"border-gray-200 dark:border-gray-800"}),M.length>0&&p.jsx("div",{className:"overflow-y-auto",children:M.map((j,D)=>p.jsxs("div",{children:[p.jsxs("div",{className:q("flex items-center hover:bg-gray-50 dark:hover:bg-gray-850",d&&"cursor-pointer"),"data-row-id":String(j.id??j.name??C+D),...d?{role:"button",tabIndex:0,onClick:()=>d(j,C+D),onKeyDown:P=>{P.key!=="Enter"&&P.key!==" "||(P.preventDefault(),d(j,C+D))}}:{},children:[i&&p.jsx("div",{className:"me-2 w-8 text-end text-gray-700 dark:text-gray-400",children:C+D+1}),p.jsxs("div",{className:"h-row-mid flex-1 text-gray-900 dark:text-gray-300",style:g,children:[r.map((P,B)=>{const L=j[P.key],U=Gn(L,P.format,O);return p.jsx("div",{className:q("flex items-center truncate",E(P)==="right"&&"justify-end",E(P)==="center"&&"justify-center",R(B)&&"pe-4"),children:P.format==="status"&&U?p.jsx(Qn,{label:U,color:di(U),variant:"pill"}):p.jsx("span",{className:"truncate",children:U})},P.key)}),o.length>0&&p.jsx("div",{className:"flex items-center justify-end gap-2 pe-4",children:o.map(P=>p.jsx("button",{type:"button",onClick:B=>{B.stopPropagation(),l==null||l(j,P,C+D)},className:"flex h-row-smallest items-center rounded-md bg-gray-100 px-3 text-sm text-gray-700 hover:bg-gray-200 dark:bg-gray-890 dark:text-gray-200 dark:hover:bg-gray-800",children:P.label},P.label))})]})]}),D!==M.length-1&&p.jsx("hr",{className:"border-gray-200 dark:border-gray-800"})]},String(j.id??j.name??C+D)))}),n.length>0&&a&&p.jsxs("div",{className:"mt-auto",children:[p.jsx("hr",{className:"border-gray-200 dark:border-gray-800"}),p.jsx(bi,{itemCount:n.length,pageNo:N,count:k,maxPages:T,pageSizes:c,activePageSize:x,onPageNo:j=>y(Math.min(Math.max(1,j),T)),onPageSize:j=>{y(1),w(j)}})]}),n.length===0&&p.jsx("div",{className:"my-auto flex flex-col items-center justify-center py-8",children:p.jsx("p",{className:"my-3 text-gray-800 dark:text-gray-200",children:s})})]})}function bi({itemCount:e,pageNo:t,count:r,maxPages:n,pageSizes:o,activePageSize:s,onPageNo:i,onPageSize:a}){const c=o.filter(l=>l===-1?e>=(o[0]??50):e>=l);return p.jsxs("div",{className:"grid select-none grid-cols-3 items-center px-4 text-sm text-gray-800 dark:text-gray-100",style:{height:"50px"},children:[p.jsx("div",{className:"justify-self-start",children:`${(t-1)*r+1} - ${Math.min(t*r,e)}`}),p.jsxs("div",{className:"flex items-center gap-1 justify-self-center",children:[p.jsx("button",{type:"button","aria-label":"Previous page",onClick:()=>i(t-1),disabled:t<=1,className:q("flex h-4 w-4 items-center justify-center",t>1?"cursor-pointer text-gray-600 dark:text-gray-500":"text-transparent"),children:p.jsx(Xo,{direction:"left"})}),p.jsxs("div",{className:"flex gap-1 rounded bg-gray-100 px-1 dark:bg-gray-890",children:[p.jsx("span",{className:"w-7 text-end",children:t}),p.jsx("span",{className:"text-gray-600",children:"/"}),p.jsx("span",{className:"w-7",children:n})]}),p.jsx("button",{type:"button","aria-label":"Next page",onClick:()=>i(t+1),disabled:t>=n,className:q("flex h-4 w-4 items-center justify-center",t<n?"cursor-pointer text-gray-600 dark:text-gray-500":"text-transparent"),children:p.jsx(Xo,{direction:"right"})})]}),c.length>0&&p.jsx("div",{className:"flex justify-self-end rounded border border-gray-100 dark:border-gray-800",children:c.map(l=>p.jsx("button",{type:"button",onClick:()=>a(l),className:q("w-9",(s===l||s===e&&l===-1)&&"rounded bg-gray-100 dark:bg-gray-890"),children:l===-1?"All":l},l))})]})}function nd({total:e=0,page:t=1,pageSize:r=20,pageSizes:n=[50,100,500,-1],onPageChange:o,onPageSizeChange:s,...i}){const a=r===-1?Math.max(e,1):r,c=Math.max(Math.ceil(e/a),1),l=Math.min(Math.max(t,1),c);return p.jsx("div",{...i,children:p.jsx(bi,{itemCount:e,pageNo:l,count:a,maxPages:c,pageSizes:n,activePageSize:r,onPageNo:d=>o==null?void 0:o(Math.min(Math.max(1,d),c)),onPageSize:d=>{o==null||o(1),s==null||s(d)}})})}function Xo({direction:e}){const t={left:"M15 18l-6-6 6-6",right:"M9 18l6-6-6-6",down:"M6 9l6 6 6-6"};return p.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-full w-full","aria-hidden":"true",children:p.jsx("path",{d:t[e]})})}function od({title:e,dataSource:t,chartType:r="bar",rows:n=[],xKey:o="label",yKey:s="value",series:i,emptyMessage:a="No transactions yet",action:c,totalLabel:l="Total",height:d=235,...u}){const[h,f]=pi(),v=m.useMemo(()=>i!=null&&i.length?i:[{key:s,label:e??s}],[i,s,e]),y=r==="donut",x=v.map((N,C)=>N.color??An[C%An.length]),w=n.map(N=>vr(N[o])),k=v.map(N=>n.map(C=>Number(C[N.key]??0))),T=f>0?Math.max(f/d,1):4.15;return p.jsxs("section",{ref:h,...u,className:q("flex flex-col",u.className),children:[(e||c||!y&&v.length>1)&&p.jsxs("div",{className:"flex items-baseline justify-between gap-4 text-gray-900 dark:text-white",children:[e&&p.jsx("span",{className:"text-base font-semibold",children:e}),!y&&v.length>1&&p.jsx("div",{className:"flex gap-8 text-base",children:v.map((N,C)=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"inline-block h-3 w-3 rounded-sm",style:{backgroundColor:x[C]}}),p.jsx("span",{className:"text-gray-900 dark:text-gray-25",children:N.label??N.key})]},N.key))}),c]}),n.length===0?p.jsx("div",{className:"flex-center my-20 h-full w-full flex-1",children:p.jsx("span",{className:"text-base text-gray-600 dark:text-gray-500",children:a})}):y?p.jsxs("div",{className:"relative flex",children:[p.jsx("div",{className:"flex w-1/2 flex-col justify-center gap-4 dark:text-gray-25",children:n.map((N,C)=>p.jsxs("div",{className:"flex items-center text-sm",children:[p.jsx("span",{className:"h-3 w-3 flex-shrink-0 rounded-sm",style:{backgroundColor:qt[C%qt.length]}}),p.jsx("p",{className:"no-scrollbar ms-2 w-28 overflow-x-auto whitespace-nowrap",children:vr(N[o])}),p.jsx("p",{className:"ms-auto flex-shrink-0 whitespace-nowrap",children:vr(N[s])})]},String(N[o]??C)))}),p.jsx(gi,{className:"my-auto w-1/2",ariaLabel:e??"donut chart",totalLabel:l,offsetX:3,thickness:10,textOffsetX:6.5,sectors:n.map((N,C)=>({color:qt[C%qt.length],value:Number(N[s]??0),label:vr(N[o])}))})]}):r==="bar"?p.jsx(hi,{className:"mt-4",ariaLabel:e??"bar chart",points:k,xLabels:w,colors:x,aspectRatio:T}):p.jsx(mi,{className:"mt-4",ariaLabel:e??"line chart",points:k,xLabels:w,colors:x,aspectRatio:T})]})}function sd({title:e,dataSource:t,columns:r=[],rows:n=[],emptyMessage:o="No items in this board",onCardClick:s,...i}){return p.jsxs("section",{...i,className:q("flex flex-col p-4",i.className),children:[e&&p.jsxs("div",{className:"mb-4 flex items-baseline justify-between",children:[p.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-white",children:e}),p.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-500",children:[n.length," records"]})]}),p.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-flow-col md:auto-cols-fr",children:r.map(a=>{const c=n.filter(l=>l.columnId===a.id);return p.jsxs("div",{className:"flex flex-col rounded-md border border-gray-200 bg-gray-25 p-3 dark:border-gray-800 dark:bg-gray-890",children:[p.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"h-2.5 w-2.5 rounded-sm",style:{backgroundColor:a.color??"#7c7c7c"}}),p.jsx("span",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:a.title})]}),p.jsx("span",{className:"pill bg-gray-200 text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:c.length})]}),p.jsx("div",{className:"flex flex-1 flex-col gap-2 overflow-y-auto",children:c.length===0?p.jsx("div",{className:"py-6 text-center text-sm text-gray-600 dark:text-gray-500",children:o}):c.map(l=>p.jsxs("div",{onClick:()=>s==null?void 0:s(l),className:q("rounded-md border border-gray-200 bg-white p-3 transition-colors hover:bg-gray-50 dark:border-gray-800 dark:bg-gray-875 dark:hover:bg-gray-850",l.route||s?"cursor-pointer":""),children:[p.jsxs("div",{className:"flex items-start justify-between gap-2",children:[p.jsx("span",{className:"text-base font-medium text-gray-900 dark:text-gray-100",children:l.title}),l.badge&&p.jsx("span",{className:"pill flex-shrink-0 bg-gray-200 font-medium text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:l.badge})]}),l.subtitle&&p.jsx("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-500",children:l.subtitle}),l.value!==void 0&&p.jsx("p",{className:"mt-2 text-sm font-semibold text-gray-900 dark:text-gray-25",children:String(l.value)})]},l.id))})]},a.id)})})]})}function vi({node:e,level:t=0,onNodeClick:r}){const[n,o]=m.useState(e.defaultExpanded??!0),s=!!(e.children&&e.children.length>0);return p.jsxs("div",{className:"flex flex-col",children:[p.jsxs("div",{className:q("flex flex-shrink-0 items-center justify-between border-b border-gray-200 pe-4 hover:bg-gray-50 dark:border-gray-800 dark:hover:bg-gray-890",t===0?"text-lg":"text-base",e.route||r?"cursor-pointer":""),style:{height:"calc(var(--h-row-mid) + 1px)",paddingLeft:`calc(1rem + 2rem * ${t})`},onClick:()=>{s&&o(!n),r==null||r(e)},children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-3 text-center text-xs text-gray-500 dark:text-gray-600",children:s?n?"▾":"▸":""}),p.jsx("span",{className:q("text-gray-900 dark:text-gray-25",t===0&&"font-semibold"),children:e.label}),e.subtitle&&p.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-500",children:["(",e.subtitle,")"]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[e.badge&&p.jsx("span",{className:"pill bg-gray-200 font-medium text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:e.badge}),e.value!==void 0&&p.jsx("span",{className:"text-base text-gray-900 dark:text-gray-25",children:String(e.value)})]})]}),s&&n&&p.jsx("div",{className:"flex flex-col",children:e.children.map(i=>p.jsx(vi,{node:i,level:t+1,onNodeClick:r},i.id))})]})}function id({title:e,dataSource:t,items:r,rows:n,emptyMessage:o="No tree data",onNodeClick:s,...i}){const a=r??n??[];return p.jsxs("section",{...i,className:q("flex flex-col text-base",i.className),children:[e&&p.jsx("h3",{className:"h-row-mid flex flex-shrink-0 items-center border-b border-gray-200 px-4 text-base font-semibold text-gray-900 dark:border-gray-800 dark:text-white",children:e}),a.length===0?p.jsx("div",{className:"py-8 text-center text-base text-gray-600 dark:text-gray-500",children:o}):p.jsx("div",{className:"custom-scroll flex flex-col overflow-y-auto",children:a.map(c=>p.jsx(vi,{node:c,level:0,onNodeClick:s},c.id))})]})}function vr(e){return e==null?"":typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e)}function ad({children:e,...t}){return p.jsx("aside",{...t,className:q("w-sidebar flex h-full flex-col bg-gray-25 py-2 dark:bg-gray-900",t.className),children:e})}function cd({children:e,...t}){return p.jsx("nav",{...t,className:q("h-row-largest flex flex-shrink-0 items-center justify-between gap-4 border-b border-gray-200 px-4 dark:border-gray-800 dark:bg-gray-875",t.className),children:e})}function ld({children:e,...t}){return p.jsx("div",{...t,role:"toolbar",className:q("flex items-center gap-2",t.className),children:e})}const dd=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Wt=[];function eo(e,t,r){const n=m.useRef(t);m.useEffect(()=>{n.current=t}),m.useEffect(()=>{if(!e)return;const o=r.current,s=document.activeElement instanceof HTMLElement?document.activeElement:null,i={close:()=>{var c;return(c=n.current)==null?void 0:c.call(n)}};Wt.push(i);const a=c=>{if(c.key==="Escape"){Wt[Wt.length-1]===i&&i.close();return}if(c.key!=="Tab"||!o)return;const l=o.querySelectorAll(dd);if(l.length===0)return;const d=l[0],u=l[l.length-1],h=document.activeElement;c.shiftKey&&(h===d||h===o)?(c.preventDefault(),u.focus()):!c.shiftKey&&(h===u||h===o)&&(c.preventDefault(),d.focus())};return o==null||o.focus(),document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a);const c=Wt.indexOf(i);c>=0&&Wt.splice(c,1),s==null||s.focus()}},[e,r])}const ud={left:"inset-y-0 left-0 w-80 border-e",right:"inset-y-0 right-0 w-80 border-s",top:"inset-x-0 top-0 h-80 border-b",bottom:"inset-x-0 bottom-0 h-80 border-t"},pd={left:"-translate-x-full",right:"translate-x-full",top:"-translate-y-full",bottom:"translate-y-full"},fd=200;function to(e){const t=e?"duration-200":"duration-300";return{surface:`transition-transform ${t} ease-out`,fade:`transition-opacity ${t} ease-out`}}const hd=typeof requestAnimationFrame=="function"?requestAnimationFrame:e=>window.setTimeout(()=>e(0),16),md=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:e=>window.clearTimeout(e);function ro(e){const[t,r]=m.useState(!1),[n,o]=m.useState(!1),[s,i]=m.useState(!1),a=m.useRef(!0);return m.useEffect(()=>{var d,u;if(a.current&&(a.current=!1,!e))return;const c=((u=(d=window.matchMedia)==null?void 0:d.call(window,"(prefers-reduced-motion: reduce)"))==null?void 0:u.matches)??!1;if(e){if(r(!0),o(!1),c){i(!0);return}i(!1);const h=hd(()=>{i(!0)});return()=>{md(h)}}if(i(!1),o(!0),c){r(!1),o(!1);return}const l=window.setTimeout(()=>{r(!1),o(!1)},fd);return()=>window.clearTimeout(l)},[e]),{mounted:t,closing:n,entered:s}}function yi({open:e,onClose:t,title:r,side:n="right",backdrop:o=!0,children:s,...i}){const a=m.useRef(null),{mounted:c,closing:l,entered:d}=ro(e);if(eo(e&&c,t,a),!c)return null;const u=to(l),h=!l&&d,f=h?"translate-x-0 translate-y-0":pd[n],v=h?"opacity-100":"opacity-0";return p.jsxs("div",{className:"meridian-overlay pointer-events-none fixed inset-0 z-50",children:[o&&p.jsx("div",{"data-overlay-backdrop":"",className:q("pointer-events-auto absolute inset-0 bg-black/10 backdrop-blur-[2px]",u.fade,v),onClick:t}),p.jsxs("div",{ref:a,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":r,...i,className:q("pointer-events-auto fixed flex flex-col border-gray-200 bg-white shadow-md outline-none dark:border-gray-800 dark:bg-gray-890",u.surface,ud[n],f,l&&"pointer-events-none",i.className),children:[r&&p.jsx("h3",{className:"h-row-large flex flex-shrink-0 items-center border-b border-gray-200 px-4 text-xl font-semibold dark:border-gray-800 dark:text-gray-25",children:r}),p.jsx("div",{className:"custom-scroll flex-1 overflow-y-auto p-4 text-base",children:s})]})]})}function gd({open:e,onClose:t,backdrop:r=!0,children:n,...o}){const s=m.useRef(null),{mounted:i,closing:a,entered:c}=ro(e);if(eo(e&&i,t,s),!i)return null;const l=to(a),u=!a&&c?"opacity-100":"opacity-0";return p.jsxs("div",{className:"pointer-events-none fixed inset-0",children:[r&&p.jsx("div",{"data-overlay-backdrop":"",className:q("pointer-events-auto absolute inset-0 bg-black/10 backdrop-blur-[2px]",l.fade,u),onClick:t}),p.jsx("div",{ref:s,tabIndex:-1,role:"dialog","aria-modal":"true",...o,className:q("meridian-overlay pointer-events-auto fixed inset-0 flex items-center justify-center",l.fade,u,a&&"pointer-events-none",o.className),children:n})]})}function bd({open:e,onClose:t,align:r="end",children:n,...o}){const s=m.useRef(null);return eo(e,t,s),m.useEffect(()=>{if(!e)return;const i=a=>{var d;const c=s.current;if(!c)return;const l=a.target;l&&(c.contains(l)||(d=c.parentElement)!=null&&d.contains(l))||t==null||t()};return document.addEventListener("mousedown",i,!0),()=>document.removeEventListener("mousedown",i,!0)},[e,t]),e?p.jsx("div",{ref:s,role:"dialog",...o,style:{...r==="end"?{insetInlineEnd:0}:{insetInlineStart:0},...o.style},className:q("meridian-overlay absolute top-full z-10 mt-1 rounded-md border border-gray-200 bg-white shadow-lg dark:border-gray-800 dark:bg-gray-890",o.className),children:n}):null}function no({message:e,duration:t=3e3,onClose:r,iconName:n="check-circle",...o}){return m.useEffect(()=>{if(!e||!r)return;const s=setTimeout(r,t);return()=>clearTimeout(s)},[e,t,r]),e?p.jsxs("div",{...o,role:"status","aria-live":"polite",className:q("w-toast fixed right-6 bottom-3 flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-3 py-2 text-base text-gray-900 shadow-lg dark:border-gray-800 dark:bg-gray-850 dark:text-gray-25",o.className),children:[n&&p.jsx(jt,{name:n,className:"h-5 w-5 flex-shrink-0 text-green-500"}),p.jsx("span",{className:"min-w-0 flex-1",children:e})]}):null}function oo({title:e,content:t,open:r,onClose:n,...o}){const{mounted:s,closing:i,entered:a}=ro(r);if(!s)return null;const c=to(i),l=!i&&a?"opacity-100":"opacity-0";return p.jsxs("div",{className:q("backdrop meridian-overlay z-50 flex items-center justify-center",c.fade,l),children:[p.jsx("div",{"data-overlay-backdrop":"",className:"absolute inset-0",onClick:n}),p.jsxs("div",{...o,role:"dialog","aria-modal":"true","aria-label":e,className:q("w-dialog relative z-10 overflow-hidden rounded-lg border border-gray-200 bg-white shadow-2xl dark:border-gray-800 dark:bg-gray-850",o.className),children:[e&&p.jsx("h3",{className:"h-row-large flex items-center border-b border-gray-200 px-4 text-xl font-semibold dark:border-gray-800 dark:text-gray-25",children:e}),p.jsx("div",{className:"px-4 py-4 text-base text-gray-900 dark:text-gray-200",children:t}),p.jsx("div",{className:"flex justify-end border-t border-gray-200 px-4 py-3 dark:border-gray-800",children:p.jsx(Xn,{onClick:n,children:"Close"})})]})]})}function xi({value:e="https://uidl-runtime.dev/verify",size:t=128,fgColor:r="#000000",bgColor:n="#ffffff",className:o,...s}){const a=Array.from(e).reduce((d,u,h)=>d+u.charCodeAt(0)*(h+1),0),c=Array.from({length:25},(d,u)=>Array.from({length:25},(h,f)=>{const v=u<7&&f<7,y=u<7&&f>=18,x=u>=18&&f<7;if(v||y||x){const T=x?u-18:u,N=y?f-18:f;return T===0||T===6||N===0||N===6||T>=2&&T<=4&&N>=2&&N<=4}if(u===6||f===6)return(u+f)%2===0;const w=u*25+f;return((e.charCodeAt(w%e.length)||65)*31+w*17+a)%3===0})),l=t/25;return p.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:o,"aria-label":`QR Code for ${e}`,role:"img",...s,children:[p.jsx("rect",{width:t,height:t,fill:n}),c.flatMap((d,u)=>d.map((h,f)=>h?p.jsx("rect",{x:f*l,y:u*l,width:l+.2,height:l+.2,fill:r},`${u}-${f}`):null))]})}function wi({value:e="1234567890",width:t=240,height:r=64,showText:n=!0,className:o,...s}){const i=[2,1,1,2];for(let u=0;u<e.length;u++){const h=e.charCodeAt(u);i.push(h%3+1,h*3%2+1,h*7%3+1,h*5%2+1)}i.push(2,3,1,2);const a=i.reduce((u,h)=>u+h,0),c=t/a,l=n?r-16:r;let d=0;return p.jsxs("svg",{width:t,height:r,viewBox:`0 0 ${t} ${r}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:o,"aria-label":`Barcode for ${e}`,role:"img",...s,children:[i.map((u,h)=>{const f=h%2===0,v=d;return d+=u*c,f?p.jsx("rect",{x:v,y:0,width:u*c+.2,height:l,fill:"#000000"},h):null}),n&&p.jsx("text",{x:t/2,y:r-2,textAnchor:"middle",fontSize:"11",fontFamily:"monospace",fontWeight:"bold",fill:"#111827",letterSpacing:"2",children:e})]})}function ki({value:e="UDI-13485",size:t=64,className:r,...n}){const s=t/16,i=Array.from(e).reduce((a,c,l)=>a+c.charCodeAt(0)*(l+1),0);return p.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,"aria-label":`UDI DataMatrix for ${e}`,role:"img",...n,children:[p.jsx("rect",{width:t,height:t,fill:"#ffffff"}),p.jsx("rect",{x:0,y:0,width:s,height:t,fill:"#000000"}),p.jsx("rect",{x:0,y:t-s,width:t,height:s,fill:"#000000"}),Array.from({length:16}).map((a,c)=>c%2===0?p.jsx("rect",{x:c*s,y:0,width:s,height:s,fill:"#000000"},`top-${c}`):null),Array.from({length:16}).map((a,c)=>c%2===0?p.jsx("rect",{x:t-s,y:c*s,width:s,height:s,fill:"#000000"},`right-${c}`):null),Array.from({length:14}).map((a,c)=>Array.from({length:14}).map((l,d)=>((e.charCodeAt((c*16+d)%e.length)||65)*19+c*11+d*7+i)%2===0?p.jsx("rect",{x:(d+1)*s,y:(c+1)*s,width:s+.1,height:s+.1,fill:"#000000"},`data-${c}-${d}`):null))]})}function A(e,t,r,n={}){return{name:e,type:t,...r?{description:r}:{},...n}}function de(e,t,r){return{name:e,payload:t,...r?{description:r}:{}}}const ze=[A("className","string"),A("style","object")],vd=[A("value","string","Visible text content.",{bindable:!0}),A("heading","enum","Render as h1-h6 instead of a paragraph.",{values:["1","2","3","4","5","6"]}),A("format","enum","Print a bound numeric/date value the way a list cell would.",{values:["text","currency","number","integer","date","status","check"]}),A("locale","string","BCP 47 tag used when `format` is set."),A("currency","string","ISO 4217 code used when `format` is `currency`.")],bn=[A("label","string"),A("aria-label","string","Accessible name, for a control whose visible label is a sibling node (TwoColumnForm rows)."),A("value","string","Controlled field value.",{bindable:!0}),A("placeholder","string"),A("error","string"),A("size","enum","Meridian control density.",{values:["small","large"]}),A("border","boolean"),A("disabled","boolean"),A("readOnly","boolean")],Qo=[A("options","array","Array of { value, label, disabled? } options.")],Ut=de("onClose","close","Fires when the component requests dismissal."),yd=[{type:"Container",component:Il,category:"layout",acceptsChildren:!0,defaultProps:{},propDescriptors:ze,events:["onClick"],eventDescriptors:[de("onClick","event")]},{type:"Row",component:Dl,category:"layout",acceptsChildren:!0,defaultProps:{},propDescriptors:ze},{type:"Column",component:Zl,category:"layout",acceptsChildren:!0,defaultProps:{},propDescriptors:ze},{type:"Stack",component:Fl,category:"layout",acceptsChildren:!0,defaultProps:{},propDescriptors:ze},{type:"Spacer",component:Ll,category:"layout",acceptsChildren:!1,defaultProps:{},propDescriptors:ze},{type:"Divider",component:Vl,category:"layout",acceptsChildren:!1,defaultProps:{},propDescriptors:ze},{type:"Text",component:Bl,category:"base",acceptsChildren:!1,defaultProps:{},propDescriptors:vd},{type:"Icon",component:ui,category:"base",acceptsChildren:!1,defaultProps:{name:"document-text"},propDescriptors:[A("name","string","Icon name from ICON_NAMES."),A("size","number","Rendered icon size in px, or pass a CSS size string."),A("title","string","Accessible icon title."),A("strokeWidth","number"),A("className","string")]},{type:"Image",component:Hl,category:"base",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("src","string"),A("alt","string"),A("className","string"),A("style","object")]},{type:"Button",component:Xn,category:"base",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("label","string","Button label text."),A("variant","enum","Meridian button variant.",{values:["primary","secondary"]}),A("icon","boolean","Use compact icon-button padding."),A("iconName","string","Optional leading or trailing icon from ICON_NAMES."),A("iconPosition","enum","Icon placement.",{values:["start","end"]}),A("background","boolean"),A("padding","boolean"),A("disabled","boolean")],events:["onClick"],eventDescriptors:[de("onClick","event")]},{type:"Badge",component:Qn,category:"base",acceptsChildren:!0,defaultProps:{},propDescriptors:[A("label","string"),A("color","enum","Meridian status color.",{values:["gray","orange","green","red","yellow","blue","indigo","pink","purple","teal"]}),A("variant","enum","Badge size/style.",{values:["badge","pill"]}),A("iconName","string")]},{type:"TextField",component:Ul,category:"form",acceptsChildren:!1,defaultProps:{},propDescriptors:bn,events:["onChange","onBlur","onFocus"],eventDescriptors:[de("onChange","value"),de("onBlur","event"),de("onFocus","event")]},{type:"Checkbox",component:Gl,category:"form",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("label","string"),A("aria-label","string"),A("checked","boolean","Controlled checked state.",{bindable:!0}),A("disabled","boolean")],events:["onChange"],eventDescriptors:[de("onChange","value")]},{type:"Switch",component:Jl,category:"form",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("checked","boolean","Controlled checked state.",{bindable:!0}),A("aria-label","string")],events:["onChange"],eventDescriptors:[de("onChange","value")]},{type:"Slider",component:Kl,category:"form",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("value","number","Controlled numeric value.",{bindable:!0}),A("min","number"),A("max","number"),A("disabled","boolean"),A("aria-label","string")],events:["onChange"],eventDescriptors:[de("onChange","value")]},{type:"Select",component:ql,category:"form",acceptsChildren:!1,defaultProps:{},propDescriptors:[...bn,...Qo,A("optionValueKey","string","Key holding an option's stored value; lookup rows carry the target's own id."),A("optionLabelKey","string","Key holding an option's visible text.")],events:["onChange","onBlur","onFocus"],eventDescriptors:[de("onChange","value"),de("onBlur","event"),de("onFocus","event")]},{type:"Textarea",component:Yl,category:"form",acceptsChildren:!1,defaultProps:{},propDescriptors:[...bn,A("rows","number")],events:["onChange","onBlur","onFocus"],eventDescriptors:[de("onChange","value"),de("onBlur","event"),de("onFocus","event")]},{type:"RadioGroup",component:Xl,category:"form",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("label","string"),A("name","string"),A("value","string","Controlled selected value.",{bindable:!0}),...Qo,A("error","string")],events:["onChange"],eventDescriptors:[de("onChange","value")]},{type:"Form",component:Ql,category:"form",acceptsChildren:!0,defaultProps:{},propDescriptors:ze,events:["onSubmit"],eventDescriptors:[de("onSubmit","submit")]},{type:"ListView",component:ed,category:"data",acceptsChildren:!0,defaultProps:{},propDescriptors:ze},{type:"GridView",component:td,category:"data",acceptsChildren:!0,defaultProps:{},propDescriptors:ze},{type:"DataTable",component:rd,category:"data",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("title","string"),A("dataSource","string","Name of a document data source resolved to rows."),A("columns","array","Array of { key, label, align?, format? } columns. `format` is one of text | currency | number | integer | date | status | check and drives how the value is printed (status renders a coloured pill; numeric formats right-align)."),A("rows","array","Static row objects. Prefer dataSource for adapter-backed data."),A("rowActions","array","Array of { label, event? } row actions. Omit for a Meridian-style list where the row itself opens the record."),A("emptyMessage","string"),A("showIndex","boolean"),A("paginate","boolean"),A("pageSizes","array"),A("locale","string","BCP 47 tag used to format date and numeric cells."),A("currency","string","ISO 4217 code used to format `currency` columns.")],events:["onRowAction","onOpen"],eventDescriptors:[de("onRowAction","rowAction","Fires for row action buttons; named row action events are also supported."),de("onOpen","rowAction","Fires when a row is activated (click or Enter/Space), with that row's data.")],hideFromPalette:!0},{type:"PageBar",component:nd,category:"navigation",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("total","number","Rows in the whole result — a server total, not the loaded page.",{bindable:!0}),A("page","number","Current 1-based page.",{bindable:!0}),A("pageSize","number","Rows per page; -1 means all.",{bindable:!0}),A("pageSizes","array","Selectable page sizes. Meridian uses [50, 100, 500, -1].")],events:["onPageChange","onPageSizeChange"],eventDescriptors:[de("onPageChange","value","Fires with the new 1-based page number."),de("onPageSizeChange","value","Fires with the new page size (-1 for all).")],hideFromPalette:!0},{type:"Chart",component:od,category:"data",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("title","string"),A("dataSource","string"),A("chartType","enum","Chart visual type.",{values:["bar","line","donut","area"]}),A("rows","array"),A("xKey","string"),A("yKey","string"),A("series","array","Array of { key, label?, color? } series."),A("emptyMessage","string"),A("totalLabel","string"),A("height","number")],hideFromPalette:!0},{type:"KanbanBoard",component:sd,category:"data",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("title","string"),A("dataSource","string"),A("columns","array"),A("rows","array"),A("emptyMessage","string")],events:["onCardClick"],eventDescriptors:[de("onCardClick","card")],hideFromPalette:!0},{type:"TreeView",component:id,category:"data",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("title","string"),A("dataSource","string"),A("items","array"),A("rows","array"),A("emptyMessage","string")],events:["onNodeClick"],eventDescriptors:[de("onNodeClick","node")],hideFromPalette:!0},{type:"Sidebar",component:ad,category:"navigation",acceptsChildren:!0,defaultProps:{},propDescriptors:ze,hideFromPalette:!0},{type:"Navbar",component:cd,category:"navigation",acceptsChildren:!0,defaultProps:{},propDescriptors:ze,hideFromPalette:!0},{type:"Toolbar",component:ld,category:"navigation",acceptsChildren:!0,defaultProps:{},propDescriptors:ze,hideFromPalette:!0},{type:"Drawer",component:yi,category:"advanced",acceptsChildren:!0,defaultProps:{},propDescriptors:[A("open","boolean","Controls drawer visibility.",{bindable:!0}),A("title","string"),A("side","enum","Screen edge the drawer slides from.",{values:["left","right","top","bottom"]}),A("backdrop","boolean")],events:["onClose"],eventDescriptors:[Ut],hideFromPalette:!0},{type:"Panel",component:gd,category:"advanced",acceptsChildren:!0,defaultProps:{},propDescriptors:[A("open","boolean","Controls panel visibility.",{bindable:!0}),A("backdrop","boolean")],events:["onClose"],eventDescriptors:[Ut],hideFromPalette:!0},{type:"Popover",component:bd,category:"navigation",acceptsChildren:!0,defaultProps:{},propDescriptors:[A("open","boolean","Controlled visibility.",{bindable:!0}),A("align","enum","Which edge the panel hangs from.",{values:["start","end"]}),A("className","string")],events:["onClose"],eventDescriptors:[Ut],hideFromPalette:!0},{type:"Dialog",component:oo,category:"advanced",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("open","boolean","Controls dialog visibility.",{bindable:!0}),A("title","string"),A("content","node")],events:["onClose"],eventDescriptors:[Ut],hideFromPalette:!0},{type:"Snackbar",component:no,category:"advanced",acceptsChildren:!1,defaultProps:{},propDescriptors:[A("message","string"),A("duration","number"),A("iconName","string")],events:["onClose"],eventDescriptors:[Ut],hideFromPalette:!0},{type:"QRCode",component:xi,category:"base",acceptsChildren:!1,defaultProps:{value:"https://djp.pajak.go.id/faktur"},propDescriptors:[A("value","string"),A("size","number"),A("fgColor","string"),A("bgColor","string")],hideFromPalette:!0},{type:"Barcode",component:wi,category:"base",acceptsChildren:!1,defaultProps:{value:"1234567890"},propDescriptors:[A("value","string"),A("width","number"),A("height","number"),A("showText","boolean")],hideFromPalette:!0},{type:"DataMatrix",component:ki,category:"base",acceptsChildren:!1,defaultProps:{value:"UDI-13485"},propDescriptors:[A("value","string"),A("size","number")],hideFromPalette:!0}];function Si(){const e=new Map;for(const t of yd)e.set(t.type,t);return{get(t){return e.get(t)},register(t){e.set(t.type,t)},has(t){return e.has(t)},list(){return Array.from(e.values())}}}const Et=Si();function xd(e){Et.register(e)}const wd=new Set(["color","spacing","radius","shadow","font","border"]),kd=["gap","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","width","height","minWidth","maxWidth","minHeight","maxHeight","inset","top","right","bottom","left","background","color","fontSize","lineHeight","letterSpacing","borderRadius","borderWidth","borderColor","shadow"];function ft(e){return typeof e=="string"&&e.startsWith("{")&&e.endsWith("}")}function yr(e){const r=e.slice(1,-1).split(".");if(r[0]!=="primitives"||r.length<3)return;const n=r[1],o=r.slice(2).join("-");if(wd.has(n))return`var(--${n}-${o})`}function Sd(e,t){const r=t.split(".");let n=e;for(const o of r)if(n&&typeof n=="object"&&o in n)n=n[o];else return;return n}function Gt(e){return!!(e&&typeof e=="object"&&!Array.isArray(e))}function _i(e){const t=new Map(Object.entries(e.primitives.color).map(([b,g])=>[b,g])),r=new Map(Object.entries(e.primitives.spacing).map(([b,g])=>[b,g])),n=new Map(Object.entries(e.primitives.radius).map(([b,g])=>[b,g])),o=new Map(Object.entries(e.primitives.shadow).map(([b,g])=>[b,g])),s=new Map(Object.entries(e.primitives.font).map(([b,g])=>[b,g])),i=new Map(Object.entries(e.primitives.border).map(([b,g])=>[b,g])),a=new Map(Object.entries(e.semantics.color).map(([b,g])=>[b,g])),c=new Map(Object.entries(e.semantics.spacing).map(([b,g])=>[b,g])),l=new Map(Object.entries(e.semantics.radius).map(([b,g])=>[b,g])),d=new Map(Object.entries(e.semantics.shadow).map(([b,g])=>[b,g]));function u(b){if(b.startsWith("primitives.")){const g=b.slice(11),[R,E]=g.split(".");switch(R){case"color":return t.get(E);case"spacing":return r.get(E);case"radius":return n.get(E);case"shadow":return o.get(E);case"font":return s.get(E);case"border":return i.get(E);default:return}}if(b.startsWith("semantics.")){const g=b.slice(10),[R,E]=g.split(".");switch(R){case"color":return a.get(E);case"spacing":return c.get(E);case"radius":return l.get(E);case"shadow":return d.get(E);case"typography":return e.semantics.typography[E];default:return}}return Sd({primitives:e.primitives,semantics:e.semantics},b)}function h(b){if(b!=null&&!ft(b)){if(typeof b=="string")return b;if(typeof b=="number")return String(b)}}function f(b){const g=[];b.display&&g.push(...w(b.display)),b.flexDirection&&g.push(...k(b.flexDirection,{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"})),b.justifyContent&&g.push(...k(b.justifyContent,{start:"justify-start",center:"justify-center",end:"justify-end","space-between":"justify-between","space-around":"justify-around","space-evenly":"justify-evenly"})),b.alignItems&&g.push(...k(b.alignItems,{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"})),b.position&&g.push(...k(b.position,{static:"static",relative:"relative",absolute:"absolute",fixed:"fixed",sticky:"sticky"}));for(const R of kd){const E=b[R];E&&g.push(...w(E).filter(Boolean))}if(b.opacity!==void 0&&g.push(...x(b.opacity,"opacity-").filter(Boolean)),b.zIndex!==void 0&&g.push(...x(b.zIndex,"z-").filter(Boolean)),b.typography){const R=M(b.typography);R&&g.push(N(R))}return g.join(" ")}const v={background:"backgroundColor",color:"color",borderColor:"borderColor",borderRadius:"borderRadius",borderWidth:"borderWidth",shadow:"boxShadow"};function y(b){const g={};for(const[R,E]of Object.entries(v)){const O=b[R],j=Gt(O)?O.base:O;if(ft(j)){const D=yr(j);D&&(g[E]=D)}}if(b.fontWeight!==void 0){const R=Gt(b.fontWeight)?b.fontWeight.base:b.fontWeight;R!==void 0&&(g.fontWeight=ft(R)?yr(R)??String(R):String(R))}if(b.typography){const R=M(b.typography);R&&Object.assign(g,C(R))}return g}function x(b,g){if(!Gt(b))return[`${g}${h(b)}`].filter(Boolean);const R=b,E=[];if(R.base!==void 0){const O=h(R.base);O&&E.push(`${g}${O}`)}for(const[O,j]of Object.entries(R)){if(O==="base"||j===void 0)continue;const D=h(j);D&&E.push(`${O}:${g}${D}`)}return E}function w(b){if(!Gt(b))return[h(b)||""].filter(Boolean);const g=b,R=[];if(g.base!==void 0){const E=h(g.base);E&&R.push(E)}for(const[E,O]of Object.entries(g)){if(E==="base"||O===void 0)continue;const j=`${E}:`,D=h(O);D&&R.push(`${j}${D}`)}return R}function k(b,g){if(!Gt(b))return[g[b]||""].filter(Boolean);const R=b,E=[];if(R.base!==void 0){const O=g[R.base]||"";O&&E.push(O)}for(const[O,j]of Object.entries(R)){if(O==="base"||j===void 0)continue;const D=g[j]||"";D&&E.push(`${O}:${D}`)}return E}function T(b,g){const R=e.variants[b.toLowerCase()];return R==null?void 0:R.find(E=>E.name===g)}function N(b){const g=[];return b.fontFamily&&!ft(b.fontFamily)&&g.push(b.fontFamily),b.fontSize&&g.push(b.fontSize),b.lineHeight&&g.push(b.lineHeight),b.letterSpacing&&g.push(b.letterSpacing),g.filter(Boolean).join(" ")}function C(b){const g={};return b.fontFamily&&(g.fontFamily=ft(b.fontFamily)?yr(b.fontFamily)??b.fontFamily:b.fontFamily),b.fontWeight!==void 0&&(g.fontWeight=ft(b.fontWeight)?yr(b.fontWeight)??String(b.fontWeight):String(b.fontWeight)),g}function M(b){if(!ft(b))return;const g=u(b.slice(1,-1));return g&&typeof g=="object"?g:void 0}return{resolveToken:u,resolveStyleIntent:f,resolveInlineStyle:y,resolveComponentVariant:T,resolveTypography:N}}function Ci(e){if(!e.responsive)return e;const t={...e.style??{}};for(const[r,n]of Object.entries(e.responsive)){if(typeof r!="string"||typeof n!="object"||n===null||Array.isArray(n))continue;const o=t[r],s=n;if(o&&typeof o=="object"&&!Array.isArray(o))t[r]={...o,...s};else{const i=o!==void 0?o:void 0,a={};i!==void 0&&(a.base=i),Object.assign(a,s),t[r]=a}}return{...e,style:t,responsive:void 0}}function _d(e){if(e==="row")return"flex-row";if(e==="row-reverse")return"flex-row-reverse";if(e==="column")return"flex-col";if(e==="column-reverse")return"flex-col-reverse"}function Cd(e){return{start:"justify-start",center:"justify-center",end:"justify-end","space-between":"justify-between","space-around":"justify-around","space-evenly":"justify-evenly"}[e]}function $d(e){return{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"}[e]}function Md(e){return{static:"static",relative:"relative",absolute:"absolute",fixed:"fixed",sticky:"sticky"}[e]}const vn=["mobile","tablet","desktop","wide"],Ad={mobile:"",tablet:"md",desktop:"lg",wide:"xl"};function Nd(e){if(!e||typeof e!="object")return;const r=e.breakpoints;if(!r||r.length===0)return;const n=vn.map(i=>r.includes(i)),o=[];let s=n[0];s||o.push("hidden");for(let i=1;i<vn.length;i++)if(n[i]!==s){s=n[i];const a=Ad[vn[i]];o.push(`${a}:${s?"block":"hidden"}`)}return o.length>0?o.join(" "):void 0}const jd=["gap","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","width","height","minWidth","maxWidth","minHeight","maxHeight","inset","top","right","bottom","left","lineHeight","letterSpacing"];function Rd(e={},t={}){const r=[];for(const n of jd){const o=e[n];o&&typeof o=="string"&&r.push(o)}return e.flexDirection&&r.push(_d(e.flexDirection)??""),e.justifyContent&&r.push(Cd(e.justifyContent)??""),e.alignItems&&r.push($d(e.alignItems)??""),e.position&&r.push(Md(e.position)??""),e.display&&typeof e.display=="string"&&r.push(e.display),e.background&&typeof e.background=="string"&&r.push(e.background.startsWith("bg-")?e.background:`bg-[${e.background}]`),r.filter(Boolean).join(" ")}const es=e=>{let t;const r=new Set,n=(l,d)=>{const u=typeof l=="function"?l(t):l;if(!Object.is(u,t)){const h=t;t=d??(typeof u!="object"||u===null)?u:Object.assign({},t,u),r.forEach(f=>f(t,h))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>c,subscribe:l=>(r.add(l),()=>r.delete(l))},c=t=e(n,o,a);return a},Ed=(e=>e?es(e):es),Td=e=>e;function zd(e,t=Td){const r=m.useSyncExternalStore(e.subscribe,m.useCallback(()=>t(e.getState()),[e,t]),m.useCallback(()=>t(e.getInitialState()),[e,t]));return m.useDebugValue(r),r}const ts=e=>{const t=Ed(e),r=n=>zd(t,n);return Object.assign(r,t),r},$i=(e=>e?ts(e):ts);function Mi(e){const t=e??{},r=new Set;return $i()((n,o)=>({state:{...t},setState:(s,i)=>{const c={...o().state};Ai(c,s,i),n({state:c}),r.forEach(l=>l())},getValue:s=>s?We(o().state,s):o().state,resetState:()=>{n({state:{...t}}),r.forEach(s=>s())},subscribe:s=>(r.add(s),()=>{r.delete(s)})}))}function We(e,t){const r=t.split(".");let n=e;for(const o of r)if(n&&typeof n=="object"&&o in n)n=n[o];else return;return n}function Ai(e,t,r){const n=t.split("."),o=n.pop();let s=e;for(const i of n)(!(i in s)||typeof s[i]!="object"||s[i]===null)&&(s[i]={}),s=s[i];s[o]=r}function he(e,t){if(!e||typeof e!="object")return e;if("literal"in e)return e.literal;if("path"in e)return Ni(e.path,t);if("agg"in e&&"over"in e)return Pd(e,t);if("=="in e){const[r,n]=e["=="];return he(r,t)===he(n,t)}if("!="in e){const[r,n]=e["!="];return he(r,t)!==he(n,t)}if("and"in e){const[r,n]=e.and;return!!he(r,t)&&!!he(n,t)}if("or"in e){const[r,n]=e.or;return!!he(r,t)||!!he(n,t)}if("not"in e)return!he(e.not,t);if("if"in e){const[r,n,o]=e.if;return he(r,t)?he(n,t):he(o,t)}if("??"in e){const[r,n]=e["??"],o=he(r,t);return o??he(n,t)}}function Pd(e,t){const r=Ni(e.over,t),n=Array.isArray(r)?r:[];if(e.agg==="count")return n.length;if(!e.field)return 0;const o=[];for(const i of n){if(!i||typeof i!="object")continue;const a=i[e.field],c=typeof a=="string"&&a.trim()!==""?Number(a):a;typeof c=="number"&&Number.isFinite(c)&&o.push(c)}const s=o.reduce((i,a)=>i+a,0);return e.agg==="sum"?s:o.length===0?0:s/o.length}function Ni(e,t){if(e.startsWith("local.")&&t.local)return We(t.local,e.replace("local.",""));if(e.startsWith("state.")&&t.state)return We(t.state,e.replace("state.",""));if(e.startsWith("session.")&&t.session)return We(t.session,e.replace("session.",""));if(e.startsWith("route.")&&t.route)return We(t.route,e.replace("route.",""));if(e.startsWith("data.")&&t.data)return We(t.data,e.replace("data.",""))}function Nn(e,t,r){var n;return{...e,id:r?t:`${t}__${e.id}`,children:(n=e.children)==null?void 0:n.map(o=>Nn(o,t,!1)),slots:e.slots?Object.fromEntries(Object.entries(e.slots).map(([o,s])=>[o,s.map(i=>Nn(i,t,!1))])):void 0}}function Od(e,t){const r=Nn(t,e.id,!0),n=r.slots||e.slots?{...r.slots,...e.slots}:void 0;return{...r,id:e.id,name:e.name??r.name,componentId:void 0,props:{...r.props,...e.props},style:{...r.style,...e.style},events:{...r.events,...e.events},bindings:{...r.bindings,...e.bindings},responsive:e.responsive??r.responsive,visibility:e.visibility??r.visibility,repeat:e.repeat??r.repeat,themeRef:e.themeRef??r.themeRef,testId:e.testId??r.testId,children:e.children??r.children,slots:n}}const Id=new Set(["TextField","Checkbox","Switch","Slider","Select","Textarea","RadioGroup"]),Dd=new Set(["onPageChange","onPageSizeChange"]);function Ct(e,t={}){var T,N,C;if(e.componentId){if((T=t.componentStack)!=null&&T.includes(e.componentId))return process.env.NODE_ENV!=="production"&&console.warn(`[uidl-runtime] Circular componentId reference detected: ${[...t.componentStack,e.componentId].join(" -> ")}`),null;const M=(N=t.definitions)==null?void 0:N[e.componentId];if(!M)return process.env.NODE_ENV!=="production"&&console.warn(`[uidl-runtime] Unknown componentId: ${e.componentId}`),null;const b=Od(e,M);return Ct(b,{...t,componentStack:[...t.componentStack??[],e.componentId]})}const n=(t.registry??Et).get(e.type);if(!n)return process.env.NODE_ENV!=="production"&&console.warn(`[uidl-runtime] Unknown node type: ${e.type}`),null;const o=Ci(e);if(!Vd(o,t))return null;if(o.repeat){let M;if(Array.isArray(o.repeat.dataSource))M=o.repeat.dataSource;else if(typeof o.repeat.dataSource=="string"&&t.data){const b=t.data[o.repeat.dataSource];Array.isArray(b)&&(M=b)}if(M){const b=o.repeat.itemName??"item";return M.map((g,R)=>{const E=`${o.id}-repeat-${R}`;return p.jsx(m.Fragment,{children:Ct({...o,id:E,repeat:void 0,props:{...o.props,[b]:g}},{...t,local:{...t.local,[b]:g,index:R}})},E)})}}const i=t.theme?_i(t.theme):void 0;let a;o.themeRef&&i&&(a=i.resolveComponentVariant(o.type,o.themeRef));const c={...a==null?void 0:a.style,...o.style??{}},l={...a==null?void 0:a.props,...o.props??{}},d=Fd(Zd(l,t),t),u=i?i.resolveStyleIntent(c):Rd(c),h=i?i.resolveInlineStyle(c):{},f=Bd(o.events??{},t.actionInterpreter,o.type),v=Nd(o.visibility),y=q(a==null?void 0:a.className,u,v,d.className),x=typeof d.style=="object"&&d.style!==null?d.style:void 0,w={...h,...x},k=n.component;return p.jsxs(k,{...d,"data-node-id":o.id,"data-testid":o.testId,className:y||void 0,style:Object.keys(w).length>0?w:void 0,...f,children:[(C=o.children)==null?void 0:C.map(M=>p.jsx(m.Fragment,{children:Ct(M,t)},M.id)),o.slots&&Object.entries(o.slots).map(([M,b])=>p.jsx(m.Fragment,{children:b.map(g=>p.jsx(m.Fragment,{children:Ct(g,t)},g.id))},M))]})}function Zd(e,t){const r={};for(const[n,o]of Object.entries(e))if(o&&typeof o=="object"&&"$bind"in o){const s=o.$bind;r[n]=Ld(s,t)}else o&&typeof o=="object"&&"$expr"in o?r[n]=he(o.$expr,t):r[n]=o;return r}function Fd(e,t){var n;if(typeof e.dataSource!="string"||e.rows!==void 0)return e;const r=(n=t.data)==null?void 0:n[e.dataSource];return Array.isArray(r)?{...e,rows:r}:e}function Ld(e,t){if(e.startsWith("local.")&&t.local){const r=e.replace("local.","");return Jt(t.local,r)}if(e.startsWith("state.")&&t.state){const r=e.replace("state.","");return Jt(t.state,r)}if(e.startsWith("session.")&&t.session){const r=e.replace("session.","");return Jt(t.session,r)}if(e.startsWith("route.")&&t.route){const r=e.replace("route.","");return Jt(t.route,r)}if(e.startsWith("data.")&&t.data){const r=e.replace("data.","");return Jt(t.data,r)}process.env.NODE_ENV!=="production"&&console.warn(`[uidl-runtime] Unrecognized binding prefix in path: ${e}`)}function Vd(e,t){var n;const r=(n=e.visibility)==null?void 0:n.condition;return r?!!he(r,t):!0}function Bd(e,t,r){const n={};if(r==="DataTable")return t&&(n.onRowAction=(o,s)=>{const i=s.event??(e.onRowAction?"onRowAction":s.label),a=e[i]??e.onRowAction??e[s.label];if(!a)return;const c=Array.isArray(a)?a:[a];t.execute({sequence:c},o)},Array.isArray(e.onOpen)&&(n.onRowOpen=o=>{t.execute({sequence:e.onOpen},o)})),n;for(const[o,s]of Object.entries(e)){if(!t||!Array.isArray(s))continue;const i=(a,c)=>l=>{const d=c==null?void 0:c(l);t.execute({sequence:a},d)};if(o==="onChange"&&r&&Id.has(r)){const a=Hd(r);n[o]=i(s,a)}else Dd.has(o)?n[o]=i(s,a=>a):n[o]=i(s)}return n}function Hd(e){switch(e){case"TextField":return t=>t.target.value;case"Checkbox":return t=>t.target.checked;case"Switch":return()=>{};case"Slider":return t=>Number(t.target.value);case"Select":return t=>t.target.value;case"Textarea":return t=>t.target.value;case"RadioGroup":return t=>t.target.value;default:return}}function Jt(e,t){const r=t.split(".");let n=e;for(const o of r)if(n&&typeof n=="object"&&o in n)n=n[o];else return;return n}var rs;function $(e,t,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const l=i.prototype,d=Object.keys(l);for(let u=0;u<d.length;u++){const h=d[u];h in a||(a[h]=l[h].bind(a))}}const o=(r==null?void 0:r.Parent)??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function i(a){var c;const l=r!=null&&r.Parent?new s:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>{var c,l;return r!=null&&r.Parent&&a instanceof r.Parent?!0:(l=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:l.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class At extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ji extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(rs=globalThis).__zod_globalConfig??(rs.__zod_globalConfig={});const so=globalThis.__zod_globalConfig;function Xe(e){return so}function Ri(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function jn(e,t){return typeof t=="bigint"?t.toString():t}function io(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ao(e){return e==null}function co(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Wd(e,t){const r=e/t,n=Math.round(r),o=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}const ns=Symbol("evaluating");function ee(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==ns)return n===void 0&&(n=ns,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function bt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function dt(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function os(e){return JSON.stringify(e)}function Ud(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ei="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Er(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Gd=io(()=>{var e;if(so.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Rt(e){if(Er(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Er(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ti(e){return Rt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Jd=new Set(["string","number","symbol"]);function Yr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ut(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(n._zod.parent=e),n}function H(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Kd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const qd={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Yd(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=dt(e._zod.def,{get shape(){const i={};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(i[a]=r.shape[a])}return bt(this,"shape",i),i},checks:[]});return ut(e,s)}function Xd(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=dt(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete i[a]}return bt(this,"shape",i),i},checks:[]});return ut(e,s)}function Qd(e,t){if(!Rt(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=dt(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return bt(this,"shape",s),s}});return ut(e,o)}function eu(e,t){if(!Rt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=dt(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return bt(this,"shape",n),n}});return ut(e,r)}function tu(e,t){var n;if((n=e._zod.def.checks)!=null&&n.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=dt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return bt(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ut(e,r)}function ru(e,t,r){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=dt(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(r)for(const l in r){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return bt(this,"shape",c),c},checks:[]});return ut(t,i)}function nu(e,t,r){const n=dt(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(r)for(const i in r){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(s[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new e({type:"nonoptional",innerType:o[i]});return bt(this,"shape",s),s}});return ut(t,n)}function $t(e,t=0){var r;if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(((r=e.issues[n])==null?void 0:r.continue)!==!0)return!0;return!1}function ou(e,t=0){var r;if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(((r=e.issues[n])==null?void 0:r.continue)===!1)return!0;return!1}function Mt(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function xr(e){return typeof e=="string"?e:e==null?void 0:e.message}function Qe(e,t,r){var c,l,d,u,h,f;const n=e.message?e.message:xr((d=(l=(c=e.inst)==null?void 0:c._zod.def)==null?void 0:l.error)==null?void 0:d.call(l,e))??xr((u=t==null?void 0:t.error)==null?void 0:u.call(t,e))??xr((h=r.customError)==null?void 0:h.call(r,e))??xr((f=r.localeError)==null?void 0:f.call(r,e))??"Invalid input",{inst:o,continue:s,input:i,...a}=e;return a.path??(a.path=[]),a.message=n,t!=null&&t.reportInput&&(a.input=i),a}function lo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function rr(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const zi=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,jn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Pi=$("$ZodError",zi),Oi=$("$ZodError",zi,{Parent:Error});function su(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function iu(e,t=r=>r.message){const r={_errors:[]},n=(o,s=[])=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>n({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")n({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")n({issues:i.issues},[...s,...i.path]);else{const a=[...s,...i.path];if(a.length===0)r._errors.push(t(i));else{let c=r,l=0;for(;l<a.length;){const d=a[l];l===a.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(i))):c[d]=c[d]||{_errors:[]},c=c[d],l++}}}};return n(e),r}const uo=e=>(t,r,n,o)=>{const s=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise)throw new At;if(i.issues.length){const a=new((o==null?void 0:o.Err)??e)(i.issues.map(c=>Qe(c,s,Xe())));throw Ei(a,o==null?void 0:o.callee),a}return i.value},po=e=>async(t,r,n,o)=>{const s=n?{...n,async:!0}:{async:!0};let i=t._zod.run({value:r,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new((o==null?void 0:o.Err)??e)(i.issues.map(c=>Qe(c,s,Xe())));throw Ei(a,o==null?void 0:o.callee),a}return i.value},Xr=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new At;return s.issues.length?{success:!1,error:new(e??Pi)(s.issues.map(i=>Qe(i,o,Xe())))}:{success:!0,data:s.value}},au=Xr(Oi),Qr=e=>async(t,r,n)=>{const o=n?{...n,async:!0}:{async:!0};let s=t._zod.run({value:r,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>Qe(i,o,Xe())))}:{success:!0,data:s.value}},cu=Qr(Oi),lu=e=>(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return uo(e)(t,r,o)},du=e=>(t,r,n)=>uo(e)(t,r,n),uu=e=>async(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return po(e)(t,r,o)},pu=e=>async(t,r,n)=>po(e)(t,r,n),fu=e=>(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return Xr(e)(t,r,o)},hu=e=>(t,r,n)=>Xr(e)(t,r,n),mu=e=>async(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return Qr(e)(t,r,o)},gu=e=>async(t,r,n)=>Qr(e)(t,r,n),bu=/^[cC][0-9a-z]{6,}$/,vu=/^[0-9a-z]+$/,yu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,xu=/^[0-9a-vA-V]{20}$/,wu=/^[A-Za-z0-9]{27}$/,ku=/^[a-zA-Z0-9_-]{21}$/,Su=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_u=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ss=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Cu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$u="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Mu(){return new RegExp($u,"u")}const Au=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Nu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ju=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ru=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Eu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ii=/^[A-Za-z0-9_-]*$/,Tu=/^https?$/,zu=/^\+[1-9]\d{6,14}$/,Di="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Pu=new RegExp(`^${Di}$`);function Zi(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ou(e){return new RegExp(`^${Zi(e)}$`)}function Iu(e){const t=Zi({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${Di}T(?:${n})$`)}const Du=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Zu=/^-?\d+$/,Fi=/^-?\d+(?:\.\d+)?$/,Fu=/^(?:true|false)$/i,Lu=/^[^A-Z]*$/,Vu=/^[^a-z]*$/,Ne=$("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Li={number:"number",bigint:"bigint",object:"date"},Vi=$("$ZodCheckLessThan",(e,t)=>{Ne.init(e,t);const r=Li[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bi=$("$ZodCheckGreaterThan",(e,t)=>{Ne.init(e,t);const r=Li[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bu=$("$ZodCheckMultipleOf",(e,t)=>{Ne.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Wd(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Hu=$("$ZodCheckNumberFormat",(e,t)=>{var i;Ne.init(e,t),t.format=t.format||"float64";const r=(i=t.format)==null?void 0:i.includes("int"),n=r?"int":"number",[o,s]=qd[t.format];e._zod.onattach.push(a=>{const c=a._zod.bag;c.format=t.format,c.minimum=o,c.maximum=s,r&&(c.pattern=Zu)}),e._zod.check=a=>{const c=a.value;if(r){if(!Number.isInteger(c)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Wu=$("$ZodCheckMaxLength",(e,t)=>{var r;Ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!ao(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const i=lo(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Uu=$("$ZodCheckMinLength",(e,t)=>{var r;Ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!ao(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const i=lo(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Gu=$("$ZodCheckLengthEquals",(e,t)=>{var r;Ne.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!ao(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,s=o.length;if(s===t.length)return;const i=lo(o),a=s>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),en=$("$ZodCheckStringFormat",(e,t)=>{var r,n;Ne.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Ju=$("$ZodCheckRegex",(e,t)=>{en.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ku=$("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Lu),en.init(e,t)}),qu=$("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Vu),en.init(e,t)}),Yu=$("$ZodCheckIncludes",(e,t)=>{Ne.init(e,t);const r=Yr(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Xu=$("$ZodCheckStartsWith",(e,t)=>{Ne.init(e,t);const r=new RegExp(`^${Yr(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Qu=$("$ZodCheckEndsWith",(e,t)=>{Ne.init(e,t);const r=new RegExp(`.*${Yr(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),e0=$("$ZodCheckOverwrite",(e,t)=>{Ne.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class t0{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
|
|
23
|
+
`).filter(i=>i),o=Math.min(...n.map(i=>i.length-i.trimStart().length)),s=n.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,r=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(s=>` ${s}`)];return new t(...r,o.join(`
|
|
24
|
+
`))}}const r0={major:4,minor:4,patch:3},ue=$("$ZodType",(e,t)=>{var o;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=r0;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const s of n)for(const i of s._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const s=(a,c,l)=>{let d=$t(a),u;for(const h of c){if(h._zod.def.when){if(ou(a)||!h._zod.def.when(a))continue}else if(d)continue;const f=a.issues.length,v=h._zod.check(a);if(v instanceof Promise&&(l==null?void 0:l.async)===!1)throw new At;if(u||v instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await v,a.issues.length!==f&&(d||(d=$t(a,f)))});else{if(a.issues.length===f)continue;d||(d=$t(a,f))}}return u?u.then(()=>a):a},i=(a,c,l)=>{if($t(a))return a.aborted=!0,a;const d=s(c,n,l);if(d instanceof Promise){if(l.async===!1)throw new At;return d.then(u=>e._zod.parse(u,l))}return e._zod.parse(d,l)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){const d=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return d instanceof Promise?d.then(u=>i(u,a,c)):i(d,a,c)}const l=e._zod.parse(a,c);if(l instanceof Promise){if(c.async===!1)throw new At;return l.then(d=>s(d,n,c))}return s(l,n,c)}}ee(e,"~standard",()=>({validate:s=>{var i;try{const a=au(e,s);return a.success?{value:a.data}:{issues:(i=a.error)==null?void 0:i.issues}}catch{return cu(e,s).then(c=>{var l;return c.success?{value:c.data}:{issues:(l=c.error)==null?void 0:l.issues}})}},vendor:"zod",version:1}))}),fo=$("$ZodString",(e,t)=>{var r;ue.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??Du(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),le=$("$ZodStringFormat",(e,t)=>{en.init(e,t),fo.init(e,t)}),n0=$("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=_u),le.init(e,t)}),o0=$("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ss(n))}else t.pattern??(t.pattern=ss());le.init(e,t)}),s0=$("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Cu),le.init(e,t)}),i0=$("$ZodURL",(e,t)=>{le.init(e,t),e._zod.check=r=>{var n;try{const o=r.value.trim();if(!t.normalize&&((n=t.protocol)==null?void 0:n.source)===Tu.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const s=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=s.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),a0=$("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Mu()),le.init(e,t)}),c0=$("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ku),le.init(e,t)}),l0=$("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=bu),le.init(e,t)}),d0=$("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=vu),le.init(e,t)}),u0=$("$ZodULID",(e,t)=>{t.pattern??(t.pattern=yu),le.init(e,t)}),p0=$("$ZodXID",(e,t)=>{t.pattern??(t.pattern=xu),le.init(e,t)}),f0=$("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=wu),le.init(e,t)}),h0=$("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Iu(t)),le.init(e,t)}),m0=$("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Pu),le.init(e,t)}),g0=$("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ou(t)),le.init(e,t)}),b0=$("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Su),le.init(e,t)}),v0=$("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Au),le.init(e,t),e._zod.bag.format="ipv4"}),y0=$("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Nu),le.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),x0=$("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ju),le.init(e,t)}),w0=$("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ru),le.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[o,s]=n;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Hi(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const k0=$("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Eu),le.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Hi(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function S0(e){if(!Ii.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Hi(r)}const _0=$("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ii),le.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{S0(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),C0=$("$ZodE164",(e,t)=>{t.pattern??(t.pattern=zu),le.init(e,t)});function $0(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const M0=$("$ZodJWT",(e,t)=>{le.init(e,t),e._zod.check=r=>{$0(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Wi=$("$ZodNumber",(e,t)=>{ue.init(e,t),e._zod.pattern=e._zod.bag.pattern??Fi,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),r}}),A0=$("$ZodNumberFormat",(e,t)=>{Hu.init(e,t),Wi.init(e,t)}),N0=$("$ZodBoolean",(e,t)=>{ue.init(e,t),e._zod.pattern=Fu,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),j0=$("$ZodUnknown",(e,t)=>{ue.init(e,t),e._zod.parse=r=>r}),R0=$("$ZodNever",(e,t)=>{ue.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function is(e,t,r){e.issues.length&&t.issues.push(...Mt(r,e.issues)),t.value[r]=e.value}const E0=$("$ZodArray",(e,t)=>{ue.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?s.push(c.then(l=>is(l,r,i))):is(c,r,i)}return s.length?Promise.all(s).then(()=>r):r}});function Tr(e,t,r,n,o,s){const i=r in n;if(e.issues.length){if(o&&s&&!i)return;t.issues.push(...Mt(r,e.issues))}if(!i&&!o){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?i&&(t.value[r]=void 0):t.value[r]=e.value}function Ui(e){var n,o,s,i;const t=Object.keys(e.shape);for(const a of t)if(!((i=(s=(o=(n=e.shape)==null?void 0:n[a])==null?void 0:o._zod)==null?void 0:s.traits)!=null&&i.has("$ZodType")))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const r=Kd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Gi(e,t,r,n,o,s){const i=[],a=o.keySet,c=o.catchall._zod,l=c.def.type,d=c.optin==="optional",u=c.optout==="optional";for(const h in t){if(h==="__proto__"||a.has(h))continue;if(l==="never"){i.push(h);continue}const f=c.run({value:t[h],issues:[]},n);f instanceof Promise?e.push(f.then(v=>Tr(v,r,h,t,d,u))):Tr(f,r,h,t,d,u)}return i.length&&r.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:s}),e.length?Promise.all(e).then(()=>r):r}const T0=$("$ZodObject",(e,t)=>{ue.init(e,t);const r=Object.getOwnPropertyDescriptor(t,"shape");if(!(r!=null&&r.get)){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const n=io(()=>Ui(t));ee(e._zod,"propValues",()=>{const a=t.shape,c={};for(const l in a){const d=a[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(const u of d.values)c[l].add(u)}}return c});const o=Er,s=t.catchall;let i;e._zod.parse=(a,c)=>{i??(i=n.value);const l=a.value;if(!o(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const d=[],u=i.shape;for(const h of i.keys){const f=u[h],v=f._zod.optin==="optional",y=f._zod.optout==="optional",x=f._zod.run({value:l[h],issues:[]},c);x instanceof Promise?d.push(x.then(w=>Tr(w,a,h,l,v,y))):Tr(x,a,h,l,v,y)}return s?Gi(d,l,a,c,n.value,e):d.length?Promise.all(d).then(()=>a):a}}),z0=$("$ZodObjectJIT",(e,t)=>{T0.init(e,t);const r=e._zod.parse,n=io(()=>Ui(t)),o=h=>{var T,N;const f=new t0(["shape","payload","ctx"]),v=n.value,y=C=>{const M=os(C);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};f.write("const input = payload.value;");const x=Object.create(null);let w=0;for(const C of v.keys)x[C]=`key_${w++}`;f.write("const newResult = {};");for(const C of v.keys){const M=x[C],b=os(C),g=h[C],R=((T=g==null?void 0:g._zod)==null?void 0:T.optin)==="optional",E=((N=g==null?void 0:g._zod)==null?void 0:N.optout)==="optional";f.write(`const ${M} = ${y(C)};`),R&&E?f.write(`
|
|
25
|
+
if (${M}.issues.length) {
|
|
26
|
+
if (${b} in input) {
|
|
27
|
+
payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
|
|
28
|
+
...iss,
|
|
29
|
+
path: iss.path ? [${b}, ...iss.path] : [${b}]
|
|
30
|
+
})));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (${M}.value === undefined) {
|
|
35
|
+
if (${b} in input) {
|
|
36
|
+
newResult[${b}] = undefined;
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
newResult[${b}] = ${M}.value;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
`):R?f.write(`
|
|
43
|
+
if (${M}.issues.length) {
|
|
44
|
+
payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
|
|
45
|
+
...iss,
|
|
46
|
+
path: iss.path ? [${b}, ...iss.path] : [${b}]
|
|
47
|
+
})));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (${M}.value === undefined) {
|
|
51
|
+
if (${b} in input) {
|
|
52
|
+
newResult[${b}] = undefined;
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
newResult[${b}] = ${M}.value;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
`):f.write(`
|
|
59
|
+
const ${M}_present = ${b} in input;
|
|
60
|
+
if (${M}.issues.length) {
|
|
61
|
+
payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
|
|
62
|
+
...iss,
|
|
63
|
+
path: iss.path ? [${b}, ...iss.path] : [${b}]
|
|
64
|
+
})));
|
|
65
|
+
}
|
|
66
|
+
if (!${M}_present && !${M}.issues.length) {
|
|
67
|
+
payload.issues.push({
|
|
68
|
+
code: "invalid_type",
|
|
69
|
+
expected: "nonoptional",
|
|
70
|
+
input: undefined,
|
|
71
|
+
path: [${b}]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (${M}_present) {
|
|
76
|
+
if (${M}.value === undefined) {
|
|
77
|
+
newResult[${b}] = undefined;
|
|
78
|
+
} else {
|
|
79
|
+
newResult[${b}] = ${M}.value;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
`)}f.write("payload.value = newResult;"),f.write("return payload;");const k=f.compile();return(C,M)=>k(h,C,M)};let s;const i=Er,a=!so.jitless,l=a&&Gd.value,d=t.catchall;let u;e._zod.parse=(h,f)=>{u??(u=n.value);const v=h.value;return i(v)?a&&l&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(s||(s=o(t.shape)),h=s(h,f),d?Gi([],v,h,f,u,e):h):r(h,f):(h.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),h)}});function as(e,t,r,n){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!$t(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(s=>s.issues.map(i=>Qe(i,n,Xe())))}),t)}const P0=$("$ZodUnion",(e,t)=>{ue.init(e,t),ee(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),ee(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),ee(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),ee(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>co(o.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let s=!1;const i=[];for(const a of t.options){const c=a._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)i.push(c),s=!0;else{if(c.issues.length===0)return c;i.push(c)}}return s?Promise.all(i).then(a=>as(a,n,e,o)):as(i,n,e,o)}}),O0=$("$ZodIntersection",(e,t)=>{ue.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,s=t.left._zod.run({value:o,issues:[]},n),i=t.right._zod.run({value:o,issues:[]},n);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,l])=>cs(r,c,l)):cs(r,s,i)}});function Rn(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Rt(e)&&Rt(t)){const r=Object.keys(t),n=Object.keys(e).filter(s=>r.indexOf(s)!==-1),o={...e,...t};for(const s of n){const i=Rn(e[s],t[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],s=t[n],i=Rn(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function cs(e,t,r){const n=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else e.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else e.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&o&&e.issues.push({...o,keys:s}),$t(e))return e;const i=Rn(t.value,r.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const I0=$("$ZodRecord",(e,t)=>{ue.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Rt(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;const s=[],i=t.keyType._zod.values;if(i){r.value={};const a=new Set;for(const l of i)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){a.add(typeof l=="number"?l.toString():l);const d=t.keyType._zod.run({value:l,issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(f=>Qe(f,n,Xe())),input:l,path:[l],inst:e});continue}const u=d.value,h=t.valueType._zod.run({value:o[l],issues:[]},n);h instanceof Promise?s.push(h.then(f=>{f.issues.length&&r.issues.push(...Mt(l,f.issues)),r.value[u]=f.value})):(h.issues.length&&r.issues.push(...Mt(l,h.issues)),r.value[u]=h.value)}let c;for(const l in o)a.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{r.value={};for(const a of Reflect.ownKeys(o)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Fi.test(a)&&c.issues.length){const u=t.keyType._zod.run({value:Number(a),issues:[]},n);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");u.issues.length===0&&(c=u)}if(c.issues.length){t.mode==="loose"?r.value[a]=o[a]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(u=>Qe(u,n,Xe())),input:a,path:[a],inst:e});continue}const d=t.valueType._zod.run({value:o[a],issues:[]},n);d instanceof Promise?s.push(d.then(u=>{u.issues.length&&r.issues.push(...Mt(a,u.issues)),r.value[c.value]=u.value})):(d.issues.length&&r.issues.push(...Mt(a,d.issues)),r.value[c.value]=d.value)}}return s.length?Promise.all(s).then(()=>r):r}}),D0=$("$ZodEnum",(e,t)=>{ue.init(e,t);const r=Ri(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Jd.has(typeof o)).map(o=>typeof o=="string"?Yr(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:r,input:i,inst:e}),o}}),Z0=$("$ZodTransform",(e,t)=>{ue.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ji(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r.fallback=!0,r));if(o instanceof Promise)throw new At;return r.value=o,r.fallback=!0,r}});function ls(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Ji=$("$ZodOptional",(e,t)=>{ue.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ee(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ee(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${co(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=r.value,s=t.innerType._zod.run(r,n);return s instanceof Promise?s.then(i=>ls(i,o)):ls(s,o)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),F0=$("$ZodExactOptional",(e,t)=>{Ji.init(e,t),ee(e._zod,"values",()=>t.innerType._zod.values),ee(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),L0=$("$ZodNullable",(e,t)=>{ue.init(e,t),ee(e._zod,"optin",()=>t.innerType._zod.optin),ee(e._zod,"optout",()=>t.innerType._zod.optout),ee(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${co(r.source)}|null)$`):void 0}),ee(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),V0=$("$ZodDefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",ee(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>ds(s,t)):ds(o,t)}});function ds(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const B0=$("$ZodPrefault",(e,t)=>{ue.init(e,t),e._zod.optin="optional",ee(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),H0=$("$ZodNonOptional",(e,t)=>{ue.init(e,t),ee(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>us(s,e)):us(o,e)}});function us(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const W0=$("$ZodCatch",(e,t)=>{ue.init(e,t),e._zod.optin="optional",ee(e._zod,"optout",()=>t.innerType._zod.optout),ee(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(s=>(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(i=>Qe(i,n,Xe()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>Qe(s,n,Xe()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),U0=$("$ZodPipe",(e,t)=>{ue.init(e,t),ee(e._zod,"values",()=>t.in._zod.values),ee(e._zod,"optin",()=>t.in._zod.optin),ee(e._zod,"optout",()=>t.out._zod.optout),ee(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const s=t.out._zod.run(r,n);return s instanceof Promise?s.then(i=>wr(i,t.in,n)):wr(s,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(s=>wr(s,t.out,n)):wr(o,t.out,n)}});function wr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}const G0=$("$ZodReadonly",(e,t)=>{ue.init(e,t),ee(e._zod,"propValues",()=>t.innerType._zod.propValues),ee(e._zod,"values",()=>t.innerType._zod.values),ee(e._zod,"optin",()=>{var r,n;return(n=(r=t.innerType)==null?void 0:r._zod)==null?void 0:n.optin}),ee(e._zod,"optout",()=>{var r,n;return(n=(r=t.innerType)==null?void 0:r._zod)==null?void 0:n.optout}),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(ps):ps(o)}});function ps(e){return e.value=Object.freeze(e.value),e}const J0=$("$ZodLazy",(e,t)=>{ue.init(e,t),ee(e._zod,"innerType",()=>{const r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),ee(e._zod,"pattern",()=>{var r,n;return(n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.pattern}),ee(e._zod,"propValues",()=>{var r,n;return(n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.propValues}),ee(e._zod,"optin",()=>{var r,n;return((n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.optin)??void 0}),ee(e._zod,"optout",()=>{var r,n;return((n=(r=e._zod.innerType)==null?void 0:r._zod)==null?void 0:n.optout)??void 0}),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),K0=$("$ZodCustom",(e,t)=>{Ne.init(e,t),ue.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(s=>fs(s,r,n,e));fs(o,r,n,e)}});function fs(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(rr(o))}}var hs;class q0{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Y0(){return new q0}(hs=globalThis).__zod_globalRegistry??(hs.__zod_globalRegistry=Y0());const Yt=globalThis.__zod_globalRegistry;function X0(e,t){return new e({type:"string",...H(t)})}function Q0(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...H(t)})}function ms(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...H(t)})}function e1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...H(t)})}function t1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...H(t)})}function r1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...H(t)})}function n1(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...H(t)})}function o1(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H(t)})}function s1(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...H(t)})}function i1(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...H(t)})}function a1(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...H(t)})}function c1(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...H(t)})}function l1(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...H(t)})}function d1(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...H(t)})}function u1(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...H(t)})}function p1(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...H(t)})}function f1(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...H(t)})}function h1(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...H(t)})}function m1(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...H(t)})}function g1(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...H(t)})}function b1(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...H(t)})}function v1(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...H(t)})}function y1(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...H(t)})}function x1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...H(t)})}function w1(e,t){return new e({type:"string",format:"date",check:"string_format",...H(t)})}function k1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...H(t)})}function S1(e,t){return new e({type:"string",format:"duration",check:"string_format",...H(t)})}function _1(e,t){return new e({type:"number",checks:[],...H(t)})}function C1(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...H(t)})}function $1(e,t){return new e({type:"boolean",...H(t)})}function M1(e){return new e({type:"unknown"})}function A1(e,t){return new e({type:"never",...H(t)})}function gs(e,t){return new Vi({check:"less_than",...H(t),value:e,inclusive:!1})}function yn(e,t){return new Vi({check:"less_than",...H(t),value:e,inclusive:!0})}function bs(e,t){return new Bi({check:"greater_than",...H(t),value:e,inclusive:!1})}function xn(e,t){return new Bi({check:"greater_than",...H(t),value:e,inclusive:!0})}function vs(e,t){return new Bu({check:"multiple_of",...H(t),value:e})}function Ki(e,t){return new Wu({check:"max_length",...H(t),maximum:e})}function zr(e,t){return new Uu({check:"min_length",...H(t),minimum:e})}function qi(e,t){return new Gu({check:"length_equals",...H(t),length:e})}function N1(e,t){return new Ju({check:"string_format",format:"regex",...H(t),pattern:e})}function j1(e){return new Ku({check:"string_format",format:"lowercase",...H(e)})}function R1(e){return new qu({check:"string_format",format:"uppercase",...H(e)})}function E1(e,t){return new Yu({check:"string_format",format:"includes",...H(t),includes:e})}function T1(e,t){return new Xu({check:"string_format",format:"starts_with",...H(t),prefix:e})}function z1(e,t){return new Qu({check:"string_format",format:"ends_with",...H(t),suffix:e})}function Tt(e){return new e0({check:"overwrite",tx:e})}function P1(e){return Tt(t=>t.normalize(e))}function O1(){return Tt(e=>e.trim())}function I1(){return Tt(e=>e.toLowerCase())}function D1(){return Tt(e=>e.toUpperCase())}function Z1(){return Tt(e=>Ud(e))}function F1(e,t,r){return new e({type:"array",element:t,...H(r)})}function L1(e,t,r){return new e({type:"custom",check:"custom",fn:t,...H(r)})}function V1(e,t){const r=B1(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(rr(o,n.value,r._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=r),s.continue??(s.continue=!r._zod.def.abort),n.issues.push(rr(s))}},e(n.value,n)),t);return r}function B1(e,t){const r=new Ne({check:"custom",...H(t)});return r._zod.check=e,r}function Pr(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Yt,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function ce(e,t,r={path:[],schemaPath:[]}){var d,u;var n;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,r.schemaPath.includes(e)&&(s.cycle=r.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,i);const a=(u=(d=e._zod).toJSONSchema)==null?void 0:u.call(d);if(a)i.schema=a;else{const h={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,h);else{const v=i.schema,y=t.processors[o.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);y(e,t,v,h)}const f=e._zod.parent;f&&(i.ref||(i.ref=f),ce(f,t,h),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(i.schema,c),t.io==="input"&&$e(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&"_prefault"in i.schema&&((n=i.schema).default??(n.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function Or(e,t){var i,a,c,l;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const d of e.seen.entries()){const u=(i=e.metadataRegistry.get(d[0]))==null?void 0:i.id;if(u){const h=n.get(u);if(h&&h!==d[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(u,d[0])}}const o=d=>{var y;const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const x=(y=e.external.registry.get(d[0]))==null?void 0:y.id,w=e.external.uri??(T=>T);if(x)return{ref:w(x)};const k=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=k,{defId:k,ref:`${w("__shared")}#/${u}/${k}`}}if(d[1]===r)return{ref:"#"};const f=`#/${u}/`,v=d[1].schema.id??`__schema${e.counter++}`;return{defId:v,ref:f+v}},s=d=>{if(d[1].schema.$ref)return;const u=d[1],{ref:h,defId:f}=o(d);u.def={...u.schema},f&&(u.defId=f);const v=u.schema;for(const y in v)delete v[y];v.$ref=h};if(e.cycles==="throw")for(const d of e.seen.entries()){const u=d[1];if(u.cycle)throw new Error(`Cycle detected: #/${(a=u.cycle)==null?void 0:a.join("/")}/<root>
|
|
84
|
+
|
|
85
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const u=d[1];if(t===d[0]){s(d);continue}if(e.external){const f=(c=e.external.registry.get(d[0]))==null?void 0:c.id;if(t!==d[0]&&f){s(d);continue}}if((l=e.metadataRegistry.get(d[0]))==null?void 0:l.id){s(d);continue}if(u.cycle){s(d);continue}if(u.count>1&&e.reused==="ref"){s(d);continue}}}function Ir(e,t){var a,c,l,d;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=u=>{const h=e.seen.get(u);if(h.ref===null)return;const f=h.def??h.schema,v={...f},y=h.ref;if(h.ref=null,y){n(y);const w=e.seen.get(y),k=w.schema;if(k.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(k)):Object.assign(f,k),Object.assign(f,v),u._zod.parent===y)for(const N in f)N==="$ref"||N==="allOf"||N in v||delete f[N];if(k.$ref&&w.def)for(const N in f)N==="$ref"||N==="allOf"||N in w.def&&JSON.stringify(f[N])===JSON.stringify(w.def[N])&&delete f[N]}const x=u._zod.parent;if(x&&x!==y){n(x);const w=e.seen.get(x);if(w!=null&&w.schema.$ref&&(f.$ref=w.schema.$ref,w.def))for(const k in f)k==="$ref"||k==="allOf"||k in w.def&&JSON.stringify(f[k])===JSON.stringify(w.def[k])&&delete f[k]}e.override({zodSchema:u,jsonSchema:f,path:h.path??[]})};for(const u of[...e.seen.entries()].reverse())n(u[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const u=(c=e.external.registry.get(t))==null?void 0:c.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}Object.assign(o,r.def??r.schema);const s=(l=e.metadataRegistry.get(t))==null?void 0:l.id;s!==void 0&&o.id===s&&delete o.id;const i=((d=e.external)==null?void 0:d.defs)??{};for(const u of e.seen.entries()){const h=u[1];h.def&&h.defId&&(h.def.id===h.defId&&delete h.def.id,i[h.defId]=h.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Dr(t,"input",e.processors),output:Dr(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function $e(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return $e(n.element,r);if(n.type==="set")return $e(n.valueType,r);if(n.type==="lazy")return $e(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return $e(n.innerType,r);if(n.type==="intersection")return $e(n.left,r)||$e(n.right,r);if(n.type==="record"||n.type==="map")return $e(n.keyType,r)||$e(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:$e(n.in,r)||$e(n.out,r);if(n.type==="object"){for(const o in n.shape)if($e(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if($e(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if($e(o,r))return!0;return!!(n.rest&&$e(n.rest,r))}return!1}const H1=(e,t={})=>r=>{const n=Pr({...r,processors:t});return ce(e,n),Or(n,e),Ir(n,e)},Dr=(e,t,r={})=>n=>{const{libraryOptions:o,target:s}=n??{},i=Pr({...o??{},target:s,io:t,processors:r});return ce(e,i),Or(i,e),Ir(i,e)},W1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Yi=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:s,maximum:i,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=W1[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),l&&(o.contentEncoding=l),c&&c.size>0){const d=[...c];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(u=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))])}},Xi=(e,t,r,n)=>{const o=r,{minimum:s,maximum:i,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?o.type="integer":o.type="number";const u=typeof d=="number"&&d>=(s??Number.NEGATIVE_INFINITY),h=typeof l=="number"&&l<=(i??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";u?f?(o.minimum=d,o.exclusiveMinimum=!0):o.exclusiveMinimum=d:typeof s=="number"&&(o.minimum=s),h?f?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l:typeof i=="number"&&(o.maximum=i),typeof c=="number"&&(o.multipleOf=c)},Qi=(e,t,r,n)=>{r.type="boolean"},U1=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},G1=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},J1=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},K1=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},q1=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},ea=(e,t,r,n)=>{r.not={}},Y1=(e,t,r,n)=>{},ta=(e,t,r,n)=>{},X1=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},ra=(e,t,r,n)=>{const o=e._zod.def,s=Ri(o.entries);s.every(i=>typeof i=="number")&&(r.type="number"),s.every(i=>typeof i=="string")&&(r.type="string"),r.enum=s},Q1=(e,t,r,n)=>{const o=e._zod.def,s=[];for(const i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(i))}else s.push(i);if(s.length!==0)if(s.length===1){const i=s[0];r.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[i]:r.const=i}else s.every(i=>typeof i=="number")&&(r.type="number"),s.every(i=>typeof i=="string")&&(r.type="string"),s.every(i=>typeof i=="boolean")&&(r.type="boolean"),s.every(i=>i===null)&&(r.type="null"),r.enum=s},e5=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},t5=(e,t,r,n)=>{const o=r,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=s.source},r5=(e,t,r,n)=>{const o=r,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:a,mime:c}=e._zod.bag;i!==void 0&&(s.minLength=i),a!==void 0&&(s.maxLength=a),c?c.length===1?(s.contentMediaType=c[0],Object.assign(o,s)):(Object.assign(o,s),o.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(o,s)},n5=(e,t,r,n)=>{r.type="boolean"},na=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},o5=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},oa=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},s5=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},i5=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},sa=(e,t,r,n)=>{const o=r,s=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=ce(s.element,t,{...n,path:[...n.path,"items"]})},ia=(e,t,r,n)=>{var l;const o=r,s=e._zod.def;o.type="object",o.properties={};const i=s.shape;for(const d in i)o.properties[d]=ce(i[d],t,{...n,path:[...n.path,"properties",d]});const a=new Set(Object.keys(i)),c=new Set([...a].filter(d=>{const u=s.shape[d]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(o.required=Array.from(c)),((l=s.catchall)==null?void 0:l._zod.def.type)==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=ce(s.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},aa=(e,t,r,n)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,c)=>ce(a,t,{...n,path:[...n.path,s?"oneOf":"anyOf",c]}));s?r.oneOf=i:r.anyOf=i},ca=(e,t,r,n)=>{const o=e._zod.def,s=ce(o.left,t,{...n,path:[...n.path,"allOf",0]}),i=ce(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];r.allOf=c},a5=(e,t,r,n)=>{const o=r,s=e._zod.def;o.type="array";const i=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=s.items.map((h,f)=>ce(h,t,{...n,path:[...n.path,i,f]})),l=s.rest?ce(s.rest,t,{...n,path:[...n.path,a,...t.target==="openapi-3.0"?[s.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=c,l&&(o.items=l)):t.target==="openapi-3.0"?(o.items={anyOf:c},l&&o.items.anyOf.push(l),o.minItems=c.length,l||(o.maxItems=c.length)):(o.items=c,l&&(o.additionalItems=l));const{minimum:d,maximum:u}=e._zod.bag;typeof d=="number"&&(o.minItems=d),typeof u=="number"&&(o.maxItems=u)},la=(e,t,r,n)=>{const o=r,s=e._zod.def;o.type="object";const i=s.keyType,a=i._zod.bag,c=a==null?void 0:a.patterns;if(s.mode==="loose"&&c&&c.size>0){const d=ce(s.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(const u of c)o.patternProperties[u.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=ce(s.keyType,t,{...n,path:[...n.path,"propertyNames"]})),o.additionalProperties=ce(s.valueType,t,{...n,path:[...n.path,"additionalProperties"]});const l=i._zod.values;if(l){const d=[...l].filter(u=>typeof u=="string"||typeof u=="number");d.length>0&&(o.required=d)}},da=(e,t,r,n)=>{const o=e._zod.def,s=ce(o.innerType,t,n),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,r.nullable=!0):r.anyOf=[s,{type:"null"}]},ua=(e,t,r,n)=>{const o=e._zod.def;ce(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType},pa=(e,t,r,n)=>{const o=e._zod.def;ce(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},fa=(e,t,r,n)=>{const o=e._zod.def;ce(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},ha=(e,t,r,n)=>{const o=e._zod.def;ce(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=i},ma=(e,t,r,n)=>{const o=e._zod.def,s=o.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?s?o.out:o.in:o.out;ce(i,t,n);const a=t.seen.get(e);a.ref=i},ga=(e,t,r,n)=>{const o=e._zod.def;ce(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType,r.readOnly=!0},c5=(e,t,r,n)=>{const o=e._zod.def;ce(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType},ho=(e,t,r,n)=>{const o=e._zod.def;ce(o.innerType,t,n);const s=t.seen.get(e);s.ref=o.innerType},ba=(e,t,r,n)=>{const o=e._zod.innerType;ce(o,t,n);const s=t.seen.get(e);s.ref=o},ys={string:Yi,number:Xi,boolean:Qi,bigint:U1,symbol:G1,null:J1,undefined:K1,void:q1,never:ea,any:Y1,unknown:ta,date:X1,enum:ra,literal:Q1,nan:e5,template_literal:t5,file:r5,success:n5,custom:na,function:o5,transform:oa,map:s5,set:i5,array:sa,object:ia,union:aa,intersection:ca,tuple:a5,record:la,nullable:da,nonoptional:ua,default:pa,prefault:fa,catch:ha,pipe:ma,readonly:ga,promise:c5,optional:ho,lazy:ba};function l5(e,t){if("_idmap"in e){const n=e,o=Pr({...t,processors:ys}),s={};for(const c of n._idmap.entries()){const[l,d]=c;ce(d,o)}const i={},a={registry:n,uri:t==null?void 0:t.uri,defs:s};o.external=a;for(const c of n._idmap.entries()){const[l,d]=c;Or(o,d),i[l]=Ir(o,d)}if(Object.keys(s).length>0){const c=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[c]:s}}return{schemas:i}}const r=Pr({...t,processors:ys});return ce(e,r),Or(r,e),Ir(r,e)}const d5=$("ZodISODateTime",(e,t)=>{h0.init(e,t),fe.init(e,t)});function u5(e){return x1(d5,e)}const p5=$("ZodISODate",(e,t)=>{m0.init(e,t),fe.init(e,t)});function f5(e){return w1(p5,e)}const h5=$("ZodISOTime",(e,t)=>{g0.init(e,t),fe.init(e,t)});function m5(e){return k1(h5,e)}const g5=$("ZodISODuration",(e,t)=>{b0.init(e,t),fe.init(e,t)});function b5(e){return S1(g5,e)}const v5=(e,t)=>{Pi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>iu(e,r)},flatten:{value:r=>su(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,jn,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,jn,2)}},isEmpty:{get(){return e.issues.length===0}}})},Oe=$("ZodError",v5,{Parent:Error}),y5=uo(Oe),x5=po(Oe),w5=Xr(Oe),k5=Qr(Oe),S5=lu(Oe),_5=du(Oe),C5=uu(Oe),$5=pu(Oe),M5=fu(Oe),A5=hu(Oe),N5=mu(Oe),j5=gu(Oe),xs=new WeakMap;function sr(e,t,r){const n=Object.getPrototypeOf(e);let o=xs.get(n);if(o||(o=new Set,xs.set(n,o)),!o.has(t)){o.add(t);for(const s in r){const i=r[s];Object.defineProperty(n,s,{configurable:!0,enumerable:!1,get(){const a=i.bind(this);return Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}const pe=$("ZodType",(e,t)=>(ue.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Dr(e,"input"),output:Dr(e,"output")}}),e.toJSONSchema=H1(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>y5(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>w5(e,r,n),e.parseAsync=async(r,n)=>x5(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>k5(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>S5(e,r,n),e.decode=(r,n)=>_5(e,r,n),e.encodeAsync=async(r,n)=>C5(e,r,n),e.decodeAsync=async(r,n)=>$5(e,r,n),e.safeEncode=(r,n)=>M5(e,r,n),e.safeDecode=(r,n)=>A5(e,r,n),e.safeEncodeAsync=async(r,n)=>N5(e,r,n),e.safeDecodeAsync=async(r,n)=>j5(e,r,n),sr(e,"ZodType",{check(...r){const n=this.def;return this.clone(dt(n,{checks:[...n.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return ut(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(Sp(r,n))},superRefine(r,n){return this.check(_p(r,n))},overwrite(r){return this.check(Tt(r))},optional(){return _s(this)},exactOptional(){return lp(this)},nullable(){return Cs(this)},nullish(){return _s(Cs(this))},nonoptional(r){return mp(this,r)},array(){return Ge(this)},or(r){return Ze([this,r])},and(r){return sp(this,r)},transform(r){return $s(this,ap(r))},default(r){return pp(this,r)},prefault(r){return hp(this,r)},catch(r){return bp(this,r)},pipe(r){return $s(this,r)},readonly(){return xp(this)},describe(r){const n=this.clone();return Yt.add(n,{description:r}),n},meta(...r){if(r.length===0)return Yt.get(this);const n=this.clone();return Yt.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){var r;return(r=Yt.get(e))==null?void 0:r.description},configurable:!0}),e)),va=$("_ZodString",(e,t)=>{fo.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Yi(e,n,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,sr(e,"_ZodString",{regex(...n){return this.check(N1(...n))},includes(...n){return this.check(E1(...n))},startsWith(...n){return this.check(T1(...n))},endsWith(...n){return this.check(z1(...n))},min(...n){return this.check(zr(...n))},max(...n){return this.check(Ki(...n))},length(...n){return this.check(qi(...n))},nonempty(...n){return this.check(zr(1,...n))},lowercase(n){return this.check(j1(n))},uppercase(n){return this.check(R1(n))},trim(){return this.check(O1())},normalize(...n){return this.check(P1(...n))},toLowerCase(){return this.check(I1())},toUpperCase(){return this.check(D1())},slugify(){return this.check(Z1())}})}),R5=$("ZodString",(e,t)=>{fo.init(e,t),va.init(e,t),e.email=r=>e.check(Q0(E5,r)),e.url=r=>e.check(o1(T5,r)),e.jwt=r=>e.check(y1(J5,r)),e.emoji=r=>e.check(s1(z5,r)),e.guid=r=>e.check(ms(ws,r)),e.uuid=r=>e.check(e1(kr,r)),e.uuidv4=r=>e.check(t1(kr,r)),e.uuidv6=r=>e.check(r1(kr,r)),e.uuidv7=r=>e.check(n1(kr,r)),e.nanoid=r=>e.check(i1(P5,r)),e.guid=r=>e.check(ms(ws,r)),e.cuid=r=>e.check(a1(O5,r)),e.cuid2=r=>e.check(c1(I5,r)),e.ulid=r=>e.check(l1(D5,r)),e.base64=r=>e.check(g1(W5,r)),e.base64url=r=>e.check(b1(U5,r)),e.xid=r=>e.check(d1(Z5,r)),e.ksuid=r=>e.check(u1(F5,r)),e.ipv4=r=>e.check(p1(L5,r)),e.ipv6=r=>e.check(f1(V5,r)),e.cidrv4=r=>e.check(h1(B5,r)),e.cidrv6=r=>e.check(m1(H5,r)),e.e164=r=>e.check(v1(G5,r)),e.datetime=r=>e.check(u5(r)),e.date=r=>e.check(f5(r)),e.time=r=>e.check(m5(r)),e.duration=r=>e.check(b5(r))});function S(e){return X0(R5,e)}const fe=$("ZodStringFormat",(e,t)=>{le.init(e,t),va.init(e,t)}),E5=$("ZodEmail",(e,t)=>{s0.init(e,t),fe.init(e,t)}),ws=$("ZodGUID",(e,t)=>{n0.init(e,t),fe.init(e,t)}),kr=$("ZodUUID",(e,t)=>{o0.init(e,t),fe.init(e,t)}),T5=$("ZodURL",(e,t)=>{i0.init(e,t),fe.init(e,t)}),z5=$("ZodEmoji",(e,t)=>{a0.init(e,t),fe.init(e,t)}),P5=$("ZodNanoID",(e,t)=>{c0.init(e,t),fe.init(e,t)}),O5=$("ZodCUID",(e,t)=>{l0.init(e,t),fe.init(e,t)}),I5=$("ZodCUID2",(e,t)=>{d0.init(e,t),fe.init(e,t)}),D5=$("ZodULID",(e,t)=>{u0.init(e,t),fe.init(e,t)}),Z5=$("ZodXID",(e,t)=>{p0.init(e,t),fe.init(e,t)}),F5=$("ZodKSUID",(e,t)=>{f0.init(e,t),fe.init(e,t)}),L5=$("ZodIPv4",(e,t)=>{v0.init(e,t),fe.init(e,t)}),V5=$("ZodIPv6",(e,t)=>{y0.init(e,t),fe.init(e,t)}),B5=$("ZodCIDRv4",(e,t)=>{x0.init(e,t),fe.init(e,t)}),H5=$("ZodCIDRv6",(e,t)=>{w0.init(e,t),fe.init(e,t)}),W5=$("ZodBase64",(e,t)=>{k0.init(e,t),fe.init(e,t)}),U5=$("ZodBase64URL",(e,t)=>{_0.init(e,t),fe.init(e,t)}),G5=$("ZodE164",(e,t)=>{C0.init(e,t),fe.init(e,t)}),J5=$("ZodJWT",(e,t)=>{M0.init(e,t),fe.init(e,t)}),ya=$("ZodNumber",(e,t)=>{Wi.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,o,s)=>Xi(e,n,o),sr(e,"ZodNumber",{gt(n,o){return this.check(bs(n,o))},gte(n,o){return this.check(xn(n,o))},min(n,o){return this.check(xn(n,o))},lt(n,o){return this.check(gs(n,o))},lte(n,o){return this.check(yn(n,o))},max(n,o){return this.check(yn(n,o))},int(n){return this.check(ks(n))},safe(n){return this.check(ks(n))},positive(n){return this.check(bs(0,n))},nonnegative(n){return this.check(xn(0,n))},negative(n){return this.check(gs(0,n))},nonpositive(n){return this.check(yn(0,n))},multipleOf(n,o){return this.check(vs(n,o))},step(n,o){return this.check(vs(n,o))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ht(e){return _1(ya,e)}const K5=$("ZodNumberFormat",(e,t)=>{A0.init(e,t),ya.init(e,t)});function ks(e){return C1(K5,e)}const q5=$("ZodBoolean",(e,t)=>{N0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qi(e,r,n)});function Y5(e){return $1(q5,e)}const X5=$("ZodUnknown",(e,t)=>{j0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ta()});function me(){return M1(X5)}const Q5=$("ZodNever",(e,t)=>{R0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ea(e,r,n)});function ep(e){return A1(Q5,e)}const tp=$("ZodArray",(e,t)=>{E0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>sa(e,r,n,o),e.element=t.element,sr(e,"ZodArray",{min(r,n){return this.check(zr(r,n))},nonempty(r){return this.check(zr(1,r))},max(r,n){return this.check(Ki(r,n))},length(r,n){return this.check(qi(r,n))},unwrap(){return this.element}})});function Ge(e,t){return F1(tp,e,t)}const rp=$("ZodObject",(e,t)=>{z0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ia(e,r,n,o),ee(e,"shape",()=>t.shape),sr(e,"ZodObject",{keyof(){return Ue(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:me()})},loose(){return this.clone({...this._zod.def,catchall:me()})},strict(){return this.clone({...this._zod.def,catchall:ep()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Qd(this,r)},safeExtend(r){return eu(this,r)},merge(r){return tu(this,r)},pick(r){return Yd(this,r)},omit(r){return Xd(this,r)},partial(...r){return ru(xa,this,r[0])},required(...r){return nu(wa,this,r[0])}})});function Y(e,t){const r={type:"object",shape:e??{},...H(t)};return new rp(r)}const np=$("ZodUnion",(e,t)=>{P0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>aa(e,r,n,o),e.options=t.options});function Ze(e,t){return new np({type:"union",options:e,...H(t)})}const op=$("ZodIntersection",(e,t)=>{O0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ca(e,r,n,o)});function sp(e,t){return new op({type:"intersection",left:e,right:t})}const Ss=$("ZodRecord",(e,t)=>{I0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>la(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function Q(e,t,r){return!t||!t._zod?new Ss({type:"record",keyType:S(),valueType:e,...H(t)}):new Ss({type:"record",keyType:e,valueType:t,...H(r)})}const En=$("ZodEnum",(e,t)=>{D0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(n,o,s)=>ra(e,n,o),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const s={};for(const i of n)if(r.has(i))s[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new En({...t,checks:[],...H(o),entries:s})},e.exclude=(n,o)=>{const s={...t.entries};for(const i of n)if(r.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new En({...t,checks:[],...H(o),entries:s})}});function Ue(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new En({type:"enum",entries:r,...H(t)})}const ip=$("ZodTransform",(e,t)=>{Z0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>oa(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ji(e.constructor.name);r.addIssue=s=>{if(typeof s=="string")r.issues.push(rr(s,r.value,t));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),r.issues.push(rr(i))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(s=>(r.value=s,r.fallback=!0,r)):(r.value=o,r.fallback=!0,r)}});function ap(e){return new ip({type:"transform",transform:e})}const xa=$("ZodOptional",(e,t)=>{Ji.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ho(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function _s(e){return new xa({type:"optional",innerType:e})}const cp=$("ZodExactOptional",(e,t)=>{F0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ho(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function lp(e){return new cp({type:"optional",innerType:e})}const dp=$("ZodNullable",(e,t)=>{L0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>da(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Cs(e){return new dp({type:"nullable",innerType:e})}const up=$("ZodDefault",(e,t)=>{V0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>pa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function pp(e,t){return new up({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ti(t)}})}const fp=$("ZodPrefault",(e,t)=>{B0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function hp(e,t){return new fp({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ti(t)}})}const wa=$("ZodNonOptional",(e,t)=>{H0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ua(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function mp(e,t){return new wa({type:"nonoptional",innerType:e,...H(t)})}const gp=$("ZodCatch",(e,t)=>{W0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ha(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function bp(e,t){return new gp({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const vp=$("ZodPipe",(e,t)=>{U0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ma(e,r,n,o),e.in=t.in,e.out=t.out});function $s(e,t){return new vp({type:"pipe",in:e,out:t})}const yp=$("ZodReadonly",(e,t)=>{G0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ga(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function xp(e){return new yp({type:"readonly",innerType:e})}const wp=$("ZodLazy",(e,t)=>{J0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ba(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function et(e){return new wp({type:"lazy",getter:e})}const kp=$("ZodCustom",(e,t)=>{K0.init(e,t),pe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>na(e,r)});function Sp(e,t={}){return L1(kp,e,t)}function _p(e,t){return V1(e,t)}const Cp=Y({fontFamily:S().optional(),fontSize:S().optional(),fontWeight:Ze([ht(),S()]).optional(),lineHeight:S().optional(),letterSpacing:S().optional()});function G(e){return Ze([e,Y({base:e.optional()}).refine(t=>Object.keys(t).length>0,{message:"Responsive value must have at least one breakpoint or base"})])}const $p=Y({gap:G(S()).optional(),padding:G(S()).optional(),paddingTop:G(S()).optional(),paddingRight:G(S()).optional(),paddingBottom:G(S()).optional(),paddingLeft:G(S()).optional(),margin:G(S()).optional(),marginTop:G(S()).optional(),marginRight:G(S()).optional(),marginBottom:G(S()).optional(),marginLeft:G(S()).optional(),width:G(S()).optional(),height:G(S()).optional(),minWidth:G(S()).optional(),maxWidth:G(S()).optional(),minHeight:G(S()).optional(),maxHeight:G(S()).optional(),flexDirection:G(Ue(["row","column","row-reverse","column-reverse"])).optional(),justifyContent:G(Ue(["start","center","end","space-between","space-around","space-evenly"])).optional(),alignItems:G(Ue(["start","center","end","stretch","baseline"])).optional(),display:G(S()).optional(),position:G(Ue(["static","relative","absolute","fixed","sticky"])).optional(),inset:G(S()).optional(),top:G(S()).optional(),right:G(S()).optional(),bottom:G(S()).optional(),left:G(S()).optional(),zIndex:G(ht()).optional(),background:G(S()).optional(),color:G(S()).optional(),fontSize:G(S()).optional(),fontWeight:G(Ze([ht(),S()])).optional(),lineHeight:G(S()).optional(),letterSpacing:G(S()).optional(),borderRadius:G(S()).optional(),borderWidth:G(S()).optional(),borderColor:G(S()).optional(),shadow:G(S()).optional(),opacity:G(ht()).optional(),typography:S().optional()}),Mp=Y({name:S(),props:Q(S(),me()).optional(),style:$p.optional(),className:S().optional()}),Ap=Y({color:Q(S(),S()),spacing:Q(S(),S()),radius:Q(S(),S()),shadow:Q(S(),S()),font:Q(S(),S()),border:Q(S(),S())}),Np=Y({color:Q(S(),S()),spacing:Q(S(),S()),radius:Q(S(),S()),shadow:Q(S(),S()),typography:Q(S(),Cp)}),ka=Y({id:S(),name:S(),mode:Ue(["light","dark"]),breakpoints:Q(S(),S()),primitives:Ap,semantics:Np,variants:Q(S(),Ge(Mp))}),Sa=Y({id:S(),label:S(),mode:Ue(["light","dark"]),theme:ka}),tn=new Map,mo=new Map;function _a(e){const t=ka.parse(e);tn.set(t.id,t)}function Ca(e){const t=Sa.parse(e);mo.set(t.id,t),tn.set(t.theme.id,t.theme)}function go(e){return tn.get(e)}function $a(e){return mo.get(e)}function Ma(){return Array.from(tn.values())}function Aa(){return Array.from(mo.values())}function jp(){return{registerTheme:_a,registerThemePreset:Ca,getTheme:go,getThemePreset:$a,listThemes:Ma,listPresets:Aa}}function Na(e){const t={};for(const[r,n]of Object.entries(e.primitives.color))t[`--color-${r}`]=n;for(const[r,n]of Object.entries(e.primitives.spacing))t[`--spacing-${r}`]=n;for(const[r,n]of Object.entries(e.primitives.radius))t[`--radius-${r}`]=n;for(const[r,n]of Object.entries(e.primitives.shadow))t[`--shadow-${r}`]=n;for(const[r,n]of Object.entries(e.primitives.font))t[`--font-${r}`]=n;for(const[r,n]of Object.entries(e.primitives.border))t[`--border-${r}`]=n;return t}function Rp(e){const t=[];e.mode==="dark"?t.push(".dark {"):t.push(":root {");for(const[r,n]of Object.entries(e.primitives.color))t.push(` --color-${r}: ${n};`);for(const[r,n]of Object.entries(e.primitives.spacing))t.push(` --spacing-${r}: ${n};`);for(const[r,n]of Object.entries(e.primitives.radius))t.push(` --radius-${r}: ${n};`);for(const[r,n]of Object.entries(e.primitives.shadow))t.push(` --shadow-${r}: ${n};`);for(const[r,n]of Object.entries(e.primitives.font))t.push(` --font-${r}: ${n};`);return t.push("}"),t.join(`
|
|
86
|
+
`)}function Ep(e){const t=['@import "tailwindcss";',""];t.push("@theme {");for(const[r,n]of Object.entries(e.primitives.color))t.push(` --color-${r}: ${n};`);for(const[r,n]of Object.entries(e.primitives.spacing))t.push(` --spacing-${r}: ${n};`);for(const[r,n]of Object.entries(e.primitives.radius))t.push(` --radius-${r}: ${n};`);for(const[r,n]of Object.entries(e.primitives.shadow))t.push(` --shadow-${r}: ${n};`);for(const[r,n]of Object.entries(e.primitives.font))t.push(` --font-${r}: ${n};`);for(const[r,n]of Object.entries(e.semantics.typography))n.fontFamily&&t.push(` --font-${r}: ${n.fontFamily};`),n.fontSize&&t.push(` --text-${r}: ${n.fontSize};`);return t.push("}"),t.join(`
|
|
87
|
+
`)}function Tp(e){const t={colors:{...e.primitives.color},spacing:Object.fromEntries(Object.entries(e.primitives.spacing).map(([n,o])=>[n,o])),borderRadius:Object.fromEntries(Object.entries(e.primitives.radius).map(([n,o])=>[n,o])),boxShadow:Object.fromEntries(Object.entries(e.primitives.shadow).map(([n,o])=>[n,o])),fontFamily:Object.fromEntries(Object.entries(e.primitives.font).map(([n,o])=>[n,o]))},r={};for(const[n,o]of Object.entries(e.semantics.typography))r[n]={fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight,lineHeight:o.lineHeight,letterSpacing:o.letterSpacing};return{extend:{...t,typography:r}}}class ke extends Error{constructor(r,n,o){super(r);ae(this,"code");ae(this,"fields");this.name="DataError",this.code=n,this.fields=o}}function zp(e){return e instanceof ke}function Pp(){return{resolve(e,t){if(Array.isArray(t))return t}}}function ir(e){return!!e&&typeof e=="object"&&"$query"in e}function Tn(e,t){if(Array.isArray(e))return e.map(r=>Tn(r,t));if(e&&typeof e=="object"){const r=e;if(typeof r.$bind=="string"&&Object.keys(r).length===1){const o=r.$bind;return o.startsWith("state.")?t.state?We(t.state,o.slice(6)):void 0:o.startsWith("session.")&&t.session?We(t.session,o.slice(8)):void 0}const n={};for(const[o,s]of Object.entries(r))n[o]=Tn(s,t);return n}return e}function bo(e,t){return Tn(e.$query,t)}async function ja(e,t){if(!e)return;const r=Object.entries(e).filter(n=>ir(n[1]));if(r.length!==0){for(const[n]of r)t.stateStore.setState(`$data.${n}.status`,"loading");await Promise.all(r.map(async([n,o])=>{try{const s=bo(o,{state:t.stateStore.getValue(),session:t.session}),i=await t.adapter.query(s,t.signal);t.stateStore.setState(`$data.${n}.status`,"success"),t.stateStore.setState(`$data.${n}.rows`,i.rows),t.stateStore.setState(`$data.${n}.total`,i.total),t.stateStore.setState(`$data.${n}.error`,null)}catch(s){if(s instanceof DOMException&&s.name==="AbortError")return;const i=s instanceof ke?s:new ke(String(s),"server");t.stateStore.setState(`$data.${n}.status`,"error"),t.stateStore.setState(`$data.${n}.error`,{code:i.code,message:i.message})}}))}}function Ra(e,t){if(!e)return{};const r={};for(const[n,o]of Object.entries(e))ir(o)&&(r[n]=JSON.stringify(bo(o,t)));return r}function vo(){const e=new Map;return{on:(t,r)=>(e.has(t)||e.set(t,new Set),e.get(t).add(r),()=>{var n;(n=e.get(t))==null||n.delete(r)}),emit:(t,r)=>{const n=e.get(t);if(n)for(const o of n)o(r)},off:(t,r)=>{var n;(n=e.get(t))==null||n.delete(r)}}}function zn(e,t){if(e==="event")return t;if(e.startsWith("event.")&&t&&typeof t=="object")return We(t,e.slice(6))}function zt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Op(e){return zt(e)&&typeof e.$bind=="string"}function Ip(e){return zt(e)&&"$expr"in e}function Ye(e,t,r){return Op(e)?zn(e.$bind,t):Ip(e)?he(e.$expr,r):Array.isArray(e)?e.map(n=>Ye(n,t,r)):zt(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>[n,Ye(o,t,r)])):e}function Pn(e,t){if(typeof e!="string"||e.length===0)throw new Error(`"${t}" must resolve to a non-empty string`);return e}function Dp(e,t){if(e!=null)return Pn(e,t)}function Zp(e,t){if(e!=null){if(typeof e=="string"){if(e.length===0)throw new Error(`"${t}" must resolve to a non-empty string or number`);return e}if(typeof e=="number"&&Number.isFinite(e))return e;throw new Error(`"${t}" must resolve to a non-empty string or finite number`)}}function Fp(e,t){if(e!=null){if(typeof e=="number"&&Number.isFinite(e))return e;throw new Error(`"${t}" must resolve to a finite number`)}}function Ms(e,t){if(e!=null){if(!zt(e))throw new Error(`"${t}" must resolve to an object`);return e}}function Lp(e){if(!zt(e))return;const t=Object.entries(e);if(t.every(([,r])=>typeof r=="string"))return Object.fromEntries(t)}function As(e){const t=e instanceof Error?e.message:"Mutation failed";if(!zt(e))return{message:t};const r=typeof e.code=="string"?e.code:void 0,n=Lp(e.fields);return{message:t,code:r,fields:n}}const Vp=15e3,Bp=5*1024*1024,Hp=6;function Wp(e,t){return t.some(r=>{if(r.startsWith("*.")){const n=r.slice(1);return e===r.slice(2)||e.endsWith(n)}return e===r})}class Ea{constructor(t={}){ae(this,"stateStore");ae(this,"route");ae(this,"session");ae(this,"data");ae(this,"eventBus");ae(this,"mutationHandler");ae(this,"commandHandler");ae(this,"apiAllowlist");ae(this,"apiMaxResponseBytes");ae(this,"apiMaxConcurrentCalls");ae(this,"inFlightApiCalls",0);this.stateStore=t.stateStore,this.route=t.route??{},this.session=t.session??{},this.data=t.data??{},this.eventBus=t.eventBus??vo(),this.mutationHandler=t.mutationHandler,this.commandHandler=t.commandHandler,this.apiAllowlist=t.apiAllowlist,this.apiMaxResponseBytes=t.apiMaxResponseBytes??Bp,this.apiMaxConcurrentCalls=t.apiMaxConcurrentCalls??Hp}getEventBus(){return this.eventBus}execute(t,r){try{this.executeAction(t,r)}catch(n){process.env.NODE_ENV!=="production"&&console.warn("[uidl-runtime] Action execution failed:",n,t)}}executeAction(t,r){var n;if("sequence"in t){for(const o of t.sequence)this.executeAction(o,r);return}if("if"in t){const{condition:o,then:s,else:i}=t.if,a=this.buildScope(),c=!!he(o,a);c&&s?this.executeAction(s,r):!c&&i&&this.executeAction(i,r);return}if("setState"in t){const{path:o,value:s}=t.setState,i=this.buildScope();let a;typeof s=="object"&&s!==null&&"$bind"in s?a=zn(s.$bind,r):s===null&&r!==void 0?a=r:typeof s=="object"&&s!==null&&"$expr"in s?a=he(s.$expr,i):a=s,(n=this.stateStore)==null||n.setState(o,a);return}if("navigate"in t){const{route:o}=t.navigate;let s;if(typeof o=="object"&&o!==null&&"$bind"in o)s=zn(o.$bind,r);else{const i=this.buildScope();s=typeof o=="object"&&o!==null&&"$expr"in o?he(o.$expr,i):o}typeof s=="string"?this.eventBus.emit("route-change",s):typeof s=="object"&&s!==null&&this.eventBus.emit("route-change",s);return}if("api"in t){this.executeApi(t.api);return}if("mutate"in t){this.executeMutation(t.mutate,r);return}if("command"in t){this.executeCommand(t.command,r);return}if("showSnackbar"in t){const{message:o,duration:s}=t.showSnackbar;this.eventBus.emit("snackbar",{message:o,duration:s??3e3});return}if("showDialog"in t){this.eventBus.emit("dialog",t.showDialog);return}if("validate"in t){this.eventBus.emit("validate",t.validate);return}}executeMutation(t,r){var n,o,s;t.statusPath&&((n=this.stateStore)==null||n.setState(t.statusPath,"loading")),t.errorPath&&((o=this.stateStore)==null||o.setState(t.errorPath,void 0)),t.fieldErrorsPath&&((s=this.stateStore)==null||s.setState(t.fieldErrorsPath,{})),this.runMutation(t,r)}async runMutation(t,r){var o,s,i,a,c,l,d;let n;try{if(n=this.buildMutationRequest(t,r),!this.mutationHandler)throw new Error('"mutate" actions are disabled by default - pass mutationHandler to ActionInterpreter/renderUIDocument/UIDocumentRenderer to handle business writes');const u=await this.mutationHandler(n);t.resultPath&&((o=this.stateStore)==null||o.setState(t.resultPath,u)),t.errorPath&&((s=this.stateStore)==null||s.setState(t.errorPath,void 0)),t.fieldErrorsPath&&((i=this.stateStore)==null||i.setState(t.fieldErrorsPath,{})),t.statusPath&&((a=this.stateStore)==null||a.setState(t.statusPath,"success"));const h={success:!0,request:n,data:u};this.eventBus.emit("mutation-response",h),t.onSuccess&&this.executeAction(t.onSuccess,u)}catch(u){const h=As(u);t.statusPath&&((c=this.stateStore)==null||c.setState(t.statusPath,"error")),t.errorPath&&((l=this.stateStore)==null||l.setState(t.errorPath,h.message)),t.fieldErrorsPath&&((d=this.stateStore)==null||d.setState(t.fieldErrorsPath,h.fields??{}));const f={success:!1,...n?{request:n}:{},error:h.message,...h.code?{code:h.code}:{},...h.fields?{fields:h.fields}:{}};this.eventBus.emit("mutation-response",f),this.eventBus.emit("snackbar",{message:h.message,duration:5e3}),t.onError&&this.executeAction(t.onError,f)}}buildMutationRequest(t,r){const n=this.buildScope(),o={operation:t.operation,collection:Pn(Ye(t.collection,r,n),"mutate.collection")},s=Zp(Ye(t.id,r,n),"mutate.id");s!==void 0&&(o.id=s);const i=Ms(Ye(t.payload,r,n),"mutate.payload");i!==void 0&&(o.payload=i);const a=Dp(Ye(t.transition,r,n),"mutate.transition");a!==void 0&&(o.transition=a);const c=Fp(Ye(t.version,r,n),"mutate.version");if(c!==void 0&&(o.version=c),(t.operation==="update"||t.operation==="delete"||t.operation==="transition")&&o.id===void 0)throw new Error(`"mutate.${t.operation}" requires an id`);if(t.operation==="transition"&&!o.transition)throw new Error('"mutate.transition" actions require a transition name');return o}executeCommand(t,r){var n,o;t.statusPath&&((n=this.stateStore)==null||n.setState(t.statusPath,"loading")),t.errorPath&&((o=this.stateStore)==null||o.setState(t.errorPath,void 0)),this.runCommand(t,r)}async runCommand(t,r){var o,s,i,a,c;let n;try{if(n=this.buildCommandRequest(t,r),!this.commandHandler)throw new Error('"command" actions are disabled by default - pass commandHandler to ActionInterpreter/renderUIDocument/UIDocumentRenderer to handle host commands');const l=await this.commandHandler(n);t.resultPath&&((o=this.stateStore)==null||o.setState(t.resultPath,l)),t.errorPath&&((s=this.stateStore)==null||s.setState(t.errorPath,void 0)),t.statusPath&&((i=this.stateStore)==null||i.setState(t.statusPath,"success"));const d={success:!0,request:n,data:l};this.eventBus.emit("command-response",d),t.onSuccess&&this.executeAction(t.onSuccess,l)}catch(l){const d=As(l);t.statusPath&&((a=this.stateStore)==null||a.setState(t.statusPath,"error")),t.errorPath&&((c=this.stateStore)==null||c.setState(t.errorPath,d.message));const u={success:!1,...n?{request:n}:{},error:d.message,...d.code?{code:d.code}:{},...d.fields?{fields:d.fields}:{}};this.eventBus.emit("command-response",u),this.eventBus.emit("snackbar",{message:d.message,duration:5e3}),t.onError&&this.executeAction(t.onError,u)}}buildCommandRequest(t,r){const n=this.buildScope(),o={name:Pn(Ye(t.name,r,n),"command.name")},s=Ms(Ye(t.payload,r,n),"command.payload");return s!==void 0&&(o.payload=s),o}executeApi(t){this.fetchApi(t)}async fetchApi(t){var r,n,o,s;if(this.inFlightApiCalls>=this.apiMaxConcurrentCalls){this.eventBus.emit("api-response",{success:!1,error:`Too many concurrent "api" actions in flight (limit: ${this.apiMaxConcurrentCalls})`}),this.eventBus.emit("snackbar",{message:"Too many API requests in flight",duration:5e3});return}this.inFlightApiCalls++;try{let i;try{i=new URL(t.url,typeof window<"u"?window.location.href:void 0)}catch{throw new Error(`Invalid API URL: ${t.url}`)}if(i.protocol!=="http:"&&i.protocol!=="https:")throw new Error(`Unsupported API URL scheme: ${i.protocol}`);if(!this.isApiUrlAllowed(i))throw new Error(this.apiAllowlist?`API host "${i.host}" is not in the configured apiAllowlist`:'"api" actions are disabled by default — pass apiAllowlist to renderUIDocument/ActionInterpreter to allow specific hosts (e.g. apiAllowlist: ["api.example.com"])');const a=new AbortController,c=setTimeout(()=>a.abort(),Vp);let l;try{l=await fetch(i,{method:t.method,headers:{"Content-Type":"application/json"},body:t.body?JSON.stringify(t.body):void 0,signal:a.signal})}finally{clearTimeout(c)}if(!l.ok)throw new Error(`API error: ${l.status}`);const d=(n=(r=l.headers)==null?void 0:r.get)==null?void 0:n.call(r,"content-type");if(d&&!d.includes("json"))throw new Error(`API response Content-Type "${d}" is not JSON`);const u=(s=(o=l.headers)==null?void 0:o.get)==null?void 0:s.call(o,"content-length");if(u&&Number(u)>this.apiMaxResponseBytes)throw new Error(`API response too large (${u} bytes, limit ${this.apiMaxResponseBytes})`);const h=await l.text(),f=new TextEncoder().encode(h).length;if(f>this.apiMaxResponseBytes)throw new Error(`API response too large (${f} bytes, limit ${this.apiMaxResponseBytes})`);const v=JSON.parse(h);t.dataSource&&this.stateStore&&this.stateStore.setState(t.dataSource,v),this.eventBus.emit("api-response",{success:!0,data:v})}catch(i){this.eventBus.emit("api-response",{success:!1,error:i instanceof Error?i.message:"Unknown error"}),this.eventBus.emit("snackbar",{message:i instanceof Error?i.message:"API request failed",duration:5e3})}finally{this.inFlightApiCalls--}}isApiUrlAllowed(t){return this.apiAllowlist?typeof this.apiAllowlist=="function"?this.apiAllowlist(t):Wp(t.host,this.apiAllowlist):!1}buildScope(){var r;return{state:(r=this.stateStore)==null?void 0:r.getValue(),session:this.session,route:this.route,data:this.data}}}function yo(e,t={}){const r=t.theme??go(e.theme??""),n=t.stateStore,o=t.dataSources??e.dataSources,s={};if(o){for(const[l,d]of Object.entries(o))if(Array.isArray(d))s[l]=d;else if(ir(d)){const u=n==null?void 0:n.getValue(`$data.${l}.rows`);s[l]=Array.isArray(u)?u:[]}}const i=n==null?void 0:n.getValue(),a=vo();t.onRouteChange&&a.on("route-change",l=>{t.onRouteChange(l)});const c=new Ea({stateStore:n,session:t.session,data:s,eventBus:a,mutationHandler:t.mutationHandler,commandHandler:t.commandHandler,apiAllowlist:t.apiAllowlist,apiMaxResponseBytes:t.apiMaxResponseBytes,apiMaxConcurrentCalls:t.apiMaxConcurrentCalls});return{theme:r,data:s,stateSnapshot:i,session:t.session,eventBus:a,interpreter:c}}let Ns=!1;function Up(e){Ns||!e.dataSources||!Object.values(e.dataSources).some(ir)||(Ns=!0,console.warn(`[uidl-runtime] renderUIDocument() found a "$query" dataSource but has no way to resolve it — it renders a single, static pass and never re-renders when a promise settles. Use <UIDocumentRenderer document={...} dataAdapter={...} /> instead for any document with a "$query" dataSource, the same way it's already required for showDialog/showSnackbar actions.`))}function Gp(e,t={}){Up(e);const{theme:r,data:n,stateSnapshot:o,session:s,interpreter:i}=yo(e,t),a=Ct(e.root,{theme:r,state:o,session:s,data:n,actionInterpreter:i,registry:t.registry,definitions:e.definitions});return Ta(a,r)}function Ta(e,t){if(t&&m.isValidElement(e)){const r=Na(t),n=e.props.style;return m.cloneElement(e,{style:{...r,...n}})}return e}function za({document:e,theme:t,stateStore:r,session:n,dataSources:o,dataAdapter:s,mutationHandler:i,commandHandler:a,onRouteChange:c,registry:l,apiAllowlist:d,apiMaxResponseBytes:u,apiMaxConcurrentCalls:h}){const[f,v]=m.useState(0);m.useEffect(()=>{if(r)return r.subscribe(()=>v(g=>g+1))},[r]);const y=m.useRef({}),x=m.useRef(null),w=o??e.dataSources;m.useEffect(()=>{if(!s||!r||!w)return;const g=()=>{var P;const E={state:r.getValue(),session:n},O=Ra(w,E);if(!Object.keys(O).some(B=>y.current[B]!==O[B]))return;y.current=O,(P=x.current)==null||P.abort();const D=new AbortController;x.current=D,ja(w,{adapter:s,stateStore:r,session:n,signal:D.signal})};g();const R=r.subscribe(g);return()=>{var E;R(),(E=x.current)==null||E.abort(),y.current={}}},[s,r,w,n]);const k=m.useMemo(()=>yo(e,{theme:t,stateStore:r,session:n,dataSources:w,dataAdapter:s,mutationHandler:i,commandHandler:a,onRouteChange:c,registry:l,apiAllowlist:d,apiMaxResponseBytes:u,apiMaxConcurrentCalls:h}),[e,t,r,n,w,s,i,a,c,l,d,u,h,f]),[T,N]=m.useState(null),[C,M]=m.useState(null);m.useEffect(()=>{const g=k.eventBus.on("dialog",E=>{N(E)}),R=k.eventBus.on("snackbar",E=>{M(E)});return()=>{g(),R()}},[k.eventBus]);const b=Ct(e.root,{theme:k.theme,state:k.stateSnapshot,session:k.session,data:k.data,actionInterpreter:k.interpreter,registry:l,definitions:e.definitions});return p.jsxs(p.Fragment,{children:[Ta(b,k.theme),p.jsx(oo,{open:T!==null,title:T==null?void 0:T.title,content:T==null?void 0:T.content,onClose:()=>N(null)}),p.jsx(no,{message:C==null?void 0:C.message,duration:C==null?void 0:C.duration,onClose:()=>M(null)})]})}const Pa="1.1.0";function Jp(){const e=Et.list();return{version:Pa,componentCount:e.length,components:e.map(t=>{var r,n;return`${t.type}:${(r=t.propDescriptors)==null?void 0:r.map(o=>o.name).join(",")}:${(n=t.eventDescriptors)==null?void 0:n.map(o=>o.name).join(",")}`})}}const xo=Jp();function Kp(){return xo}function qp(){return xo.components.join(`
|
|
88
|
+
`)}Q(S(),me());const Yp=Y({condition:me().optional(),breakpoints:Ge(Ue(["mobile","tablet","desktop","wide"])).optional()}),Xp=Y({dataSource:Ze([Ge(me()),S()]).optional(),itemName:S().optional(),useIndex:Y5().optional()}),Zr=Y({id:S(),type:S(),name:S().optional(),props:Q(S(),me()).optional(),style:Q(S(),me()).optional(),children:Ge(et(()=>Zr)).optional(),slots:Q(S(),Ge(et(()=>Zr))).optional(),responsive:Q(S(),me()).optional().describe("DEPRECATED: responsive overrides are migrating into style values. This field is preserved for backward compatibility only."),visibility:Yp.optional(),bindings:Q(S(),me()).optional(),events:Q(S(),me()).optional(),repeat:Xp.optional(),ref:S().optional(),componentId:S().optional(),themeRef:S().optional(),testId:S().optional()}),Oa=Ge(Sa),Fr=Y({$schema:S().optional(),version:S(),id:S(),name:S(),route:S().optional(),theme:S().optional(),state:Q(S(),me()).optional(),dataSources:Q(S(),me()).optional(),definitions:Q(S(),Zr).optional(),root:Zr}),Ia=Y({color:Q(S(),S()).optional(),font:Q(S(),S()).optional(),spacing:Q(S(),S()).optional(),radius:Q(S(),S()).optional(),shadow:Q(S(),me()).optional()}),Qp=Y({setState:Y({path:S(),value:me()})}),ef=Y({navigate:Y({route:Ze([S(),Q(S(),me())])})}),tf=Y({api:Y({url:S(),method:Ue(["GET","POST","PUT","DELETE"]),body:Q(S(),me()).optional(),dataSource:S().optional()})}),rn=Y({$bind:S()}),nn=Y({$expr:me()}),On=Ze([S(),rn,nn]),rf=Ze([S(),ht(),rn,nn]),Da=Ze([Q(S(),me()),rn,nn]),nf=Ze([ht(),rn,nn]),of=Y({mutate:Y({operation:Ue(["create","update","delete","transition"]),collection:On,id:rf.optional(),payload:Da.optional(),transition:On.optional(),version:nf.optional(),resultPath:S().optional(),errorPath:S().optional(),fieldErrorsPath:S().optional(),statusPath:S().optional(),onSuccess:et(()=>Je).optional(),onError:et(()=>Je).optional()})}),sf=Y({command:Y({name:On,payload:Da.optional(),resultPath:S().optional(),errorPath:S().optional(),statusPath:S().optional(),onSuccess:et(()=>Je).optional(),onError:et(()=>Je).optional()})}),af=Y({showSnackbar:Y({message:S(),duration:ht().optional()})}),cf=Y({showDialog:Y({title:S(),content:S()})}),lf=Y({validate:Y({fields:Ge(S())})}),df=Y({sequence:Ge(et(()=>Je))}),uf=Y({if:Y({condition:Q(S(),me()),then:et(()=>Je),else:et(()=>Je).optional()})}),Je=Ze([Qp,ef,tf,of,sf,af,cf,lf,df,uf]),pf=Ge(Je),ff="https://uidl-runtime.local/schema";function Sr(e,t){const r=`${ff}/${e}`,n=l5(t,{target:"draft-2020-12"});return n.$id=r,{filename:e,id:r,schema:n}}function hf(){return[Sr("uidl-document.schema.json",Fr),Sr("action.schema.json",Je),Sr("theme-presets.schema.json",Oa),Sr("design-tokens.schema.json",Ia)]}const Za={color:{primary:"#4B39EF",secondary:"#39D2C0",tertiary:"#F9CF58",error:"#FF5963",success:"#249689",warning:"#F9CF58",background:"#F1F4F8",surface:"#FFFFFF","surface-elevated":"#FFFFFF",border:"#E1E4E8","border-hover":"#C5C9CD","text-primary":"#14181B","text-secondary":"#57636C","text-muted":"#8B939C","text-inverse":"#FFFFFF",accent:"#4B39EF","accent-hover":"#3D2FB8","accent-subtle":"#EEECFF"},spacing:{0:"0px","0.5":"0.125rem",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem",10:"2.5rem",12:"3rem",16:"4rem",20:"5rem",24:"6rem"},radius:{none:"0px",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"},shadow:{none:"none",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"},font:{sans:"ui-sans-serif, system-ui, sans-serif",serif:"ui-serif, Georgia, serif",mono:"ui-monospace, SFMono-Regular, monospace"},border:{"width-0":"0px","width-thin":"1px","width-medium":"2px","width-thick":"4px","style-solid":"solid","style-dashed":"dashed","style-dotted":"dotted","style-none":"none"}},In={color:{"bg-primary":"{primitives.color.primary}","bg-secondary":"{primitives.color.secondary}","bg-success":"{primitives.color.success}","bg-error":"{primitives.color.error}","bg-warning":"{primitives.color.warning}","bg-background":"{primitives.color.background}","bg-surface":"{primitives.color.surface}","bg-surface-elevated":"{primitives.color.surface-elevated}","bg-border":"{primitives.color.border}","text-primary":"{primitives.color.text-primary}","text-secondary":"{primitives.color.text-secondary}","text-muted":"{primitives.color.text-muted}","text-inverse":"{primitives.color.text-inverse}","text-on-primary":"{primitives.color.text-inverse}","border-default":"{primitives.color.border}","border-hover":"{primitives.color.border-hover}"},spacing:{xs:"{primitives.spacing.1}",sm:"{primitives.spacing.2}",md:"{primitives.spacing.4}",lg:"{primitives.spacing.6}",xl:"{primitives.spacing.8}","2xl":"{primitives.spacing.12}"},radius:{sm:"{primitives.radius.sm}",md:"{primitives.radius.md}",lg:"{primitives.radius.lg}",xl:"{primitives.radius.xl}",full:"{primitives.radius.full}"},shadow:{sm:"{primitives.shadow.sm}",md:"{primitives.shadow.md}",lg:"{primitives.shadow.lg}",xl:"{primitives.shadow.xl}"},typography:{"display-large":{fontFamily:"{primitives.font.sans}",fontSize:"text-4xl",fontWeight:700,lineHeight:"leading-tight",letterSpacing:"tracking-tight"},"headline-medium":{fontFamily:"{primitives.font.sans}",fontSize:"text-2xl",fontWeight:600,lineHeight:"leading-snug",letterSpacing:"tracking-tight"},"headline-small":{fontFamily:"{primitives.font.sans}",fontSize:"text-xl",fontWeight:600,lineHeight:"leading-snug",letterSpacing:"tracking-tight"},"title-large":{fontFamily:"{primitives.font.sans}",fontSize:"text-lg",fontWeight:600,lineHeight:"leading-snug",letterSpacing:"tracking-normal"},"title-medium":{fontFamily:"{primitives.font.sans}",fontSize:"text-base",fontWeight:600,lineHeight:"leading-normal",letterSpacing:"tracking-normal"},"body-large":{fontFamily:"{primitives.font.sans}",fontSize:"text-base",fontWeight:400,lineHeight:"leading-relaxed",letterSpacing:"tracking-normal"},"body-medium":{fontFamily:"{primitives.font.sans}",fontSize:"text-sm",fontWeight:400,lineHeight:"leading-normal",letterSpacing:"tracking-normal"},"label-large":{fontFamily:"{primitives.font.sans}",fontSize:"text-sm",fontWeight:500,lineHeight:"leading-normal",letterSpacing:"tracking-wide"},"label-medium":{fontFamily:"{primitives.font.sans}",fontSize:"text-xs",fontWeight:500,lineHeight:"leading-normal",letterSpacing:"tracking-wide"}}},tt={id:"theme-light",name:"Light",mode:"light",breakpoints:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},primitives:Za,semantics:In,variants:{button:[{name:"primary",props:{variant:"primary"},style:{background:"{primitives.color.primary}",color:"{primitives.color.text-inverse}",padding:"px-4 py-2",borderRadius:"{primitives.radius.md}",fontWeight:500}},{name:"secondary",props:{variant:"secondary"},style:{background:"transparent",color:"{primitives.color.primary}",padding:"px-4 py-2",borderRadius:"{primitives.radius.md}",borderWidth:"{primitives.border.width.thin}",borderColor:"{primitives.color.border}",fontWeight:500}},{name:"ghost",props:{variant:"ghost"},style:{background:"transparent",color:"{primitives.color.text-secondary}",padding:"px-4 py-2",borderRadius:"{primitives.radius.md}",fontWeight:500}},{name:"danger",props:{variant:"danger"},style:{background:"{primitives.color.error}",color:"{primitives.color.text-inverse}",padding:"px-4 py-2",borderRadius:"{primitives.radius.md}",fontWeight:500}}],card:[{name:"elevated",props:{variant:"elevated"},style:{background:"{primitives.color.surface}",padding:"p-6",borderRadius:"{primitives.radius.lg}",shadow:"{primitives.shadow.md}",borderWidth:"{primitives.border.width.thin}",borderColor:"{primitives.color.border}"}},{name:"outlined",props:{variant:"outlined"},style:{background:"transparent",padding:"p-6",borderRadius:"{primitives.radius.lg}",borderWidth:"{primitives.border.width.thin}",borderColor:"{primitives.color.border}"}}],textfield:[{name:"default",props:{variant:"default"},style:{padding:"px-3 py-2",borderRadius:"{primitives.radius.md}",borderWidth:"{primitives.border.width.thin}",borderColor:"{primitives.color.border}",background:"{primitives.color.surface}"}},{name:"filled",props:{variant:"filled"},style:{padding:"px-3 py-2",borderRadius:"{primitives.radius.md}",background:"{primitives.color.background}",borderWidth:"{primitives.border.width.0}"}}],badge:[{name:"solid",props:{variant:"solid"},style:{background:"{primitives.color.primary}",color:"{primitives.color.text-inverse}",padding:"px-2 py-0.5",borderRadius:"{primitives.radius.full}",fontSize:"text-xs",fontWeight:500}},{name:"subtle",props:{variant:"subtle"},style:{background:"{primitives.color.accent-subtle}",color:"{primitives.color.primary}",padding:"px-2 py-0.5",borderRadius:"{primitives.radius.full}",fontSize:"text-xs",fontWeight:500}}]}},mf={...Za,color:{primary:"#8B7DFA",secondary:"#5CE1D4",tertiary:"#F9CF58",error:"#FF6B73",success:"#3DB8A8",warning:"#F9CF58",background:"#0B0F14",surface:"#151B23","surface-elevated":"#1C2430",border:"#2A3441","border-hover":"#3A4858","text-primary":"#F9FAFB","text-secondary":"#A3AEB8","text-muted":"#6B7885","text-inverse":"#0B0F14",accent:"#8B7DFA","accent-hover":"#A598FB","accent-subtle":"#1E2540"}},gf={...In,color:{...In.color,"bg-background":"{primitives.color.background}","bg-surface":"{primitives.color.surface}","bg-surface-elevated":"{primitives.color.surface-elevated}","bg-border":"{primitives.color.border}","text-primary":"{primitives.color.text-primary}","text-secondary":"{primitives.color.text-secondary}","text-muted":"{primitives.color.text-muted}","text-inverse":"{primitives.color.text-inverse}","text-on-primary":"{primitives.color.text-inverse}","border-default":"{primitives.color.border}","border-hover":"{primitives.color.border-hover}"}},wo={...tt,id:"theme-dark",name:"Dark",mode:"dark",primitives:mf,semantics:gf},bf={id:"preset-light",label:"Light",mode:"light",theme:tt},vf={id:"preset-dark",label:"Dark",mode:"dark",theme:wo},we={25:"#FBFBFB",200:"#EDEDED",300:"#E2E2E2",400:"#C7C7C7",500:"#999999",600:"#7C7C7C",700:"#525252",800:"#383838",875:"#212121",890:"#1C1C1C",900:"#171717"},Dn={...tt.primitives,color:{primary:"#1E293B",secondary:we[200],tertiary:"#EDBA13",error:"#E03636",success:"#30A66D",warning:"#EDBA13",background:"#FFFFFF",surface:we[25],"surface-elevated":"#FFFFFF",border:we[200],"border-hover":we[300],"text-primary":"#1E293B","text-secondary":we[600],"text-muted":we[500],"text-inverse":"#FFFFFF",accent:"#33A1FF","accent-hover":"#007BE0","accent-subtle":"#EDF6FD"},radius:{none:"0px",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"},shadow:{none:"none",sm:"0 0.5px 0 0 rgba(0, 0, 0, 0.08)",md:"0 2px 4px 0 rgba(0, 0, 0, 0.05)",lg:"0 0 2px 0 rgba(0, 0, 0, 0.10), 0 2px 4px 0 rgba(0, 0, 0, 0.08)",xl:"0 0 2px 0 rgba(0, 0, 0, 0.10), 0 4px 8px 0 rgba(0, 0, 0, 0.10)"},font:{...tt.primitives.font,sans:'Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif'}},yf={...Dn,color:{...Dn.color,primary:we[300],secondary:we[900],background:we[875],surface:we[900],"surface-elevated":we[890],border:we[800],"border-hover":we[700],"text-primary":we[25],"text-secondary":we[400],"text-muted":we[500],"text-inverse":we[900],accent:"#007BE0","accent-hover":"#33A1FF","accent-subtle":"#004880"}},xf=tt.semantics,ko={...tt,id:"theme-meridian-light",name:"Meridian Light",mode:"light",primitives:Dn,semantics:xf,variants:{...tt.variants,button:[{name:"primary",props:{variant:"primary"},style:{padding:"px-6",borderRadius:"{primitives.radius.md}",fontSize:"text-sm"}},{name:"secondary",props:{variant:"secondary"},style:{padding:"px-6",borderRadius:"{primitives.radius.md}",fontSize:"text-sm"}},{name:"icon",props:{variant:"secondary",icon:!0},style:{padding:"px-3",borderRadius:"{primitives.radius.md}",fontSize:"text-sm"}}]}},Fa={...ko,id:"theme-meridian-dark",name:"Meridian Dark",mode:"dark",primitives:yf},wf={id:"preset-meridian-light",label:"Meridian Light",mode:"light",theme:ko},kf={id:"preset-meridian-dark",label:"Meridian Dark",mode:"dark",theme:Fa};function Sf(e){return JSON.stringify(e,null,2)}function _f(e){return JSON.stringify(e,null,2)}function Cf(e){return JSON.parse(e)}function $f(e){return JSON.parse(e)}function La(e,t){const r=[];if(!e||typeof e!="object"||Array.isArray(e))return r;const n=e;for(const[o,s]of Object.entries(n))o!=="base"&&(t.breakpoints[o]||r.push({path:o,message:`Unknown breakpoint "${o}". Expected one of: ${Object.keys(t.breakpoints).join(", ")}`}),s==null&&r.push({path:o,message:`Responsive value at "${o}" is null or undefined`}));return r}function Mf(e,t){const r=[];for(const[n,o]of Object.entries(e)){if(!o||typeof o!="object"||Array.isArray(o))continue;const s=La(o,t);for(const i of s)r.push({path:`${n}.${i.path}`,message:i.message})}return r}function Af(e,t){if(t.value===void 0||t.value===null||t.value==="")return!0;const r=e[t.field];switch(t.op){case"eq":return r===t.value;case"ne":return r!==t.value;case"in":return Array.isArray(t.value)&&t.value.includes(r);case"gt":return typeof r=="number"&&typeof t.value=="number"&&r>t.value;case"gte":return typeof r=="number"&&typeof t.value=="number"&&r>=t.value;case"lt":return typeof r=="number"&&typeof t.value=="number"&&r<t.value;case"lte":return typeof r=="number"&&typeof t.value=="number"&&r<=t.value;case"like":return typeof r=="string"&&typeof t.value=="string"&&r.toLowerCase().includes(t.value.toLowerCase());case"between":{if(!Array.isArray(t.value)||t.value.length!==2)return!1;const[n,o]=t.value;return typeof r=="number"&&typeof n=="number"&&typeof o=="number"||typeof r=="string"&&typeof n=="string"&&typeof o=="string"?r>=n&&r<=o:!1}default:return!0}}function Nf(e,t){return e===t?0:e==null?-1:t==null?1:typeof e=="number"&&typeof t=="number"?e-t:String(e)<String(t)?-1:1}class Va{constructor(t={}){ae(this,"stores",new Map);ae(this,"persist");ae(this,"storageKey");ae(this,"latencyMs");ae(this,"failureRate");ae(this,"now");ae(this,"random");this.persist=t.persist??"none",this.storageKey=t.storageKey??"uidl-runtime-data-adapter",this.latencyMs=t.latencyMs??0,this.failureRate=t.failureRate??0,this.now=t.now??(()=>Date.now()),this.random=t.random??(()=>Math.random());const r=this.persist==="localStorage"?this.loadFromStorage():void 0;if(r)for(const[n,o]of Object.entries(r))this.stores.set(n,o);else if(t.seed){for(const[n,o]of Object.entries(t.seed))this.stores.set(n,o.map(s=>({data:{...s},version:1})));this.saveToStorage()}}async simulate(t){if(t!=null&&t.aborted)throw new DOMException("Aborted","AbortError");if(this.latencyMs>0&&await new Promise((r,n)=>{const o=setTimeout(r,this.latencyMs);t==null||t.addEventListener("abort",()=>{clearTimeout(o),n(new DOMException("Aborted","AbortError"))},{once:!0})}),t!=null&&t.aborted)throw new DOMException("Aborted","AbortError");if(this.failureRate>0&&this.random()<this.failureRate)throw new ke("Simulated failure (failureRate)","server")}collection(t){return this.stores.get(t)??[]}async query(t,r){var a,c;await this.simulate(r);let n=this.collection(t.collection).map(l=>l.data);for(const l of t.filters??[])n=n.filter(d=>Af(d,l));if(t.search){const l=t.search.toLowerCase();n=n.filter(d=>Object.values(d).some(u=>typeof u=="string"&&u.toLowerCase().includes(l)))}for(const l of[...t.sort??[]].reverse()){const d=l.dir==="desc"?-1:1;n=[...n].sort((u,h)=>d*Nf(u[l.field],h[l.field]))}const o=n.length,s=((a=t.page)==null?void 0:a.number)??1,i=((c=t.page)==null?void 0:c.size)??(o||1);if(t.page){const l=(s-1)*i;n=n.slice(l,l+i)}if(t.fields&&t.fields.length>0){const l=t.fields;n=n.map(d=>Object.fromEntries(l.map(u=>[u,d[u]])))}return{rows:n,total:o,page:s,pageSize:i}}async get(t,r,n){await this.simulate(n);const o=this.collection(t).find(s=>s.data.id===r);if(o)return{record:{...o.data},meta:{version:o.version}}}async create(t,r){var i;await this.simulate(r);const n=this.stores.get(t.collection)??[],o=((i=t.data)==null?void 0:i.id)??this.generateId(t.collection);if(n.some(a=>a.data.id===o))throw new ke(`Record "${o}" already exists in "${t.collection}"`,"conflict");const s={data:{...t.data,id:o},version:1};return n.push(s),this.stores.set(t.collection,n),this.saveToStorage(),{record:{...s.data},meta:{version:s.version}}}async update(t,r){if(await this.simulate(r),!t.id)throw new ke("update requires an id","validation");const n=this.stores.get(t.collection)??[],o=n.findIndex(a=>a.data.id===t.id);if(o===-1)throw new ke(`Record "${t.id}" not found in "${t.collection}"`,"not_found");const s=n[o];if(t.version!==void 0&&t.version!==s.version)throw new ke(`Record "${t.id}" has changed since it was read`,"conflict");const i={data:{...s.data,...t.data},version:s.version+1};return n[o]=i,this.stores.set(t.collection,n),this.saveToStorage(),{record:{...i.data},meta:{version:i.version}}}async remove(t,r,n){await this.simulate(n);const o=this.stores.get(t)??[],s=o.filter(i=>i.data.id!==r);if(s.length===o.length)throw new ke(`Record "${r}" not found in "${t}"`,"not_found");this.stores.set(t,s),this.saveToStorage()}async transition(t,r){return this.update({...t,data:{...t.data,status:t.transition}},r)}async report(t,r,n){throw await this.simulate(n),new ke("InMemoryAdapter.report has no registered reports — pass a reportRunner","not_found")}reset(t){if(this.stores.clear(),t)for(const[r,n]of Object.entries(t))this.stores.set(r,n.map(o=>({data:{...o},version:1})));this.saveToStorage()}generateId(t){return`${t.slice(0,3).toUpperCase()}-${this.now().toString(36)}-${Math.floor(this.random()*1e6).toString(36)}`}saveToStorage(){if(!(this.persist!=="localStorage"||typeof window>"u"))try{const t={};for(const[r,n]of this.stores.entries())t[r]=n;window.localStorage.setItem(this.storageKey,JSON.stringify(t))}catch{}}loadFromStorage(){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(this.storageKey);return t?JSON.parse(t):void 0}catch{return}}}function jf(e){return new Va(e)}const Rf={400:"validation",403:"forbidden",404:"not_found",409:"conflict",408:"timeout"};class Ba{constructor(t){ae(this,"baseUrl");ae(this,"fetchImpl");ae(this,"headers");ae(this,"timeoutMs");this.baseUrl=t.baseUrl.replace(/\/+$/,""),this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.headers=t.headers,this.timeoutMs=t.timeoutMs??15e3}async query(t,r){return this.request("/query",{method:"POST",body:t},r)}async get(t,r,n){return this.request(`/records/${encodeURIComponent(t)}/${encodeURIComponent(r)}`,{method:"GET",allowNotFound:!0},n)}async create(t,r){return this.request(`/records/${encodeURIComponent(t.collection)}`,{method:"POST",body:t},r)}async update(t,r){if(!t.id)throw new ke("update requires an id","validation");return this.request(`/records/${encodeURIComponent(t.collection)}/${encodeURIComponent(t.id)}`,{method:"PATCH",body:t},r)}async remove(t,r,n){await this.request(`/records/${encodeURIComponent(t)}/${encodeURIComponent(r)}`,{method:"DELETE"},n)}async transition(t,r){if(!t.id)throw new ke("transition requires an id","validation");return this.request(`/records/${encodeURIComponent(t.collection)}/${encodeURIComponent(t.id)}/transition`,{method:"POST",body:t},r)}async report(t,r,n){return this.request(`/reports/${encodeURIComponent(t)}`,{method:"POST",body:{params:r}},n)}async request(t,r,n){const o=new AbortController,s=setTimeout(()=>o.abort(),this.timeoutMs),i=()=>o.abort();n==null||n.addEventListener("abort",i,{once:!0});try{const a=await this.fetchImpl(`${this.baseUrl}${t}`,{method:r.method,headers:{Accept:"application/json",...r.body===void 0?{}:{"Content-Type":"application/json"},...this.headers},body:r.body===void 0?void 0:JSON.stringify(r.body),signal:o.signal});if(r.allowNotFound&&a.status===404)return;if(!a.ok)throw await Ef(a);return a.status===204?void 0:await a.json()}catch(a){throw a instanceof ke?a:a instanceof DOMException&&a.name==="AbortError"?new ke("HTTP request timed out or was aborted",n!=null&&n.aborted?"network":"timeout"):new ke(a instanceof Error?a.message:"HTTP request failed","network")}finally{clearTimeout(s),n==null||n.removeEventListener("abort",i)}}}async function Ef(e){var n,o,s;let t;try{t=await e.json()}catch{t=void 0}const r=Rf[e.status]??(e.status>=500?"server":"validation");return new ke(((n=t==null?void 0:t.error)==null?void 0:n.message)??`HTTP ${e.status}`,(((o=t==null?void 0:t.error)==null?void 0:o.code)===r,r),(s=t==null?void 0:t.error)==null?void 0:s.fields)}function Tf(e){return new Ba(e)}function _r(e){const t=new Map;function r(n){t.set(n.id,n);for(const o of n.children??[])r(o);for(const o of Object.values(n.slots??{}))for(const s of o)r(s)}return r(e),t}function js(e,t){for(const[r,n]of e.entries()){if((n.children??[]).some(o=>o.id===t))return r;if(n.slots){for(const o of Object.values(n.slots))if(o.some(s=>s.id===t))return r}}}function Rs(e,t){var r;if((r=e.children)!=null&&r.some(n=>n.id===t))return{...e,children:e.children.filter(n=>n.id!==t)};if(e.slots){for(const[n,o]of Object.entries(e.slots))if(o.some(s=>s.id===t))return{...e,slots:{...e.slots,[n]:o.filter(s=>s.id!==t)}}}return e}function zf(e){const t=e?_r(e.root):new Map;return $i()((r,n)=>({document:e??Pf(),flatNodeMap:t,history:{past:[],future:[]},selectedNodeId:null,hoveredNodeId:null,activeBreakpoint:"base",themeMode:"light",panelVisibility:{palette:!0,layers:!0,properties:!0,style:!0},validationErrors:[],isDirty:!1,canUndo:!1,canRedo:!1,selectNode:o=>r({selectedNodeId:o}),hoverNode:o=>r({hoveredNodeId:o}),updateNode:(o,s)=>{const{flatNodeMap:i,document:a,history:c}=n(),l=i.get(o);if(!l)return;const d={...l,...s},u=new Map(i);u.set(o,d);const h=Xt(a.root,o,d),f={...a,root:h};r({document:f,flatNodeMap:u,history:{past:[...c.past,a],future:[]},isDirty:!0,canUndo:!0,canRedo:!1})},addChild:(o,s,i)=>{const{flatNodeMap:a,document:c,history:l}=n(),d=a.get(o);if(!d)return;const u={id:`node-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,type:s,props:{},style:{},children:[]},h=new Map(a);h.set(u.id,u);const f={...d,children:[...d.children??[],u]};h.set(o,f);const v=Xt(c.root,o,f),y={...c,root:v};r({document:y,flatNodeMap:h,selectedNodeId:u.id,history:{past:[...l.past,c],future:[]},isDirty:!0,canUndo:!0,canRedo:!1})},deleteNode:o=>{const{flatNodeMap:s,document:i,selectedNodeId:a,history:c}=n();if(o===i.root.id)return;const l=js(s,o);if(!l)return;const d=s.get(l);if(!d)return;const u=new Map(s);u.delete(o);const h=Rs(d,o);u.set(l,h);const f=Xt(i.root,l,h),v={...i,root:f};r({document:v,flatNodeMap:u,selectedNodeId:a===o?l:a,history:{past:[...c.past,i],future:[]},isDirty:!0,canUndo:!0,canRedo:!1})},moveNode:(o,s,i)=>{const{flatNodeMap:a,document:c,history:l}=n(),d=a.get(o);if(!d)return;const u=js(a,o);if(!u)return;const h=a.get(u),f=a.get(s);if(!h||!f)return;const v=new Map(a),y=Rs(h,o);v.set(u,y);const x=u===s?y:f,w=[...x.children??[]],k=i??w.length;w.splice(k,0,d);const T={...x,children:w};v.set(s,T);const N=Zn(v,c.root.id),C={...c,root:N};r({document:C,flatNodeMap:v,history:{past:[...l.past,c],future:[]},isDirty:!0,canUndo:!0,canRedo:!1})},setBreakpoint:o=>r({activeBreakpoint:o}),setThemeMode:o=>r({themeMode:o}),togglePanel:o=>r(s=>({panelVisibility:{...s.panelVisibility,[o]:!s.panelVisibility[o]}})),setDocument:o=>{const s=_r(o.root);r({document:o,flatNodeMap:s,history:{past:[],future:[]},isDirty:!1,selectedNodeId:null,canUndo:!1,canRedo:!1})},setValidationErrors:o=>r({validationErrors:o}),markClean:()=>r({isDirty:!1}),undo:()=>{const{history:o,document:s}=n(),i=o.past[o.past.length-1];if(!i)return;const a=o.past.slice(0,-1),c=_r(i.root);r({document:i,flatNodeMap:c,history:{past:a,future:[s,...o.future]},selectedNodeId:null,isDirty:!0,canUndo:a.length>0,canRedo:!0})},redo:()=>{const{history:o,document:s}=n(),[i,...a]=o.future;if(!i)return;const c=_r(i.root);r({document:i,flatNodeMap:c,history:{past:[...o.past,s],future:a},selectedNodeId:null,isDirty:!0,canUndo:!0,canRedo:a.length>0})}}))}function Pf(){return{version:"1.0.0",id:"empty-document",name:"Untitled",root:{id:"root",type:"Container",props:{},style:{},children:[]}}}function Xt(e,t,r){var n;return e.id===t?r:{...e,children:(n=e.children)==null?void 0:n.map(o=>Xt(o,t,r)),slots:e.slots?Object.fromEntries(Object.entries(e.slots).map(([o,s])=>[o,s.map(i=>Xt(i,t,r))])):void 0}}function Zn(e,t){const r=e.get(t);if(!r)throw new Error(`Root node ${t} not found`);return{...r,children:(r.children??[]).map(n=>Zn(e,n.id)),slots:r.slots?Object.fromEntries(Object.entries(r.slots).map(([n,o])=>[n,o.map(s=>Zn(e,s.id))])):void 0}}class Of extends m.Component{constructor(){super(...arguments);ae(this,"state",{error:null})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r){console.error("Failed to render document:",r)}render(){return this.state.error?p.jsxs("div",{className:"p-4 text-red-500",children:["Failed to render document: ",this.state.error.message]}):this.props.children}}function If({document:e,onSelectNode:t,onHoverNode:r,themeMode:n="light",stateStore:o,dataSources:s,mutationHandler:i,commandHandler:a,apiAllowlist:c,apiMaxResponseBytes:l,apiMaxConcurrentCalls:d,className:u}){const h=m.useMemo(()=>n==="dark"?wo:tt,[n]),f=m.useCallback(y=>{var k;const w=(k=y.target.closest("[data-node-id]"))==null?void 0:k.getAttribute("data-node-id");t(w??null)},[t]),v=m.useCallback(y=>{var k;const w=(k=y.target.closest("[data-node-id]"))==null?void 0:k.getAttribute("data-node-id");r(w??null)},[r]);return p.jsx("div",{className:`relative flex-1 overflow-auto bg-background p-8 ${u??""}`,onClick:f,onMouseOver:v,children:p.jsx("div",{className:"mx-auto max-w-4xl",children:p.jsx(Of,{children:p.jsx(za,{document:e,theme:h,stateStore:o,dataSources:s,mutationHandler:i,commandHandler:a,apiAllowlist:c,apiMaxResponseBytes:l,apiMaxConcurrentCalls:d})},e.id)})})}const Es=[{id:"layout",label:"Layout"},{id:"base",label:"Base"},{id:"form",label:"Form"},{id:"data",label:"Data"},{id:"navigation",label:"Navigation"},{id:"advanced",label:"Advanced"}];function Df({onSelectWidget:e,selectedNodeId:t,className:r}){const n=Et.list().filter(s=>!s.hideFromPalette),o=Es.reduce((s,i)=>(s[i.id]=n.filter(a=>a.category===i.id),s),{});return p.jsxs("div",{className:`flex h-full flex-col border-r border-border ${r??""}`,children:[p.jsxs("div",{className:"border-b border-border px-4 py-3",children:[p.jsx("h2",{className:"text-sm font-semibold text-text-primary",children:"Widgets"}),p.jsxs("p",{className:"mt-1 text-xs text-text-secondary",children:[n.length," components available"]})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:Es.map(s=>{const i=o[s.id];return i.length===0?null:p.jsxs("div",{className:"mb-4",children:[p.jsx("h3",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-text-muted",children:s.label}),p.jsx("div",{className:"grid grid-cols-2 gap-2",children:i.map(a=>p.jsxs("button",{onClick:()=>e(a.type),disabled:!t,className:"rounded-lg border border-border bg-surface p-3 text-left transition-colors hover:border-border-hover hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-50",title:a.type,children:[p.jsx("div",{className:"text-sm font-medium text-text-primary",children:a.type}),p.jsx("div",{className:"mt-1 text-xs text-text-secondary",children:a.acceptsChildren?"Container":"Leaf"})]},a.type))})]},s.id)})})]})}function Zf(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return m.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const on=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Pt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function So(e){return"nodeType"in e}function Me(e){var t,r;return e?Pt(e)?e:So(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function _o(e){const{Document:t}=Me(e);return e instanceof t}function ar(e){return Pt(e)?!1:e instanceof Me(e).HTMLElement}function Ha(e){return e instanceof Me(e).SVGElement}function Ot(e){return e?Pt(e)?e.document:So(e)?_o(e)?e:ar(e)||Ha(e)?e.ownerDocument:document:document:document}const Ie=on?m.useLayoutEffect:m.useEffect;function sn(e){const t=m.useRef(e);return Ie(()=>{t.current=e}),m.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function Ff(){const e=m.useRef(null),t=m.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=m.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function nr(e,t){t===void 0&&(t=[e]);const r=m.useRef(e);return Ie(()=>{r.current!==e&&(r.current=e)},t),r}function cr(e,t){const r=m.useRef();return m.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Lr(e){const t=sn(e),r=m.useRef(null),n=m.useCallback(o=>{o!==r.current&&(t==null||t(o,r.current)),r.current=o},[]);return[r,n]}function Vr(e){const t=m.useRef();return m.useEffect(()=>{t.current=e},[e]),t.current}let wn={};function lr(e,t){return m.useMemo(()=>{if(t)return t;const r=wn[e]==null?0:wn[e]+1;return wn[e]=r,e+"-"+r},[e,t])}function Wa(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((s,i)=>{const a=Object.entries(i);for(const[c,l]of a){const d=s[c];d!=null&&(s[c]=d+e*l)}return s},{...t})}}const Nt=Wa(1),Br=Wa(-1);function Lf(e){return"clientX"in e&&"clientY"in e}function an(e){if(!e)return!1;const{KeyboardEvent:t}=Me(e.target);return t&&e instanceof t}function Vf(e){if(!e)return!1;const{TouchEvent:t}=Me(e.target);return t&&e instanceof t}function Hr(e){if(Vf(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return Lf(e)?{x:e.clientX,y:e.clientY}:null}const mt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[mt.Translate.toString(e),mt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),Ts="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Bf(e){return e.matches(Ts)?e:e.querySelector(Ts)}const Hf={display:"none"};function Wf(e){let{id:t,value:r}=e;return m.createElement("div",{id:t,style:Hf},r)}function Uf(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return m.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function Gf(){const[e,t]=m.useState("");return{announce:m.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const Ua=m.createContext(null);function Jf(e){const t=m.useContext(Ua);m.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Kf(){const[e]=m.useState(()=>new Set),t=m.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[m.useCallback(n=>{let{type:o,event:s}=n;e.forEach(i=>{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const qf={draggable:`
|
|
89
|
+
To pick up a draggable item, press the space bar.
|
|
90
|
+
While dragging, use the arrow keys to move the item.
|
|
91
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
92
|
+
`},Yf={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Xf(e){let{announcements:t=Yf,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=qf}=e;const{announce:s,announcement:i}=Gf(),a=lr("DndLiveRegion"),[c,l]=m.useState(!1);if(m.useEffect(()=>{l(!0)},[]),Jf(m.useMemo(()=>({onDragStart(u){let{active:h}=u;s(t.onDragStart({active:h}))},onDragMove(u){let{active:h,over:f}=u;t.onDragMove&&s(t.onDragMove({active:h,over:f}))},onDragOver(u){let{active:h,over:f}=u;s(t.onDragOver({active:h,over:f}))},onDragEnd(u){let{active:h,over:f}=u;s(t.onDragEnd({active:h,over:f}))},onDragCancel(u){let{active:h,over:f}=u;s(t.onDragCancel({active:h,over:f}))}}),[s,t])),!c)return null;const d=m.createElement(m.Fragment,null,m.createElement(Wf,{id:n,value:o.draggable}),m.createElement(Uf,{id:a,announcement:i}));return r?Kt.createPortal(d,r):d}var be;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(be||(be={}));function Wr(){}function zs(e,t){return m.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Qf(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return m.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const De=Object.freeze({x:0,y:0});function e2(e,t){const r=Hr(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function t2(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function r2(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function n2(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=o-n,a=s-r;if(n<o&&r<s){const c=t.width*t.height,l=e.width*e.height,d=i*a,u=d/(c+l-d);return Number(u.toFixed(4))}return 0}const o2=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const s of n){const{id:i}=s,a=r.get(i);if(a){const c=n2(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(t2)};function s2(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function Ga(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:De}function i2(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...r})}}const a2=i2(1);function Ja(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function c2(e,t,r){const n=Ja(t);if(!n)return e;const{scaleX:o,scaleY:s,x:i,y:a}=n,c=e.left-i-(1-o)*parseFloat(r),l=e.top-a-(1-s)*parseFloat(r.slice(r.indexOf(" ")+1)),d=o?e.width/o:e.width,u=s?e.height/s:e.height;return{width:d,height:u,top:l,right:c+d,bottom:l+u,left:c}}const l2={ignoreTransform:!1};function It(e,t){t===void 0&&(t=l2);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:l,transformOrigin:d}=Me(e).getComputedStyle(e);l&&(r=c2(r,l,d))}const{top:n,left:o,width:s,height:i,bottom:a,right:c}=r;return{top:n,left:o,width:s,height:i,bottom:a,right:c}}function Ps(e){return It(e,{ignoreTransform:!0})}function d2(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function u2(e,t){return t===void 0&&(t=Me(e).getComputedStyle(e)),t.position==="fixed"}function p2(e,t){t===void 0&&(t=Me(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?r.test(s):!1})}function Co(e,t){const r=[];function n(o){if(t!=null&&r.length>=t||!o)return r;if(_o(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!ar(o)||Ha(o)||r.includes(o))return r;const s=Me(e).getComputedStyle(o);return o!==e&&p2(o,s)&&r.push(o),u2(o,s)?r:n(o.parentNode)}return e?n(e):r}function Ka(e){const[t]=Co(e,1);return t??null}function kn(e){return!on||!e?null:Pt(e)?e:So(e)?_o(e)||e===Ot(e).scrollingElement?window:ar(e)?e:null:null}function qa(e){return Pt(e)?e.scrollX:e.scrollLeft}function Ya(e){return Pt(e)?e.scrollY:e.scrollTop}function Fn(e){return{x:qa(e),y:Ya(e)}}var ye;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ye||(ye={}));function Xa(e){return!on||!e?!1:e===document.scrollingElement}function Qa(e){const t={x:0,y:0},r=Xa(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,i=e.scrollTop>=n.y,a=e.scrollLeft>=n.x;return{isTop:o,isLeft:s,isBottom:i,isRight:a,maxScroll:n,minScroll:t}}const f2={x:.2,y:.2};function h2(e,t,r,n,o){let{top:s,left:i,right:a,bottom:c}=r;n===void 0&&(n=10),o===void 0&&(o=f2);const{isTop:l,isBottom:d,isLeft:u,isRight:h}=Qa(e),f={x:0,y:0},v={x:0,y:0},y={height:t.height*o.y,width:t.width*o.x};return!l&&s<=t.top+y.height?(f.y=ye.Backward,v.y=n*Math.abs((t.top+y.height-s)/y.height)):!d&&c>=t.bottom-y.height&&(f.y=ye.Forward,v.y=n*Math.abs((t.bottom-y.height-c)/y.height)),!h&&a>=t.right-y.width?(f.x=ye.Forward,v.x=n*Math.abs((t.right-y.width-a)/y.width)):!u&&i<=t.left+y.width&&(f.x=ye.Backward,v.x=n*Math.abs((t.left+y.width-i)/y.width)),{direction:f,speed:v}}function m2(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:t,left:r,right:n,bottom:o}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ec(e){return e.reduce((t,r)=>Nt(t,Fn(r)),De)}function g2(e){return e.reduce((t,r)=>t+qa(r),0)}function b2(e){return e.reduce((t,r)=>t+Ya(r),0)}function tc(e,t){if(t===void 0&&(t=It),!e)return;const{top:r,left:n,bottom:o,right:s}=t(e);Ka(e)&&(o<=0||s<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const v2=[["x",["left","right"],g2],["y",["top","bottom"],b2]];class $o{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Co(r),o=ec(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,a]of v2)for(const c of i)Object.defineProperty(this,c,{get:()=>{const l=a(n),d=o[s]-l;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Qt{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var o;(o=this.target)==null||o.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function y2(e){const{EventTarget:t}=Me(e);return e instanceof t?e:Ot(e)}function Sn(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var Pe;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Pe||(Pe={}));function Os(e){e.preventDefault()}function x2(e){e.stopPropagation()}var oe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(oe||(oe={}));const rc={start:[oe.Space,oe.Enter],cancel:[oe.Esc],end:[oe.Space,oe.Enter,oe.Tab]},w2=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case oe.Right:return{...r,x:r.x+25};case oe.Left:return{...r,x:r.x-25};case oe.Down:return{...r,y:r.y+25};case oe.Up:return{...r,y:r.y-25}}};class Mo{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Qt(Ot(r)),this.windowListeners=new Qt(Me(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Pe.Resize,this.handleCancel),this.windowListeners.add(Pe.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Pe.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&tc(n),r(De)}handleKeyDown(t){if(an(t)){const{active:r,context:n,options:o}=this.props,{keyboardCodes:s=rc,coordinateGetter:i=w2,scrollBehavior:a="smooth"}=o,{code:c}=t;if(s.end.includes(c)){this.handleEnd(t);return}if(s.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:l}=n.current,d=l?{x:l.left,y:l.top}:De;this.referenceCoordinates||(this.referenceCoordinates=d);const u=i(t,{active:r,context:n.current,currentCoordinates:d});if(u){const h=Br(u,d),f={x:0,y:0},{scrollableAncestors:v}=n.current;for(const y of v){const x=t.code,{isTop:w,isRight:k,isLeft:T,isBottom:N,maxScroll:C,minScroll:M}=Qa(y),b=m2(y),g={x:Math.min(x===oe.Right?b.right-b.width/2:b.right,Math.max(x===oe.Right?b.left:b.left+b.width/2,u.x)),y:Math.min(x===oe.Down?b.bottom-b.height/2:b.bottom,Math.max(x===oe.Down?b.top:b.top+b.height/2,u.y))},R=x===oe.Right&&!k||x===oe.Left&&!T,E=x===oe.Down&&!N||x===oe.Up&&!w;if(R&&g.x!==u.x){const O=y.scrollLeft+h.x,j=x===oe.Right&&O<=C.x||x===oe.Left&&O>=M.x;if(j&&!h.y){y.scrollTo({left:O,behavior:a});return}j?f.x=y.scrollLeft-O:f.x=x===oe.Right?y.scrollLeft-C.x:y.scrollLeft-M.x,f.x&&y.scrollBy({left:-f.x,behavior:a});break}else if(E&&g.y!==u.y){const O=y.scrollTop+h.y,j=x===oe.Down&&O<=C.y||x===oe.Up&&O>=M.y;if(j&&!h.x){y.scrollTo({top:O,behavior:a});return}j?f.y=y.scrollTop-O:f.y=x===oe.Down?y.scrollTop-C.y:y.scrollTop-M.y,f.y&&y.scrollBy({top:-f.y,behavior:a});break}}this.handleMove(t,Nt(Br(u,this.referenceCoordinates),f))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Mo.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=rc,onActivation:o}=t,{active:s}=r;const{code:i}=e.nativeEvent;if(n.start.includes(i)){const a=s.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Is(e){return!!(e&&"distance"in e)}function Ds(e){return!!(e&&"delay"in e)}class Ao{constructor(t,r,n){var o;n===void 0&&(n=y2(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:s}=t,{target:i}=s;this.props=t,this.events=r,this.document=Ot(i),this.documentListeners=new Qt(this.document),this.listeners=new Qt(n),this.windowListeners=new Qt(Me(i)),this.initialCoordinates=(o=Hr(s))!=null?o:De,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Pe.Resize,this.handleCancel),this.windowListeners.add(Pe.DragStart,Os),this.windowListeners.add(Pe.VisibilityChange,this.handleCancel),this.windowListeners.add(Pe.ContextMenu,Os),this.documentListeners.add(Pe.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ds(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Is(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:o}=this.props;o(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(Pe.Click,x2,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Pe.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:o,props:s}=this,{onMove:i,options:{activationConstraint:a}}=s;if(!o)return;const c=(r=Hr(t))!=null?r:De,l=Br(o,c);if(!n&&a){if(Is(a)){if(a.tolerance!=null&&Sn(l,a.tolerance))return this.handleCancel();if(Sn(l,a.distance))return this.handleStart()}if(Ds(a)&&Sn(l,a.tolerance))return this.handleCancel();this.handlePending(a,l);return}t.cancelable&&t.preventDefault(),i(c)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===oe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const k2={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class No extends Ao{constructor(t){const{event:r}=t,n=Ot(r.target);super(t,k2,n)}}No.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const S2={move:{name:"mousemove"},end:{name:"mouseup"}};var Ln;(function(e){e[e.RightClick=2]="RightClick"})(Ln||(Ln={}));class _2 extends Ao{constructor(t){super(t,S2,Ot(t.event.target))}}_2.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===Ln.RightClick?!1:(n==null||n({event:r}),!0)}}];const _n={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class C2 extends Ao{constructor(t){super(t,_n)}static setup(){return window.addEventListener(_n.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(_n.move.name,t)};function t(){}}}C2.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:o}=r;return o.length>1?!1:(n==null||n({event:r}),!0)}}];var er;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(er||(er={}));var Ur;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ur||(Ur={}));function $2(e){let{acceleration:t,activator:r=er.Pointer,canScroll:n,draggingRect:o,enabled:s,interval:i=5,order:a=Ur.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:d,delta:u,threshold:h}=e;const f=A2({delta:u,disabled:!s}),[v,y]=Ff(),x=m.useRef({x:0,y:0}),w=m.useRef({x:0,y:0}),k=m.useMemo(()=>{switch(r){case er.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case er.DraggableRect:return o}},[r,o,c]),T=m.useRef(null),N=m.useCallback(()=>{const M=T.current;if(!M)return;const b=x.current.x*w.current.x,g=x.current.y*w.current.y;M.scrollBy(b,g)},[]),C=m.useMemo(()=>a===Ur.TreeOrder?[...l].reverse():l,[a,l]);m.useEffect(()=>{if(!s||!l.length||!k){y();return}for(const M of C){if((n==null?void 0:n(M))===!1)continue;const b=l.indexOf(M),g=d[b];if(!g)continue;const{direction:R,speed:E}=h2(M,g,k,t,h);for(const O of["x","y"])f[O][R[O]]||(E[O]=0,R[O]=0);if(E.x>0||E.y>0){y(),T.current=M,v(N,i),x.current=E,w.current=R;return}}x.current={x:0,y:0},w.current={x:0,y:0},y()},[t,N,n,y,s,i,JSON.stringify(k),JSON.stringify(f),v,l,C,d,JSON.stringify(h)])}const M2={x:{[ye.Backward]:!1,[ye.Forward]:!1},y:{[ye.Backward]:!1,[ye.Forward]:!1}};function A2(e){let{delta:t,disabled:r}=e;const n=Vr(t);return cr(o=>{if(r||!n||!o)return M2;const s={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[ye.Backward]:o.x[ye.Backward]||s.x===-1,[ye.Forward]:o.x[ye.Forward]||s.x===1},y:{[ye.Backward]:o.y[ye.Backward]||s.y===-1,[ye.Forward]:o.y[ye.Forward]||s.y===1}}},[r,t,n])}function N2(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return cr(o=>{var s;return t==null?null:(s=n??o)!=null?s:null},[n,t])}function j2(e,t){return m.useMemo(()=>e.reduce((r,n)=>{const{sensor:o}=n,s=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,n)}));return[...r,...s]},[]),[e,t])}var or;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(or||(or={}));var Vn;(function(e){e.Optimized="optimized"})(Vn||(Vn={}));const Zs=new Map;function R2(e,t){let{dragging:r,dependencies:n,config:o}=t;const[s,i]=m.useState(null),{frequency:a,measure:c,strategy:l}=o,d=m.useRef(e),u=x(),h=nr(u),f=m.useCallback(function(w){w===void 0&&(w=[]),!h.current&&i(k=>k===null?w:k.concat(w.filter(T=>!k.includes(T))))},[h]),v=m.useRef(null),y=cr(w=>{if(u&&!r)return Zs;if(!w||w===Zs||d.current!==e||s!=null){const k=new Map;for(let T of e){if(!T)continue;if(s&&s.length>0&&!s.includes(T.id)&&T.rect.current){k.set(T.id,T.rect.current);continue}const N=T.node.current,C=N?new $o(c(N),N):null;T.rect.current=C,C&&k.set(T.id,C)}return k}return w},[e,s,r,u,c]);return m.useEffect(()=>{d.current=e},[e]),m.useEffect(()=>{u||f()},[r,u]),m.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),m.useEffect(()=>{u||typeof a!="number"||v.current!==null||(v.current=setTimeout(()=>{f(),v.current=null},a))},[a,u,f,...n]),{droppableRects:y,measureDroppableContainers:f,measuringScheduled:s!=null};function x(){switch(l){case or.Always:return!1;case or.BeforeDragging:return r;default:return!r}}}function jo(e,t){return cr(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function E2(e,t){return jo(e,t)}function T2(e){let{callback:t,disabled:r}=e;const n=sn(t),o=m.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(n)},[n,r]);return m.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function cn(e){let{callback:t,disabled:r}=e;const n=sn(t),o=m.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(n)},[r]);return m.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function z2(e){return new $o(It(e),e)}function Fs(e,t,r){t===void 0&&(t=z2);const[n,o]=m.useState(null);function s(){o(c=>{if(!e)return null;if(e.isConnected===!1){var l;return(l=c??r)!=null?l:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const i=T2({callback(c){if(e)for(const l of c){const{type:d,target:u}=l;if(d==="childList"&&u instanceof HTMLElement&&u.contains(e)){s();break}}}}),a=cn({callback:s});return Ie(()=>{s(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),n}function P2(e){const t=jo(e);return Ga(e,t)}const Ls=[];function O2(e){const t=m.useRef(e),r=cr(n=>e?n&&n!==Ls&&e&&t.current&&e.parentNode===t.current.parentNode?n:Co(e):Ls,[e]);return m.useEffect(()=>{t.current=e},[e]),r}function I2(e){const[t,r]=m.useState(null),n=m.useRef(e),o=m.useCallback(s=>{const i=kn(s.target);i&&r(a=>a?(a.set(i,Fn(i)),new Map(a)):null)},[]);return m.useEffect(()=>{const s=n.current;if(e!==s){i(s);const a=e.map(c=>{const l=kn(c);return l?(l.addEventListener("scroll",o,{passive:!0}),[l,Fn(l)]):null}).filter(c=>c!=null);r(a.length?new Map(a):null),n.current=e}return()=>{i(e),i(s)};function i(a){a.forEach(c=>{const l=kn(c);l==null||l.removeEventListener("scroll",o)})}},[o,e]),m.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>Nt(s,i),De):ec(e):De,[e,t])}function Vs(e,t){t===void 0&&(t=[]);const r=m.useRef(null);return m.useEffect(()=>{r.current=null},t),m.useEffect(()=>{const n=e!==De;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?Br(e,r.current):De}function D2(e){m.useEffect(()=>{if(!on)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function Z2(e,t){return m.useMemo(()=>e.reduce((r,n)=>{let{eventName:o,handler:s}=n;return r[o]=i=>{s(i,t)},r},{}),[e,t])}function nc(e){return m.useMemo(()=>e?d2(e):null,[e])}const Bs=[];function F2(e,t){t===void 0&&(t=It);const[r]=e,n=nc(r?Me(r):null),[o,s]=m.useState(Bs);function i(){s(()=>e.length?e.map(c=>Xa(c)?n:new $o(t(c),c)):Bs)}const a=cn({callback:i});return Ie(()=>{a==null||a.disconnect(),i(),e.forEach(c=>a==null?void 0:a.observe(c))},[e]),o}function oc(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ar(t)?t:e}function L2(e){let{measure:t}=e;const[r,n]=m.useState(null),o=m.useCallback(l=>{for(const{target:d}of l)if(ar(d)){n(u=>{const h=t(d);return u?{...u,width:h.width,height:h.height}:h});break}},[t]),s=cn({callback:o}),i=m.useCallback(l=>{const d=oc(l);s==null||s.disconnect(),d&&(s==null||s.observe(d)),n(d?t(d):null)},[t,s]),[a,c]=Lr(i);return m.useMemo(()=>({nodeRef:a,rect:r,setRef:c}),[r,a,c])}const V2=[{sensor:No,options:{}},{sensor:Mo,options:{}}],B2={current:{}},Ar={draggable:{measure:Ps},droppable:{measure:Ps,strategy:or.WhileDragging,frequency:Vn.Optimized},dragOverlay:{measure:It}};class tr extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const H2={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new tr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Wr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ar,measureDroppableContainers:Wr,windowRect:null,measuringScheduled:!1},sc={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Wr,draggableNodes:new Map,over:null,measureDroppableContainers:Wr},dr=m.createContext(sc),ic=m.createContext(H2);function W2(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new tr}}}function U2(e,t){switch(t.type){case be.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case be.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case be.DragEnd:case be.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case be.RegisterDroppable:{const{element:r}=t,{id:n}=r,o=new tr(e.droppable.containers);return o.set(n,r),{...e,droppable:{...e.droppable,containers:o}}}case be.SetDroppableDisabled:{const{id:r,key:n,disabled:o}=t,s=e.droppable.containers.get(r);if(!s||n!==s.key)return e;const i=new tr(e.droppable.containers);return i.set(r,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case be.UnregisterDroppable:{const{id:r,key:n}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const s=new tr(e.droppable.containers);return s.delete(r),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function G2(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:o}=m.useContext(dr),s=Vr(n),i=Vr(r==null?void 0:r.id);return m.useEffect(()=>{if(!t&&!n&&s&&i!=null){if(!an(s)||document.activeElement===s.target)return;const a=o.get(i);if(!a)return;const{activatorNode:c,node:l}=a;if(!c.current&&!l.current)return;requestAnimationFrame(()=>{for(const d of[c.current,l.current]){if(!d)continue;const u=Bf(d);if(u){u.focus();break}}})}},[n,t,o,i,s]),null}function ac(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...n}),r):r}function J2(e){return m.useMemo(()=>({draggable:{...Ar.draggable,...e==null?void 0:e.draggable},droppable:{...Ar.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ar.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function K2(e){let{activeNode:t,measure:r,initialRect:n,config:o=!0}=e;const s=m.useRef(!1),{x:i,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Ie(()=>{if(!i&&!a||!t){s.current=!1;return}if(s.current||!n)return;const l=t==null?void 0:t.node.current;if(!l||l.isConnected===!1)return;const d=r(l),u=Ga(d,n);if(i||(u.x=0),a||(u.y=0),s.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const h=Ka(l);h&&h.scrollBy({top:u.y,left:u.x})}},[t,i,a,n,r])}const ln=m.createContext({...De,scaleX:1,scaleY:1});var ct;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ct||(ct={}));const q2=m.memo(function(t){var r,n,o,s;let{id:i,accessibility:a,autoScroll:c=!0,children:l,sensors:d=V2,collisionDetection:u=o2,measuring:h,modifiers:f,...v}=t;const y=m.useReducer(U2,void 0,W2),[x,w]=y,[k,T]=Kf(),[N,C]=m.useState(ct.Uninitialized),M=N===ct.Initialized,{draggable:{active:b,nodes:g,translate:R},droppable:{containers:E}}=x,O=b!=null?g.get(b):null,j=m.useRef({initial:null,translated:null}),D=m.useMemo(()=>{var Se;return b!=null?{id:b,data:(Se=O==null?void 0:O.data)!=null?Se:B2,rect:j}:null},[b,O]),P=m.useRef(null),[B,L]=m.useState(null),[U,I]=m.useState(null),W=nr(v,Object.values(v)),z=lr("DndDescribedBy",i),_=m.useMemo(()=>E.getEnabled(),[E]),V=J2(h),{droppableRects:K,measureDroppableContainers:ne,measuringScheduled:ie}=R2(_,{dragging:M,dependencies:[R.x,R.y],config:V.droppable}),te=N2(g,b),se=m.useMemo(()=>U?Hr(U):null,[U]),ve=Tc(),re=E2(te,V.draggable.measure);K2({activeNode:b!=null?g.get(b):null,config:ve.layoutShiftCompensation,initialRect:re,measure:V.draggable.measure});const X=Fs(te,V.draggable.measure,re),Fe=Fs(te?te.parentElement:null),Ce=m.useRef({activatorEvent:null,active:null,activeNode:te,collisionRect:null,collisions:null,droppableRects:K,draggableNodes:g,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Le=E.getNodeFor((r=Ce.current.over)==null?void 0:r.id),Ae=L2({measure:V.dragOverlay.measure}),yt=(n=Ae.nodeRef.current)!=null?n:te,xt=M?(o=Ae.rect)!=null?o:X:null,Eo=!!(Ae.nodeRef.current&&Ae.rect),To=P2(Eo?null:X),un=nc(yt?Me(yt):null),rt=O2(M?Le??te:null),ur=F2(rt),pr=ac(f,{transform:{x:R.x-To.x,y:R.y-To.y,scaleX:1,scaleY:1},activatorEvent:U,active:D,activeNodeRect:X,containerNodeRect:Fe,draggingNodeRect:xt,over:Ce.current.over,overlayNodeRect:Ae.rect,scrollableAncestors:rt,scrollableAncestorRects:ur,windowRect:un}),zo=se?Nt(se,R):null,Po=I2(rt),$c=Vs(Po),Mc=Vs(Po,[X]),wt=Nt(pr,$c),kt=xt?a2(xt,pr):null,Dt=D&&kt?u({active:D,collisionRect:kt,droppableRects:K,droppableContainers:_,pointerCoordinates:zo}):null,Oo=r2(Dt,"id"),[nt,Io]=m.useState(null),Ac=Eo?pr:Nt(pr,Mc),Nc=s2(Ac,(s=nt==null?void 0:nt.rect)!=null?s:null,X),pn=m.useRef(null),Do=m.useCallback((Se,je)=>{let{sensor:Re,options:ot}=je;if(P.current==null)return;const Te=g.get(P.current);if(!Te)return;const Ee=Se.nativeEvent,Ve=new Re({active:P.current,activeNode:Te,event:Ee,options:ot,context:Ce,onAbort(xe){if(!g.get(xe))return;const{onDragAbort:Be}=W.current,Ke={id:xe};Be==null||Be(Ke),k({type:"onDragAbort",event:Ke})},onPending(xe,st,Be,Ke){if(!g.get(xe))return;const{onDragPending:Ft}=W.current,it={id:xe,constraint:st,initialCoordinates:Be,offset:Ke};Ft==null||Ft(it),k({type:"onDragPending",event:it})},onStart(xe){const st=P.current;if(st==null)return;const Be=g.get(st);if(!Be)return;const{onDragStart:Ke}=W.current,Zt={activatorEvent:Ee,active:{id:st,data:Be.data,rect:j}};Kt.unstable_batchedUpdates(()=>{Ke==null||Ke(Zt),C(ct.Initializing),w({type:be.DragStart,initialCoordinates:xe,active:st}),k({type:"onDragStart",event:Zt}),L(pn.current),I(Ee)})},onMove(xe){w({type:be.DragMove,coordinates:xe})},onEnd:St(be.DragEnd),onCancel:St(be.DragCancel)});pn.current=Ve;function St(xe){return async function(){const{active:Be,collisions:Ke,over:Zt,scrollAdjustedTranslate:Ft}=Ce.current;let it=null;if(Be&&Ft){const{cancelDrop:Lt}=W.current;it={activatorEvent:Ee,active:Be,collisions:Ke,delta:Ft,over:Zt},xe===be.DragEnd&&typeof Lt=="function"&&await Promise.resolve(Lt(it))&&(xe=be.DragCancel)}P.current=null,Kt.unstable_batchedUpdates(()=>{w({type:xe}),C(ct.Uninitialized),Io(null),L(null),I(null),pn.current=null;const Lt=xe===be.DragEnd?"onDragEnd":"onDragCancel";if(it){const fn=W.current[Lt];fn==null||fn(it),k({type:Lt,event:it})}})}}},[g]),jc=m.useCallback((Se,je)=>(Re,ot)=>{const Te=Re.nativeEvent,Ee=g.get(ot);if(P.current!==null||!Ee||Te.dndKit||Te.defaultPrevented)return;const Ve={active:Ee};Se(Re,je.options,Ve)===!0&&(Te.dndKit={capturedBy:je.sensor},P.current=ot,Do(Re,je))},[g,Do]),Zo=j2(d,jc);D2(d),Ie(()=>{X&&N===ct.Initializing&&C(ct.Initialized)},[X,N]),m.useEffect(()=>{const{onDragMove:Se}=W.current,{active:je,activatorEvent:Re,collisions:ot,over:Te}=Ce.current;if(!je||!Re)return;const Ee={active:je,activatorEvent:Re,collisions:ot,delta:{x:wt.x,y:wt.y},over:Te};Kt.unstable_batchedUpdates(()=>{Se==null||Se(Ee),k({type:"onDragMove",event:Ee})})},[wt.x,wt.y]),m.useEffect(()=>{const{active:Se,activatorEvent:je,collisions:Re,droppableContainers:ot,scrollAdjustedTranslate:Te}=Ce.current;if(!Se||P.current==null||!je||!Te)return;const{onDragOver:Ee}=W.current,Ve=ot.get(Oo),St=Ve&&Ve.rect.current?{id:Ve.id,rect:Ve.rect.current,data:Ve.data,disabled:Ve.disabled}:null,xe={active:Se,activatorEvent:je,collisions:Re,delta:{x:Te.x,y:Te.y},over:St};Kt.unstable_batchedUpdates(()=>{Io(St),Ee==null||Ee(xe),k({type:"onDragOver",event:xe})})},[Oo]),Ie(()=>{Ce.current={activatorEvent:U,active:D,activeNode:te,collisionRect:kt,collisions:Dt,droppableRects:K,draggableNodes:g,draggingNode:yt,draggingNodeRect:xt,droppableContainers:E,over:nt,scrollableAncestors:rt,scrollAdjustedTranslate:wt},j.current={initial:xt,translated:kt}},[D,te,Dt,kt,g,yt,xt,K,E,nt,rt,wt]),$2({...ve,delta:R,draggingRect:kt,pointerCoordinates:zo,scrollableAncestors:rt,scrollableAncestorRects:ur});const Rc=m.useMemo(()=>({active:D,activeNode:te,activeNodeRect:X,activatorEvent:U,collisions:Dt,containerNodeRect:Fe,dragOverlay:Ae,draggableNodes:g,droppableContainers:E,droppableRects:K,over:nt,measureDroppableContainers:ne,scrollableAncestors:rt,scrollableAncestorRects:ur,measuringConfiguration:V,measuringScheduled:ie,windowRect:un}),[D,te,X,U,Dt,Fe,Ae,g,E,K,nt,ne,rt,ur,V,ie,un]),Ec=m.useMemo(()=>({activatorEvent:U,activators:Zo,active:D,activeNodeRect:X,ariaDescribedById:{draggable:z},dispatch:w,draggableNodes:g,over:nt,measureDroppableContainers:ne}),[U,Zo,D,X,w,z,g,nt,ne]);return m.createElement(Ua.Provider,{value:T},m.createElement(dr.Provider,{value:Ec},m.createElement(ic.Provider,{value:Rc},m.createElement(ln.Provider,{value:Nc},l)),m.createElement(G2,{disabled:(a==null?void 0:a.restoreFocus)===!1})),m.createElement(Xf,{...a,hiddenTextDescribedById:z}));function Tc(){const Se=(B==null?void 0:B.autoScrollEnabled)===!1,je=typeof c=="object"?c.enabled===!1:c===!1,Re=M&&!Se&&!je;return typeof c=="object"?{...c,enabled:Re}:{enabled:Re}}}),Y2=m.createContext(null),Hs="button",X2="Draggable";function Q2(e){let{id:t,data:r,disabled:n=!1,attributes:o}=e;const s=lr(X2),{activators:i,activatorEvent:a,active:c,activeNodeRect:l,ariaDescribedById:d,draggableNodes:u,over:h}=m.useContext(dr),{role:f=Hs,roleDescription:v="draggable",tabIndex:y=0}=o??{},x=(c==null?void 0:c.id)===t,w=m.useContext(x?ln:Y2),[k,T]=Lr(),[N,C]=Lr(),M=Z2(i,t),b=nr(r);Ie(()=>(u.set(t,{id:t,key:s,node:k,activatorNode:N,data:b}),()=>{const R=u.get(t);R&&R.key===s&&u.delete(t)}),[u,t]);const g=m.useMemo(()=>({role:f,tabIndex:y,"aria-disabled":n,"aria-pressed":x&&f===Hs?!0:void 0,"aria-roledescription":v,"aria-describedby":d.draggable}),[n,f,y,x,v,d.draggable]);return{active:c,activatorEvent:a,activeNodeRect:l,attributes:g,isDragging:x,listeners:n?void 0:M,node:k,over:h,setNodeRef:T,setActivatorNodeRef:C,transform:w}}function cc(){return m.useContext(ic)}const eh="Droppable",th={timeout:25};function rh(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:o}=e;const s=lr(eh),{active:i,dispatch:a,over:c,measureDroppableContainers:l}=m.useContext(dr),d=m.useRef({disabled:r}),u=m.useRef(!1),h=m.useRef(null),f=m.useRef(null),{disabled:v,updateMeasurementsFor:y,timeout:x}={...th,...o},w=nr(y??n),k=m.useCallback(()=>{if(!u.current){u.current=!0;return}f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{l(Array.isArray(w.current)?w.current:[w.current]),f.current=null},x)},[x]),T=cn({callback:k,disabled:v||!i}),N=m.useCallback((g,R)=>{T&&(R&&(T.unobserve(R),u.current=!1),g&&T.observe(g))},[T]),[C,M]=Lr(N),b=nr(t);return m.useEffect(()=>{!T||!C.current||(T.disconnect(),u.current=!1,T.observe(C.current))},[C,T]),m.useEffect(()=>(a({type:be.RegisterDroppable,element:{id:n,key:s,disabled:r,node:C,rect:h,data:b}}),()=>a({type:be.UnregisterDroppable,key:s,id:n})),[n]),m.useEffect(()=>{r!==d.current.disabled&&(a({type:be.SetDroppableDisabled,id:n,key:s,disabled:r}),d.current.disabled=r)},[n,s,r,a]),{active:i,rect:h,isOver:(c==null?void 0:c.id)===n,node:C,over:c,setNodeRef:M}}function nh(e){let{animation:t,children:r}=e;const[n,o]=m.useState(null),[s,i]=m.useState(null),a=Vr(r);return!r&&!n&&a&&o(a),Ie(()=>{if(!s)return;const c=n==null?void 0:n.key,l=n==null?void 0:n.props.id;if(c==null||l==null){o(null);return}Promise.resolve(t(l,s)).then(()=>{o(null)})},[t,n,s]),m.createElement(m.Fragment,null,r,n?m.cloneElement(n,{ref:i}):null)}const oh={x:0,y:0,scaleX:1,scaleY:1};function sh(e){let{children:t}=e;return m.createElement(dr.Provider,{value:sc},m.createElement(ln.Provider,{value:oh},t))}const ih={position:"fixed",touchAction:"none"},ah=e=>an(e)?"transform 250ms ease":void 0,ch=m.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:o,children:s,className:i,rect:a,style:c,transform:l,transition:d=ah}=e;if(!a)return null;const u=o?l:{...l,scaleX:1,scaleY:1},h={...ih,width:a.width,height:a.height,top:a.top,left:a.left,transform:mt.Transform.toString(u),transformOrigin:o&&n?e2(n,a):void 0,transition:typeof d=="function"?d(n):d,...c};return m.createElement(r,{className:i,style:h,ref:t},s)}),lh=e=>t=>{let{active:r,dragOverlay:n}=t;const o={},{styles:s,className:i}=e;if(s!=null&&s.active)for(const[a,c]of Object.entries(s.active))c!==void 0&&(o[a]=r.node.style.getPropertyValue(a),r.node.style.setProperty(a,c));if(s!=null&&s.dragOverlay)for(const[a,c]of Object.entries(s.dragOverlay))c!==void 0&&n.node.style.setProperty(a,c);return i!=null&&i.active&&r.node.classList.add(i.active),i!=null&&i.dragOverlay&&n.node.classList.add(i.dragOverlay),function(){for(const[c,l]of Object.entries(o))r.node.style.setProperty(c,l);i!=null&&i.active&&r.node.classList.remove(i.active)}},dh=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:mt.Transform.toString(t)},{transform:mt.Transform.toString(r)}]},uh={duration:250,easing:"ease",keyframes:dh,sideEffects:lh({styles:{active:{opacity:"0"}}})};function ph(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:o}=e;return sn((s,i)=>{if(t===null)return;const a=r.get(s);if(!a)return;const c=a.node.current;if(!c)return;const l=oc(i);if(!l)return;const{transform:d}=Me(i).getComputedStyle(i),u=Ja(d);if(!u)return;const h=typeof t=="function"?t:fh(t);return tc(c,o.draggable.measure),h({active:{id:s,data:a.data,node:c,rect:o.draggable.measure(c)},draggableNodes:r,dragOverlay:{node:i,rect:o.dragOverlay.measure(l)},droppableContainers:n,measuringConfiguration:o,transform:u})})}function fh(e){const{duration:t,easing:r,sideEffects:n,keyframes:o}={...uh,...e};return s=>{let{active:i,dragOverlay:a,transform:c,...l}=s;if(!t)return;const d={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},u={scaleX:c.scaleX!==1?i.rect.width*c.scaleX/a.rect.width:1,scaleY:c.scaleY!==1?i.rect.height*c.scaleY/a.rect.height:1},h={x:c.x-d.x,y:c.y-d.y,...u},f=o({...l,active:i,dragOverlay:a,transform:{initial:c,final:h}}),[v]=f,y=f[f.length-1];if(JSON.stringify(v)===JSON.stringify(y))return;const x=n==null?void 0:n({active:i,dragOverlay:a,...l}),w=a.node.animate(f,{duration:t,easing:r,fill:"forwards"});return new Promise(k=>{w.onfinish=()=>{x==null||x(),k()}})}}let Ws=0;function hh(e){return m.useMemo(()=>{if(e!=null)return Ws++,Ws},[e])}const mh=m.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:o,transition:s,modifiers:i,wrapperElement:a="div",className:c,zIndex:l=999}=e;const{activatorEvent:d,active:u,activeNodeRect:h,containerNodeRect:f,draggableNodes:v,droppableContainers:y,dragOverlay:x,over:w,measuringConfiguration:k,scrollableAncestors:T,scrollableAncestorRects:N,windowRect:C}=cc(),M=m.useContext(ln),b=hh(u==null?void 0:u.id),g=ac(i,{activatorEvent:d,active:u,activeNodeRect:h,containerNodeRect:f,draggingNodeRect:x.rect,over:w,overlayNodeRect:x.rect,scrollableAncestors:T,scrollableAncestorRects:N,transform:M,windowRect:C}),R=jo(h),E=ph({config:n,draggableNodes:v,droppableContainers:y,measuringConfiguration:k}),O=R?x.setRef:void 0;return m.createElement(sh,null,m.createElement(nh,{animation:E},u&&b?m.createElement(ch,{key:b,id:u.id,ref:O,as:a,activatorEvent:d,adjustScale:t,className:c,transition:s,rect:R,style:{zIndex:l,...o},transform:g},r):null))});function lc(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function gh(e,t){return e.reduce((r,n,o)=>{const s=t.get(n);return s&&(r[o]=s),r},Array(e.length))}function Cr(e){return e!==null&&e>=0}function bh(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function vh(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const dc=e=>{let{rects:t,activeIndex:r,overIndex:n,index:o}=e;const s=lc(t,n,r),i=t[o],a=s[o];return!a||!i?null:{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}},$r={scaleX:1,scaleY:1},yh=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:o,rects:s,overIndex:i}=e;const a=(t=s[r])!=null?t:n;if(!a)return null;if(o===r){const l=s[i];return l?{x:0,y:r<i?l.top+l.height-(a.top+a.height):l.top-a.top,...$r}:null}const c=xh(s,o,r);return o>r&&o<=i?{x:0,y:-a.height-c,...$r}:o<r&&o>=i?{x:0,y:a.height+c,...$r}:{x:0,y:0,...$r}};function xh(e,t,r){const n=e[t],o=e[t-1],s=e[t+1];return n?r<t?o?n.top-(o.top+o.height):s?s.top-(n.top+n.height):0:s?s.top-(n.top+n.height):o?n.top-(o.top+o.height):0:0}const uc="Sortable",pc=m.createContext({activeIndex:-1,containerId:uc,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:dc,disabled:{draggable:!1,droppable:!1}});function wh(e){let{children:t,id:r,items:n,strategy:o=dc,disabled:s=!1}=e;const{active:i,dragOverlay:a,droppableRects:c,over:l,measureDroppableContainers:d}=cc(),u=lr(uc,r),h=a.rect!==null,f=m.useMemo(()=>n.map(M=>typeof M=="object"&&"id"in M?M.id:M),[n]),v=i!=null,y=i?f.indexOf(i.id):-1,x=l?f.indexOf(l.id):-1,w=m.useRef(f),k=!bh(f,w.current),T=x!==-1&&y===-1||k,N=vh(s);Ie(()=>{k&&v&&d(f)},[k,f,v,d]),m.useEffect(()=>{w.current=f},[f]);const C=m.useMemo(()=>({activeIndex:y,containerId:u,disabled:N,disableTransforms:T,items:f,overIndex:x,useDragOverlay:h,sortedRects:gh(f,c),strategy:o}),[y,u,N.draggable,N.droppable,T,f,x,c,h,o]);return m.createElement(pc.Provider,{value:C},t)}const kh=e=>{let{id:t,items:r,activeIndex:n,overIndex:o}=e;return lc(r,n,o).indexOf(t)},Sh=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:o,items:s,newIndex:i,previousItems:a,previousContainerId:c,transition:l}=e;return!l||!n||a!==s&&o===i?!1:r?!0:i!==o&&t===c},_h={duration:200,easing:"ease"},fc="transform",Ch=mt.Transition.toString({property:fc,duration:0,easing:"linear"}),$h={roleDescription:"sortable"};function Mh(e){let{disabled:t,index:r,node:n,rect:o}=e;const[s,i]=m.useState(null),a=m.useRef(r);return Ie(()=>{if(!t&&r!==a.current&&n.current){const c=o.current;if(c){const l=It(n.current,{ignoreTransform:!0}),d={x:c.left-l.left,y:c.top-l.top,scaleX:c.width/l.width,scaleY:c.height/l.height};(d.x||d.y)&&i(d)}}r!==a.current&&(a.current=r)},[t,r,n,o]),m.useEffect(()=>{s&&i(null)},[s]),s}function Ah(e){let{animateLayoutChanges:t=Sh,attributes:r,disabled:n,data:o,getNewIndex:s=kh,id:i,strategy:a,resizeObserverConfig:c,transition:l=_h}=e;const{items:d,containerId:u,activeIndex:h,disabled:f,disableTransforms:v,sortedRects:y,overIndex:x,useDragOverlay:w,strategy:k}=m.useContext(pc),T=Nh(n,f),N=d.indexOf(i),C=m.useMemo(()=>({sortable:{containerId:u,index:N,items:d},...o}),[u,o,N,d]),M=m.useMemo(()=>d.slice(d.indexOf(i)),[d,i]),{rect:b,node:g,isOver:R,setNodeRef:E}=rh({id:i,data:C,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:M,...c}}),{active:O,activatorEvent:j,activeNodeRect:D,attributes:P,setNodeRef:B,listeners:L,isDragging:U,over:I,setActivatorNodeRef:W,transform:z}=Q2({id:i,data:C,attributes:{...$h,...r},disabled:T.draggable}),_=Zf(E,B),V=!!O,K=V&&!v&&Cr(h)&&Cr(x),ne=!w&&U,ie=ne&&K?z:null,se=K?ie??(a??k)({rects:y,activeNodeRect:D,activeIndex:h,overIndex:x,index:N}):null,ve=Cr(h)&&Cr(x)?s({id:i,items:d,activeIndex:h,overIndex:x}):N,re=O==null?void 0:O.id,X=m.useRef({activeId:re,items:d,newIndex:ve,containerId:u}),Fe=d!==X.current.items,Ce=t({active:O,containerId:u,isDragging:U,isSorting:V,id:i,index:N,items:d,newIndex:X.current.newIndex,previousItems:X.current.items,previousContainerId:X.current.containerId,transition:l,wasDragging:X.current.activeId!=null}),Le=Mh({disabled:!Ce,index:N,node:g,rect:b});return m.useEffect(()=>{V&&X.current.newIndex!==ve&&(X.current.newIndex=ve),u!==X.current.containerId&&(X.current.containerId=u),d!==X.current.items&&(X.current.items=d)},[V,ve,u,d]),m.useEffect(()=>{if(re===X.current.activeId)return;if(re!=null&&X.current.activeId==null){X.current.activeId=re;return}const yt=setTimeout(()=>{X.current.activeId=re},50);return()=>clearTimeout(yt)},[re]),{active:O,activeIndex:h,attributes:P,data:C,rect:b,index:N,newIndex:ve,items:d,isOver:R,isSorting:V,isDragging:U,listeners:L,node:g,overIndex:x,over:I,setNodeRef:_,setActivatorNodeRef:W,setDroppableNodeRef:E,setDraggableNodeRef:B,transform:Le??se,transition:Ae()};function Ae(){if(Le||Fe&&X.current.newIndex===N)return Ch;if(!(ne&&!an(j)||!l)&&(V||Ce))return mt.Transition.toString({...l,property:fc})}}function Nh(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}oe.Down,oe.Right,oe.Up,oe.Left;function jh({root:e,selectedNodeId:t,hoveredNodeId:r,onSelectNode:n,onHoverNode:o,onMoveNode:s,className:i}){var f;const[a,c]=m.useState(null),l=Qf(zs(No,{activationConstraint:{distance:5}}),zs(Mo)),d=m.useMemo(()=>{const v=[];function y(x,w){v.push({id:x.id,node:x,level:w});for(const k of x.children??[])y(k,w+1)}return y(e,0),v},[e]),u=m.useCallback(v=>{c(v.active.id)},[]),h=m.useCallback(v=>{var M,b;const{active:y,over:x}=v;if(c(null),!x||y.id===x.id||!d.find(g=>g.id===y.id))return;const k=d.find(g=>g.id===x.id);if(!k||((M=k.node.children)==null?void 0:M.some(g=>g.id===y.id)))return;const N=k.node.id,C=((b=k.node.children)==null?void 0:b.length)??0;s==null||s(y.id,N,C)},[d,s]);return p.jsxs("div",{className:`flex h-full flex-col border-r border-border ${i??""}`,children:[p.jsx("div",{className:"border-b border-border px-4 py-3",children:p.jsx("h2",{className:"text-sm font-semibold text-text-primary",children:"Layers"})}),p.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:p.jsxs(q2,{sensors:l,onDragStart:u,onDragEnd:h,children:[p.jsx(wh,{items:d.map(v=>v.id),strategy:yh,children:d.map(({id:v,node:y,level:x})=>p.jsx(Rh,{id:v,node:y,level:x,selectedNodeId:t,hoveredNodeId:r,onSelectNode:n,onHoverNode:o},v))}),p.jsx(mh,{children:a?p.jsx("div",{className:"rounded-md bg-accent/10 px-2 py-1.5 text-sm text-accent",children:(f=d.find(v=>v.id===a))==null?void 0:f.node.type}):null})]})})]})}function Rh({id:e,node:t,level:r,selectedNodeId:n,hoveredNodeId:o,onSelectNode:s,onHoverNode:i}){const{attributes:a,listeners:c,setNodeRef:l,transform:d,transition:u,isDragging:h}=Ah({id:e}),f=n===t.id,v=o===t.id,y={paddingLeft:`${r*16+8}px`,transform:d?`translate3d(${d.x}px, ${d.y}px, 0)`:void 0,transition:u,opacity:h?.5:1},x=m.useCallback(T=>{T.stopPropagation(),s(t.id)},[t.id,s]),w=m.useCallback(()=>i(t.id),[t.id,i]),k=m.useCallback(()=>i(null),[i]);return p.jsx("div",{ref:l,style:y,children:p.jsxs("div",{onClick:x,onMouseEnter:w,onMouseLeave:k,className:`
|
|
93
|
+
flex items-center gap-2 rounded-md px-2 py-1.5 cursor-pointer
|
|
94
|
+
transition-colors
|
|
95
|
+
${f?"bg-accent/10 text-accent":"text-text-primary hover:bg-surface-hover"}
|
|
96
|
+
${v&&!f?"bg-surface-hover":""}
|
|
97
|
+
`,...a,...c,children:[p.jsx("span",{className:"text-xs text-text-muted",children:t.type}),t.name&&p.jsx("span",{className:"truncate text-sm text-text-secondary",children:t.name}),!t.name&&p.jsx("span",{className:"truncate text-sm text-text-muted",children:t.id})]})})}function Eh({node:e,onUpdateNode:t,className:r}){const n=m.useCallback((o,s)=>{e&&t(e.id,{[o]:s})},[e,t]);return e?p.jsxs("div",{className:`flex h-full flex-col border-r border-border ${r??""}`,children:[p.jsxs("div",{className:"border-b border-border px-4 py-3",children:[p.jsx("h2",{className:"text-sm font-semibold text-text-primary",children:"Properties"}),p.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:e.type})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[p.jsxs("div",{children:[p.jsx("label",{className:"block text-xs font-medium text-text-secondary mb-1",children:"ID"}),p.jsx("input",{type:"text",value:e.id,disabled:!0,className:"w-full rounded-md border border-border bg-surface px-3 py-1.5 text-sm text-text-muted"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-xs font-medium text-text-secondary mb-1",children:"Type"}),p.jsx("input",{type:"text",value:e.type,disabled:!0,className:"w-full rounded-md border border-border bg-surface px-3 py-1.5 text-sm text-text-muted"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-xs font-medium text-text-secondary mb-1",children:"Name"}),p.jsx("input",{type:"text",value:e.name??"",onChange:o=>n("name",o.target.value||void 0),className:"w-full rounded-md border border-border bg-surface px-3 py-1.5 text-sm text-text-primary",placeholder:"Node name"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-xs font-medium text-text-secondary mb-1",children:"Theme Ref"}),p.jsx("input",{type:"text",value:e.themeRef??"",onChange:o=>n("themeRef",o.target.value||void 0),className:"w-full rounded-md border border-border bg-surface px-3 py-1.5 text-sm text-text-primary",placeholder:"variant name"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-xs font-medium text-text-secondary mb-1",children:"Test ID"}),p.jsx("input",{type:"text",value:e.testId??"",onChange:o=>n("testId",o.target.value||void 0),className:"w-full rounded-md border border-border bg-surface px-3 py-1.5 text-sm text-text-primary",placeholder:"data-testid"})]})]})]}):p.jsxs("div",{className:`flex h-full flex-col border-r border-border ${r??""}`,children:[p.jsx("div",{className:"border-b border-border px-4 py-3",children:p.jsx("h2",{className:"text-sm font-semibold text-text-primary",children:"Properties"})}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:p.jsx("p",{className:"text-sm text-text-secondary",children:"Select a node to edit its properties."})})]})}const Th=[{key:"display",label:"Display",type:"text"},{key:"flexDirection",label:"Flex Direction",type:"select",options:["row","column","row-reverse","column-reverse"]},{key:"justifyContent",label:"Justify Content",type:"select",options:["start","center","end","space-between","space-around","space-evenly"]},{key:"alignItems",label:"Align Items",type:"select",options:["start","center","end","stretch","baseline"]},{key:"gap",label:"Gap",type:"text"},{key:"padding",label:"Padding",type:"text"},{key:"margin",label:"Margin",type:"text"},{key:"width",label:"Width",type:"text"},{key:"height",label:"Height",type:"text"},{key:"background",label:"Background",type:"text"},{key:"color",label:"Color",type:"text"},{key:"fontSize",label:"Font Size",type:"text"},{key:"fontWeight",label:"Font Weight",type:"text"},{key:"borderRadius",label:"Border Radius",type:"text"},{key:"borderWidth",label:"Border Width",type:"text"},{key:"borderColor",label:"Border Color",type:"text"},{key:"shadow",label:"Shadow",type:"text"},{key:"opacity",label:"Opacity",type:"text"}];function zh({node:e,onUpdateNode:t,className:r}){const n=m.useMemo(()=>(e==null?void 0:e.style)??{},[e==null?void 0:e.style]),o=m.useCallback((a,c)=>{if(!e)return;const l={...n,[a]:c};t(e.id,{style:l})},[e,n,t]),s=m.useCallback((a,c,l)=>{if(!e)return;const d=n[a];let u;l===""&&c==="base"?u=void 0:l===""?(u={...typeof d=="object"&&d!==null?d:{},[c]:void 0},Object.keys(u).forEach(f=>{u[f]===void 0&&delete u[f]}),Object.keys(u).length===0&&(u=void 0)):typeof d=="object"&&d!==null?u={...d,[c]:l}:u={base:d,[c]:l};const h={...n,[a]:u};t(e.id,{style:h})},[e,n,t]);if(!e)return p.jsxs("div",{className:`flex h-full flex-col border-r border-border ${r??""}`,children:[p.jsx("div",{className:"border-b border-border px-4 py-3",children:p.jsx("h2",{className:"text-sm font-semibold text-text-primary",children:"Style"})}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:p.jsx("p",{className:"text-sm text-text-secondary",children:"Select a node to edit its style."})})]});const i=(a,c)=>{if(typeof c=="object"&&c!==null){const l=c;return p.jsx("div",{className:"space-y-2",children:["base","sm","md","lg","xl"].map(d=>p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("label",{className:"w-12 text-xs text-text-muted",children:d}),p.jsx("input",{type:"text",value:l[d]??"",onChange:u=>s(a,d,u.target.value),className:"flex-1 rounded-md border border-border bg-surface px-2 py-1 text-xs text-text-primary",placeholder:d==="base"?"base value":`${d}:value`})]},d))})}return typeof c=="string"?p.jsx("input",{type:"text",value:c,onChange:l=>o(a,l.target.value||void 0),className:"w-full rounded-md border border-border bg-surface px-3 py-1.5 text-sm text-text-primary"}):p.jsx("input",{type:"text",value:"",onChange:l=>o(a,l.target.value||void 0),className:"w-full rounded-md border border-border bg-surface px-3 py-1.5 text-sm text-text-primary",placeholder:"Enter value"})};return p.jsxs("div",{className:`flex h-full flex-col border-r border-border ${r??""}`,children:[p.jsxs("div",{className:"border-b border-border px-4 py-3",children:[p.jsx("h2",{className:"text-sm font-semibold text-text-primary",children:"Style"}),p.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:e.type})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:Th.map(a=>{const c=n[a.key];return c==null||c===""?null:p.jsxs("div",{children:[p.jsx("label",{className:"block text-xs font-medium text-text-secondary mb-1",children:a.label}),i(a.key,c)]},a.key)})})]})}function Ph({errors:e,className:t}){const r=e.filter(o=>o.severity==="error").length,n=e.filter(o=>o.severity==="warning").length;return e.length===0?p.jsxs("div",{className:`flex items-center gap-2 text-sm text-text-secondary ${t??""}`,children:[p.jsx("span",{className:"inline-flex h-2 w-2 rounded-full bg-green-500"}),"No validation errors"]}):p.jsxs("div",{className:`flex items-center gap-4 text-sm ${t??""}`,children:[r>0&&p.jsxs("span",{className:"flex items-center gap-1.5 text-red-400",children:[p.jsx("span",{className:"inline-flex h-2 w-2 rounded-full bg-red-500"}),r," error",r!==1?"s":""]}),n>0&&p.jsxs("span",{className:"flex items-center gap-1.5 text-yellow-400",children:[p.jsx("span",{className:"inline-flex h-2 w-2 rounded-full bg-yellow-500"}),n," warning",n!==1?"s":""]})]})}function Oh({initialDocument:e,mutationHandler:t,commandHandler:r,apiAllowlist:n,apiMaxResponseBytes:o,apiMaxConcurrentCalls:s,className:i}){const a=m.useMemo(()=>zf(e),[e]),c=a(),[l,d]=m.useState("properties"),u=m.useRef(null),h=c.document,f=m.useMemo(()=>c.selectedNodeId?c.flatNodeMap.get(c.selectedNodeId)??null:null,[c.flatNodeMap,c.selectedNodeId]),y=m.useMemo(()=>Mi(h.state),[h.state])(),x=m.useCallback(()=>{const{document:C,setValidationErrors:M}=a.getState(),b=Fr.safeParse(C);if(b.success)M([]);else{const g=b.error.issues.map(R=>({path:R.path.join("."),message:R.message,severity:"error"}));M(g)}},[a]);m.useEffect(()=>{const C=a.subscribe((M,b)=>{M.document!==b.document&&x()});return x(),C},[a,x]);const w=m.useCallback(C=>{if(!c.selectedNodeId)return;const M=c.flatNodeMap.get(c.selectedNodeId);if(!M)return;const b=Et.get(M.type);((b==null?void 0:b.acceptsChildren)??!0)&&c.addChild(c.selectedNodeId,C)},[c]),k=m.useCallback(()=>{const C=JSON.stringify(c.document,null,2),M=new Blob([C],{type:"application/json"}),b=URL.createObjectURL(M),g=window.document.createElement("a");g.href=b,g.download=`${c.document.name||"document"}.json`,g.click(),URL.revokeObjectURL(b)},[c.document]),T=m.useCallback(C=>{var g;const M=(g=C.target.files)==null?void 0:g[0];if(!M)return;const b=new FileReader;b.onload=R=>{var E;try{const O=JSON.parse((E=R.target)==null?void 0:E.result),j=Fr.safeParse(O);if(!j.success){const D=j.error.issues;a.getState().setValidationErrors(D.map(P=>({path:P.path.join("."),message:P.message,severity:"error"})));return}a.getState().setDocument(j.data)}catch{a.getState().setValidationErrors([{path:"file",message:"Invalid JSON file",severity:"error"}])}},b.readAsText(M),C.target.value=""},[a]),N=m.useCallback((C,M,b)=>{c.moveNode(C,M,b)},[c]);return p.jsxs("div",{className:`flex h-screen w-full flex-col bg-background text-text-primary ${c.themeMode==="dark"?"dark":""} ${i??""}`,children:[p.jsxs("header",{className:"flex items-center justify-between border-b border-border px-4 py-2",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsx("h1",{className:"text-lg font-semibold",children:"uidl-runtime"}),p.jsx("span",{className:"text-sm text-text-secondary",children:"Editor"})]}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsx(Ph,{errors:c.validationErrors}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("button",{onClick:c.undo,disabled:!c.canUndo,className:"rounded-md border border-border px-2 py-1 text-xs disabled:opacity-50",children:"Undo"}),p.jsx("button",{onClick:c.redo,disabled:!c.canRedo,className:"rounded-md border border-border px-2 py-1 text-xs disabled:opacity-50",children:"Redo"})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("button",{onClick:k,className:"rounded-md border border-border px-2 py-1 text-xs",children:"Save"}),p.jsx("button",{onClick:()=>{var C;return(C=u.current)==null?void 0:C.click()},className:"rounded-md border border-border px-2 py-1 text-xs",children:"Load"}),p.jsx("input",{ref:u,type:"file",accept:"application/json",className:"hidden",onChange:T})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("label",{className:"text-xs text-text-secondary",children:"Breakpoint:"}),p.jsxs("select",{value:c.activeBreakpoint,onChange:C=>c.setBreakpoint(C.target.value),className:"rounded-md border border-border bg-surface px-2 py-1 text-sm text-text-primary",children:[p.jsx("option",{value:"base",children:"Base"}),p.jsx("option",{value:"sm",children:"SM"}),p.jsx("option",{value:"md",children:"MD"}),p.jsx("option",{value:"lg",children:"LG"}),p.jsx("option",{value:"xl",children:"XL"}),p.jsx("option",{value:"2xl",children:"2XL"})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("label",{className:"text-xs text-text-secondary",children:"Theme:"}),p.jsxs("select",{value:c.themeMode,onChange:C=>c.setThemeMode(C.target.value),className:"rounded-md border border-border bg-surface px-2 py-1 text-sm text-text-primary",children:[p.jsx("option",{value:"light",children:"Light"}),p.jsx("option",{value:"dark",children:"Dark"})]})]})]})]}),p.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[p.jsx("aside",{className:"w-64 flex-shrink-0",children:p.jsx(Df,{onSelectWidget:w,selectedNodeId:c.selectedNodeId})}),p.jsx("aside",{className:"w-64 flex-shrink-0",children:p.jsx(jh,{root:h.root,selectedNodeId:c.selectedNodeId,hoveredNodeId:c.hoveredNodeId,onSelectNode:c.selectNode,onHoverNode:c.hoverNode,onMoveNode:N})}),p.jsx("main",{className:"flex-1 overflow-hidden",children:p.jsx(If,{document:h,selectedNodeId:c.selectedNodeId,hoveredNodeId:c.hoveredNodeId,onSelectNode:c.selectNode,onHoverNode:c.hoverNode,themeMode:c.themeMode,stateStore:y,dataSources:h.dataSources,mutationHandler:t,commandHandler:r,apiAllowlist:n,apiMaxResponseBytes:o,apiMaxConcurrentCalls:s})}),p.jsx("aside",{className:"w-80 flex-shrink-0",children:p.jsxs("div",{className:"flex h-full flex-col",children:[p.jsxs("div",{className:"flex border-b border-border",children:[p.jsx("button",{onClick:()=>d("properties"),className:`flex-1 px-4 py-2 text-sm font-medium transition-colors ${l==="properties"?"border-b-2 border-accent text-accent":"text-text-secondary hover:text-text-primary"}`,children:"Properties"}),p.jsx("button",{onClick:()=>d("style"),className:`flex-1 px-4 py-2 text-sm font-medium transition-colors ${l==="style"?"border-b-2 border-accent text-accent":"text-text-secondary hover:text-text-primary"}`,children:"Style"})]}),p.jsx("div",{className:"flex-1 overflow-hidden",children:l==="properties"?p.jsx(Eh,{node:f,onUpdateNode:c.updateNode}):p.jsx(zh,{node:f,onUpdateNode:c.updateNode})})]})})]})]})}const Us={id:{dashboard:"Dashboard",operations:"Operasional",inventory:"Inventori & Stok",accounting:"Akuntansi & GL",reports:"Laporan Finansial",controls:"Kontrol & Audit",settings:"Pengaturan",playground:"Playground UIDL",search:"Cari...",openConsole:"Buka Konsol",backToCatalog:"Kembali ke Katalog",create:"Buat Baru",save:"Simpan",cancel:"Batal",print:"Cetak Dokumen",export:"Ekspor Data",import:"Impor Data",format:"Format Kode",copy:"Salin",delete:"Hapus",edit:"Ubah",detail:"Detail Record",filter:"Saring",downloadPdf:"Download PDF",totalReceivables:"Total Piutang Usaha",totalPayables:"Total Hutang Usaha",netProfit:"Laba Bersih",cashBalance:"Saldo Kas & Bank",debit:"Debit",credit:"Kredit",balance:"Saldo",taxInvoice:"Faktur Pajak PPN 11%",salesInvoice:"Faktur Penjualan",purchaseOrder:"Surat Pesanan Pembelian",billOfMaterials:"Struktur Bahan Baku (BOM)",workOrder:"Perintah Kerja (WO)",deviceHistoryRecord:"Device History Record (DHR)",prescription:"Salinan Resep Obat",murabahahAgreement:"Akad Pembiayaan Murabahah",shippingLabel:"Label Resi Pengiriman",customer:"Pelanggan / Klien",supplier:"Pemasok / Vendor",status:"Status",date:"Tanggal",dueDate:"Jatuh Tempo",amount:"Nominal",qty:"Kuantitas",price:"Harga Satuan",subtotal:"Subtotal",tax:"PPN (11%)",grandTotal:"Total Keseluruhan",terbilang:"Terbilang"},en:{dashboard:"Dashboard",operations:"Operations",inventory:"Inventory & Stock",accounting:"Accounting & GL",reports:"Financial Reports",controls:"Controls & Audit",settings:"Settings",playground:"UIDL Playground",search:"Search...",openConsole:"Open Console",backToCatalog:"Back to Catalog",create:"Create New",save:"Save",cancel:"Cancel",print:"Print Document",export:"Export Data",import:"Import Data",format:"Format Code",copy:"Copy",delete:"Delete",edit:"Edit",detail:"Record Detail",filter:"Filter",downloadPdf:"Download PDF",totalReceivables:"Total Receivables",totalPayables:"Total Payables",netProfit:"Net Profit",cashBalance:"Cash & Bank Balance",debit:"Debit",credit:"Credit",balance:"Balance",taxInvoice:"VAT Tax Invoice 11%",salesInvoice:"Sales Invoice",purchaseOrder:"Purchase Order",billOfMaterials:"Bill of Materials (BOM)",workOrder:"Work Order (WO)",deviceHistoryRecord:"Device History Record (DHR)",prescription:"Medical Prescription",murabahahAgreement:"Murabahah Financing Contract",shippingLabel:"Shipping & Packing Slip",customer:"Customer / Client",supplier:"Supplier / Vendor",status:"Status",date:"Date",dueDate:"Due Date",amount:"Amount",qty:"Quantity",price:"Unit Price",subtotal:"Subtotal",tax:"VAT (11%)",grandTotal:"Grand Total",terbilang:"In Words"}};function Ih(e,t="id"){const r=Us[t],n=Us.id;return(r==null?void 0:r[e])??n[e]??e}function Dh(e,t=!0){const r=typeof e=="string"?parseFloat(e.replace(/[^0-9.-]/g,""))||0:e,n=new Intl.NumberFormat("id-ID",{minimumFractionDigits:0,maximumFractionDigits:2}).format(r);return t?`Rp ${n}`:n}const Zh=["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],Fh=["January","February","March","April","May","June","July","August","September","October","November","December"];function Lh(e,t="id"){const r=typeof e=="string"?new Date(e):e;if(isNaN(r.getTime()))return String(e);const n=r.getDate(),o=t==="id"?Zh[r.getMonth()]:Fh[r.getMonth()],s=r.getFullYear();return`${n} ${o} ${s}`}function hc(e){const t=Math.floor(typeof e=="string"?parseFloat(e.replace(/[^0-9.-]/g,""))||0:e);if(t===0)return"Nol Rupiah";if(t<0)return`Minus ${hc(Math.abs(t))}`;const r=["","Satu","Dua","Tiga","Empat","Lima","Enam","Tujuh","Delapan","Sembilan","Sepuluh","Sebelas"];function n(o){if(o<12)return r[o];if(o<20)return`${r[o-10]} Belas`;if(o<100){const s=o%10;return`${r[Math.floor(o/10)]} Puluh ${s>0?r[s]:""}`.trim()}else return o<200?`Seratus ${n(o-100)}`.trim():o<1e3?`${r[Math.floor(o/100)]} Ratus ${n(o%100)}`.trim():o<2e3?`Seribu ${n(o-1e3)}`.trim():o<1e6?`${n(Math.floor(o/1e3))} Ribu ${n(o%1e3)}`.trim():o<1e9?`${n(Math.floor(o/1e6))} Juta ${n(o%1e6)}`.trim():o<1e12?`${n(Math.floor(o/1e9))} Miliar ${n(o%1e9)}`.trim():`${n(Math.floor(o/1e12))} Triliun ${n(o%1e12)}`.trim()}return`${n(t)} Rupiah`}function Vh(e){const t=e.toLowerCase();if(t.includes("rental")||t.includes("mobil")||t.includes("armada")||t.includes("vehicle"))return{version:"1.0.0",id:"ai-rental-fleet-console",name:"Nusantara Car Rental & Fleet Operations",dataSources:{fleet:[{noPlat:"B 1024 SKA",tipe:"Innova Zenix Hybrid",status:"Disewa (Active)",customer:"PT Karya Abadi",tarifHari:"Rp 850.000",pengembalian:"24 Aug 2026"},{noPlat:"B 2488 WZA",tipe:"Avanza Veloz 1.5",status:"Tersedia (Ready)",customer:"-",tarifHari:"Rp 450.000",pengembalian:"-"},{noPlat:"B 9912 TYU",tipe:"Fortuner GR Sport",status:"Servis Berkala",customer:"-",tarifHari:"Rp 1.200.000",pengembalian:"22 Aug 2026"}],chart:[{label:"Senin",value:85},{label:"Selasa",value:92},{label:"Rabu",value:88},{label:"Kamis",value:94},{label:"Jumat",value:100},{label:"Sabtu",value:98},{label:"Minggu",value:90}]},root:{id:"root-rental",type:"Column",style:{gap:"gap-4",padding:"p-6"},children:[{id:"header-card",type:"Column",style:{padding:"p-4",borderWidth:"border",borderColor:"{primitives.color.border}",borderRadius:"{primitives.radius.md}",background:"{primitives.color.surface}"},children:[{id:"title",type:"Text",props:{value:"Sistem Manajemen Rental Mobil & Armada",variant:"heading"},style:{fontSize:"text-xl",fontWeight:"font-bold"}},{id:"desc",type:"Text",props:{value:"Monitoring ketersediaan unit armada, jadwal sewa, dan utilisasi pendapatan",variant:"paragraph"},style:{fontSize:"text-xs",color:"{primitives.color.textSecondary}"}}]},{id:"fleet-table",type:"DataTable",style:{width:"w-full"},props:{title:"Daftar Armada & Status Booking Aktif",dataSource:"fleet",columns:[{key:"noPlat",label:"No. Polisi"},{key:"tipe",label:"Model Kendaraan"},{key:"status",label:"Status Unit"},{key:"customer",label:"Penyewa"},{key:"tarifHari",label:"Tarif / Hari"},{key:"pengembalian",label:"Jadwal Kembali"}],rowActions:[{label:"Detail Sewa"}]}}]}};if(t.includes("payroll")||t.includes("gaji")||t.includes("karyawan")||t.includes("bpjs"))return{version:"1.0.0",id:"ai-payroll-hr-console",name:"Sistem Penggajian & Payroll Karyawan (HRIS)",dataSources:{payroll:[{nik:"EMP-041",nama:"Bambang Sudiro",divisi:"Engineering",gapok:"Rp 14.000.000",tunjangan:"Rp 3.500.000",bpjs:"Rp 700.000",thp:"Rp 16.800.000",status:"Transfer Success"},{nik:"EMP-042",nama:"Dewi Lestari",divisi:"Finance & Tax",gapok:"Rp 11.500.000",tunjangan:"Rp 2.800.000",bpjs:"Rp 575.000",thp:"Rp 13.725.000",status:"Transfer Success"},{nik:"EMP-043",nama:"Rahmat Hidayat",divisi:"Supply Chain",gapok:"Rp 8.500.000",tunjangan:"Rp 2.000.000",bpjs:"Rp 425.000",thp:"Rp 10.075.000",status:"Pending Approval"}]},root:{id:"root-payroll",type:"Column",style:{gap:"gap-4",padding:"p-6"},children:[{id:"header-card",type:"Column",style:{padding:"p-4",borderWidth:"border",borderColor:"{primitives.color.border}",borderRadius:"{primitives.radius.md}",background:"{primitives.color.surface}"},children:[{id:"title",type:"Text",props:{value:"Slip & Rekapitulasi Gaji Karyawan (Payroll)",variant:"heading"},style:{fontSize:"text-xl",fontWeight:"font-bold"}},{id:"desc",type:"Text",props:{value:"Perhitungan take-home-pay, potongan BPJS Ketenagakerjaan & Kesehatan",variant:"paragraph"},style:{fontSize:"text-xs",color:"{primitives.color.textSecondary}"}}]},{id:"payroll-table",type:"DataTable",style:{width:"w-full"},props:{title:"Daftar Payroll Karyawan Periode Aktif",dataSource:"payroll",columns:[{key:"nik",label:"NIK Karyawan"},{key:"nama",label:"Nama Lengkap"},{key:"divisi",label:"Divisi"},{key:"gapok",label:"Gaji Pokok"},{key:"bpjs",label:"Potongan BPJS"},{key:"thp",label:"Take Home Pay (THP)"},{key:"status",label:"Status Slip"}],rowActions:[{label:"Slip PDF"}]}}]}};if(t.includes("hotel")||t.includes("kamar")||t.includes("penginapan")||t.includes("occupancy"))return{version:"1.0.0",id:"ai-hotel-room-console",name:"Grand Nusantara Hotel - Room Operations",dataSources:{rooms:[{noKamar:"Room 301",tipe:"Deluxe King Bed",status:"Occupied (In-house)",tamu:"Mr. Arthur Pendelton",tarif:"Rp 1.450.000",checkOut:"23 Aug 2026"},{noKamar:"Room 302",tipe:"Executive Suite",status:"Clean & Ready",tamu:"-",tarif:"Rp 2.800.000",checkOut:"-"},{noKamar:"Room 303",tipe:"Deluxe Twin Bed",status:"Housekeeping",tamu:"-",tarif:"Rp 1.350.000",checkOut:"Today 12:00"}]},root:{id:"root-hotel",type:"Column",style:{gap:"gap-4",padding:"p-6"},children:[{id:"header-card",type:"Column",style:{padding:"p-4",borderWidth:"border",borderColor:"{primitives.color.border}",borderRadius:"{primitives.radius.md}",background:"{primitives.color.surface}"},children:[{id:"title",type:"Text",props:{value:"Front Desk & Room Inventory Management",variant:"heading"},style:{fontSize:"text-xl",fontWeight:"font-bold"}},{id:"desc",type:"Text",props:{value:"Status kamar, reservasi tamu, dan kontrol kebersihan housekeeping",variant:"paragraph"},style:{fontSize:"text-xs",color:"{primitives.color.textSecondary}"}}]},{id:"room-table",type:"DataTable",style:{width:"w-full"},props:{title:"Status Kamar & Tamu Check-in",dataSource:"rooms",columns:[{key:"noKamar",label:"No. Kamar"},{key:"tipe",label:"Tipe Room"},{key:"status",label:"Status Kamar"},{key:"tamu",label:"Nama Tamu"},{key:"tarif",label:"Tarif / Malam"},{key:"checkOut",label:"Jadwal Check-Out"}],rowActions:[{label:"Key Card"}]}}]}};const r=e.length>3?e:"Custom Operational Console";return{version:"1.0.0",id:`ai-custom-${Date.now()}`,name:r,dataSources:{items:[{id:"REC-001",name:"Operasional Item A",kategori:"Kategori Utama",nilai:"Rp 24.500.000",status:"Active / Verified"},{id:"REC-002",name:"Operasional Item B",kategori:"Kategori Sekunder",nilai:"Rp 12.800.000",status:"In Process"},{id:"REC-003",name:"Operasional Item C",kategori:"Kategori Penunjang",nilai:"Rp 8.200.000",status:"Pending Review"}]},root:{id:"root-custom",type:"Column",style:{gap:"gap-4",padding:"p-6"},children:[{id:"header-card",type:"Column",style:{padding:"p-4",borderWidth:"border",borderColor:"{primitives.color.border}",borderRadius:"{primitives.radius.md}",background:"{primitives.color.surface}"},children:[{id:"title",type:"Text",props:{value:r,variant:"heading"},style:{fontSize:"text-xl",fontWeight:"font-bold"}},{id:"desc",type:"Text",props:{value:"Generated dynamically via AI Natural Language Synthesizer",variant:"paragraph"},style:{fontSize:"text-xs",color:"{primitives.color.textSecondary}"}}]},{id:"main-table",type:"DataTable",style:{width:"w-full"},props:{title:"Data Records & Transaksi",dataSource:"items",columns:[{key:"id",label:"ID Referensi"},{key:"name",label:"Nama Transaksi"},{key:"kategori",label:"Kategori"},{key:"nilai",label:"Nilai Nominal"},{key:"status",label:"Status"}],rowActions:[{label:"Detail"}]}}]}}}const mc=["list","form","report","dashboard","settings","tree","wizard"];function Bh(e){return typeof e=="string"&&mc.includes(e)}function vt(e){var s,i,a;const t=[],r=e.hostCapabilities,n=new Set(r.collections),o=new Set(r.mutationCollections??r.collections);if(e.recipe==="list"||e.recipe==="form"){const c=e.meta.name;!n.has(c)&&!o.has(c)&&t.push({code:"unknown_collection",path:"meta.name",message:`collection "${c}" is not in hostCapabilities.collections`})}if(e.recipe==="report"){const l=e.meta.dataSource;if(l&&typeof l=="object"&&"$query"in l){const d=l.$query.collection??"";d&&!n.has(d)&&t.push({code:"unknown_collection",path:"meta.dataSource.$query.collection",message:`report collection "${d}" is not in hostCapabilities.collections`})}}if(((s=r.limits)==null?void 0:s.maxPageSize)!==void 0&&e.recipe==="list"){const c=e.meta.pageSize??20;c>r.limits.maxPageSize&&t.push({code:"limit_exceeded",path:"meta.pageSize",message:`pageSize ${c} exceeds hostCapabilities.limits.maxPageSize ${r.limits.maxPageSize}`})}if(((i=r.limits)==null?void 0:i.maxFilters)!==void 0&&e.recipe==="list"){const c=((a=e.meta.filters)==null?void 0:a.length)??0;c>r.limits.maxFilters&&t.push({code:"limit_exceeded",path:"meta.filters",message:`filters count ${c} exceeds hostCapabilities.limits.maxFilters ${r.limits.maxFilters}`})}if(r.queries&&e.recipe==="list"){const c=e.meta,l=r.queries.find(d=>d.collection===c.name);if(l){for(const d of c.filters??[])l.filterFields&&!l.filterFields.includes(d.field)&&t.push({code:"unknown_collection",path:`meta.filters.${d.field}`,message:`filter field "${d.field}" not allowlisted for collection "${c.name}" in hostCapabilities.queries`});l.sortableFields&&!l.sortableFields.includes(c.defaultSort.field)&&t.push({code:"unknown_collection",path:"meta.defaultSort.field",message:`sort field "${c.defaultSort.field}" not allowlisted for collection "${c.name}"`})}}if(r.queries&&e.recipe==="report"){const c=e.meta,l=c.dataSource;if(l&&typeof l=="object"&&"$query"in l){const d=l.$query.collection??"",u=r.queries.find(h=>h.collection===d);if(u&&c.filters)for(const h of c.filters)u.filterFields&&!u.filterFields.includes(h.field)&&t.push({code:"unknown_collection",path:`meta.filters.${h.field}`,message:`report filter field "${h.field}" not allowlisted for collection "${d}"`})}}if(e.recipe==="form"||e.recipe==="settings"||e.recipe==="wizard"){const c=e.recipe==="form"?e.meta.fields:e.recipe==="settings"?e.meta.sections.flatMap(l=>l.fields):e.meta.steps.flatMap(l=>l.fields);for(const l of c)if(l.widget==="Link"){const d=l.options&&typeof l.options=="object"&&"doctype"in l.options?l.options.doctype:l.linkDoctype;d&&!n.has(d)&&t.push({code:"unknown_collection",path:`meta.fields.${l.key}.linkDoctype`,message:`Link target collection "${d}" for field "${l.key}" not in hostCapabilities.collections`})}}return t}function _e(e,t,r){return`${e}-${t}-field-${r}`}function gc(e){return{search:`list-${e}-search`,table:`list-${e}-table`,page:`list-${e}-page`}}const Mr="{primitives.color.border}",Gs="{primitives.color.text-secondary}";function Hh(e,t,r){if(r&&e===r)return"status";if(t!=null&&t.format)return t.format;const n=t==null?void 0:t.widget;return n==="Currency"?"currency":n==="Date"?"date":n==="Checkbox"||n==="Switch"?"check":"text"}function Wh(e,t){const r=t.fields.find(n=>n.key===e);return r!=null&&r.format?{format:r.format==="integer"?"integer":r.format}:{format:(r==null?void 0:r.widget)==="Currency"?"currency":"number"}}function Uh(e,t){var O,j,D,P,B,L,U;const r={recipe:"list",meta:e,hostCapabilities:t.hostCapabilities},n=vt(r);if(n.length>0)throw new Error(`compileListPage: hostCapabilities rejected: ${n.map(I=>I.message).join("; ")}`);const o=((O=t.uiPolicy)==null?void 0:O.lang)??"id",s=t.docId??`list-${e.name.toLowerCase()}`,i=e.label[o]??e.name,a=gc(e.name),c=((j=t.routePolicy)==null?void 0:j.listBase)??"/app/list",l=((D=t.routePolicy)==null?void 0:D.formBase)??"/app/edit",d=(P=t.routePolicy)!=null&&P.resolveListRoute?t.routePolicy.resolveListRoute(e):`${c}/${e.name}/new`.replace("//","/");(B=t.routePolicy)!=null&&B.resolveFormRoute?t.routePolicy.resolveFormRoute(e,":id"):`${l}/${e.name}/:id`.replace("//","/");const u=e.pageSize??20,h=e.defaultSort.field,f=e.defaultSort.dir,v={page:1,pageSize:u,sortField:h,sortDir:f,search:"",filterOpen:!1};for(const I of e.filters??[])v[`filter_${I.field}`]="";t.initialState&&Object.assign(v,t.initialState);const y=(e.filters??[]).map(I=>({field:I.field,op:I.widget==="DateRange"?"between":"eq",value:{$bind:`state.filter_${I.field}`}})),x={rows:{$query:{collection:e.name,filters:y.length>0?y:void 0,sort:[{field:{$bind:"state.sortField"},dir:{$bind:"state.sortDir"}}],page:{number:{$bind:"state.page"},size:{$bind:"state.pageSize"}},search:{$bind:"state.search"}}}},w=[];w.push({id:a.search,type:"TextField",style:{width:"w-64"},props:{label:o==="id"?"Cari":"Search",placeholder:o==="id"?`Cari ${i}…`:`Search ${i}…`,value:{$bind:"state.search"}},events:{onChange:[{setState:{path:"search",value:null}},{setState:{path:"page",value:1}}]}});for(const I of e.filters??[]){const W=e.fields.find(_=>_.key===I.field),z=(W==null?void 0:W.label[o])??((L=I.label)==null?void 0:L[o])??I.field;if(I.widget==="Select"){let _;I.options&&Array.isArray(I.options)?_=[{value:"",label:o==="id"?`Semua ${z}`:`All ${z}`},...I.options]:W!=null&&W.options&&Array.isArray(W.options)?_=[{value:"",label:o==="id"?`Semua ${z}`:`All ${z}`},...W.options]:_=[{value:"",label:o==="id"?`Semua ${z}`:`All ${z}`}],w.push({id:`filter-${I.field}`,type:"Select",style:{width:"w-52"},props:{label:z,value:{$bind:`state.filter_${I.field}`},options:_},events:{onChange:[{setState:{path:`filter_${I.field}`,value:null}},{setState:{path:"page",value:1}}]}})}else I.widget==="TextField"?w.push({id:`filter-${I.field}`,type:"TextField",style:{width:"w-48"},props:{label:z,placeholder:o==="id"?`Cari ${z}…`:`Search ${z}…`,value:{$bind:`state.filter_${I.field}`}},events:{onChange:[{setState:{path:`filter_${I.field}`,value:null}},{setState:{path:"page",value:1}}]}}):I.widget==="DateRange"&&w.push({id:`filter-${I.field}`,type:"TextField",style:{width:"w-56"},props:{label:z,placeholder:o==="id"?"Rentang Tanggal":"Date Range",value:{$bind:`state.filter_${I.field}`}},events:{onChange:[{setState:{path:`filter_${I.field}`,value:null}},{setState:{path:"page",value:1}}]}})}const k=[{setState:{path:"search",value:""}},{setState:{path:"page",value:1}},...(e.filters??[]).map(I=>({setState:{path:`filter_${I.field}`,value:""}}))];w.push({id:"reset-filters-btn",type:"Button",props:{label:"Reset",variant:"secondary"},events:{onClick:k}}),t.extraFilterActions&&w.push(...t.extraFilterActions);const T=e.columns.map(I=>{const W=e.fields.find(V=>V.key===I.field),z=(W==null?void 0:W.label[o])??I.field,_=Hh(I.field,W,e.statusField);return{key:I.field,label:z,width:I.width,format:_,...I.align?{align:I.align}:{}}}),N=t.createNewActions??[{navigate:{route:d}}],C={id:"filter-popover-anchor",type:"Container",style:{position:"relative",display:"flex",alignItems:"center"},children:[{id:"filter-toggle-btn",type:"Button",props:{label:"Filter",variant:"secondary",iconName:"filter"},events:{onClick:[{setState:{path:"filterOpen",value:!0}}]}},{id:"filter-popover",type:"Popover",props:{open:{$bind:"state.filterOpen"},align:"end"},style:{width:"w-80"},events:{onClose:[{setState:{path:"filterOpen",value:!1}}]},children:[{id:"filter-bar",type:"Column",style:{display:"flex",flexDirection:"column",gap:"gap-3",padding:"p-4"},children:w}]}]},M=[...t.extraHeaderActions??[],C,{id:"create-new-btn",type:"Button",props:{label:o==="id"?`+ ${e.label.id}`:`+ New ${e.label.en}`,variant:"primary"},events:{onClick:N}}],b=[];if(e.summaries&&e.summaries.length>0){const I=e.summaries;b.push({id:"list-summaries",type:"GridView",props:{style:{display:"grid",gridTemplateColumns:`repeat(${I.length}, minmax(0, 1fr))`}},style:{borderWidth:"border-b",borderColor:Mr},children:I.map((W,z)=>{var _;return{id:`summary-${z}`,type:"Column",style:{padding:"p-4",gap:"gap-1",...z<I.length-1?{borderWidth:"border-e",borderColor:Mr}:{}},children:[{id:`summary-${z}-label`,type:"Text",props:{value:W.label[o]??W.field},style:{fontSize:"text-sm",color:Gs}},{id:`summary-${z}-agg`,type:"Text",props:{value:{$expr:{agg:W.agg,over:"data.rows",...W.agg==="count"?{}:{field:W.field}}},...W.agg==="count"?{format:"integer"}:Wh(W.field,e),locale:o==="id"?"id-ID":"en-US",...(_=t.uiPolicy)!=null&&_.currency?{currency:t.uiPolicy.currency}:{}},style:{fontSize:"text-xl",fontWeight:600}}]}})})}const g=t.rowActions??[],R=t.rowOpenActions??[{navigate:{route:{$bind:"event.route"}}}];return{version:"1.0.0",id:s,name:i,state:v,dataSources:x,root:{id:"page",type:"Column",style:{fontSize:"text-base",width:"w-full"},children:[{id:"list-header",type:"Navbar",style:{justifyContent:"space-between",alignItems:"center",padding:"px-4",height:"h-row-large",borderWidth:"border-b",borderColor:Mr},children:[{id:"list-header-title",type:"Text",props:{value:i,heading:1},style:{fontSize:"text-xl",fontWeight:600}},{id:"list-header-actions",type:"Toolbar",style:{display:"flex",alignItems:"center",gap:"gap-2"},children:M}]},...b,{id:"list-loading",type:"Text",props:{value:o==="id"?"Memuat data…":"Loading data…"},style:{padding:"p-4",color:Gs},visibility:{condition:{"==":[{path:"state.$data.rows.status"},{literal:"loading"}]}}},{id:"list-error",type:"Text",props:{value:o==="id"?"Gagal memuat data. Coba muat ulang halaman.":"Failed to load data. Please refresh."},style:{padding:"p-4",color:"{primitives.color.error}"},visibility:{condition:{"==":[{path:"state.$data.rows.status"},{literal:"error"}]}}},{id:a.table,type:"DataTable",style:{width:"w-full"},props:{dataSource:"rows",columns:T,rowActions:g,showIndex:!0,paginate:!1,locale:o==="id"?"id-ID":"en-US",...(U=t.uiPolicy)!=null&&U.currency?{currency:t.uiPolicy.currency}:{}},events:{onOpen:R}},{id:a.page,type:"PageBar",style:{borderWidth:"border-t",borderColor:Mr},props:{total:{$bind:"state.$data.rows.total"},page:{$bind:"state.page"},pageSize:{$bind:"state.pageSize"}},events:{onPageChange:[{setState:{path:"page",value:null}}],onPageSizeChange:[{setState:{path:"pageSize",value:null}}]}}]}}}function Gh(e,t){const r=typeof e=="string"?new URLSearchParams(e):e,n={},o=r.get("page");o&&!isNaN(Number(o))&&(n.page=Number(o));const s=r.get("pageSize")||r.get("limit");s&&!isNaN(Number(s))&&(n.pageSize=Number(s));const i=r.get("sort");i&&(i.startsWith("-")?(n.sortField=i.slice(1),n.sortDir="desc"):(n.sortField=i,n.sortDir="asc"));const a=r.get("q")||r.get("search");a&&(n.search=a);for(const c of t.filters??[]){const l=r.get(c.field)??r.get(`filter_${c.field}`);l!=null&&(n[`filter_${c.field}`]=l)}return n}function Jh(e,t){const r=new URLSearchParams;if(e.search&&typeof e.search=="string"&&e.search.trim()&&r.set("q",e.search.trim()),e.page&&typeof e.page=="number"&&e.page>1&&r.set("page",String(e.page)),e.pageSize&&typeof e.pageSize=="number"&&e.pageSize!==(t.pageSize??20)&&r.set("pageSize",String(e.pageSize)),e.sortField&&typeof e.sortField=="string"){const n=e.sortDir==="desc",o=t.defaultSort.dir==="desc";(e.sortField!==t.defaultSort.field||n!==o)&&r.set("sort",`${n?"-":""}${e.sortField}`)}for(const n of t.filters??[]){const o=e[`filter_${n.field}`];o!=null&&o!==""&&r.set(n.field,String(o))}return r}const dn="{primitives.color.border}",bc="{primitives.color.text-secondary}",Kh={display:"flex",flexDirection:"column",alignItems:"center",width:"w-full",minHeight:"min-h-full",background:"{primitives.color.surface}",paddingTop:"pt-4",fontSize:"text-base"},qh={display:"flex",flexDirection:"column",width:"w-full",minHeight:"min-h-full",background:"{primitives.color.surface}",fontSize:"text-base"},Yh={display:"flex",flexDirection:"column",width:"w-form",maxWidth:"max-w-full",margin:"mx-4 mb-4",background:"{primitives.color.surface-elevated}",borderWidth:"border",borderColor:dn,borderRadius:"rounded-lg",shadow:"{primitives.shadow.lg}"},Xh={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"px-4",height:"h-row-large",borderWidth:"border-b",borderColor:dn},vc={borderWidth:"border-b",borderColor:dn,minHeight:"min-h-row-mid"},yc={display:"grid",gridTemplateColumns:"minmax(0, 1fr) minmax(0, 1fr)",alignItems:"center"},xc={padding:"ps-4",color:bc,fontSize:"text-base"},wc={padding:"py-2 pe-4"},Qh={border:!1,size:"small"},kc={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"px-4 py-2.5",background:"{primitives.color.surface}",borderWidth:"border-b",borderColor:dn,fontSize:"text-sm",fontWeight:600,color:bc},em={display:"flex",justifyContent:"end",alignItems:"center",gap:"gap-2",padding:"p-4"},tm="{primitives.color.border}";function rm(e){const t={};for(const r of e.fields)r.key!=="id"&&r.widget!=="Table"&&(t[r.key]={$expr:{path:`state.${r.key}`}});return t}function Sc(e,t,r,n="secondary"){return{id:e,type:"Button",props:{label:t,variant:n},events:{onClick:[{navigate:{route:r}}]}}}function nm(e,t,r,n){const o=Sc("save-btn",n==="id"?"Simpan":"Save",r,"primary");return o.events={onClick:[{mutate:{operation:t?"create":"update",collection:e.name,...t?{}:{id:{$expr:{path:"state.id"}}},payload:rm(e),version:{$expr:{path:"state._meta.version"}},statusPath:"formStatus",resultPath:"savedRecord",errorPath:"formError",fieldErrorsPath:"formErrors",onSuccess:{navigate:{route:r}}}}]},o}function om(e,t,r){const n=e.states,o=t.label[r]??t.name,s=t.name==="submit";return{id:`transition-${t.name}`,type:"Button",props:{label:o,variant:s?"primary":"secondary"},events:{onClick:[{mutate:{operation:"transition",collection:e.name,id:{$expr:{path:"state.id"}},transition:t.name,version:{$expr:{path:"state._meta.version"}},statusPath:"formStatus",resultPath:"savedRecord",errorPath:"formError",fieldErrorsPath:"formErrors",onSuccess:{sequence:[{setState:{path:n.field,value:{$bind:`event.record.${n.field}`}}},{setState:{path:"_meta.version",value:{$bind:"event.meta.version"}}}]}}}]},visibility:{condition:t.from.length===1?{"==":[{path:`state.${n.field}`},{literal:t.from[0]}]}:{or:t.from.map(i=>({"==":[{path:`state.${n.field}`},{literal:i}]}))}}}}function sm(e,t,r){var a,c;const n=e.widget==="Checkbox"||e.widget==="Switch",o=e.readOnly===!0,s={...n?{}:{size:"small",error:{$bind:`state.formErrors.${e.key}`}},...o?{disabled:!0}:{}};if(n)return{id:_e("form",r.name,e.key),type:e.widget,props:{...s,checked:{$bind:`state.${e.key}`}},events:{onChange:[{setState:{path:e.key,value:null}}]}};if(e.widget==="Select"||e.widget==="RadioGroup"){let l;return e.options&&Array.isArray(e.options)?l=e.options:r.states&&e.key===r.states.field?l=r.states.values.map(d=>({value:d,label:d})):e.options&&typeof e.options=="object"&&"doctype"in e.options&&(l=[]),{id:_e("form",r.name,e.key),type:e.widget,props:{...s,value:{$bind:`state.${e.key}`},options:l??[]},events:{onChange:[{setState:{path:e.key,value:null}}]}}}if(e.widget==="Link"){if((e.options&&typeof e.options=="object"&&"doctype"in e.options?e.options.doctype:void 0)??e.linkDoctype){const u=`link_${e.key}`,h=e.options&&typeof e.options=="object"&&"doctype"in e.options?e.options:{},f=h.valueKey??"id",v=h.labelKey??"name";return{id:_e("form",r.name,e.key),type:"Column",style:{display:"flex",flexDirection:"column",gap:"gap-1"},children:[{id:`${_e("form",r.name,e.key)}-select`,type:"Select",props:{...s,value:{$bind:`state.${e.key}`},options:{$bind:`state.$data.${u}.rows`},optionValueKey:f,optionLabelKey:v,placeholder:typeof e.placeholder=="string"?e.placeholder:((a=e.placeholder)==null?void 0:a[t])??`Select ${e.label[t]??e.key}`},events:{onChange:[{setState:{path:e.key,value:null}}]}},{id:`${_e("form",r.name,e.key)}-loading`,type:"Text",props:{value:"Loading…"},style:{fontSize:"text-xs",color:"{primitives.color.text-secondary}"},visibility:{condition:{"==":[{path:`state.$data.${u}.status`},{literal:"loading"}]}}},{id:`${_e("form",r.name,e.key)}-error`,type:"Text",props:{value:"Failed to load options"},style:{fontSize:"text-xs",color:"{primitives.color.error}"},visibility:{condition:{"==":[{path:`state.$data.${u}.status`},{literal:"error"}]}}},{id:`${_e("form",r.name,e.key)}-empty`,type:"Text",props:{value:"No options"},style:{fontSize:"text-xs",color:"{primitives.color.text-secondary}"},visibility:{condition:{and:[{"==":[{path:`state.$data.${u}.status`},{literal:"success"}]},{"==":[{path:`state.$data.${u}.rows.length`},{literal:0}]}]}}}]}}let d=[];return e.options&&Array.isArray(e.options)&&(d=e.options),{id:_e("form",r.name,e.key),type:"Select",props:{...s,value:{$bind:`state.${e.key}`},options:d,placeholder:typeof e.placeholder=="string"?e.placeholder:((c=e.placeholder)==null?void 0:c[t])??`Select ${e.label[t]??e.key}`},events:{onChange:[{setState:{path:e.key,value:null}}]}}}const i=typeof e.placeholder=="object"?e.placeholder[t]??"":typeof e.placeholder=="string"?e.placeholder:"";return e.widget==="Textarea"?{id:_e("form",r.name,e.key),type:"Textarea",props:{...s,value:{$bind:`state.${e.key}`},placeholder:i},events:{onChange:[{setState:{path:e.key,value:null}}]}}:e.widget==="Currency"?{id:_e("form",r.name,e.key),type:"TextField",props:{...s,value:{$bind:`state.${e.key}`},placeholder:i||"0"},events:{onChange:[{setState:{path:e.key,value:null}}]}}:e.widget==="Date"?{id:_e("form",r.name,e.key),type:"TextField",props:{...s,value:{$bind:`state.${e.key}`},placeholder:i||"YYYY-MM-DD"},events:{onChange:[{setState:{path:e.key,value:null}}]}}:e.widget==="Slider"?{id:_e("form",r.name,e.key),type:"Slider",props:{...s,value:{$bind:`state.${e.key}`}},events:{onChange:[{setState:{path:e.key,value:null}}]}}:{id:_e("form",r.name,e.key),type:"TextField",props:{...s,value:{$bind:`state.${e.key}`},placeholder:i},events:{onChange:[{setState:{path:e.key,value:null}}]}}}function im(e,t,r){return{id:e,type:"Row",props:{style:{...yc}},style:{...vc},children:[{id:`${e}-label`,type:"Text",props:{value:t},style:{...xc}},{id:`${e}-control`,type:"Column",style:{...wc},children:[Ro(_c(r),t)]}]}}function _c(e){var t;return am.has(e.type)?{...e,props:{...Qh,...e.props??{}}}:(t=e.children)!=null&&t.length?{...e,children:e.children.map(_c)}:e}const am=new Set(["TextField","Textarea","Select"]);function Ro(e,t){var o;if(cm.has(e.type)){const s=e.props??{};return s["aria-label"]||s.label?e:{...e,props:{...s,"aria-label":t}}}if(!((o=e.children)!=null&&o.length))return e;let r=!1;const n=e.children.map(s=>{if(r)return s;const i=Ro(s,t);return i!==s&&(r=!0),i});return r?{...e,children:n}:e}const cm=new Set(["TextField","Textarea","Select","RadioGroup","Checkbox","Switch","Slider"]);function lm(e,t){return{id:e,type:"Text",props:{value:t,heading:3},style:{...kc}}}function dm(e,t){return{id:"form-header",type:"Navbar",style:{...Xh},children:[{id:"form-header-title",type:"Text",props:{value:e,heading:1},style:{fontSize:"text-xl",fontWeight:600}},{id:"form-header-actions",type:"Toolbar",style:{display:"flex",gap:"gap-2"},children:t}]}}function Js(e,t=!1){return{id:"page",type:"Column",style:t?{...qh}:{...Kh},children:e}}function um(e){return{id:"form-shell",type:"Form",style:{...Yh},children:e}}function pm(e,t,r){var R,E,O;const n=t==="new",o=((R=r.uiPolicy)==null?void 0:R.lang)??"id",s={recipe:"form",meta:e,hostCapabilities:r.hostCapabilities},i=vt(s);if(i.length>0)throw new Error(`compileFormPage: hostCapabilities rejected: ${i.map(j=>j.message).join("; ")}`);const a=r.docId??`form-${e.name.toLowerCase()}-${t.toLowerCase()}`,c=((E=r.routePolicy)==null?void 0:E.listBase)??"/app/list",l=r.listRoute??`${c}/${e.name}`.replace("//","/"),d=n?o==="id"?`Buat ${e.label.id}`:`New ${e.label.en}`:`${e.label[o]??e.name} (${t})`,u={id:n?"":t,formErrors:{},formError:"",formStatus:"idle",savedRecord:null,_meta:r.initialVersion!==void 0?{version:r.initialVersion}:{}};for(const j of e.fields)j.key!=="id"&&j.widget!=="Table"&&(r.initialData&&j.key in r.initialData?u[j.key]=r.initialData[j.key]:j.default!==void 0?u[j.key]=j.default:j.widget==="Checkbox"||j.widget==="Switch"?u[j.key]=!1:j.widget==="Currency"?u[j.key]=0:u[j.key]="");e.states&&(u[e.states.field]=((O=r.initialData)==null?void 0:O[e.states.field])??e.states.initial);const h={};for(const j of e.fields)if(j.widget==="Link"){const D=(j.options&&typeof j.options=="object"&&"doctype"in j.options?j.options.doctype:void 0)??j.linkDoctype;if(D){const P=`link_${j.key}`;h[P]={$query:{collection:D,page:{size:50}}}}}const f=new Map;for(const j of e.fields){if(j.widget==="Table")continue;const D=j.section??"";f.has(D)||f.set(D,[]),f.get(D).push(j)}const v=[];for(const[j,D]of f.entries()){j.trim()&&v.push(lm(`section-${j.toLowerCase().replace(/\s+/g,"-")}`,j));for(const P of D){const B=`${P.label[o]??P.key}${P.required?" *":""}`,L=sm(P,o,e);v.push(im(`row-${P.key}`,B,L))}}const y=[],x=!!(e.childTables&&e.childTables.length>0);if(x)for(const j of e.childTables??[]){const D=e.fields.find(B=>B.key===j.field),P=(D==null?void 0:D.label[o])??j.field;y.push({id:`child-table-${j.field}`,type:"DataTable",props:{title:P,dataSource:j.field,paginate:!1},style:{width:"w-full",borderWidth:"border-b",borderColor:tm}})}const w=[];if(!n&&e.states)for(const j of e.states.transitions)w.push(om(e,j,o));const k=[...r.extraHeaderActions??[],...w],T=[Sc("cancel-btn",o==="id"?"Batal":"Cancel",l),...r.extraFormActions??[],nm(e,n,l,o)],N=r.useFullWidth??x,C=dm(d,k),M={id:"form-actions",type:"Toolbar",style:{...em},children:T},b={id:"form-error",type:"Text",props:{value:{$bind:"state.formError"}},style:{padding:"px-4",color:"{primitives.color.error}"},visibility:{condition:{"!=":[{path:"state.formError"},{literal:""}]}}};let g;if(N){const j={id:"form",type:"Form",style:{display:"flex",flexDirection:"column"},children:[...v,...y]};g=Js([C,j,b,M],!0)}else g=Js([um([C,...v,...y,b,M])]);return{version:"1.0.0",id:a,name:d,state:u,dataSources:Object.keys(h).length>0?h:void 0,root:g}}const Nr="{primitives.color.border}",fm="{primitives.color.text-secondary}";function hm(e,t){return{id:"report-header",type:"Navbar",style:{justifyContent:"space-between",alignItems:"center",padding:"px-4",height:"h-row-large",borderWidth:"border-b",borderColor:Nr},children:[{id:"report-header-title",type:"Text",props:{value:e,heading:1},style:{fontSize:"text-xl",fontWeight:600}},{id:"report-header-actions",type:"Toolbar",style:{display:"flex",gap:"gap-2"},children:t}]}}function mm(e,t){return{id:e,type:"Button",props:{label:t,variant:"secondary"}}}function gm(e,t){var u,h;const r=vt({recipe:"report",meta:e,hostCapabilities:t.hostCapabilities});if(r.length>0)throw new Error(`compileReportPage: hostCapabilities rejected: ${r.map(f=>f.message).join("; ")}`);const n=((u=t.uiPolicy)==null?void 0:u.lang)??"id",o=t.docId??`report-${e.name.toLowerCase()}`,s=e.label[n]??e.name,i={};for(const f of e.filters??[])i[`filter_${f.field}`]=f.default??"";const a={};if(typeof e.dataSource!="string")if(Array.isArray(e.dataSource))a.rows=e.dataSource;else if(e.dataSource&&typeof e.dataSource=="object"&&"$query"in e.dataSource){const f=e.dataSource.$query,v=(e.filters??[]).map(y=>({field:y.field,op:y.widget==="DateRange"?"between":"eq",value:{$bind:`state.filter_${y.field}`}}));a.rows={$query:{...f,filters:v.length>0?v:f.filters}}}else e.dataSource&&typeof e.dataSource=="object"&&(a.rows=e.dataSource);const c=[],l=[...t.extraHeaderActions??[],mm("export-report-btn",n==="id"?"Ekspor":"Export")];if(c.push(hm(s,l)),e.filters&&e.filters.length>0){const f=e.filters.map(v=>{const y=v.label[n]??v.field;return v.widget==="Select"?{id:`filter-${v.field}`,type:"Select",style:{width:"w-52"},props:{label:y,value:{$bind:`state.filter_${v.field}`},options:[{value:"",label:n==="id"?`Semua ${y}`:`All ${y}`},...v.options??[]]},events:{onChange:[{setState:{path:`filter_${v.field}`,value:null}}]}}:{id:`filter-${v.field}`,type:"TextField",style:{width:"w-48"},props:{label:y,placeholder:y,value:{$bind:`state.filter_${v.field}`}},events:{onChange:[{setState:{path:`filter_${v.field}`,value:null}}]}}});c.push({id:"report-filter-strip",type:"Toolbar",style:{display:"flex",alignItems:"center",gap:"gap-3",padding:"p-4",borderWidth:"border-b",borderColor:Nr},children:f})}if(e.summaries&&e.summaries.length>0){const f=e.summaries;c.push({id:"report-summary-strip",type:"GridView",props:{style:{display:"grid",gridTemplateColumns:`repeat(${f.length}, minmax(0, 1fr))`}},style:{borderWidth:"border-b",borderColor:Nr},children:f.map((v,y)=>{var x;return{id:`summary-${y}`,type:"Column",style:{padding:"p-4",gap:"gap-1",...y<f.length-1?{borderWidth:"border-e",borderColor:Nr}:{}},children:[{id:`summary-${y}-label`,type:"Text",props:{value:v.label[n]??""},style:{fontSize:"text-sm",color:fm}},{id:`summary-${y}-value`,type:"Text",props:v.agg?{value:{$expr:{agg:v.agg,over:"data.rows",...v.agg==="count"?{}:{field:v.field}}},...v.agg==="count"?{format:"integer"}:{format:v.format??"number"},locale:n==="id"?"id-ID":"en-US",...(x=t.uiPolicy)!=null&&x.currency?{currency:t.uiPolicy.currency}:{}}:{value:String(v.value??"")},style:{fontSize:"text-xl",fontWeight:600}}]}})})}const d=e.columns.map(f=>({key:f.key,label:typeof f.label=="string"?f.label:f.label[n]??f.key,...f.align?{align:f.align}:{},...f.width?{width:f.width}:{},...f.format?{format:f.format}:{}}));return c.push({id:"report-table",type:"DataTable",props:{dataSource:typeof e.dataSource=="string"?e.dataSource:"rows",columns:d,paginate:!1,locale:n==="id"?"id-ID":"en-US",...(h=t.uiPolicy)!=null&&h.currency?{currency:t.uiPolicy.currency}:{}},style:{width:"w-full"}}),{version:"1.0.0",id:o,name:s,state:Object.keys(i).length>0?i:void 0,dataSources:Object.keys(a).length>0?a:void 0,root:{id:"page",type:"Column",style:{fontSize:"text-base",width:"w-full"},children:c}}}const Cc="{primitives.color.text-secondary}",Gr="{primitives.color.border}";function bm(e,t){return{id:"dashboard-header",type:"Navbar",style:{justifyContent:"space-between",alignItems:"center",padding:"px-4",height:"h-row-large",borderWidth:"border-b",borderColor:Gr},children:[{id:"dashboard-header-title",type:"Text",props:{value:e,heading:1},style:{fontSize:"text-xl",fontWeight:600}},{id:"dashboard-header-actions",type:"Toolbar",style:{display:"flex",gap:"gap-2"},children:t}]}}function vm(e,t){return{id:e,type:"GridView",props:{style:{display:"grid",gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`}},style:{borderWidth:"border-b",borderColor:Gr},children:t.map(([r,n],o)=>({id:`${e}-kpi-${o}`,type:"Column",style:{padding:"p-4",gap:"gap-1",...o<t.length-1?{borderWidth:"border-e",borderColor:Gr}:{}},children:[{id:`${e}-kpi-${o}-label`,type:"Text",props:{value:r},style:{fontSize:"text-sm",color:Cc}},{id:`${e}-kpi-${o}-value`,type:"Text",props:{value:n},style:{fontSize:"text-xl",fontWeight:600}}]}))}}function Cn(e,t,r={}){return{id:e,type:r.grid?"GridView":"Column",props:r.grid?{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(280px, 1fr))"}}:void 0,style:{padding:"p-4",gap:"gap-4",...r.border?{borderWidth:"border-b",borderColor:Gr}:{}},children:t}}function ym(e,t,r={}){return{id:e,type:"Text",props:{value:t},style:r}}function xm(e,t){var a;const r=((a=t.uiPolicy)==null?void 0:a.lang)??"id",n=t.docId??`dashboard-${e.name.toLowerCase()}`,o=e.label[r]??e.name,s=[];if(t.extraHeaderActions&&t.extraHeaderActions.length>0&&s.push(bm(o,t.extraHeaderActions)),e.kpis&&e.kpis.length>0){const c=e.kpis.map(l=>[l.label[r]??"",String(l.value)]);s.push(vm("dashboard-kpis",c))}if(e.shortcuts&&e.shortcuts.length>0){const c=e.shortcuts.map((l,d)=>{var f;const u=l.route??`${((f=t.routePolicy)==null?void 0:f.listBase)??"/app/list"}/${l.doctype}`.replace("//","/"),h=l.label[r]??l.doctype;return{id:`shortcut-${d}`,type:"Container",props:{className:"flex flex-col p-4 rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-875 hover:bg-gray-50 dark:hover:bg-gray-850 cursor-pointer shadow-sm transition-colors"},events:{onClick:[{navigate:{route:u}}]},children:[{id:`shortcut-${d}-title`,type:"Text",props:{value:h},style:{fontSize:"text-base",fontWeight:600}},...l.description?[{id:`shortcut-${d}-desc`,type:"Text",props:{value:l.description[r]??""},style:{fontSize:"text-sm",color:Cc,marginTop:"mt-1"}}]:[]]}});s.push(Cn("shortcuts-section",[ym("shortcuts-title",r==="id"?"Akses Cepat Modul":"Quick Navigation",{fontSize:"text-base",fontWeight:600}),{id:"shortcuts-grid",type:"GridView",props:{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))"}},style:{gap:"gap-4"},children:c}],{border:!0}))}if(e.charts&&e.charts.length>0){const c=e.charts.map(u=>({id:`chart-${u.id}`,type:"Chart",props:{title:u.title[r]??u.id,chartType:u.type,xKey:u.xKey,yKey:u.yKey,dataSource:typeof u.dataSource=="string"?u.dataSource:void 0,rows:Array.isArray(u.dataSource)?u.dataSource:void 0},style:u.style??{width:"w-full"}})),[l,...d]=c;l&&s.push(Cn("cashflow-section",[l],{border:!0})),d.length>0&&s.push(Cn("pnl-expenses-section",d,{border:!0,grid:!0}))}const i={...e.dataSources??{}};for(const c of e.charts??[])Array.isArray(c.dataSource)&&(i[`chart_${c.id}`]=c.dataSource);return{version:"1.0.0",id:n,name:o,dataSources:Object.keys(i).length>0?i:void 0,root:{id:"page",type:"Column",style:{gap:"gap-0",fontSize:"text-base",width:"w-full"},children:s}}}const wm="{primitives.color.border}",km="{primitives.color.text-secondary}";function Sm(e,t){return{id:"settings-header",type:"Navbar",style:{justifyContent:"space-between",alignItems:"center",padding:"px-4",height:"h-row-large",borderWidth:"border-b",borderColor:wm},children:[{id:"settings-header-title",type:"Text",props:{value:e,heading:1},style:{fontSize:"text-xl",fontWeight:600}},{id:"settings-header-actions",type:"Toolbar",style:{display:"flex",gap:"gap-2"},children:t}]}}function _m(e,t){return{id:e,type:"Text",props:{value:t,heading:3},style:{...kc}}}function Cm(e,t){var h;const r=vt({recipe:"settings",meta:e,hostCapabilities:t.hostCapabilities});if(r.length>0)throw new Error(`compileSettingsPage: hostCapabilities rejected: ${r.map(f=>f.message).join("; ")}`);const n=((h=t.uiPolicy)==null?void 0:h.lang)??"id",o=t.docId??`settings-${e.name.toLowerCase()}`,s=e.label[n]??e.name,i={formErrors:{},formError:"",formStatus:"idle"};for(const f of e.sections)for(const v of f.fields)i[v.key]=v.default??(v.widget==="Checkbox"||v.widget==="Switch"?!1:"");const a={id:"settings-save-btn",type:"Button",props:{label:n==="id"?"Simpan Pengaturan":"Save Settings",variant:"primary"},events:{onClick:[{command:{name:"workspace.settings.save",payload:{settings:e.name,values:{$expr:{path:"state"}}},statusPath:"formStatus",errorPath:"formError"}}]}},c=[...t.extraHeaderActions??[],a],l=[];for(const f of e.sections){l.push(_m(`section-${f.id}`,f.label[n]??f.id));for(const v of f.fields){const y=$m(v,e.name),x=`${v.label[n]??v.key}${v.required?" *":""}`;l.push({id:`row-${v.key}`,type:"Row",props:{style:{...yc}},style:{...vc},children:[{id:`row-${v.key}-label`,type:"Text",props:{value:x},style:{...xc}},{id:`row-${v.key}-control`,type:"Column",style:{...wc},children:[Ro(y,x)]}]})}}l.length===0&&l.push({id:"settings-empty",type:"Text",props:{value:n==="id"?"Tidak ada pengaturan":"No settings"},style:{padding:"p-4",color:km}});const d={id:"settings-form",type:"Form",style:{display:"flex",flexDirection:"column"},children:l},u={id:"settings-error",type:"Text",props:{value:{$bind:"state.formError"}},style:{padding:"px-4",color:"{primitives.color.error}"},visibility:{condition:{"!=":[{path:"state.formError"},{literal:""}]}}};return{version:"1.0.0",id:o,name:s,state:i,root:{id:"page",type:"Column",style:{fontSize:"text-base",width:"w-full"},children:[Sm(s,c),d,u]}}}function $m(e,t,r){const n=_e("settings",t,e.key),o={error:{$bind:`state.formErrors.${e.key}`}};return e.widget==="Checkbox"||e.widget==="Switch"?{id:n,type:e.widget,props:{...o,checked:{$bind:`state.${e.key}`}},events:{onChange:[{setState:{path:e.key,value:null}}]}}:e.widget==="Select"||e.widget==="RadioGroup"?{id:n,type:e.widget,props:{...o,value:{$bind:`state.${e.key}`},options:e.options??[]},events:{onChange:[{setState:{path:e.key,value:null}}]}}:e.widget==="Textarea"?{id:n,type:"Textarea",props:{...o,value:{$bind:`state.${e.key}`}},events:{onChange:[{setState:{path:e.key,value:null}}]}}:{id:n,type:"TextField",props:{...o,value:{$bind:`state.${e.key}`}},events:{onChange:[{setState:{path:e.key,value:null}}]}}}const jr="{primitives.color.border}";function Mm(e,t){return{id:"tree-header",type:"Navbar",style:{justifyContent:"space-between",alignItems:"center",padding:"px-4",height:"h-row-large",borderWidth:"border-b",borderColor:jr},children:[{id:"tree-header-title",type:"Text",props:{value:e,heading:1},style:{fontSize:"text-xl",fontWeight:600}},{id:"tree-header-actions",type:"Toolbar",style:{display:"flex",gap:"gap-2"},children:t}]}}function Am(e,t){var f,v;const r=vt({recipe:"tree",meta:e,hostCapabilities:t.hostCapabilities});if(r.length>0)throw new Error(`compileTreePage: hostCapabilities rejected: ${r.map(y=>y.message).join("; ")}`);const n=((f=t.uiPolicy)==null?void 0:f.lang)??"id",o=t.docId??`tree-${e.name.toLowerCase()}`,s=e.label[n]??e.name,i={selectedKey:"",search:""},a={id:"tree-create-btn",type:"Button",props:{label:n==="id"?`+ ${e.label.id}`:`+ New ${e.label.en}`,variant:"primary"},events:{onClick:[{navigate:{route:`${((v=t.routePolicy)==null?void 0:v.formBase)??"/app/edit"}/${e.name}/new`.replace("//","/")}}]}},c={id:"tree-search",type:"TextField",style:{width:"w-64"},props:{placeholder:n==="id"?"Cari…":"Search…",value:{$bind:"state.search"}},events:{onChange:[{setState:{path:"search",value:null}}]}},l=y=>{var x;return{id:y.key,label:y.label[n]??y.key,children:(x=y.children)==null?void 0:x.map(l)}},d=e.nodes.map(l),u={id:"tree-view",type:"TreeView",props:{title:s,items:d},events:{onNodeClick:[{setState:{path:"selectedKey",value:{$bind:"event.id"}}}]},style:{width:"w-full",padding:"p-4"}},h={id:"tree-detail",type:"Column",style:{padding:"p-4",gap:"gap-2",borderWidth:"border",borderColor:jr,borderRadius:"{primitives.radius.md}"},children:[{id:"tree-detail-title",type:"Text",props:{value:{$bind:"state.selectedKey"}},style:{fontSize:"text-lg",fontWeight:600}},{id:"tree-detail-placeholder",type:"Text",props:{value:n==="id"?"Pilih node untuk melihat detail":"Select a node to view details"},style:{color:"{primitives.color.text-secondary}",fontSize:"text-sm"}}]};return{version:"1.0.0",id:o,name:s,state:i,dataSources:{nodes:d},root:{id:"page",type:"Column",style:{fontSize:"text-base",width:"w-full"},children:[Mm(s,[a,...t.extraHeaderActions??[]]),{id:"tree-toolbar",type:"Toolbar",style:{display:"flex",gap:"gap-3",padding:"p-4",borderWidth:"border-b",borderColor:jr},children:[c]},{id:"tree-layout",type:"Row",style:{display:"flex",gap:"gap-4",padding:"p-4"},children:[{id:"tree-pane",type:"Container",style:{width:"w-1/3",borderWidth:"border",borderColor:jr,borderRadius:"{primitives.radius.md}"},children:[u]},{id:"detail-pane",type:"Container",style:{width:"w-2/3"},children:[h]}]}]}}}const Bn="{primitives.color.border}";function Nm(e,t){return{id:"wizard-header",type:"Navbar",style:{justifyContent:"space-between",alignItems:"center",padding:"px-4",height:"h-row-large",borderWidth:"border-b",borderColor:Bn},children:[{id:"wizard-header-title",type:"Text",props:{value:e,heading:1},style:{fontSize:"text-xl",fontWeight:600}},{id:"wizard-header-actions",type:"Toolbar",style:{display:"flex",gap:"gap-2"},children:t}]}}function jm(e,t,r){const n=_e("wizard",t,e.key),o={};return e.widget==="Checkbox"||e.widget==="Switch"?{id:n,type:e.widget,props:{...o,checked:{$bind:`state.${e.key}`}},events:{onChange:[{setState:{path:e.key,value:null}}]}}:e.widget==="Select"||e.widget==="RadioGroup"?{id:n,type:e.widget,props:{...o,value:{$bind:`state.${e.key}`},options:e.options??[]},events:{onChange:[{setState:{path:e.key,value:null}}]}}:e.widget==="Textarea"?{id:n,type:"Textarea",props:{...o,value:{$bind:`state.${e.key}`}},events:{onChange:[{setState:{path:e.key,value:null}}]}}:{id:n,type:"TextField",props:{...o,value:{$bind:`state.${e.key}`}},events:{onChange:[{setState:{path:e.key,value:null}}]}}}function Rm(e,t){var d;const r=vt({recipe:"wizard",meta:e,hostCapabilities:t.hostCapabilities});if(r.length>0)throw new Error(`compileWizardPage: hostCapabilities rejected: ${r.map(u=>u.message).join("; ")}`);const n=((d=t.uiPolicy)==null?void 0:d.lang)??"id",o=t.docId??`wizard-${e.name.toLowerCase()}`,s=e.label[n]??e.name,i={currentStep:0,formErrors:{},formError:""};for(const u of e.steps)for(const h of u.fields)i[h.key]=h.default??"";const a={id:"wizard-stepper",type:"Toolbar",style:{display:"flex",gap:"gap-2",padding:"p-4",borderWidth:"border-b",borderColor:Bn},children:e.steps.map((u,h)=>({id:`wizard-step-${u.id}`,type:"Badge",props:{label:u.label[n]??u.id,color:h===0?"blue":"gray",variant:"pill"}}))},c=e.steps.map((u,h)=>({id:`wizard-panel-${u.id}`,type:"Column",style:{gap:"gap-4",padding:"p-4"},children:[{id:`wizard-panel-${u.id}-title`,type:"Text",props:{value:u.label[n]??u.id,heading:2},style:{fontSize:"text-lg",fontWeight:600}},...u.fields.map(f=>{const v=jm(f,e.name);return{id:`wizard-row-${f.key}`,type:"Row",style:{display:"flex",gap:"gap-4",alignItems:"center"},children:[{id:`wizard-row-${f.key}-label`,type:"Text",props:{value:f.label[n]??f.key},style:{width:"w-1/3",fontSize:"text-sm"}},{id:`wizard-row-${f.key}-control`,type:"Container",style:{width:"w-2/3"},children:[v]}]}})],visibility:{condition:{"==":[{path:"state.currentStep"},{literal:h}]}}})),l={id:"wizard-nav",type:"Toolbar",style:{display:"flex",justifyContent:"space-between",padding:"p-4",borderWidth:"border-t",borderColor:Bn},children:[{id:"wizard-prev-btn",type:"Button",props:{label:n==="id"?"Kembali":"Back",variant:"secondary"},events:{onClick:[{setState:{path:"currentStep",value:{$expr:{path:"state.currentStep - 1"}}}}]}},{id:"wizard-next-btn",type:"Button",props:{label:n==="id"?"Lanjut":"Next",variant:"secondary"},events:{onClick:[{setState:{path:"currentStep",value:{$expr:{path:"state.currentStep + 1"}}}}]},visibility:{condition:{"<":[{path:"state.currentStep"},{literal:e.steps.length-1}]}}},{id:"wizard-submit-btn",type:"Button",props:{label:n==="id"?"Selesai":"Submit",variant:"primary"},events:{onClick:[{mutate:{operation:"create",collection:e.name,payload:Object.fromEntries(e.steps.flatMap(u=>u.fields.map(h=>[h.key,{$expr:{path:`state.${h.key}`}}]))),statusPath:"formStatus",errorPath:"formError",fieldErrorsPath:"formErrors"}}]},visibility:{condition:{"==":[{path:"state.currentStep"},{literal:e.steps.length-1}]}}}]};return{version:"1.0.0",id:o,name:s,state:i,root:{id:"page",type:"Column",style:{fontSize:"text-base",width:"w-full"},children:[Nm(s,t.extraHeaderActions??[]),a,...c,{id:"wizard-error",type:"Text",props:{value:{$bind:"state.formError"}},style:{padding:"px-4",color:"{primitives.color.error}"},visibility:{condition:{"!=":[{path:"state.formError"},{literal:""}]}}},l]}}}exports.ActionInterpreter=Ea;exports.ActionSchema=Je;exports.ActionsSchema=pf;exports.Badge=Qn;exports.BarcodeSVG=wi;exports.Button=Xn;exports.DataError=ke;exports.DataMatrixSVG=ki;exports.DesignTokensSchema=Ia;exports.Dialog=oo;exports.DocumentSchema=Fr;exports.Drawer=yi;exports.Editor=Oh;exports.HttpAdapter=Ba;exports.ICON_NAMES=zl;exports.ICON_PATHS=Jr;exports.Icon=jt;exports.IconWidget=ui;exports.InMemoryAdapter=Va;exports.MERIDIAN_DONUT_COLORS=qt;exports.MERIDIAN_SERIES_COLORS=An;exports.MeridianBarChart=hi;exports.MeridianDonutChart=gi;exports.MeridianLineChart=mi;exports.PAGE_RECIPES=mc;exports.QRCodeSVG=xi;exports.REGISTRY_VERSION=xo;exports.Snackbar=no;exports.ThemePresetsSchema=Oa;exports.UIDL_RUNTIME_VERSION=Pa;exports.UIDocumentRenderer=za;exports.compileDashboardPage=xm;exports.compileFormPage=pm;exports.compileListPage=Uh;exports.compileReportPage=gm;exports.compileSettingsPage=Cm;exports.compileTreePage=Am;exports.compileWizardPage=Rm;exports.createDocumentState=Mi;exports.createEventBus=vo;exports.createHttpAdapter=Tf;exports.createInMemoryAdapter=jf;exports.createInlineArrayResolver=Pp;exports.createRegistry=Si;exports.createRenderContext=yo;exports.createThemeEngine=_i;exports.createThemeRegistry=jp;exports.defaultDarkPreset=vf;exports.defaultDarkTheme=wo;exports.defaultLightPreset=bf;exports.defaultLightTheme=tt;exports.defaultRegistry=Et;exports.deserializeTheme=Cf;exports.deserializeThemePreset=$f;exports.formatCellValue=Gn;exports.formatIndonesianDate=Lh;exports.formatRupiah=Dh;exports.formatTerbilang=hc;exports.generateJsonSchemas=hf;exports.generateUidlFromPrompt=Vh;exports.getByPath=We;exports.getRegistryFingerprint=qp;exports.getRegistryVersion=Kp;exports.getTheme=go;exports.getThemePreset=$a;exports.hasIcon=Pl;exports.isDataError=zp;exports.isNumericFormat=Un;exports.isPageRecipe=Bh;exports.isQueryDataSource=ir;exports.listPresets=Aa;exports.listThemes=Ma;exports.meridianDarkPreset=kf;exports.meridianDarkTheme=Fa;exports.meridianLightPreset=wf;exports.meridianLightTheme=ko;exports.normalizeNodeResponsive=Ci;exports.parseListQueryParams=Gh;exports.prefixFormat=Jn;exports.registerComponent=xd;exports.registerTheme=_a;exports.registerThemePreset=Ca;exports.renderUIDocument=Gp;exports.resolveQueryDescriptor=bo;exports.runDataSources=ja;exports.semanticListNodeIds=gc;exports.semanticNodeId=_e;exports.serializeListQueryParams=Jh;exports.serializeResolvedQueries=Ra;exports.serializeTheme=Sf;exports.serializeThemePreset=_f;exports.setByPath=Ai;exports.statusColor=di;exports.t=Ih;exports.themeToCssVariables=Rp;exports.themeToCssVariablesMap=Na;exports.themeToTailwindV3=Tp;exports.themeToTailwindV4=Ep;exports.useElementWidth=pi;exports.validateHostCapabilities=vt;exports.validateResponsiveStyle=Mf;exports.validateResponsiveValue=La;
|
|
98
|
+
//# sourceMappingURL=uidl-runtime.js.map
|