@absoluteui/mcp 0.13.1 → 0.13.2

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/README.md CHANGED
@@ -40,4 +40,4 @@ Full documentation: [aui.kasadara.com/docs/guides/ai-assistants/](https://aui.ka
40
40
 
41
41
  ## License
42
42
 
43
- Licensed under the [Apache License 2.0](https://aui.kasadara.com/license/). Copyright (c) 2026 Kasadara Technology Solutions Pvt Ltd; see the LICENSE and NOTICE files in this package. AbsoluteUI is open source, Kasadara's contribution to the open-source community; the source is at https://github.com/Kasadara-Technology-Solutions-Pvt-Ltd/AbsoluteUI. Report vulnerabilities as described in the [Security Policy](https://aui.kasadara.com/security/).
43
+ Licensed under the [Apache License 2.0](https://aui.kasadara.com/license/). Copyright (c) 2026 Kasadara Technology Solutions Pvt Ltd; see the LICENSE and NOTICE files in this package. AbsoluteUI is open source, Kasadara's contribution to the open-source community; the source is at https://github.com/kasadara-labs/AbsoluteUI. Report vulnerabilities as described in the [Security Policy](https://aui.kasadara.com/security/).
package/SECURITY.md CHANGED
@@ -27,7 +27,7 @@ The current release line is `0.13`. Until `1.0`, security fixes ship as patch re
27
27
 
28
28
  Report privately through either channel:
29
29
 
30
- - **GitHub (preferred):** open a private vulnerability report at https://github.com/Kasadara-Technology-Solutions-Pvt-Ltd/AbsoluteUI/security/advisories/new (the **Report a vulnerability** button on the repository's **Security** tab). Only you and the AbsoluteUI maintainers can see it, and we can work on the fix and the advisory with you there.
30
+ - **GitHub (preferred):** open a private vulnerability report at https://github.com/kasadara-labs/AbsoluteUI/security/advisories/new (the **Report a vulnerability** button on the repository's **Security** tab). Only you and the AbsoluteUI maintainers can see it, and we can work on the fix and the advisory with you there.
31
31
  - **Email:** security@kasadara.com
32
32
 
33
33
  The email contact is also published in `/.well-known/security.txt` on each AbsoluteUI website.
@@ -64,7 +64,7 @@ Targets are objectives, not guarantees. See Section 7 (Disclaimer of Warranty) o
64
64
 
65
65
  ## Security Advisories
66
66
 
67
- Advisories are published as GitHub security advisories at https://github.com/Kasadara-Technology-Solutions-Pvt-Ltd/AbsoluteUI/security/advisories and at https://aui.kasadara.com/advisory/. They include:
67
+ Advisories are published as GitHub security advisories at https://github.com/kasadara-labs/AbsoluteUI/security/advisories and at https://aui.kasadara.com/advisory/. They include:
68
68
 
69
69
  - affected packages and versions;
70
70
  - fixed versions;
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- /*! AbsoluteUI @absoluteui/mcp v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
+ /*! AbsoluteUI @absoluteui/mcp v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
3
3
  import{stdin as Go,stdout as Zo}from"node:process";var Z={ParseError:-32700,InvalidRequest:-32600,MethodNotFound:-32601,InvalidParams:-32602,InternalError:-32603,LegacyResourceNotFound:-32002,UnsupportedProtocolVersion:-32022},oe=class extends Error{code;data;constructor(n,t,r){super(t),this.name="RpcError",this.code=n,this.data=r}toBody(){return this.data===void 0?{code:this.code,message:this.message}:{code:this.code,message:this.message,data:this.data}}};function z(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ot(e){return typeof e=="string"||typeof e=="number"&&Number.isInteger(e)}function It(e){let n;try{n=JSON.parse(e)}catch{return{kind:"invalid",id:null,error:{code:Z.ParseError,message:"Parse error: the line is not valid JSON."}}}if(Array.isArray(n))return{kind:"invalid",id:null,error:{code:Z.InvalidRequest,message:"Invalid request: JSON-RPC batches are not supported."}};if(!z(n))return{kind:"invalid",id:null,error:{code:Z.InvalidRequest,message:"Invalid request: a message must be a JSON object."}};let t=n.id,r="id"in n,o=Ot(t)?t:null;if(n.jsonrpc!=="2.0")return{kind:"invalid",id:o,error:{code:Z.InvalidRequest,message:'Invalid request: "jsonrpc" must be "2.0".'}};let s=n.method;if(typeof s!="string")return"result"in n||"error"in n?{kind:"ignored"}:{kind:"invalid",id:o,error:{code:Z.InvalidRequest,message:'Invalid request: "method" must be a string.'}};let i=n.params;return i!==void 0&&!z(i)?{kind:"invalid",id:o,error:{code:Z.InvalidParams,message:'Invalid params: "params" must be an object.'}}:r?Ot(t)?{kind:"request",id:t,method:s,params:i}:{kind:"invalid",id:null,error:{code:Z.InvalidRequest,message:'Invalid request: "id" must be a string or an integer.'}}:{kind:"notification",method:s,params:i}}function Rt(e,n){return{jsonrpc:"2.0",id:e,result:n}}function $e(e,n){return{jsonrpc:"2.0",id:e,error:n}}function dt(e){return Array.isArray(e)}function re(e){return typeof e=="string"?e:""}import{env as Pn,stderr as Un}from"node:process";var Dn=Pn.ABSOLUTEUI_MCP_DEBUG==="1";function Ne(e){Dn&&Un.write(`[absoluteui-mcp] ${e}
4
4
  `)}var jt=1048576;function Ct(e,n){let{input:t,output:r}=n,o=new Set,s="",i=!1,u=!1,f=a=>{u||r.write(`${JSON.stringify(a)}
5
5
  `)},l=a=>{let p=a.endsWith("\r")?a.slice(0,-1):a;if(p.trim()==="")return;let m=e.handle(It(p)).then(c=>{c&&f(c)}).catch(c=>{Ne(`unexpected: ${c instanceof Error?c.message:String(c)}`)});o.add(m),m.finally(()=>o.delete(m))};return new Promise(a=>{r.on("error",()=>{u=!0,a()}),t.setEncoding("utf8"),t.on("data",p=>{s+=typeof p=="string"?p:p.toString("utf8");let m=s.indexOf(`
@@ -8,7 +8,7 @@ import{stdin as Go,stdout as Zo}from"node:process";var Z={ParseError:-32700,Inva
8
8
  `).trim();i&&n.push([t,i])};for(let i of e.split(`
9
9
  `)){/^\s*(```|~~~)/.test(i)&&(o=!o);let u=o?null:/^## (.+)$/.exec(i);u?(s(),t=(u[1]??"").trim(),r=[]):r.push(i)}return s(),n}function Q(e,n){let t=e[n];return typeof t=="string"?t:void 0}function Te(e,n){let t=e[n];return Array.isArray(t)?t.filter(r=>typeof r=="string"):void 0}function ae(e,n){let t=e[n];if(typeof t!="string")throw new se(`"${n}" is required.`);return t}function U(e){if(e===null||typeof e=="string"||typeof e=="boolean")return e;if(typeof e=="number")return Number.isFinite(e)?e:null;if(Array.isArray(e))return e.map(U);if(typeof e=="object"){let n={};for(let[t,r]of Object.entries(e))r!==void 0&&(n[t]=U(r));return n}return null}var Me={type:"string",minLength:1,maxLength:128},me=e=>({type:"object",required:[...e]}),ht=["overview","highlights","options","methods","events","properties","keyboard","accessibility","behavior","performance","tokens","css","security","limitations","usage","typescript"],to=["overview","options","events"],Qt=["core","utilities","helpers","theme","icons","services"];function yt(e,n){return e.sections.find(t=>t.number===n)?.body}function Oe(e,n){let t={};for(let r of n){let o=e.sections.find(s=>s.number===r);o&&(t[o.heading]=o.body)}return t}function no(e,n,t){let r=n.component,o=n.accessibility;switch(t){case"overview":return U({displayName:n.displayName,purpose:n.purpose,group:n.group,category:n.category,import:n.import,styleImport:n.styleImport,whenToUse:n.whenToUse,whenNotToUse:n.whenNotToUse,introduction:yt(n,1),anatomy:yt(n,2),angular:n.angularEntry?`@absoluteui/angular/${n.angularEntry}`:null,showcases:n.showcases});case"highlights":return U(n.highlights);case"options":return U({factory:n.api.factory,configKey:n.api.configKey??null,options:n.api.options});case"methods":return U(n.api.methods??[]);case"events":return U(n.api.events??[]);case"properties":return U(n.api.properties??[]);case"keyboard":return U({keyboard:o.keyboard??[],focus:o.focus??null});case"accessibility":return U({pattern:o.pattern,roles:o.roles,aria:o.aria,wcag:o.wcag,notes:o.notes,knownCaveats:o.knownCaveats,...Oe(n,[15])});case"behavior":return U({states:r.states,responsive:r.responsive,rtl:r.rtl,theme:r.theme,timezone:r.timezone,...Oe(n,[12,16,17,18,19,20,21,22,28,29])});case"performance":return U({performance:r.performance,importCost:n.importCost,...Oe(n,[25,26])});case"tokens":return U({globalTokens:n.tokens,componentTokens:e.tokens.components.find(s=>s.component===n.name)?.tokens??[],themingGuide:`${e.docsUrl}/guides/theming/`});case"css":return U({cssClasses:n.api.cssClasses??[],contentAreas:n.api.contentAreas??[],iconSlots:n.api.iconSlots??[]});case"security":return U({security:r.security,dataHandling:r.dataHandling,...Oe(n,[23,24])});case"limitations":return U({limitations:r.limitations,unsupported:r.unsupported,antiPatterns:r.antiPatterns,...Oe(n,[30,31])});case"usage":return U(Oe(n,[33,27]));case"typescript":return U(yt(n,32)??"")}}function en(e,n){let t=new Map(e.components.map(g=>[g.name,g])),r=new Map(e.addons.map(g=>[g.name,g])),o=[...t.keys(),...r.keys()],s=new Set(e.excluded),i=g=>w=>({truncated:!0,message:`The "${w}" part is too large for one answer; read it at ${g}.`,docUrl:g}),u=g=>t.get(g.toLowerCase().replace(/^aui-/,"").replace(/\s+/g,"-")),f=g=>{let w=g.toLowerCase();if(s.has(w))throw new se(`'${w}' is not part of AbsoluteUI (removed or on hold). Search for an alternative with search_docs.`);return ee("component",g,o)},l={name:"search_docs",title:"Search the AbsoluteUI docs",description:"Ranked search over AbsoluteUI components, package APIs, Angular bindings, guides, design tokens, and icons of this version. Returns ids and resource URIs for the get_* tools.",inputSchema:{type:"object",additionalProperties:!1,required:["query"],properties:{query:{type:"string",minLength:1,maxLength:200,description:'Words to search for, such as "date range with business days".'},kinds:{type:"array",items:{enum:[...Fe]},uniqueItems:!0,maxItems:Fe.length,description:"Restrict to these kinds."},limit:{type:"integer",minimum:1,maximum:25,description:"Maximum hits (default 10)."}}},outputSchema:{type:"object",required:["query","hits"],properties:{query:{type:"string"},hits:{type:"array",items:{type:"object",required:["kind","id","title","uri"]}}}},run:g=>{let w=ae(g,"query"),b=Te(g,"kinds")?.filter(J=>Fe.includes(J)),A=typeof g.limit=="number"?g.limit:10,T=n.search(w,{...b?{kinds:b}:{},limit:A});return{query:w,hits:U(T)}}},a=[...new Set(e.components.map(g=>g.group))],p={name:"list_components",title:"List AbsoluteUI components",description:'Without a group: every component name by group. With a group (such as "Forms" or "Charts"): each component of the group with its purpose, when to use it, and its imports.',inputSchema:{type:"object",additionalProperties:!1,properties:{group:{type:"string",minLength:1,maxLength:64,description:`One of: ${a.join(", ")}.`}}},outputSchema:me(["version"]),run:g=>{let w=Q(g,"group");if(w===void 0)return{version:e.version,groups:a.map(A=>({group:A,components:e.components.filter(T=>T.group===A).map(T=>({name:T.name,displayName:T.displayName}))})),addons:e.addons.map(A=>({name:A.name,summary:A.summary}))};let b=a.find(A=>A.toLowerCase()===w.toLowerCase());return b?{version:e.version,group:b,components:e.components.filter(A=>A.group===b).map(A=>({name:A.name,displayName:A.displayName,purpose:Be(A.purpose),whenToUse:A.whenToUse[0]??"",import:A.import,styleImport:A.styleImport,docUrl:A.docUrl}))}:ee("group",w,a)}},m={name:"get_component",title:"Get a component reference",description:'The reference of one component: overview, options, methods, events, properties, keyboard, accessibility, behavior, performance, tokens, CSS hooks, security, limitations, usage, and TypeScript definitions. Defaults to overview, options, and events. Parts that do not fit one answer are listed in "omitted"; ask for them by name.',inputSchema:{type:"object",additionalProperties:!1,required:["name"],properties:{name:{...Me,description:'Component name, such as "date-picker" (add-on entry points such as "data-grid-export" also work).'},sections:{type:"array",items:{enum:[...ht]},uniqueItems:!0,minItems:1,maxItems:ht.length}}},outputSchema:me(["name","docUrl"]),run:g=>{let w=ae(g,"name"),b=u(w);if(!b){let I=r.get(w.toLowerCase());if(!I)return f(w);let H=gt(I.markdown).map(([V,ct])=>[V,ct]),R=["API",U(I.api.map(V=>({name:V.name,kind:V.kind,signature:V.signature,doc:Be(V.doc)})))],{included:L,omitted:C}=ue([...H,R],ie-600,i(I.docUrl));return{name:I.name,import:I.import,summary:I.summary,docUrl:I.docUrl,sections:L,omitted:C}}let A=Te(g,"sections")??to,{included:T,omitted:J}=ue(A.map(I=>[I,no(e,b,I)]),ie-600,i(b.docUrl));return{name:b.name,displayName:b.displayName,docUrl:b.docUrl,version:e.version,sections:T,omitted:J,available:[...ht]}}},c={name:"get_examples",title:"Get component examples",description:'Type-checked examples of a component (TypeScript by default, or Angular), or the source of its fully featured showcase. Examples that do not fit are listed in "omitted"; ask for them with "ids".',inputSchema:{type:"object",additionalProperties:!1,required:["name"],properties:{name:Me,framework:{enum:["ts","angular"]},kind:{enum:["examples","showcase"]},ids:{type:"array",items:{type:"string",maxLength:128},uniqueItems:!0,minItems:1,maxItems:50}}},outputSchema:me(["name","examples"]),run:g=>{let w=ae(g,"name"),b=u(w);if(!b)return f(w);let A=Q(g,"kind")??"examples",T=Q(g,"framework")??"ts",J=Te(g,"ids"),I;if(A==="showcase")I=e.showcases.filter(L=>L.components.includes(b.name)).map(L=>[L.id,U({title:L.title,components:L.components,language:"ts",code:L.code})]);else if(T==="angular"){let L=e.angular.find(C=>C.entry===b.angularEntry);I=(L?.examples??[]).map((C,V)=>[`angular-${String(V+1)}`,U({language:C.language,code:C.code,import:L?.import})])}else I=b.examples.map(L=>[L.id,U({title:L.title,language:L.language,code:L.code})]);if(J){let L=I.map(([C])=>C);for(let C of J)L.includes(C)||ee("example id",C,L);I=I.filter(([C])=>J.includes(C))}let{included:H,omitted:R}=ue(I,ie-800,i(b.docUrl));return{name:b.name,kind:A,framework:A==="showcase"?"ts":T,styleImport:b.styleImport,examples:H,omitted:R,docUrl:b.docUrl}}},h=g=>U({import:g.import,summary:g.summary,preview:g.preview,docUrl:g.docUrl}),k={name:"get_api",title:"Get a package API",description:"The API of an AbsoluteUI package (core, utilities, helpers, theme, icons, services): its modules, the exports of a module, or one symbol with its signature, documentation, and examples. @absoluteui/services is in preview.",inputSchema:{type:"object",additionalProperties:!1,required:["package"],properties:{package:{enum:[...Qt]},module:{type:"string",minLength:1,maxLength:64,description:'Subpath module, such as "date" for @absoluteui/helpers/date, or "designer" for @absoluteui/theme/designer.'},symbol:{type:"string",minLength:1,maxLength:128,description:'Exported name, such as "addBusinessDays".'}}},outputSchema:me(["package"]),run:g=>{let w=ae(g,"package"),b=Q(g,"module"),A=Q(g,"symbol"),T=e.api.filter(C=>C.package===w),J=T.some(C=>C.module!==null&&T.every(V=>V.module!==null)),I;if(b!==void 0){let C=T.find(V=>V.module===b);if(!C)return ee(`module of @absoluteui/${w}`,b,T.map(V=>V.module??"index"));I=[C]}else{if(J&&A===void 0)return{package:w,preview:T.some(C=>C.preview),modules:T.map(C=>({module:C.module,...h(C)}))};I=J?T:T.filter(C=>C.module===null)}if(A!==void 0){for(let C of I){let V=C.items.find(ct=>ct.name===A);if(V)return{package:w,module:C.module,import:C.import,preview:C.preview,symbol:U(V),docUrl:C.docUrl}}return ee(`symbol of @absoluteui/${w}${b?`/${b}`:""}`,A,I.flatMap(C=>C.items.map(V=>V.name)))}let H=I[0];if(!H)return ee("package",w,[...Qt]);let R=H.items.map(C=>({name:C.name,kind:C.kind,group:C.module,summary:Be(C.doc),deprecated:C.deprecated!==null})),L=H.howTo.length+De(U(R))<ie-1e3?H.howTo:`${H.howTo.slice(0,Math.max(0,ie-1e3-De(U(R))))}
10
10
 
11
- [Truncated: see ${H.docUrl}]`;return{package:w,module:H.module,...h(H),howTo:L,exports:R}}},x=e.angular.map(g=>g.entry),$=g=>{let w=g.trim(),b=w.replace(/^@absoluteui\/angular\/?/,"").replace(/^aui-/,"");return e.angular.find(A=>A.entry===(b===""?"index":b))??e.angular.find(A=>A.declarations.some(T=>T.name===w||T.selector===w))},_={name:"get_angular",title:"Get an Angular binding",description:'An @absoluteui/angular entry point: selector, inputs, models, outputs, forms integration, templates, and its Angular example. Accepts the entry ("select"), the selector ("aui-select"), or the class ("AuiSelect").',inputSchema:{type:"object",additionalProperties:!1,required:["name"],properties:{name:Me,declaration:{type:"string",minLength:1,maxLength:128,description:"Only this declaration (class name) of the entry."}}},outputSchema:me(["entry","import"]),run:g=>{let w=ae(g,"name"),b=$(w);if(!b)return s.has(w.toLowerCase())?f(w):ee("Angular entry point",w,x);let A=Q(g,"declaration"),T=b.declarations.filter(R=>A===void 0||R.name===A);if(A!==void 0&&T.length===0)return ee(`declaration of ${b.import}`,A,b.declarations.map(R=>re(R.name)));let J=[["examples",U(b.examples)],...T.map(R=>[re(R.name),R])],{included:I,omitted:H}=ue(J,ie-600,i(b.docUrl));return{entry:b.entry,import:b.import,component:b.component,title:b.title,summary:b.summary,docUrl:b.docUrl,parts:I,omitted:H}}},v=e.guides.map(g=>g.slug),N=g=>{let w=g.trim().replace(/^\/+|\/+$/g,"").replace(/^docs\//,"").toLowerCase();return e.guides.find(b=>b.slug===w)??e.guides.find(b=>b.slug.endsWith(`/${w}`))??e.guides.find(b=>b.title.toLowerCase()===w)},y={name:"get_guide",title:"Get a guide",description:`A getting-started page, guide, or Angular guide as Markdown. Long guides return their outline and first sections; ask for one "section" by its heading. Slugs: ${v.join(", ")}.`,inputSchema:{type:"object",additionalProperties:!1,required:["slug"],properties:{slug:Me,section:{type:"string",minLength:1,maxLength:200}}},outputSchema:me(["slug","title","docUrl"]),run:g=>{let w=ae(g,"slug"),b=N(w);if(!b)return ee("guide",w,v);let A=gt(b.markdown),T=A.map(([R])=>R),J=Q(g,"section");if(J!==void 0){let R=A.find(([C])=>C.toLowerCase()===J.toLowerCase());if(!R)return ee(`section of ${b.slug}`,J,T);let L=ue([[R[0],R[1]]],ie-600,i(b.docUrl));return{slug:b.slug,title:b.title,docUrl:b.docUrl,outline:T,sections:L.included}}let{included:I,omitted:H}=ue(A.map(([R,L])=>[R,L]),ie-1200,i(b.docUrl));return{slug:b.slug,title:b.title,description:b.description,docUrl:b.docUrl,outline:T,sections:I,omitted:H}}},O=()=>{let g=Object.keys(e.tokens.themes[0]?.tokens??{});return[...new Set(g.map(w=>w.split("-")[0]??w))].sort()},E=g=>Object.fromEntries(e.tokens.themes.map(w=>[w.name,w.tokens[g]??null])),j={name:"get_tokens",title:"Get design tokens",description:'Design tokens: the component tokens of one component (CSS custom properties with their fallbacks) and the global tokens it reads, with values per built-in theme; or the global tokens of one group (such as "color" or "space"); or, without arguments, the groups and components that have tokens.',inputSchema:{type:"object",additionalProperties:!1,properties:{component:Me,group:{type:"string",minLength:1,maxLength:64}}},outputSchema:me(["themes"]),run:g=>{let w=Q(g,"component"),b=Q(g,"group"),A=e.tokens.themes.map(T=>({name:T.name,mode:T.mode}));if(w!==void 0){let T=w.toLowerCase(),J=e.tokens.components.find(V=>V.component===T),I=t.get(T);if(!J&&!I)return ee("component with tokens",w,[...new Set([...e.tokens.components.map(V=>V.component),...t.keys()])]);let H=(I?.tokens??[]).map(V=>({name:V,cssProperty:`--aui-${V}`,values:E(V)})),R=[["componentTokens",U(J?.tokens??[])],["globalTokens",U(H)]],{included:L,omitted:C}=ue(R,ie-600,()=>({truncated:!0,docUrl:`${e.docsUrl}/guides/theming/`}));return{themes:U(A),component:T,...L,omitted:C}}if(b!==void 0){let T=O();if(!T.includes(b.toLowerCase()))return ee("token group",b,T);let J=Object.keys(e.tokens.themes[0]?.tokens??{}).filter(I=>I===b.toLowerCase()||I.startsWith(`${b.toLowerCase()}-`));return{themes:U(A),group:b.toLowerCase(),tokens:J.map(I=>({name:I,cssProperty:`--aui-${I}`,values:E(I)})),densities:U(Object.fromEntries(Object.entries(e.tokens.densities).map(([I,H])=>[I,Object.fromEntries(Object.entries(H).filter(([R])=>J.includes(R)))])))}}return{themes:U(A),groups:O(),componentsWithTokens:e.tokens.components.map(T=>T.component),docUrl:`${e.docsUrl}/guides/theming/`}}},D=[...new Set(e.icons.icons.map(g=>g.category))],W={name:"search_icons",title:"Search the AbsoluteUI icon set",description:"Find icons in the original AbsoluteUI icon set by meaning, name, or alias, with the import for each. Prefer these over third-party icons, which work only through an icon adapter.",inputSchema:{type:"object",additionalProperties:!1,required:["query"],properties:{query:{type:"string",minLength:1,maxLength:200},category:{enum:D},limit:{type:"integer",minimum:1,maximum:50}}},outputSchema:me(["icons"]),run:g=>{let w=ae(g,"query"),b=Q(g,"category"),A=typeof g.limit=="number"?g.limit:10,T=e.icons.icons.find(R=>R.id===w.trim().toLowerCase()||R.aliases.includes(w.trim().toLowerCase())),J=n.search(w,{kinds:["icon"],limit:200}).map(R=>R.id),H=[...new Set([...T?[T.id]:[],...J])].map(R=>e.icons.icons.find(L=>L.id===R)).filter(R=>R!==void 0&&(b===void 0||R.category===b)).slice(0,A);return{icons:U(H.map(R=>({id:R.id,displayName:R.displayName,category:R.category,description:R.description,aliases:R.aliases,variants:R.variants,rtl:R.rtl,exportName:R.exportName,import:R.import}))),usage:"Pass the definition to renderIcon (import { renderIcon } from '@absoluteui/icons') or to a component's icons option. To use icons by name, import '@absoluteui/icons/set/register' once at start-up (it bundles the whole set).",docUrl:`${e.docsUrl}/guides/icons/`}}},F={name:"get_setup",title:"Get installation and setup",description:"How to install and set up AbsoluteUI of this version: packages, styles, theme runtime, configuration, and (for Angular) providers.",inputSchema:{type:"object",additionalProperties:!1,properties:{framework:{enum:["ts","angular"]}}},outputSchema:me(["version","framework","guides"]),run:g=>{let w=Q(g,"framework")??"ts",A=(w==="angular"?["angular/guides/getting-started","getting-started/installation"]:["getting-started/installation","getting-started/configuration"]).map(I=>{let H=e.guides.find(R=>R.slug===I);return[I,H?U({title:H.title,docUrl:H.docUrl,markdown:H.markdown}):null]}),{included:T,omitted:J}=ue(A,ie-600,I=>({truncated:!0,docUrl:`${e.docsUrl}/${I}/`}));return{version:e.version,framework:w,versionNote:`Install the same version (${e.version}) of every @absoluteui/* package as this server.`,guides:T,omitted:J}}};return[l,p,m,c,k,_,y,j,W,F]}/*! AbsoluteUI @absoluteui/core v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var oo="production";var Ge=class extends Error{name="AbsoluteUIError";category;code;details;constructor(n,t,r,o={}){super(ro(t,r,o)),this.category=n,this.code=t,this.details=Object.freeze({...o})}};function ro(e,n,t){let r=[`[AbsoluteUI ${e}] ${n}`];return t.property!==void 0&&r.push(`Property: ${t.property}.`),t.expected!==void 0&&r.push(`Expected: ${t.expected}.`),oo==="development"&&(t.component!==void 0&&r.push(`Component: ${t.component}.`),t.remediation!==void 0&&r.push(`Fix: ${t.remediation}`)),r.join(" ")}function bt(e,n,t){return new Ge("validation",e,n,t)}/*! AbsoluteUI @absoluteui/helpers v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var Ze=class extends Error{name="HelperError";code;kind;details;fields;constructor(n,t,r={}){super(t,r.cause===void 0?void 0:{cause:r.cause}),this.code=n,this.kind=r.kind??"internal",this.details=Object.freeze({...r.details}),this.fields=Object.freeze({...r.fields})}},Ke=class extends Ze{name="ValidationError";constructor(n,t,r={}){super(n,t,{...r,kind:"validation"})}};var Ye=class extends Ze{name="LimitError";constructor(n,t,r={}){super(n,t,{...r,kind:"limit"})}};/*! AbsoluteUI @absoluteui/core v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ *//*! AbsoluteUI @absoluteui/helpers v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var so=1e5;var Xe=()=>{throw new Ke("HLP_JSON_POINTER_INVALID","The JSON Pointer is not valid.")};function io(e){if(!e.includes("~"))return e;for(let n=0;n<e.length;n++)e[n]==="~"&&e[n+1]!=="0"&&e[n+1]!=="1"&&Xe();return e.replace(/~1/g,"/").replace(/~0/g,"~")}function wt(e){if(typeof e!="string"&&Xe(),e.length>so)throw new Ye("HLP_JSON_POINTER_TOO_LONG","The JSON Pointer is too long.");let n=e;if(n.startsWith("#"))try{n=decodeURIComponent(n.slice(1))}catch{Xe()}return n===""?[]:(n.startsWith("/")||Xe(),n.slice(1).split("/").map(io))}/*! AbsoluteUI @absoluteui/helpers v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ *//*! AbsoluteUI @absoluteui/components v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var ye="^[A-Za-z][A-Za-z0-9_-]{0,63}$",be="^([a-z][a-z0-9-]{0,31}:)?[a-z][a-z0-9-]{0,47}$",S=Object.freeze({widgets:200,dataSources:100,variables:50,pages:20,breakpoints:8,transforms:20,title:200,text:2e3,url:2048,params:50,headers:20,headerValue:1024,jsonDepth:20,jsonNodes:1e4,selectOptions:500,interactions:10}),Qe=["vertical","none"],Ie=["compact","comfortable","spacious"],Re=["primary","neutral","info","success","warning","danger","chart-1","chart-2","chart-3","chart-4","chart-5","chart-6","chart-7","chart-8"],et=["default","subtle","transparent"],tn=["dateRange","select","text","number"],tt=["today","yesterday","last7Days","last30Days","thisWeek","lastWeek","thisMonth","lastMonth","thisQuarter","lastQuarter","thisYear","lastYear","yearToDate","last5BusinessDays","last20BusinessDays"],nt=["GET","POST"],ot=["same-origin","include","omit"],nn=/^(authorization|cookie|cookie2|set-cookie|host|origin|referer|proxy-.*|sec-.*)$/i,on=/\{\{\s*([A-Za-z][A-Za-z0-9_-]{0,63})(?:\.(from|to))?\s*\}\}/g,rt=["eq","ne","gt","gte","lt","lte","in","contains"],st=["sum","avg","min","max","count"];/*! AbsoluteUI @absoluteui/components v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var ao=100,co=new RegExp(ye),an=new RegExp(be),lo=/^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,64}$/,uo=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,cn=new Set(["__proto__","prototype","constructor"]),xt=class{issues=[];add(n,t,r){this.issues.length<ao&&this.issues.push({path:n,code:t,expected:r})}};function dn(e){for(let n=0;n<e.length;n++){let t=e.charCodeAt(n);if(t<32||t===127)return!0}return!1}function mo(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e,n){return`${e}/${mo(String(n))}`}function te(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;let n=Object.getPrototypeOf(e);return n===Object.prototype||n===null}function M(e,n,t,r,o=[]){if(!te(n)){e.add(t,"type","object");return}for(let s of Object.keys(n))r.includes(s)||e.add(d(t,s),"unknown-key",`one of: ${r.join(", ")}`);for(let s of o)n[s]===void 0&&e.add(d(t,s),"required","a value");return n}function ce(e,n,t,r,o=1){if(typeof n!="string"||n.length<o||n.length>r){e.add(t,"type",`string of ${o} to ${r} characters`);return}return n}function de(e,n,t){if(typeof n!="string"||!co.test(n)){e.add(t,"id",`id matching ${ye}`);return}return n}function G(e,n,t,r,o){if(typeof n!="number"||!Number.isInteger(n)||n<r||n>o){e.add(t,"range",`integer from ${r} to ${o}`);return}return n}function vt(e,n,t){if(typeof n!="number"||!Number.isFinite(n)){e.add(t,"type","finite number");return}return n}function at(e,n,t){if(typeof n!="boolean"){e.add(t,"type","boolean");return}return n}function Y(e,n,t,r){if(typeof n!="string"||!r.includes(n)){e.add(t,"enum",`one of: ${r.join(", ")}`);return}return n}function ve(e,n,t){return cn.has(n)?(e.add(t,"unsafe-key","a key other than __proto__, prototype, or constructor"),!1):!0}function kt(e,n,t){if(typeof n!="string"||n.length>512||n!==""&&!n.startsWith("/")){e.add(t,"pointer",'JSON Pointer (RFC 6901) such as "/data/0/total"');return}let r;try{r=wt(n)}catch{e.add(t,"pointer",'JSON Pointer (RFC 6901) such as "/data/0/total"');return}if(r.some(o=>cn.has(o))){e.add(t,"unsafe-key","pointer tokens other than __proto__, prototype, or constructor");return}return n}function Je(e,n,t){let r=0,o=!1,s=(i,u,f)=>{if(!o){if(++r>S.jsonNodes||f>S.jsonDepth){e.add(t,"size",`JSON with at most ${S.jsonNodes} values and depth ${S.jsonDepth}`),o=!0;return}if(i===null||typeof i=="string"||typeof i=="boolean")return i;if(typeof i=="number"){if(Number.isFinite(i))return i;e.add(u,"type","finite number");return}if(Array.isArray(i)){let l=[];return i.forEach((a,p)=>{let m=s(a,d(u,p),f+1);m!==void 0&&l.push(m)}),Object.freeze(l)}if(te(i)){let l={};for(let[a,p]of Object.entries(i)){if(!ve(e,a,d(u,a)))continue;let m=s(p,d(u,a),f+1);m!==void 0&&(l[a]=m)}return Object.freeze(l)}e.add(u,"type","JSON value (string, number, boolean, null, array, or plain object)")}};return s(n,t,0)}function ln(e,n,t){if(!te(n)){e.add(t,"type","object");return}return Je(e,n,t)}function P(e,n,t){t!==void 0&&(e[n]=t)}function po(e,n,t){let r=M(e,n,t,["columns","rowHeight","gap","compaction"]);if(!r)return;let o={};return r.columns!==void 0&&P(o,"columns",G(e,r.columns,d(t,"columns"),1,24)),r.rowHeight!==void 0&&P(o,"rowHeight",G(e,r.rowHeight,d(t,"rowHeight"),24,600)),r.gap!==void 0&&P(o,"gap",G(e,r.gap,d(t,"gap"),0,64)),r.compaction!==void 0&&P(o,"compaction",Y(e,r.compaction,d(t,"compaction"),Qe)),o}function un(e,n,t,r,o){let s=["x","y","w","h","minW","minH","maxW","maxH","locked"],i=M(e,n,t,o?["id",...s]:s,o?["id","x","y","w","h"]:["x","y","w","h"]);if(!i)return;let u=e.issues.length,f=G(e,i.x,d(t,"x"),0,r-1),l=G(e,i.y,d(t,"y"),0,1e4),a=G(e,i.w,d(t,"w"),1,r),p=G(e,i.h,d(t,"h"),1,100),m={id:"",x:f??0,y:l??0,w:a??1,h:p??1};o&&P(m,"id",de(e,i.id,d(t,"id")));for(let h of["minW","maxW"])i[h]!==void 0&&P(m,h,G(e,i[h],d(t,h),1,r));for(let h of["minH","maxH"])i[h]!==void 0&&P(m,h,G(e,i[h],d(t,h),1,100));if(i.locked!==void 0&&P(m,"locked",at(e,i.locked,d(t,"locked"))),e.issues.length!==u)return;if(m.x+m.w>r&&e.add(d(t,"w"),"range",`x + w at most ${r} (the column count)`),m.minW!==void 0&&m.maxW!==void 0&&m.minW>m.maxW&&e.add(d(t,"minW"),"range","minW at most maxW"),m.minH!==void 0&&m.maxH!==void 0&&m.minH>m.maxH&&e.add(d(t,"minH"),"range","minH at most maxH"),m.minW!==void 0&&m.w<m.minW&&e.add(d(t,"w"),"range","w at least minW"),m.maxW!==void 0&&m.w>m.maxW&&e.add(d(t,"w"),"range","w at most maxW"),m.minH!==void 0&&m.h<m.minH&&e.add(d(t,"h"),"range","h at least minH"),m.maxH!==void 0&&m.h>m.maxH&&e.add(d(t,"h"),"range","h at most maxH"),o)return m;let c={x:m.x,y:m.y,w:m.w,h:m.h};for(let h of["minW","minH","maxW","maxH","locked"])P(c,h,m[h]);return c}function fo(e,n,t){let r=M(e,n,t,["accent","surface","border","shadow","header","density","padding"]);if(!r)return;let o={};r.accent!==void 0&&P(o,"accent",Y(e,r.accent,d(t,"accent"),Re)),r.surface!==void 0&&P(o,"surface",Y(e,r.surface,d(t,"surface"),et));for(let s of["border","shadow","header"])r[s]!==void 0&&P(o,s,at(e,r[s],d(t,s)));return r.density!==void 0&&P(o,"density",Y(e,r.density,d(t,"density"),Ie)),r.padding!==void 0&&P(o,"padding",G(e,r.padding,d(t,"padding"),0,4)),o}function go(e,n,t){let r=M(e,n,t,["density","accent"]);if(!r)return;let o={};return r.density!==void 0&&P(o,"density",Y(e,r.density,d(t,"density"),Ie)),r.accent!==void 0&&P(o,"accent",Y(e,r.accent,d(t,"accent"),Re)),o}function rn(e,n,t){if(typeof n!="string"||!uo.test(n)||Number.isNaN(Date.parse(`${n}T00:00:00Z`))){e.add(t,"date","ISO date YYYY-MM-DD");return}return n}function ho(e,n,t){if(te(n)&&n.preset!==void 0){let i=M(e,n,t,["preset"],["preset"]),u=i?Y(e,i.preset,d(t,"preset"),tt):void 0;return u===void 0?void 0:{preset:u}}let r=M(e,n,t,["from","to"],["from","to"]);if(!r)return;let o=rn(e,r.from,d(t,"from")),s=rn(e,r.to,d(t,"to"));if(!(o===void 0||s===void 0))return o>s&&e.add(d(t,"to"),"range","to on or after from"),{from:o,to:s}}function yo(e,n,t){let r=te(n)?Y(e,n.kind,d(t,"kind"),tn):void 0;if(!te(n)){e.add(t,"type","object");return}if(r===void 0)return;let o=["id","label","kind","default"],s={dateRange:["businessCalendar"],select:["options","multiple"],text:["maxLength"],number:["min","max"]},i=M(e,n,t,[...o,...s[r]],r==="select"?["id","label","kind","options"]:["id","label","kind"]);if(!i)return;let u=de(e,i.id,d(t,"id"))??"",f=ce(e,i.label,d(t,"label"),S.title)??"",l=d(t,"default");switch(r){case"dateRange":{let a={id:u,label:f,kind:r};return i.default!==void 0&&P(a,"default",ho(e,i.default,l)),i.businessCalendar!==void 0&&P(a,"businessCalendar",de(e,i.businessCalendar,d(t,"businessCalendar"))),a}case"select":{let a=[],p=d(t,"options");if(!Array.isArray(i.options)||i.options.length<1||i.options.length>S.selectOptions)e.add(p,"type",`array of 1 to ${S.selectOptions} options`);else{let c=new Set;i.options.forEach((h,k)=>{let x=M(e,h,d(p,k),["value","label"],["value","label"]);if(!x)return;let $=ce(e,x.value,d(d(p,k),"value"),S.title,0),_=ce(e,x.label,d(d(p,k),"label"),S.title);$===void 0||_===void 0||(c.has($)&&e.add(d(d(p,k),"value"),"duplicate-id","unique option values"),c.add($),a.push(Object.freeze({value:$,label:_})))})}let m={id:u,label:f,kind:r,options:Object.freeze(a)};if(i.multiple!==void 0&&P(m,"multiple",at(e,i.multiple,d(t,"multiple"))),i.default!==void 0){let c=new Set(a.map(k=>k.value)),h=(k,x)=>typeof k=="string"&&c.has(k)?!0:(e.add(x,"reference","one of the option values"),!1);if(m.multiple===!0)if(!Array.isArray(i.default))e.add(l,"type","array of option values");else{let k=i.default.filter((x,$)=>h(x,d(l,$)));m.default=Object.freeze(k)}else h(i.default,l)&&(m.default=i.default)}return m}case"text":{let a={id:u,label:f,kind:r};return i.maxLength!==void 0&&P(a,"maxLength",G(e,i.maxLength,d(t,"maxLength"),1,S.text)),i.default!==void 0&&P(a,"default",ce(e,i.default,l,a.maxLength??S.text,0)),a}case"number":{let a={id:u,label:f,kind:r};if(i.min!==void 0&&P(a,"min",vt(e,i.min,d(t,"min"))),i.max!==void 0&&P(a,"max",vt(e,i.max,d(t,"max"))),a.min!==void 0&&a.max!==void 0&&a.min>a.max&&e.add(d(t,"min"),"range","min at most max"),i.default!==void 0){let p=vt(e,i.default,l);p!==void 0&&(a.min!==void 0&&p<a.min||a.max!==void 0&&p>a.max)&&e.add(l,"range","a default between min and max"),P(a,"default",p)}return a}}}function sn(e){return[...e.matchAll(on)].map(n=>n[1]??"")}function bo(e,n,t){let r=ce(e,n,t,S.url);if(r===void 0)return;let o='absolute http(s) URL or root-relative path ("/api/..."), without placeholders or user info';if(r.includes("{{")||/\s/.test(r)||dn(r)){e.add(t,"url",o);return}if(r.startsWith("/")&&!r.startsWith("//"))return r;let s;try{s=new URL(r)}catch{e.add(t,"url",o);return}if(s.protocol!=="https:"&&s.protocol!=="http:"||s.username!==""||s.password!==""){e.add(t,"url",o);return}return r}function wo(e,n,t,r){if(!te(n)){e.add(t,"type","object");return}let o=n.kind===void 0?"http":Y(e,n.kind,d(t,"kind"),["http","static","mock"]);if(o===void 0)return;if(o==="static"){let f=M(e,n,t,["kind","data"],["data"]),l=f?Je(e,f.data,d(t,"data")):void 0;return l===void 0?void 0:{kind:o,data:l}}if(o==="mock"){let f=M(e,n,t,["kind","data","delay","failStatus"],["data"]);if(!f)return;let l=Je(e,f.data,d(t,"data"));if(l===void 0)return;let a={kind:o,data:l};return f.delay!==void 0&&P(a,"delay",G(e,f.delay,d(t,"delay"),0,1e4)),f.failStatus!==void 0&&P(a,"failStatus",G(e,f.failStatus,d(t,"failStatus"),400,599)),a}let s=M(e,n,t,["kind","url","method","params","headers","body","credentials","select","ttl","refresh","timeout","maxBytes"],["url"]);if(!s)return;let i=bo(e,s.url,d(t,"url"));if(i===void 0)return;let u={kind:"http",url:i};if(s.method!==void 0&&P(u,"method",Y(e,s.method,d(t,"method"),nt)),s.params!==void 0){let f=d(t,"params"),l=M(e,s.params,f,Object.keys(te(s.params)?s.params:{}));if(l){let a=Object.entries(l);a.length>S.params&&e.add(f,"size",`at most ${S.params} parameters`);let p={};for(let[m,c]of a){let h=d(f,m);if(ve(e,m,h))if(m.length<1||m.length>128)e.add(h,"type","parameter name of 1 to 128 characters");else if(typeof c=="string"&&c.length<=S.text){for(let k of sn(c))r.add(k);p[m]=c}else typeof c=="boolean"||typeof c=="number"&&Number.isFinite(c)?p[m]=c:e.add(h,"type",`string (at most ${S.text} characters), finite number, or boolean`)}u.params=Object.freeze(p)}}if(s.headers!==void 0){let f=d(t,"headers"),l=M(e,s.headers,f,Object.keys(te(s.headers)?s.headers:{}));if(l){let a=Object.entries(l);a.length>S.headers&&e.add(f,"size",`at most ${S.headers} headers`);let p={};for(let[m,c]of a){let h=d(f,m);ve(e,m,h)&&(lo.test(m)?nn.test(m)?e.add(h,"forbidden-header","no Authorization, Cookie, Host, Origin, Referer, Proxy-*, or Sec-* header (authentication belongs to the host fetcher)"):typeof c!="string"||c.length>S.headerValue||dn(c)||c.includes("{{")?e.add(h,"header",`header value of at most ${S.headerValue} characters, single line, without placeholders`):p[m]=c:e.add(h,"header","HTTP header name (token characters, at most 64)"))}u.headers=Object.freeze(p)}}if(s.body!==void 0){u.method!=="POST"&&e.add(d(t,"body"),"body","a body only with method POST");let f=Je(e,s.body,d(t,"body"));if(f!==void 0){let l=a=>{if(typeof a=="string")for(let p of sn(a))r.add(p);else Array.isArray(a)?a.forEach(l):a!==null&&typeof a=="object"&&Object.values(a).forEach(l)};l(f),u.body=f}}if(s.credentials!==void 0&&P(u,"credentials",Y(e,s.credentials,d(t,"credentials"),ot)),s.select!==void 0&&P(u,"select",kt(e,s.select,d(t,"select"))),s.ttl!==void 0&&P(u,"ttl",G(e,s.ttl,d(t,"ttl"),0,86400)),s.refresh!==void 0){let f=G(e,s.refresh,d(t,"refresh"),0,86400);f!==void 0&&f!==0&&f<10?e.add(d(t,"refresh"),"range","0 (off) or 10 to 86400 seconds"):P(u,"refresh",f)}return s.timeout!==void 0&&P(u,"timeout",G(e,s.timeout,d(t,"timeout"),1,120)),s.maxBytes!==void 0&&P(u,"maxBytes",G(e,s.maxBytes,d(t,"maxBytes"),1024,50*1024*1024)),u}function we(e,n,t){let r=ce(e,n,t,128);if(!(r!==void 0&&!ve(e,r,t)))return r}function vo(e,n,t){if(!te(n)){e.add(t,"type","object");return}let r=Y(e,n.op,d(t,"op"),["pick","rename","filter","sort","limit","groupBy","custom"]);switch(r){case void 0:return;case"pick":{let o=M(e,n,t,["op","fields"],["fields"]);if(!o)return;if(!Array.isArray(o.fields)||o.fields.length<1||o.fields.length>100){e.add(d(t,"fields"),"type","array of 1 to 100 field names");return}let s=o.fields.map((i,u)=>we(e,i,d(d(t,"fields"),u))).filter(i=>i!==void 0);return{op:r,fields:Object.freeze(s)}}case"rename":{let o=M(e,n,t,["op","fields"],["fields"]),s=d(t,"fields"),i=o?M(e,o.fields,s,Object.keys(te(o.fields)?o.fields:{})):void 0;if(!i)return;let u={};for(let[f,l]of Object.entries(i)){if(!ve(e,f,d(s,f)))continue;let a=we(e,l,d(s,f));a!==void 0&&(u[f]=a)}return{op:r,fields:Object.freeze(u)}}case"filter":{let o=M(e,n,t,["op","field","operator","value"],["field","operator","value"]);if(!o)return;let s=we(e,o.field,d(t,"field")),i=Y(e,o.operator,d(t,"operator"),rt),u=Je(e,o.value,d(t,"value"));return i==="in"&&!Array.isArray(o.value)&&e.add(d(t,"value"),"type",'array for operator "in"'),s===void 0||i===void 0||u===void 0?void 0:{op:r,field:s,operator:i,value:u}}case"sort":{let o=M(e,n,t,["op","field","direction"],["field"]);if(!o)return;let s=we(e,o.field,d(t,"field"));if(s===void 0)return;if(o.direction===void 0)return{op:r,field:s};let i=Y(e,o.direction,d(t,"direction"),["asc","desc"]);return i===void 0?void 0:{op:r,field:s,direction:i}}case"limit":{let o=M(e,n,t,["op","count"],["count"]),s=o?G(e,o.count,d(t,"count"),1,1e5):void 0;return s===void 0?void 0:{op:r,count:s}}case"groupBy":{let o=M(e,n,t,["op","by","aggregates"],["by","aggregates"]);if(!o)return;let s=d(t,"by"),i=d(t,"aggregates");if(!Array.isArray(o.by)||o.by.length>10){e.add(s,"type","array of at most 10 field names (empty for a grand total)");return}if(!Array.isArray(o.aggregates)||o.aggregates.length<1||o.aggregates.length>20){e.add(i,"type","array of 1 to 20 aggregates");return}let u=o.by.map((l,a)=>we(e,l,d(s,a))).filter(l=>l!==void 0),f=[];return o.aggregates.forEach((l,a)=>{let p=d(i,a),m=M(e,l,p,["fn","field","as"],["fn","as"]);if(!m)return;let c=Y(e,m.fn,d(p,"fn"),st),h=we(e,m.as,d(p,"as"));if(c===void 0||h===void 0)return;if(m.field===void 0){c!=="count"?e.add(d(p,"field"),"required",`a field for ${c}`):f.push(Object.freeze({fn:c,as:h}));return}let k=we(e,m.field,d(p,"field"));k!==void 0&&f.push(Object.freeze({fn:c,field:k,as:h}))}),{op:r,by:Object.freeze(u),aggregates:Object.freeze(f)}}case"custom":{let o=M(e,n,t,["op","name","options"],["name"]);if(!o)return;let s=typeof o.name=="string"&&an.test(o.name)?o.name:void 0;s===void 0&&e.add(d(t,"name"),"type",`registered transform name matching ${be}`);let i=o.options===void 0?void 0:ln(e,o.options,d(t,"options"));return s===void 0?void 0:i===void 0?{op:r,name:s}:{op:r,name:s,options:i}}}}function xo(e,n,t){let r=["collapsible","maximizable","removable","refreshable"],o=M(e,n,t,r);if(!o)return;let s={};for(let i of r)o[i]!==void 0&&P(s,i,at(e,o[i],d(t,i)));return s}function ko(e,n,t,r){let o=M(e,n,t,["id","type","title","subtitle","page","source","map","transforms","options","style","actions","interactions","layout"],["id","type","title","layout"]);if(!o)return;let s=de(e,o.id,d(t,"id")),i=typeof o.type=="string"&&an.test(o.type)?o.type:void 0;o.type!==void 0&&i===void 0&&e.add(d(t,"type"),"type",`widget type name matching ${be}`);let u=ce(e,o.title,d(t,"title"),S.title),f=o.layout===void 0?void 0:un(e,o.layout,d(t,"layout"),r,!1);if(s===void 0||i===void 0||u===void 0||f===void 0)return;let l={id:s,type:i,title:u,layout:Object.freeze(f)};if(o.subtitle!==void 0&&P(l,"subtitle",ce(e,o.subtitle,d(t,"subtitle"),S.title)),o.page!==void 0&&P(l,"page",de(e,o.page,d(t,"page"))),o.source!==void 0&&P(l,"source",de(e,o.source,d(t,"source"))),o.map!==void 0){let a=d(t,"map"),p=M(e,o.map,a,Object.keys(te(o.map)?o.map:{}));if(p){let m={};for(let[c,h]of Object.entries(p)){if(!ve(e,c,d(a,c)))continue;if(!/^[A-Za-z][A-Za-z0-9_]{0,63}$/.test(c)){e.add(d(a,c),"id","widget input name (letters, digits, underscore)");continue}let k=kt(e,h,d(a,c));k!==void 0&&(m[c]=k)}l.map=Object.freeze(m)}}if(o.transforms!==void 0){let a=d(t,"transforms");!Array.isArray(o.transforms)||o.transforms.length>S.transforms?e.add(a,"type",`array of at most ${S.transforms} transforms`):l.transforms=Object.freeze(o.transforms.map((p,m)=>vo(e,p,d(a,m))).filter(p=>p!==void 0).map(p=>Object.freeze(p)))}if(o.options!==void 0&&P(l,"options",ln(e,o.options,d(t,"options"))),o.style!==void 0&&P(l,"style",it(fo(e,o.style,d(t,"style")))),o.actions!==void 0&&P(l,"actions",it(xo(e,o.actions,d(t,"actions")))),o.interactions!==void 0){let a=d(t,"interactions");if(!Array.isArray(o.interactions)||o.interactions.length>S.interactions)e.add(a,"type",`array of at most ${S.interactions} interactions`);else{let p=[];o.interactions.forEach((m,c)=>{let h=d(a,c),k=M(e,m,h,["on","set","from"],["on","set","from"]);if(!k)return;let x=Y(e,k.on,d(h,"on"),["select"]),$=de(e,k.set,d(h,"set")),_=kt(e,k.from,d(h,"from"));x!==void 0&&$!==void 0&&_!==void 0&&p.push(Object.freeze({on:x,set:$,from:_}))}),l.interactions=Object.freeze(p)}}return l}function it(e){return e===void 0?void 0:Object.freeze(e)}function So(e,n,t,r){if(!Array.isArray(n)||n.length<1||n.length>S.breakpoints){e.add(t,"type",`array of 1 to ${S.breakpoints} breakpoints`);return}let o=[];if(n.forEach((u,f)=>{let l=d(t,f),a=M(e,u,l,["name","minWidth","columns"],["name","minWidth","columns"]);if(!a)return;let p=de(e,a.name,d(l,"name")),m=G(e,a.minWidth,d(l,"minWidth"),0,1e4),c=G(e,a.columns,d(l,"columns"),1,24);p!==void 0&&m!==void 0&&c!==void 0&&o.push(Object.freeze({name:p,minWidth:m,columns:c}))}),o.length!==n.length)return;let s=new Set,i=new Set;return o.forEach((u,f)=>{s.has(u.name)&&e.add(d(d(t,f),"name"),"duplicate-id","unique breakpoint names"),i.has(u.minWidth)&&e.add(d(d(t,f),"minWidth"),"duplicate-id","unique breakpoint minWidth values"),s.add(u.name),i.add(u.minWidth)}),o.some(u=>u.minWidth===0)||e.add(t,"breakpoints","one breakpoint with minWidth 0"),o.reduce((u,f)=>f.minWidth>u.minWidth?f:u).columns!==r&&e.add(t,"breakpoints",`the widest breakpoint with ${r} columns (grid.columns)`),o}var $o=["schemaVersion","id","title","description","grid","breakpoints","layouts","style","pages","variables","dataSources","widgets"];function Eo(e,n){let t=M(e,n,"",$o,["schemaVersion","id","title","widgets"]);if(!t)return;t.schemaVersion!==1&&e.add("/schemaVersion","version",`schemaVersion ${1} (run migrateDefinition first for older documents)`);let r=de(e,t.id,"/id")??"",o=ce(e,t.title,"/title",S.title)??"",s={schemaVersion:1,id:r,title:o,widgets:[]};t.description!==void 0&&P(s,"description",ce(e,t.description,"/description",S.text,0)),t.grid!==void 0&&P(s,"grid",it(po(e,t.grid,"/grid")));let i=s.grid?.columns??12;t.style!==void 0&&P(s,"style",it(go(e,t.style,"/style")));let u;t.breakpoints!==void 0&&(u=So(e,t.breakpoints,"/breakpoints",i),u&&(s.breakpoints=Object.freeze(u)));let f=new Set;if(t.pages!==void 0)if(!Array.isArray(t.pages)||t.pages.length<1||t.pages.length>S.pages)e.add("/pages","type",`array of 1 to ${S.pages} pages`);else{let c=[];t.pages.forEach((h,k)=>{let x=d("/pages",k),$=M(e,h,x,["id","title"],["id","title"]);if(!$)return;let _=de(e,$.id,d(x,"id")),v=ce(e,$.title,d(x,"title"),S.title);_===void 0||v===void 0||(f.has(_)&&e.add(d(x,"id"),"duplicate-id","unique page ids"),f.add(_),c.push(Object.freeze({id:_,title:v})))}),s.pages=Object.freeze(c)}let l=new Set,a=new Map;if(t.variables!==void 0)if(!Array.isArray(t.variables)||t.variables.length>S.variables)e.add("/variables","type",`array of at most ${S.variables} variables`);else{let c=[];t.variables.forEach((h,k)=>{let x=yo(e,h,d("/variables",k));x&&(l.has(x.id)&&e.add(d(d("/variables",k),"id"),"duplicate-id","unique variable ids"),l.add(x.id),a.set(x.id,x.kind),c.push(Object.freeze(x)))}),s.variables=Object.freeze(c)}let p=new Set;if(t.dataSources!==void 0){let c=M(e,t.dataSources,"/dataSources",Object.keys(te(t.dataSources)?t.dataSources:{}));if(c){let h=Object.entries(c);h.length>S.dataSources&&e.add("/dataSources","size",`at most ${S.dataSources} data sources`);let k={};for(let[x,$]of h){let _=d("/dataSources",x);if(de(e,x,_)===void 0||!ve(e,x,_))continue;let v=new Set,N=wo(e,$,_,v);if(N){for(let y of v)l.has(y)||e.add(_,"reference",`placeholders that name declared variables (unknown: ${y})`);p.add(x),k[x]=Object.freeze(N)}}s.dataSources=Object.freeze(k)}}let m=new Set;if(!Array.isArray(t.widgets)||t.widgets.length>S.widgets)e.add("/widgets","type",`array of at most ${S.widgets} widgets`);else{let c=[];t.widgets.forEach((h,k)=>{let x=d("/widgets",k),$=ko(e,h,x,i);$&&(m.has($.id)&&e.add(d(x,"id"),"duplicate-id","unique widget ids"),m.add($.id),$.source!==void 0&&!p.has($.source)&&e.add(d(x,"source"),"reference","the id of a declared data source"),$.page!==void 0&&!f.has($.page)&&e.add(d(x,"page"),"reference","the id of a declared page"),$.page===void 0&&f.size>0&&e.add(d(x,"page"),"required","a page id (the dashboard declares pages)"),($.map!==void 0||$.transforms!==void 0)&&$.source===void 0&&e.add(d(x,"source"),"required","a data source for map or transforms"),$.interactions?.forEach((_,v)=>{let N=a.get(_.set);N===void 0?e.add(d(d(d(x,"interactions"),v),"set"),"reference","the id of a declared variable"):N==="dateRange"&&e.add(d(d(d(x,"interactions"),v),"set"),"reference","a select, text, or number variable")}),c.push(Object.freeze($)))}),s.widgets=Object.freeze(c)}if(t.layouts!==void 0){let c=new Map((u??mn(i)).map(k=>[k.name,k.columns])),h=M(e,t.layouts,"/layouts",[...c.keys()]);if(h){let k={};for(let[x,$]of Object.entries(h)){let _=d("/layouts",x),v=c.get(x);if(v===void 0)continue;if(!Array.isArray($)||$.length>S.widgets){e.add(_,"type",`array of at most ${S.widgets} layout entries`);continue}let N=new Set,y=[];$.forEach((O,E)=>{let j=un(e,O,d(_,E),v,!0);j&&(m.has(j.id)||e.add(d(d(_,E),"id"),"reference","the id of a declared widget"),N.has(j.id)&&e.add(d(d(_,E),"id"),"duplicate-id","one entry per widget"),N.add(j.id),y.push(Object.freeze(j)))}),k[x]=Object.freeze(y)}s.layouts=Object.freeze(k)}}return Object.freeze(s)}function mn(e){return[{name:"lg",minWidth:1024,columns:e},{name:"md",minWidth:640,columns:Math.max(1,Math.round(e/2))},{name:"sm",minWidth:0,columns:1}]}function St(e){let n=new xt,t=Eo(n,e);return n.issues.length>0||t===void 0?{ok:!1,issues:Object.freeze(n.issues.map(r=>Object.freeze(r)))}:{ok:!0,definition:t}}/*! AbsoluteUI @absoluteui/components v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var Ao={};function To(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;let n=Object.getPrototypeOf(e);return n===Object.prototype||n===null}function $t(e){let n=o=>{throw bt("DASHBOARD_DEFINITION_VERSION","Unsupported dashboard definition version.",{component:"dashboard",property:"/schemaVersion",expected:o})};if(!To(e))return n("a definition object");let t=e.schemaVersion;if(typeof t!="number"||!Number.isInteger(t)||t<1)return n("a positive integer schemaVersion");if(t>1)return n(`schemaVersion ${1} or lower (the document was written by a newer AbsoluteUI)`);let r=e;for(let o=t;o<1;o++){let s=Ao[o];if(!s)return n(`a migration path from schemaVersion ${o}`);r={...s(r),schemaVersion:o+1}}return r}/*! AbsoluteUI @absoluteui/components v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ *//*! AbsoluteUI @absoluteui/components v0.13.1 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var ne={type:"string",pattern:ye},Et={type:"string",maxLength:512,pattern:"^(/.*)?$",description:"JSON Pointer (RFC 6901)."},pe={type:"string",minLength:1,maxLength:S.title},pn={type:"string",pattern:"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},xe={type:"string",minLength:1,maxLength:128,not:{enum:["__proto__","prototype","constructor"]}},Oo=e=>e.replace(/[a-z]/g,n=>`[${n.toUpperCase()}${n}]`),q=(e,n=[])=>({type:"object",additionalProperties:!1,required:n,properties:e});function fn(e){let n={x:{type:"integer",minimum:0,maximum:23},y:{type:"integer",minimum:0,maximum:1e4},w:{type:"integer",minimum:1,maximum:24},h:{type:"integer",minimum:1,maximum:100},minW:{type:"integer",minimum:1,maximum:24},minH:{type:"integer",minimum:1,maximum:100},maxW:{type:"integer",minimum:1,maximum:24},maxH:{type:"integer",minimum:1,maximum:100},locked:{type:"boolean"}};return e?q({id:ne,...n},["id","x","y","w","h"]):q(n,["x","y","w","h"])}var Io=q({accent:{enum:Re},surface:{enum:et},border:{type:"boolean"},shadow:{type:"boolean"},header:{type:"boolean"},density:{enum:Ie},padding:{type:"integer",minimum:0,maximum:4}}),Ro={oneOf:[q({preset:{enum:tt}},["preset"]),q({from:pn,to:pn},["from","to"])]},jo={oneOf:[q({id:ne,label:pe,kind:{const:"dateRange"},default:Ro,businessCalendar:ne},["id","label","kind"]),q({id:ne,label:pe,kind:{const:"select"},options:{type:"array",minItems:1,maxItems:S.selectOptions,items:q({value:{type:"string",maxLength:S.title},label:pe},["value","label"])},multiple:{type:"boolean"},default:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},["id","label","kind","options"]),q({id:ne,label:pe,kind:{const:"text"},default:{type:"string",maxLength:S.text},maxLength:{type:"integer",minimum:1,maximum:S.text}},["id","label","kind"]),q({id:ne,label:pe,kind:{const:"number"},default:{type:"number"},min:{type:"number"},max:{type:"number"}},["id","label","kind"])]},Co=q({kind:{const:"http"},url:{type:"string",minLength:1,maxLength:S.url,pattern:"^(https?://[^\\s{}]+|/(?!/)[^\\s{}]*)$",description:"Absolute http(s) URL or root-relative path. The host allowlist decides which origins are reachable."},method:{enum:nt},params:{type:"object",maxProperties:S.params,propertyNames:{minLength:1,maxLength:128},additionalProperties:{type:["string","number","boolean"]},description:"Query parameters; strings may contain {{variable}} or {{variable.from}} placeholders."},headers:{type:"object",maxProperties:S.headers,propertyNames:{pattern:"^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,64}$",not:{pattern:Oo("^(authorization|cookie|cookie2|set-cookie|host|origin|referer|proxy-.*|sec-.*)$")}},additionalProperties:{type:"string",maxLength:S.headerValue},description:"Static non-secret headers. Authentication belongs to the host fetcher."},body:{description:"JSON body for POST; strings may contain placeholders."},credentials:{enum:ot},select:Et,ttl:{type:"integer",minimum:0,maximum:86400},refresh:{anyOf:[{const:0},{type:"integer",minimum:10,maximum:86400}]},timeout:{type:"integer",minimum:1,maximum:120},maxBytes:{type:"integer",minimum:1024,maximum:50*1024*1024}},["url"]),No={oneOf:[Co,q({kind:{const:"static"},data:{}},["kind","data"]),q({kind:{const:"mock"},data:{},delay:{type:"integer",minimum:0,maximum:1e4},failStatus:{type:"integer",minimum:400,maximum:599}},["kind","data"])]};function _o(e){return{oneOf:[q({op:{const:"pick"},fields:{type:"array",minItems:1,maxItems:100,items:xe}},["op","fields"]),q({op:{const:"rename"},fields:{type:"object",additionalProperties:xe}},["op","fields"]),q({op:{const:"filter"},field:xe,operator:{enum:rt},value:{}},["op","field","operator","value"]),q({op:{const:"sort"},field:xe,direction:{enum:["asc","desc"]}},["op","field"]),q({op:{const:"limit"},count:{type:"integer",minimum:1,maximum:1e5}},["op","count"]),q({op:{const:"groupBy"},by:{type:"array",maxItems:10,items:xe},aggregates:{type:"array",minItems:1,maxItems:20,items:q({fn:{enum:st},field:xe,as:xe},["fn","as"])}},["op","by","aggregates"]),q({op:{const:"custom"},name:e?{enum:e}:{type:"string",pattern:be},options:{type:"object"}},["op","name"])]}}function gn(e={}){let n=e.widgetTypes?{enum:[...e.widgetTypes]}:{type:"string",pattern:be},t=q({id:ne,type:n,title:pe,subtitle:pe,page:ne,source:ne,map:{type:"object",propertyNames:{pattern:"^[A-Za-z][A-Za-z0-9_]{0,63}$"},additionalProperties:Et},transforms:{type:"array",maxItems:S.transforms,items:_o(e.transforms)},options:{type:"object",description:"Type-specific options, validated by the widget type."},style:Io,actions:q({collapsible:{type:"boolean"},maximizable:{type:"boolean"},removable:{type:"boolean"},refreshable:{type:"boolean"}}),interactions:{type:"array",maxItems:S.interactions,items:q({on:{const:"select"},set:ne,from:Et},["on","set","from"])},layout:fn(!1)},["id","type","title","layout"]);return{$schema:"https://json-schema.org/draft/2020-12/schema",title:"AbsoluteUI dashboard definition",...q({schemaVersion:{const:1},id:ne,title:pe,description:{type:"string",maxLength:S.text},grid:q({columns:{type:"integer",minimum:1,maximum:24},rowHeight:{type:"integer",minimum:24,maximum:600},gap:{type:"integer",minimum:0,maximum:64},compaction:{enum:Qe}}),breakpoints:{type:"array",minItems:1,maxItems:S.breakpoints,items:q({name:ne,minWidth:{type:"integer",minimum:0,maximum:1e4},columns:{type:"integer",minimum:1,maximum:24}},["name","minWidth","columns"])},layouts:{type:"object",propertyNames:{pattern:ye},additionalProperties:{type:"array",maxItems:S.widgets,items:fn(!0)}},style:q({density:{enum:Ie},accent:{enum:Re}}),pages:{type:"array",minItems:1,maxItems:S.pages,items:q({id:ne,title:pe},["id","title"])},variables:{type:"array",maxItems:S.variables,items:jo},dataSources:{type:"object",maxProperties:S.dataSources,propertyNames:{pattern:ye},additionalProperties:No},widgets:{type:"array",maxItems:S.widgets,items:t}},["schemaVersion","id","title","widgets"])}}function hn(e){let n=e.split(""),t=[],r=(i,u)=>{for(let f=i;f<u;f++)n[f]!==`
11
+ [Truncated: see ${H.docUrl}]`;return{package:w,module:H.module,...h(H),howTo:L,exports:R}}},x=e.angular.map(g=>g.entry),$=g=>{let w=g.trim(),b=w.replace(/^@absoluteui\/angular\/?/,"").replace(/^aui-/,"");return e.angular.find(A=>A.entry===(b===""?"index":b))??e.angular.find(A=>A.declarations.some(T=>T.name===w||T.selector===w))},_={name:"get_angular",title:"Get an Angular binding",description:'An @absoluteui/angular entry point: selector, inputs, models, outputs, forms integration, templates, and its Angular example. Accepts the entry ("select"), the selector ("aui-select"), or the class ("AuiSelect").',inputSchema:{type:"object",additionalProperties:!1,required:["name"],properties:{name:Me,declaration:{type:"string",minLength:1,maxLength:128,description:"Only this declaration (class name) of the entry."}}},outputSchema:me(["entry","import"]),run:g=>{let w=ae(g,"name"),b=$(w);if(!b)return s.has(w.toLowerCase())?f(w):ee("Angular entry point",w,x);let A=Q(g,"declaration"),T=b.declarations.filter(R=>A===void 0||R.name===A);if(A!==void 0&&T.length===0)return ee(`declaration of ${b.import}`,A,b.declarations.map(R=>re(R.name)));let J=[["examples",U(b.examples)],...T.map(R=>[re(R.name),R])],{included:I,omitted:H}=ue(J,ie-600,i(b.docUrl));return{entry:b.entry,import:b.import,component:b.component,title:b.title,summary:b.summary,docUrl:b.docUrl,parts:I,omitted:H}}},v=e.guides.map(g=>g.slug),N=g=>{let w=g.trim().replace(/^\/+|\/+$/g,"").replace(/^docs\//,"").toLowerCase();return e.guides.find(b=>b.slug===w)??e.guides.find(b=>b.slug.endsWith(`/${w}`))??e.guides.find(b=>b.title.toLowerCase()===w)},y={name:"get_guide",title:"Get a guide",description:`A getting-started page, guide, or Angular guide as Markdown. Long guides return their outline and first sections; ask for one "section" by its heading. Slugs: ${v.join(", ")}.`,inputSchema:{type:"object",additionalProperties:!1,required:["slug"],properties:{slug:Me,section:{type:"string",minLength:1,maxLength:200}}},outputSchema:me(["slug","title","docUrl"]),run:g=>{let w=ae(g,"slug"),b=N(w);if(!b)return ee("guide",w,v);let A=gt(b.markdown),T=A.map(([R])=>R),J=Q(g,"section");if(J!==void 0){let R=A.find(([C])=>C.toLowerCase()===J.toLowerCase());if(!R)return ee(`section of ${b.slug}`,J,T);let L=ue([[R[0],R[1]]],ie-600,i(b.docUrl));return{slug:b.slug,title:b.title,docUrl:b.docUrl,outline:T,sections:L.included}}let{included:I,omitted:H}=ue(A.map(([R,L])=>[R,L]),ie-1200,i(b.docUrl));return{slug:b.slug,title:b.title,description:b.description,docUrl:b.docUrl,outline:T,sections:I,omitted:H}}},O=()=>{let g=Object.keys(e.tokens.themes[0]?.tokens??{});return[...new Set(g.map(w=>w.split("-")[0]??w))].sort()},E=g=>Object.fromEntries(e.tokens.themes.map(w=>[w.name,w.tokens[g]??null])),j={name:"get_tokens",title:"Get design tokens",description:'Design tokens: the component tokens of one component (CSS custom properties with their fallbacks) and the global tokens it reads, with values per built-in theme; or the global tokens of one group (such as "color" or "space"); or, without arguments, the groups and components that have tokens.',inputSchema:{type:"object",additionalProperties:!1,properties:{component:Me,group:{type:"string",minLength:1,maxLength:64}}},outputSchema:me(["themes"]),run:g=>{let w=Q(g,"component"),b=Q(g,"group"),A=e.tokens.themes.map(T=>({name:T.name,mode:T.mode}));if(w!==void 0){let T=w.toLowerCase(),J=e.tokens.components.find(V=>V.component===T),I=t.get(T);if(!J&&!I)return ee("component with tokens",w,[...new Set([...e.tokens.components.map(V=>V.component),...t.keys()])]);let H=(I?.tokens??[]).map(V=>({name:V,cssProperty:`--aui-${V}`,values:E(V)})),R=[["componentTokens",U(J?.tokens??[])],["globalTokens",U(H)]],{included:L,omitted:C}=ue(R,ie-600,()=>({truncated:!0,docUrl:`${e.docsUrl}/guides/theming/`}));return{themes:U(A),component:T,...L,omitted:C}}if(b!==void 0){let T=O();if(!T.includes(b.toLowerCase()))return ee("token group",b,T);let J=Object.keys(e.tokens.themes[0]?.tokens??{}).filter(I=>I===b.toLowerCase()||I.startsWith(`${b.toLowerCase()}-`));return{themes:U(A),group:b.toLowerCase(),tokens:J.map(I=>({name:I,cssProperty:`--aui-${I}`,values:E(I)})),densities:U(Object.fromEntries(Object.entries(e.tokens.densities).map(([I,H])=>[I,Object.fromEntries(Object.entries(H).filter(([R])=>J.includes(R)))])))}}return{themes:U(A),groups:O(),componentsWithTokens:e.tokens.components.map(T=>T.component),docUrl:`${e.docsUrl}/guides/theming/`}}},D=[...new Set(e.icons.icons.map(g=>g.category))],W={name:"search_icons",title:"Search the AbsoluteUI icon set",description:"Find icons in the original AbsoluteUI icon set by meaning, name, or alias, with the import for each. Prefer these over third-party icons, which work only through an icon adapter.",inputSchema:{type:"object",additionalProperties:!1,required:["query"],properties:{query:{type:"string",minLength:1,maxLength:200},category:{enum:D},limit:{type:"integer",minimum:1,maximum:50}}},outputSchema:me(["icons"]),run:g=>{let w=ae(g,"query"),b=Q(g,"category"),A=typeof g.limit=="number"?g.limit:10,T=e.icons.icons.find(R=>R.id===w.trim().toLowerCase()||R.aliases.includes(w.trim().toLowerCase())),J=n.search(w,{kinds:["icon"],limit:200}).map(R=>R.id),H=[...new Set([...T?[T.id]:[],...J])].map(R=>e.icons.icons.find(L=>L.id===R)).filter(R=>R!==void 0&&(b===void 0||R.category===b)).slice(0,A);return{icons:U(H.map(R=>({id:R.id,displayName:R.displayName,category:R.category,description:R.description,aliases:R.aliases,variants:R.variants,rtl:R.rtl,exportName:R.exportName,import:R.import}))),usage:"Pass the definition to renderIcon (import { renderIcon } from '@absoluteui/icons') or to a component's icons option. To use icons by name, import '@absoluteui/icons/set/register' once at start-up (it bundles the whole set).",docUrl:`${e.docsUrl}/guides/icons/`}}},F={name:"get_setup",title:"Get installation and setup",description:"How to install and set up AbsoluteUI of this version: packages, styles, theme runtime, configuration, and (for Angular) providers.",inputSchema:{type:"object",additionalProperties:!1,properties:{framework:{enum:["ts","angular"]}}},outputSchema:me(["version","framework","guides"]),run:g=>{let w=Q(g,"framework")??"ts",A=(w==="angular"?["angular/guides/getting-started","getting-started/installation"]:["getting-started/installation","getting-started/configuration"]).map(I=>{let H=e.guides.find(R=>R.slug===I);return[I,H?U({title:H.title,docUrl:H.docUrl,markdown:H.markdown}):null]}),{included:T,omitted:J}=ue(A,ie-600,I=>({truncated:!0,docUrl:`${e.docsUrl}/${I}/`}));return{version:e.version,framework:w,versionNote:`Install the same version (${e.version}) of every @absoluteui/* package as this server.`,guides:T,omitted:J}}};return[l,p,m,c,k,_,y,j,W,F]}/*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var oo="production";var Ge=class extends Error{name="AbsoluteUIError";category;code;details;constructor(n,t,r,o={}){super(ro(t,r,o)),this.category=n,this.code=t,this.details=Object.freeze({...o})}};function ro(e,n,t){let r=[`[AbsoluteUI ${e}] ${n}`];return t.property!==void 0&&r.push(`Property: ${t.property}.`),t.expected!==void 0&&r.push(`Expected: ${t.expected}.`),oo==="development"&&(t.component!==void 0&&r.push(`Component: ${t.component}.`),t.remediation!==void 0&&r.push(`Fix: ${t.remediation}`)),r.join(" ")}function bt(e,n,t){return new Ge("validation",e,n,t)}/*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var Ze=class extends Error{name="HelperError";code;kind;details;fields;constructor(n,t,r={}){super(t,r.cause===void 0?void 0:{cause:r.cause}),this.code=n,this.kind=r.kind??"internal",this.details=Object.freeze({...r.details}),this.fields=Object.freeze({...r.fields})}},Ke=class extends Ze{name="ValidationError";constructor(n,t,r={}){super(n,t,{...r,kind:"validation"})}};var Ye=class extends Ze{name="LimitError";constructor(n,t,r={}){super(n,t,{...r,kind:"limit"})}};/*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ *//*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var so=1e5;var Xe=()=>{throw new Ke("HLP_JSON_POINTER_INVALID","The JSON Pointer is not valid.")};function io(e){if(!e.includes("~"))return e;for(let n=0;n<e.length;n++)e[n]==="~"&&e[n+1]!=="0"&&e[n+1]!=="1"&&Xe();return e.replace(/~1/g,"/").replace(/~0/g,"~")}function wt(e){if(typeof e!="string"&&Xe(),e.length>so)throw new Ye("HLP_JSON_POINTER_TOO_LONG","The JSON Pointer is too long.");let n=e;if(n.startsWith("#"))try{n=decodeURIComponent(n.slice(1))}catch{Xe()}return n===""?[]:(n.startsWith("/")||Xe(),n.slice(1).split("/").map(io))}/*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ *//*! AbsoluteUI @absoluteui/components v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var ye="^[A-Za-z][A-Za-z0-9_-]{0,63}$",be="^([a-z][a-z0-9-]{0,31}:)?[a-z][a-z0-9-]{0,47}$",S=Object.freeze({widgets:200,dataSources:100,variables:50,pages:20,breakpoints:8,transforms:20,title:200,text:2e3,url:2048,params:50,headers:20,headerValue:1024,jsonDepth:20,jsonNodes:1e4,selectOptions:500,interactions:10}),Qe=["vertical","none"],Ie=["compact","comfortable","spacious"],Re=["primary","neutral","info","success","warning","danger","chart-1","chart-2","chart-3","chart-4","chart-5","chart-6","chart-7","chart-8"],et=["default","subtle","transparent"],tn=["dateRange","select","text","number"],tt=["today","yesterday","last7Days","last30Days","thisWeek","lastWeek","thisMonth","lastMonth","thisQuarter","lastQuarter","thisYear","lastYear","yearToDate","last5BusinessDays","last20BusinessDays"],nt=["GET","POST"],ot=["same-origin","include","omit"],nn=/^(authorization|cookie|cookie2|set-cookie|host|origin|referer|proxy-.*|sec-.*)$/i,on=/\{\{\s*([A-Za-z][A-Za-z0-9_-]{0,63})(?:\.(from|to))?\s*\}\}/g,rt=["eq","ne","gt","gte","lt","lte","in","contains"],st=["sum","avg","min","max","count"];/*! AbsoluteUI @absoluteui/components v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var ao=100,co=new RegExp(ye),an=new RegExp(be),lo=/^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,64}$/,uo=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/,cn=new Set(["__proto__","prototype","constructor"]),xt=class{issues=[];add(n,t,r){this.issues.length<ao&&this.issues.push({path:n,code:t,expected:r})}};function dn(e){for(let n=0;n<e.length;n++){let t=e.charCodeAt(n);if(t<32||t===127)return!0}return!1}function mo(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function d(e,n){return`${e}/${mo(String(n))}`}function te(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;let n=Object.getPrototypeOf(e);return n===Object.prototype||n===null}function M(e,n,t,r,o=[]){if(!te(n)){e.add(t,"type","object");return}for(let s of Object.keys(n))r.includes(s)||e.add(d(t,s),"unknown-key",`one of: ${r.join(", ")}`);for(let s of o)n[s]===void 0&&e.add(d(t,s),"required","a value");return n}function ce(e,n,t,r,o=1){if(typeof n!="string"||n.length<o||n.length>r){e.add(t,"type",`string of ${o} to ${r} characters`);return}return n}function de(e,n,t){if(typeof n!="string"||!co.test(n)){e.add(t,"id",`id matching ${ye}`);return}return n}function G(e,n,t,r,o){if(typeof n!="number"||!Number.isInteger(n)||n<r||n>o){e.add(t,"range",`integer from ${r} to ${o}`);return}return n}function vt(e,n,t){if(typeof n!="number"||!Number.isFinite(n)){e.add(t,"type","finite number");return}return n}function at(e,n,t){if(typeof n!="boolean"){e.add(t,"type","boolean");return}return n}function Y(e,n,t,r){if(typeof n!="string"||!r.includes(n)){e.add(t,"enum",`one of: ${r.join(", ")}`);return}return n}function ve(e,n,t){return cn.has(n)?(e.add(t,"unsafe-key","a key other than __proto__, prototype, or constructor"),!1):!0}function kt(e,n,t){if(typeof n!="string"||n.length>512||n!==""&&!n.startsWith("/")){e.add(t,"pointer",'JSON Pointer (RFC 6901) such as "/data/0/total"');return}let r;try{r=wt(n)}catch{e.add(t,"pointer",'JSON Pointer (RFC 6901) such as "/data/0/total"');return}if(r.some(o=>cn.has(o))){e.add(t,"unsafe-key","pointer tokens other than __proto__, prototype, or constructor");return}return n}function Je(e,n,t){let r=0,o=!1,s=(i,u,f)=>{if(!o){if(++r>S.jsonNodes||f>S.jsonDepth){e.add(t,"size",`JSON with at most ${S.jsonNodes} values and depth ${S.jsonDepth}`),o=!0;return}if(i===null||typeof i=="string"||typeof i=="boolean")return i;if(typeof i=="number"){if(Number.isFinite(i))return i;e.add(u,"type","finite number");return}if(Array.isArray(i)){let l=[];return i.forEach((a,p)=>{let m=s(a,d(u,p),f+1);m!==void 0&&l.push(m)}),Object.freeze(l)}if(te(i)){let l={};for(let[a,p]of Object.entries(i)){if(!ve(e,a,d(u,a)))continue;let m=s(p,d(u,a),f+1);m!==void 0&&(l[a]=m)}return Object.freeze(l)}e.add(u,"type","JSON value (string, number, boolean, null, array, or plain object)")}};return s(n,t,0)}function ln(e,n,t){if(!te(n)){e.add(t,"type","object");return}return Je(e,n,t)}function P(e,n,t){t!==void 0&&(e[n]=t)}function po(e,n,t){let r=M(e,n,t,["columns","rowHeight","gap","compaction"]);if(!r)return;let o={};return r.columns!==void 0&&P(o,"columns",G(e,r.columns,d(t,"columns"),1,24)),r.rowHeight!==void 0&&P(o,"rowHeight",G(e,r.rowHeight,d(t,"rowHeight"),24,600)),r.gap!==void 0&&P(o,"gap",G(e,r.gap,d(t,"gap"),0,64)),r.compaction!==void 0&&P(o,"compaction",Y(e,r.compaction,d(t,"compaction"),Qe)),o}function un(e,n,t,r,o){let s=["x","y","w","h","minW","minH","maxW","maxH","locked"],i=M(e,n,t,o?["id",...s]:s,o?["id","x","y","w","h"]:["x","y","w","h"]);if(!i)return;let u=e.issues.length,f=G(e,i.x,d(t,"x"),0,r-1),l=G(e,i.y,d(t,"y"),0,1e4),a=G(e,i.w,d(t,"w"),1,r),p=G(e,i.h,d(t,"h"),1,100),m={id:"",x:f??0,y:l??0,w:a??1,h:p??1};o&&P(m,"id",de(e,i.id,d(t,"id")));for(let h of["minW","maxW"])i[h]!==void 0&&P(m,h,G(e,i[h],d(t,h),1,r));for(let h of["minH","maxH"])i[h]!==void 0&&P(m,h,G(e,i[h],d(t,h),1,100));if(i.locked!==void 0&&P(m,"locked",at(e,i.locked,d(t,"locked"))),e.issues.length!==u)return;if(m.x+m.w>r&&e.add(d(t,"w"),"range",`x + w at most ${r} (the column count)`),m.minW!==void 0&&m.maxW!==void 0&&m.minW>m.maxW&&e.add(d(t,"minW"),"range","minW at most maxW"),m.minH!==void 0&&m.maxH!==void 0&&m.minH>m.maxH&&e.add(d(t,"minH"),"range","minH at most maxH"),m.minW!==void 0&&m.w<m.minW&&e.add(d(t,"w"),"range","w at least minW"),m.maxW!==void 0&&m.w>m.maxW&&e.add(d(t,"w"),"range","w at most maxW"),m.minH!==void 0&&m.h<m.minH&&e.add(d(t,"h"),"range","h at least minH"),m.maxH!==void 0&&m.h>m.maxH&&e.add(d(t,"h"),"range","h at most maxH"),o)return m;let c={x:m.x,y:m.y,w:m.w,h:m.h};for(let h of["minW","minH","maxW","maxH","locked"])P(c,h,m[h]);return c}function fo(e,n,t){let r=M(e,n,t,["accent","surface","border","shadow","header","density","padding"]);if(!r)return;let o={};r.accent!==void 0&&P(o,"accent",Y(e,r.accent,d(t,"accent"),Re)),r.surface!==void 0&&P(o,"surface",Y(e,r.surface,d(t,"surface"),et));for(let s of["border","shadow","header"])r[s]!==void 0&&P(o,s,at(e,r[s],d(t,s)));return r.density!==void 0&&P(o,"density",Y(e,r.density,d(t,"density"),Ie)),r.padding!==void 0&&P(o,"padding",G(e,r.padding,d(t,"padding"),0,4)),o}function go(e,n,t){let r=M(e,n,t,["density","accent"]);if(!r)return;let o={};return r.density!==void 0&&P(o,"density",Y(e,r.density,d(t,"density"),Ie)),r.accent!==void 0&&P(o,"accent",Y(e,r.accent,d(t,"accent"),Re)),o}function rn(e,n,t){if(typeof n!="string"||!uo.test(n)||Number.isNaN(Date.parse(`${n}T00:00:00Z`))){e.add(t,"date","ISO date YYYY-MM-DD");return}return n}function ho(e,n,t){if(te(n)&&n.preset!==void 0){let i=M(e,n,t,["preset"],["preset"]),u=i?Y(e,i.preset,d(t,"preset"),tt):void 0;return u===void 0?void 0:{preset:u}}let r=M(e,n,t,["from","to"],["from","to"]);if(!r)return;let o=rn(e,r.from,d(t,"from")),s=rn(e,r.to,d(t,"to"));if(!(o===void 0||s===void 0))return o>s&&e.add(d(t,"to"),"range","to on or after from"),{from:o,to:s}}function yo(e,n,t){let r=te(n)?Y(e,n.kind,d(t,"kind"),tn):void 0;if(!te(n)){e.add(t,"type","object");return}if(r===void 0)return;let o=["id","label","kind","default"],s={dateRange:["businessCalendar"],select:["options","multiple"],text:["maxLength"],number:["min","max"]},i=M(e,n,t,[...o,...s[r]],r==="select"?["id","label","kind","options"]:["id","label","kind"]);if(!i)return;let u=de(e,i.id,d(t,"id"))??"",f=ce(e,i.label,d(t,"label"),S.title)??"",l=d(t,"default");switch(r){case"dateRange":{let a={id:u,label:f,kind:r};return i.default!==void 0&&P(a,"default",ho(e,i.default,l)),i.businessCalendar!==void 0&&P(a,"businessCalendar",de(e,i.businessCalendar,d(t,"businessCalendar"))),a}case"select":{let a=[],p=d(t,"options");if(!Array.isArray(i.options)||i.options.length<1||i.options.length>S.selectOptions)e.add(p,"type",`array of 1 to ${S.selectOptions} options`);else{let c=new Set;i.options.forEach((h,k)=>{let x=M(e,h,d(p,k),["value","label"],["value","label"]);if(!x)return;let $=ce(e,x.value,d(d(p,k),"value"),S.title,0),_=ce(e,x.label,d(d(p,k),"label"),S.title);$===void 0||_===void 0||(c.has($)&&e.add(d(d(p,k),"value"),"duplicate-id","unique option values"),c.add($),a.push(Object.freeze({value:$,label:_})))})}let m={id:u,label:f,kind:r,options:Object.freeze(a)};if(i.multiple!==void 0&&P(m,"multiple",at(e,i.multiple,d(t,"multiple"))),i.default!==void 0){let c=new Set(a.map(k=>k.value)),h=(k,x)=>typeof k=="string"&&c.has(k)?!0:(e.add(x,"reference","one of the option values"),!1);if(m.multiple===!0)if(!Array.isArray(i.default))e.add(l,"type","array of option values");else{let k=i.default.filter((x,$)=>h(x,d(l,$)));m.default=Object.freeze(k)}else h(i.default,l)&&(m.default=i.default)}return m}case"text":{let a={id:u,label:f,kind:r};return i.maxLength!==void 0&&P(a,"maxLength",G(e,i.maxLength,d(t,"maxLength"),1,S.text)),i.default!==void 0&&P(a,"default",ce(e,i.default,l,a.maxLength??S.text,0)),a}case"number":{let a={id:u,label:f,kind:r};if(i.min!==void 0&&P(a,"min",vt(e,i.min,d(t,"min"))),i.max!==void 0&&P(a,"max",vt(e,i.max,d(t,"max"))),a.min!==void 0&&a.max!==void 0&&a.min>a.max&&e.add(d(t,"min"),"range","min at most max"),i.default!==void 0){let p=vt(e,i.default,l);p!==void 0&&(a.min!==void 0&&p<a.min||a.max!==void 0&&p>a.max)&&e.add(l,"range","a default between min and max"),P(a,"default",p)}return a}}}function sn(e){return[...e.matchAll(on)].map(n=>n[1]??"")}function bo(e,n,t){let r=ce(e,n,t,S.url);if(r===void 0)return;let o='absolute http(s) URL or root-relative path ("/api/..."), without placeholders or user info';if(r.includes("{{")||/\s/.test(r)||dn(r)){e.add(t,"url",o);return}if(r.startsWith("/")&&!r.startsWith("//"))return r;let s;try{s=new URL(r)}catch{e.add(t,"url",o);return}if(s.protocol!=="https:"&&s.protocol!=="http:"||s.username!==""||s.password!==""){e.add(t,"url",o);return}return r}function wo(e,n,t,r){if(!te(n)){e.add(t,"type","object");return}let o=n.kind===void 0?"http":Y(e,n.kind,d(t,"kind"),["http","static","mock"]);if(o===void 0)return;if(o==="static"){let f=M(e,n,t,["kind","data"],["data"]),l=f?Je(e,f.data,d(t,"data")):void 0;return l===void 0?void 0:{kind:o,data:l}}if(o==="mock"){let f=M(e,n,t,["kind","data","delay","failStatus"],["data"]);if(!f)return;let l=Je(e,f.data,d(t,"data"));if(l===void 0)return;let a={kind:o,data:l};return f.delay!==void 0&&P(a,"delay",G(e,f.delay,d(t,"delay"),0,1e4)),f.failStatus!==void 0&&P(a,"failStatus",G(e,f.failStatus,d(t,"failStatus"),400,599)),a}let s=M(e,n,t,["kind","url","method","params","headers","body","credentials","select","ttl","refresh","timeout","maxBytes"],["url"]);if(!s)return;let i=bo(e,s.url,d(t,"url"));if(i===void 0)return;let u={kind:"http",url:i};if(s.method!==void 0&&P(u,"method",Y(e,s.method,d(t,"method"),nt)),s.params!==void 0){let f=d(t,"params"),l=M(e,s.params,f,Object.keys(te(s.params)?s.params:{}));if(l){let a=Object.entries(l);a.length>S.params&&e.add(f,"size",`at most ${S.params} parameters`);let p={};for(let[m,c]of a){let h=d(f,m);if(ve(e,m,h))if(m.length<1||m.length>128)e.add(h,"type","parameter name of 1 to 128 characters");else if(typeof c=="string"&&c.length<=S.text){for(let k of sn(c))r.add(k);p[m]=c}else typeof c=="boolean"||typeof c=="number"&&Number.isFinite(c)?p[m]=c:e.add(h,"type",`string (at most ${S.text} characters), finite number, or boolean`)}u.params=Object.freeze(p)}}if(s.headers!==void 0){let f=d(t,"headers"),l=M(e,s.headers,f,Object.keys(te(s.headers)?s.headers:{}));if(l){let a=Object.entries(l);a.length>S.headers&&e.add(f,"size",`at most ${S.headers} headers`);let p={};for(let[m,c]of a){let h=d(f,m);ve(e,m,h)&&(lo.test(m)?nn.test(m)?e.add(h,"forbidden-header","no Authorization, Cookie, Host, Origin, Referer, Proxy-*, or Sec-* header (authentication belongs to the host fetcher)"):typeof c!="string"||c.length>S.headerValue||dn(c)||c.includes("{{")?e.add(h,"header",`header value of at most ${S.headerValue} characters, single line, without placeholders`):p[m]=c:e.add(h,"header","HTTP header name (token characters, at most 64)"))}u.headers=Object.freeze(p)}}if(s.body!==void 0){u.method!=="POST"&&e.add(d(t,"body"),"body","a body only with method POST");let f=Je(e,s.body,d(t,"body"));if(f!==void 0){let l=a=>{if(typeof a=="string")for(let p of sn(a))r.add(p);else Array.isArray(a)?a.forEach(l):a!==null&&typeof a=="object"&&Object.values(a).forEach(l)};l(f),u.body=f}}if(s.credentials!==void 0&&P(u,"credentials",Y(e,s.credentials,d(t,"credentials"),ot)),s.select!==void 0&&P(u,"select",kt(e,s.select,d(t,"select"))),s.ttl!==void 0&&P(u,"ttl",G(e,s.ttl,d(t,"ttl"),0,86400)),s.refresh!==void 0){let f=G(e,s.refresh,d(t,"refresh"),0,86400);f!==void 0&&f!==0&&f<10?e.add(d(t,"refresh"),"range","0 (off) or 10 to 86400 seconds"):P(u,"refresh",f)}return s.timeout!==void 0&&P(u,"timeout",G(e,s.timeout,d(t,"timeout"),1,120)),s.maxBytes!==void 0&&P(u,"maxBytes",G(e,s.maxBytes,d(t,"maxBytes"),1024,50*1024*1024)),u}function we(e,n,t){let r=ce(e,n,t,128);if(!(r!==void 0&&!ve(e,r,t)))return r}function vo(e,n,t){if(!te(n)){e.add(t,"type","object");return}let r=Y(e,n.op,d(t,"op"),["pick","rename","filter","sort","limit","groupBy","custom"]);switch(r){case void 0:return;case"pick":{let o=M(e,n,t,["op","fields"],["fields"]);if(!o)return;if(!Array.isArray(o.fields)||o.fields.length<1||o.fields.length>100){e.add(d(t,"fields"),"type","array of 1 to 100 field names");return}let s=o.fields.map((i,u)=>we(e,i,d(d(t,"fields"),u))).filter(i=>i!==void 0);return{op:r,fields:Object.freeze(s)}}case"rename":{let o=M(e,n,t,["op","fields"],["fields"]),s=d(t,"fields"),i=o?M(e,o.fields,s,Object.keys(te(o.fields)?o.fields:{})):void 0;if(!i)return;let u={};for(let[f,l]of Object.entries(i)){if(!ve(e,f,d(s,f)))continue;let a=we(e,l,d(s,f));a!==void 0&&(u[f]=a)}return{op:r,fields:Object.freeze(u)}}case"filter":{let o=M(e,n,t,["op","field","operator","value"],["field","operator","value"]);if(!o)return;let s=we(e,o.field,d(t,"field")),i=Y(e,o.operator,d(t,"operator"),rt),u=Je(e,o.value,d(t,"value"));return i==="in"&&!Array.isArray(o.value)&&e.add(d(t,"value"),"type",'array for operator "in"'),s===void 0||i===void 0||u===void 0?void 0:{op:r,field:s,operator:i,value:u}}case"sort":{let o=M(e,n,t,["op","field","direction"],["field"]);if(!o)return;let s=we(e,o.field,d(t,"field"));if(s===void 0)return;if(o.direction===void 0)return{op:r,field:s};let i=Y(e,o.direction,d(t,"direction"),["asc","desc"]);return i===void 0?void 0:{op:r,field:s,direction:i}}case"limit":{let o=M(e,n,t,["op","count"],["count"]),s=o?G(e,o.count,d(t,"count"),1,1e5):void 0;return s===void 0?void 0:{op:r,count:s}}case"groupBy":{let o=M(e,n,t,["op","by","aggregates"],["by","aggregates"]);if(!o)return;let s=d(t,"by"),i=d(t,"aggregates");if(!Array.isArray(o.by)||o.by.length>10){e.add(s,"type","array of at most 10 field names (empty for a grand total)");return}if(!Array.isArray(o.aggregates)||o.aggregates.length<1||o.aggregates.length>20){e.add(i,"type","array of 1 to 20 aggregates");return}let u=o.by.map((l,a)=>we(e,l,d(s,a))).filter(l=>l!==void 0),f=[];return o.aggregates.forEach((l,a)=>{let p=d(i,a),m=M(e,l,p,["fn","field","as"],["fn","as"]);if(!m)return;let c=Y(e,m.fn,d(p,"fn"),st),h=we(e,m.as,d(p,"as"));if(c===void 0||h===void 0)return;if(m.field===void 0){c!=="count"?e.add(d(p,"field"),"required",`a field for ${c}`):f.push(Object.freeze({fn:c,as:h}));return}let k=we(e,m.field,d(p,"field"));k!==void 0&&f.push(Object.freeze({fn:c,field:k,as:h}))}),{op:r,by:Object.freeze(u),aggregates:Object.freeze(f)}}case"custom":{let o=M(e,n,t,["op","name","options"],["name"]);if(!o)return;let s=typeof o.name=="string"&&an.test(o.name)?o.name:void 0;s===void 0&&e.add(d(t,"name"),"type",`registered transform name matching ${be}`);let i=o.options===void 0?void 0:ln(e,o.options,d(t,"options"));return s===void 0?void 0:i===void 0?{op:r,name:s}:{op:r,name:s,options:i}}}}function xo(e,n,t){let r=["collapsible","maximizable","removable","refreshable"],o=M(e,n,t,r);if(!o)return;let s={};for(let i of r)o[i]!==void 0&&P(s,i,at(e,o[i],d(t,i)));return s}function ko(e,n,t,r){let o=M(e,n,t,["id","type","title","subtitle","page","source","map","transforms","options","style","actions","interactions","layout"],["id","type","title","layout"]);if(!o)return;let s=de(e,o.id,d(t,"id")),i=typeof o.type=="string"&&an.test(o.type)?o.type:void 0;o.type!==void 0&&i===void 0&&e.add(d(t,"type"),"type",`widget type name matching ${be}`);let u=ce(e,o.title,d(t,"title"),S.title),f=o.layout===void 0?void 0:un(e,o.layout,d(t,"layout"),r,!1);if(s===void 0||i===void 0||u===void 0||f===void 0)return;let l={id:s,type:i,title:u,layout:Object.freeze(f)};if(o.subtitle!==void 0&&P(l,"subtitle",ce(e,o.subtitle,d(t,"subtitle"),S.title)),o.page!==void 0&&P(l,"page",de(e,o.page,d(t,"page"))),o.source!==void 0&&P(l,"source",de(e,o.source,d(t,"source"))),o.map!==void 0){let a=d(t,"map"),p=M(e,o.map,a,Object.keys(te(o.map)?o.map:{}));if(p){let m={};for(let[c,h]of Object.entries(p)){if(!ve(e,c,d(a,c)))continue;if(!/^[A-Za-z][A-Za-z0-9_]{0,63}$/.test(c)){e.add(d(a,c),"id","widget input name (letters, digits, underscore)");continue}let k=kt(e,h,d(a,c));k!==void 0&&(m[c]=k)}l.map=Object.freeze(m)}}if(o.transforms!==void 0){let a=d(t,"transforms");!Array.isArray(o.transforms)||o.transforms.length>S.transforms?e.add(a,"type",`array of at most ${S.transforms} transforms`):l.transforms=Object.freeze(o.transforms.map((p,m)=>vo(e,p,d(a,m))).filter(p=>p!==void 0).map(p=>Object.freeze(p)))}if(o.options!==void 0&&P(l,"options",ln(e,o.options,d(t,"options"))),o.style!==void 0&&P(l,"style",it(fo(e,o.style,d(t,"style")))),o.actions!==void 0&&P(l,"actions",it(xo(e,o.actions,d(t,"actions")))),o.interactions!==void 0){let a=d(t,"interactions");if(!Array.isArray(o.interactions)||o.interactions.length>S.interactions)e.add(a,"type",`array of at most ${S.interactions} interactions`);else{let p=[];o.interactions.forEach((m,c)=>{let h=d(a,c),k=M(e,m,h,["on","set","from"],["on","set","from"]);if(!k)return;let x=Y(e,k.on,d(h,"on"),["select"]),$=de(e,k.set,d(h,"set")),_=kt(e,k.from,d(h,"from"));x!==void 0&&$!==void 0&&_!==void 0&&p.push(Object.freeze({on:x,set:$,from:_}))}),l.interactions=Object.freeze(p)}}return l}function it(e){return e===void 0?void 0:Object.freeze(e)}function So(e,n,t,r){if(!Array.isArray(n)||n.length<1||n.length>S.breakpoints){e.add(t,"type",`array of 1 to ${S.breakpoints} breakpoints`);return}let o=[];if(n.forEach((u,f)=>{let l=d(t,f),a=M(e,u,l,["name","minWidth","columns"],["name","minWidth","columns"]);if(!a)return;let p=de(e,a.name,d(l,"name")),m=G(e,a.minWidth,d(l,"minWidth"),0,1e4),c=G(e,a.columns,d(l,"columns"),1,24);p!==void 0&&m!==void 0&&c!==void 0&&o.push(Object.freeze({name:p,minWidth:m,columns:c}))}),o.length!==n.length)return;let s=new Set,i=new Set;return o.forEach((u,f)=>{s.has(u.name)&&e.add(d(d(t,f),"name"),"duplicate-id","unique breakpoint names"),i.has(u.minWidth)&&e.add(d(d(t,f),"minWidth"),"duplicate-id","unique breakpoint minWidth values"),s.add(u.name),i.add(u.minWidth)}),o.some(u=>u.minWidth===0)||e.add(t,"breakpoints","one breakpoint with minWidth 0"),o.reduce((u,f)=>f.minWidth>u.minWidth?f:u).columns!==r&&e.add(t,"breakpoints",`the widest breakpoint with ${r} columns (grid.columns)`),o}var $o=["schemaVersion","id","title","description","grid","breakpoints","layouts","style","pages","variables","dataSources","widgets"];function Eo(e,n){let t=M(e,n,"",$o,["schemaVersion","id","title","widgets"]);if(!t)return;t.schemaVersion!==1&&e.add("/schemaVersion","version",`schemaVersion ${1} (run migrateDefinition first for older documents)`);let r=de(e,t.id,"/id")??"",o=ce(e,t.title,"/title",S.title)??"",s={schemaVersion:1,id:r,title:o,widgets:[]};t.description!==void 0&&P(s,"description",ce(e,t.description,"/description",S.text,0)),t.grid!==void 0&&P(s,"grid",it(po(e,t.grid,"/grid")));let i=s.grid?.columns??12;t.style!==void 0&&P(s,"style",it(go(e,t.style,"/style")));let u;t.breakpoints!==void 0&&(u=So(e,t.breakpoints,"/breakpoints",i),u&&(s.breakpoints=Object.freeze(u)));let f=new Set;if(t.pages!==void 0)if(!Array.isArray(t.pages)||t.pages.length<1||t.pages.length>S.pages)e.add("/pages","type",`array of 1 to ${S.pages} pages`);else{let c=[];t.pages.forEach((h,k)=>{let x=d("/pages",k),$=M(e,h,x,["id","title"],["id","title"]);if(!$)return;let _=de(e,$.id,d(x,"id")),v=ce(e,$.title,d(x,"title"),S.title);_===void 0||v===void 0||(f.has(_)&&e.add(d(x,"id"),"duplicate-id","unique page ids"),f.add(_),c.push(Object.freeze({id:_,title:v})))}),s.pages=Object.freeze(c)}let l=new Set,a=new Map;if(t.variables!==void 0)if(!Array.isArray(t.variables)||t.variables.length>S.variables)e.add("/variables","type",`array of at most ${S.variables} variables`);else{let c=[];t.variables.forEach((h,k)=>{let x=yo(e,h,d("/variables",k));x&&(l.has(x.id)&&e.add(d(d("/variables",k),"id"),"duplicate-id","unique variable ids"),l.add(x.id),a.set(x.id,x.kind),c.push(Object.freeze(x)))}),s.variables=Object.freeze(c)}let p=new Set;if(t.dataSources!==void 0){let c=M(e,t.dataSources,"/dataSources",Object.keys(te(t.dataSources)?t.dataSources:{}));if(c){let h=Object.entries(c);h.length>S.dataSources&&e.add("/dataSources","size",`at most ${S.dataSources} data sources`);let k={};for(let[x,$]of h){let _=d("/dataSources",x);if(de(e,x,_)===void 0||!ve(e,x,_))continue;let v=new Set,N=wo(e,$,_,v);if(N){for(let y of v)l.has(y)||e.add(_,"reference",`placeholders that name declared variables (unknown: ${y})`);p.add(x),k[x]=Object.freeze(N)}}s.dataSources=Object.freeze(k)}}let m=new Set;if(!Array.isArray(t.widgets)||t.widgets.length>S.widgets)e.add("/widgets","type",`array of at most ${S.widgets} widgets`);else{let c=[];t.widgets.forEach((h,k)=>{let x=d("/widgets",k),$=ko(e,h,x,i);$&&(m.has($.id)&&e.add(d(x,"id"),"duplicate-id","unique widget ids"),m.add($.id),$.source!==void 0&&!p.has($.source)&&e.add(d(x,"source"),"reference","the id of a declared data source"),$.page!==void 0&&!f.has($.page)&&e.add(d(x,"page"),"reference","the id of a declared page"),$.page===void 0&&f.size>0&&e.add(d(x,"page"),"required","a page id (the dashboard declares pages)"),($.map!==void 0||$.transforms!==void 0)&&$.source===void 0&&e.add(d(x,"source"),"required","a data source for map or transforms"),$.interactions?.forEach((_,v)=>{let N=a.get(_.set);N===void 0?e.add(d(d(d(x,"interactions"),v),"set"),"reference","the id of a declared variable"):N==="dateRange"&&e.add(d(d(d(x,"interactions"),v),"set"),"reference","a select, text, or number variable")}),c.push(Object.freeze($)))}),s.widgets=Object.freeze(c)}if(t.layouts!==void 0){let c=new Map((u??mn(i)).map(k=>[k.name,k.columns])),h=M(e,t.layouts,"/layouts",[...c.keys()]);if(h){let k={};for(let[x,$]of Object.entries(h)){let _=d("/layouts",x),v=c.get(x);if(v===void 0)continue;if(!Array.isArray($)||$.length>S.widgets){e.add(_,"type",`array of at most ${S.widgets} layout entries`);continue}let N=new Set,y=[];$.forEach((O,E)=>{let j=un(e,O,d(_,E),v,!0);j&&(m.has(j.id)||e.add(d(d(_,E),"id"),"reference","the id of a declared widget"),N.has(j.id)&&e.add(d(d(_,E),"id"),"duplicate-id","one entry per widget"),N.add(j.id),y.push(Object.freeze(j)))}),k[x]=Object.freeze(y)}s.layouts=Object.freeze(k)}}return Object.freeze(s)}function mn(e){return[{name:"lg",minWidth:1024,columns:e},{name:"md",minWidth:640,columns:Math.max(1,Math.round(e/2))},{name:"sm",minWidth:0,columns:1}]}function St(e){let n=new xt,t=Eo(n,e);return n.issues.length>0||t===void 0?{ok:!1,issues:Object.freeze(n.issues.map(r=>Object.freeze(r)))}:{ok:!0,definition:t}}/*! AbsoluteUI @absoluteui/components v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var Ao={};function To(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;let n=Object.getPrototypeOf(e);return n===Object.prototype||n===null}function $t(e){let n=o=>{throw bt("DASHBOARD_DEFINITION_VERSION","Unsupported dashboard definition version.",{component:"dashboard",property:"/schemaVersion",expected:o})};if(!To(e))return n("a definition object");let t=e.schemaVersion;if(typeof t!="number"||!Number.isInteger(t)||t<1)return n("a positive integer schemaVersion");if(t>1)return n(`schemaVersion ${1} or lower (the document was written by a newer AbsoluteUI)`);let r=e;for(let o=t;o<1;o++){let s=Ao[o];if(!s)return n(`a migration path from schemaVersion ${o}`);r={...s(r),schemaVersion:o+1}}return r}/*! AbsoluteUI @absoluteui/components v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ *//*! AbsoluteUI @absoluteui/components v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */var ne={type:"string",pattern:ye},Et={type:"string",maxLength:512,pattern:"^(/.*)?$",description:"JSON Pointer (RFC 6901)."},pe={type:"string",minLength:1,maxLength:S.title},pn={type:"string",pattern:"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},xe={type:"string",minLength:1,maxLength:128,not:{enum:["__proto__","prototype","constructor"]}},Oo=e=>e.replace(/[a-z]/g,n=>`[${n.toUpperCase()}${n}]`),q=(e,n=[])=>({type:"object",additionalProperties:!1,required:n,properties:e});function fn(e){let n={x:{type:"integer",minimum:0,maximum:23},y:{type:"integer",minimum:0,maximum:1e4},w:{type:"integer",minimum:1,maximum:24},h:{type:"integer",minimum:1,maximum:100},minW:{type:"integer",minimum:1,maximum:24},minH:{type:"integer",minimum:1,maximum:100},maxW:{type:"integer",minimum:1,maximum:24},maxH:{type:"integer",minimum:1,maximum:100},locked:{type:"boolean"}};return e?q({id:ne,...n},["id","x","y","w","h"]):q(n,["x","y","w","h"])}var Io=q({accent:{enum:Re},surface:{enum:et},border:{type:"boolean"},shadow:{type:"boolean"},header:{type:"boolean"},density:{enum:Ie},padding:{type:"integer",minimum:0,maximum:4}}),Ro={oneOf:[q({preset:{enum:tt}},["preset"]),q({from:pn,to:pn},["from","to"])]},jo={oneOf:[q({id:ne,label:pe,kind:{const:"dateRange"},default:Ro,businessCalendar:ne},["id","label","kind"]),q({id:ne,label:pe,kind:{const:"select"},options:{type:"array",minItems:1,maxItems:S.selectOptions,items:q({value:{type:"string",maxLength:S.title},label:pe},["value","label"])},multiple:{type:"boolean"},default:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},["id","label","kind","options"]),q({id:ne,label:pe,kind:{const:"text"},default:{type:"string",maxLength:S.text},maxLength:{type:"integer",minimum:1,maximum:S.text}},["id","label","kind"]),q({id:ne,label:pe,kind:{const:"number"},default:{type:"number"},min:{type:"number"},max:{type:"number"}},["id","label","kind"])]},Co=q({kind:{const:"http"},url:{type:"string",minLength:1,maxLength:S.url,pattern:"^(https?://[^\\s{}]+|/(?!/)[^\\s{}]*)$",description:"Absolute http(s) URL or root-relative path. The host allowlist decides which origins are reachable."},method:{enum:nt},params:{type:"object",maxProperties:S.params,propertyNames:{minLength:1,maxLength:128},additionalProperties:{type:["string","number","boolean"]},description:"Query parameters; strings may contain {{variable}} or {{variable.from}} placeholders."},headers:{type:"object",maxProperties:S.headers,propertyNames:{pattern:"^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,64}$",not:{pattern:Oo("^(authorization|cookie|cookie2|set-cookie|host|origin|referer|proxy-.*|sec-.*)$")}},additionalProperties:{type:"string",maxLength:S.headerValue},description:"Static non-secret headers. Authentication belongs to the host fetcher."},body:{description:"JSON body for POST; strings may contain placeholders."},credentials:{enum:ot},select:Et,ttl:{type:"integer",minimum:0,maximum:86400},refresh:{anyOf:[{const:0},{type:"integer",minimum:10,maximum:86400}]},timeout:{type:"integer",minimum:1,maximum:120},maxBytes:{type:"integer",minimum:1024,maximum:50*1024*1024}},["url"]),No={oneOf:[Co,q({kind:{const:"static"},data:{}},["kind","data"]),q({kind:{const:"mock"},data:{},delay:{type:"integer",minimum:0,maximum:1e4},failStatus:{type:"integer",minimum:400,maximum:599}},["kind","data"])]};function _o(e){return{oneOf:[q({op:{const:"pick"},fields:{type:"array",minItems:1,maxItems:100,items:xe}},["op","fields"]),q({op:{const:"rename"},fields:{type:"object",additionalProperties:xe}},["op","fields"]),q({op:{const:"filter"},field:xe,operator:{enum:rt},value:{}},["op","field","operator","value"]),q({op:{const:"sort"},field:xe,direction:{enum:["asc","desc"]}},["op","field"]),q({op:{const:"limit"},count:{type:"integer",minimum:1,maximum:1e5}},["op","count"]),q({op:{const:"groupBy"},by:{type:"array",maxItems:10,items:xe},aggregates:{type:"array",minItems:1,maxItems:20,items:q({fn:{enum:st},field:xe,as:xe},["fn","as"])}},["op","by","aggregates"]),q({op:{const:"custom"},name:e?{enum:e}:{type:"string",pattern:be},options:{type:"object"}},["op","name"])]}}function gn(e={}){let n=e.widgetTypes?{enum:[...e.widgetTypes]}:{type:"string",pattern:be},t=q({id:ne,type:n,title:pe,subtitle:pe,page:ne,source:ne,map:{type:"object",propertyNames:{pattern:"^[A-Za-z][A-Za-z0-9_]{0,63}$"},additionalProperties:Et},transforms:{type:"array",maxItems:S.transforms,items:_o(e.transforms)},options:{type:"object",description:"Type-specific options, validated by the widget type."},style:Io,actions:q({collapsible:{type:"boolean"},maximizable:{type:"boolean"},removable:{type:"boolean"},refreshable:{type:"boolean"}}),interactions:{type:"array",maxItems:S.interactions,items:q({on:{const:"select"},set:ne,from:Et},["on","set","from"])},layout:fn(!1)},["id","type","title","layout"]);return{$schema:"https://json-schema.org/draft/2020-12/schema",title:"AbsoluteUI dashboard definition",...q({schemaVersion:{const:1},id:ne,title:pe,description:{type:"string",maxLength:S.text},grid:q({columns:{type:"integer",minimum:1,maximum:24},rowHeight:{type:"integer",minimum:24,maximum:600},gap:{type:"integer",minimum:0,maximum:64},compaction:{enum:Qe}}),breakpoints:{type:"array",minItems:1,maxItems:S.breakpoints,items:q({name:ne,minWidth:{type:"integer",minimum:0,maximum:1e4},columns:{type:"integer",minimum:1,maximum:24}},["name","minWidth","columns"])},layouts:{type:"object",propertyNames:{pattern:ye},additionalProperties:{type:"array",maxItems:S.widgets,items:fn(!0)}},style:q({density:{enum:Ie},accent:{enum:Re}}),pages:{type:"array",minItems:1,maxItems:S.pages,items:q({id:ne,title:pe},["id","title"])},variables:{type:"array",maxItems:S.variables,items:jo},dataSources:{type:"object",maxProperties:S.dataSources,propertyNames:{pattern:ye},additionalProperties:No},widgets:{type:"array",maxItems:S.widgets,items:t}},["schemaVersion","id","title","widgets"])}}function hn(e){let n=e.split(""),t=[],r=(i,u)=>{for(let f=i;f<u;f++)n[f]!==`
12
12
  `&&(n[f]=" ")},o=0,s=e.length;for(;o<s;){let i=e[o],u=e[o+1];if(i==="/"&&u==="/"){let f=e.indexOf(`
13
13
  `,o),l=f===-1?s:f;r(o,l),o=l}else if(i==="/"&&u==="*"){let f=e.indexOf("*/",o+2),l=f===-1?s:f+2;r(o,l),o=l}else if(i==='"'||i==="'"||i==="`"){let f=o+1,l=f;for(;l<s&&e[l]!==i;){if(e[l]==="\\")l++;else if(i!=="`"&&e[l]===`
14
14
  `)break;l++}t.push({start:f,end:Math.min(l,s),quote:i}),r(f,Math.min(l,s)),o=l+1}else o++}return{code:n.join(""),strings:t}}function yn(e,n){let t=1,r=0;for(let o=0;o<n&&o<e.length;o++)e[o]===`