@exponential_app/eui-element 0.15.0 → 0.15.1

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.
@@ -1,4 +1,4 @@
1
- const _b=(e,t)=>e===t,Ks=Symbol("solid-proxy"),Yh=typeof Proxy=="function",Xh=Symbol("solid-track"),Gs={equals:_b};let di=null,Zh=nm;const Rn=1,Ys=2,Jh={owned:null,cleanups:null,context:null,owner:null};var Re=null;let bl=null,Ob=null,Xe=null,kt=null,yn=null,Na=0;function Vn(e,t){const n=Xe,r=Re,o=e.length===0,i=t===void 0?r:t,s=o?Jh:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>W(()=>vi(s)));Re=s,Xe=null;try{return Jr(a,!0)}finally{Xe=n,Re=r}}function G(e,t){t=t?Object.assign({},Gs,t):Gs;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),tm(n,o));return[em.bind(n),r]}function Qn(e,t,n){const r=qi(e,t,!0,Rn);Lo(r)}function re(e,t,n){const r=qi(e,t,!1,Rn);Lo(r)}function ge(e,t,n){Zh=Ib;const r=qi(e,t,!1,Rn);(!n||!n.render)&&(r.user=!0),yn?yn.push(r):Lo(r)}function j(e,t,n){n=n?Object.assign({},Gs,n):Gs;const r=qi(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Lo(r),em.bind(r)}function uc(e){return Jr(e,!1)}function W(e){if(Xe===null)return e();const t=Xe;Xe=null;try{return e()}finally{Xe=t}}function Ne(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const l=W(()=>t(a,o,s));return o=a,l}}function ot(e){ge(()=>W(e))}function de(e){return Re===null||(Re.cleanups===null?Re.cleanups=[e]:Re.cleanups.push(e)),e}function Tb(e,t){di||(di=Symbol("error")),Re=qi(void 0,void 0,!0),Re.context={...Re.context,[di]:[t]};try{return e()}catch(n){Ui(n)}finally{Re=Re.owner}}function gu(){return Re}function Qh(e,t){const n=Re,r=Xe;Re=e,Xe=null;try{return Jr(t,!0)}catch(o){Ui(o)}finally{Re=n,Xe=r}}const[Fz,zz]=G(!1);function br(e,t){const n=Symbol("context");return{id:n,Provider:Db(n),defaultValue:e}}function er(e){let t;return Re&&Re.context&&(t=Re.context[e.id])!==void 0?t:e.defaultValue}function Xs(e){const t=j(e),n=j(()=>dc(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}function em(){if(this.sources&&this.state)if(this.state===Rn)Lo(this);else{const e=kt;kt=null,Jr(()=>Js(this),!1),kt=e}if(Xe){const e=this.observers;if(!e||e[e.length-1]!==Xe){const t=e?e.length:0;Xe.sources?(Xe.sources.push(this),Xe.sourceSlots.push(t)):(Xe.sources=[this],Xe.sourceSlots=[t]),e?(e.push(Xe),this.observerSlots.push(Xe.sources.length-1)):(this.observers=[Xe],this.observerSlots=[Xe.sources.length-1])}}return this.value}function tm(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Jr(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=bl&&bl.running;s&&bl.disposed.has(i),(s?!i.tState:!i.state)&&(i.pure?kt.push(i):yn.push(i),i.observers&&rm(i)),s||(i.state=Rn)}if(kt.length>1e6)throw kt=[],new Error},!1)),t}function Lo(e){if(!e.fn)return;vi(e);const t=Na;Mb(e,e.value,t)}function Mb(e,t,n){let r;const o=Re,i=Xe;Xe=Re=e;try{r=e.fn(t)}catch(s){return e.pure&&(e.state=Rn,e.owned&&e.owned.forEach(vi),e.owned=null),e.updatedAt=n+1,Ui(s)}finally{Xe=i,Re=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?tm(e,r):e.value=r,e.updatedAt=n)}function qi(e,t,n,r=Rn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Re,context:Re?Re.context:null,pure:n};return Re===null||Re!==Jh&&(Re.owned?Re.owned.push(i):Re.owned=[i]),i}function Zs(e){if(e.state===0)return;if(e.state===Ys)return Js(e);if(e.suspense&&W(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Na);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Rn)Lo(e);else if(e.state===Ys){const r=kt;kt=null,Jr(()=>Js(e,t[0]),!1),kt=r}}function Jr(e,t){if(kt)return e();let n=!1;t||(kt=[]),yn?n=!0:yn=[],Na++;try{const r=e();return Eb(n),r}catch(r){n||(yn=null),kt=null,Ui(r)}}function Eb(e){if(kt&&(nm(kt),kt=null),e)return;const t=yn;yn=null,t.length&&Jr(()=>Zh(t),!1)}function nm(e){for(let t=0;t<e.length;t++)Zs(e[t])}function Ib(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Zs(r)}for(t=0;t<n;t++)Zs(e[t])}function Js(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const o=r.state;o===Rn?r!==t&&(!r.updatedAt||r.updatedAt<Na)&&Zs(r):o===Ys&&Js(r,t)}}}function rm(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Ys,n.pure?kt.push(n):yn.push(n),n.observers&&rm(n))}}function vi(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)vi(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)vi(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Pb(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Nd(e,t,n){try{for(const r of t)r(e)}catch(r){Ui(r,n&&n.owner||null)}}function Ui(e,t=Re){const n=di&&t&&t.context&&t.context[di],r=Pb(e);if(!n)throw r;yn?yn.push({fn(){Nd(r,n,t)},state:Rn}):Nd(r,n,t)}function dc(e){if(typeof e=="function"&&!e.length)return dc(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=dc(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function Db(e,t){return function(r){let o;return re(()=>o=W(()=>(Re.context={...Re.context,[e]:r.value},Xs(()=>r.children))),void 0),o}}const pc=Symbol("fallback");function Qs(e){for(let t=0;t<e.length;t++)e[t]()}function Rb(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return de(()=>Qs(i)),()=>{let l=e()||[],c=l.length,u,d;return l[Xh],W(()=>{let h,f,y,g,v,m,b,x,$;if(c===0)s!==0&&(Qs(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[pc],o[0]=Vn(S=>(i[0]=S,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=l[d],o[d]=Vn(p);s=c}else{for(y=new Array(c),g=new Array(c),a&&(v=new Array(c)),m=0,b=Math.min(s,c);m<b&&r[m]===l[m];m++);for(b=s-1,x=c-1;b>=m&&x>=m&&r[b]===l[x];b--,x--)y[x]=o[b],g[x]=i[b],a&&(v[x]=a[b]);for(h=new Map,f=new Array(x+1),d=x;d>=m;d--)$=l[d],u=h.get($),f[d]=u===void 0?-1:u,h.set($,d);for(u=m;u<=b;u++)$=r[u],d=h.get($),d!==void 0&&d!==-1?(y[d]=o[u],g[d]=i[u],a&&(v[d]=a[u]),d=f[d],h.set($,d)):i[u]();for(d=m;d<c;d++)d in y?(o[d]=y[d],i[d]=g[d],a&&(a[d]=v[d],a[d](d))):o[d]=Vn(p);o=o.slice(0,s=c),r=l.slice(0)}return o});function p(h){if(i[d]=h,a){const[f,y]=G(d);return a[d]=y,t(l[d],f)}return t(l[d])}}}function Fb(e,t,n={}){let r=[],o=[],i=[],s=[],a=0,l;return de(()=>Qs(i)),()=>{const c=e()||[],u=c.length;return c[Xh],W(()=>{if(u===0)return a!==0&&(Qs(i),i=[],r=[],o=[],a=0,s=[]),n.fallback&&(r=[pc],o[0]=Vn(p=>(i[0]=p,n.fallback())),a=1),o;for(r[0]===pc&&(i[0](),i=[],r=[],o=[],a=0),l=0;l<u;l++)l<r.length&&r[l]!==c[l]?s[l](()=>c[l]):l>=r.length&&(o[l]=Vn(d));for(;l<r.length;l++)i[l]();return a=s.length=i.length=u,r=c.slice(0),o=o.slice(0,a)});function d(p){i[l]=p;const[h,f]=G(c[l]);return s[l]=f,t(h,l)}}}function w(e,t){return W(()=>e(t||{}))}function hs(){return!0}const fc={get(e,t,n){return t===Ks?n:e.get(t)},has(e,t){return t===Ks?!0:e.has(t)},set:hs,deleteProperty:hs,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:hs,deleteProperty:hs}},ownKeys(e){return e.keys()}};function vl(e){return(e=typeof e=="function"?e():e)?e:{}}function zb(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function T(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&Ks in a,e[s]=typeof a=="function"?(t=!0,j(a)):a}if(Yh&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const l=vl(e[a])[s];if(l!==void 0)return l}},has(s){for(let a=e.length-1;a>=0;a--)if(s in vl(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(vl(e[a])));return[...new Set(s)]}},fc);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:zb.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const p=n[u];p&&(d.get?p.push(d.get.bind(a)):d.value!==void 0&&p.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],l=r[a];l&&l.get?Object.defineProperty(o,a,l):o[a]=l?l.value:void 0}return o}function Vi(e,...t){const n=t.length;if(Yh&&Ks in e){const o=n>1?t.flat():t[0],i=new Set,s=t.map(a=>{const l=a.filter(c=>!i.has(c)&&(i.add(c),!0));return new Proxy({get(c){return l.includes(c)?e[c]:void 0},has(c){return l.includes(c)&&c in e},keys(){return l.filter(c=>c in e)}},fc)});return s.push(new Proxy({get(a){return o.includes(a)?void 0:e[a]},has(a){return o.includes(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.includes(a))}},fc)),s}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let l=0;l<t.length;l++)if(t[l].includes(o)){i=l;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let Nb=0;function Fe(){return`cl-${Nb++}`}const Lb=e=>`Stale read from <${e}>.`;function Te(e){const t="fallback"in e&&{fallback:()=>e.fallback};return j(Rb(()=>e.each,e.children,t||void 0))}function tn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return j(Fb(()=>e.each,e.children,t||void 0))}function ee(e){const t=e.keyed,n=j(()=>e.when,void 0,void 0),r=t?n:j(n,void 0,{equals:(o,i)=>!o==!i});return j(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?W(()=>i(t?o:()=>{if(!W(r))throw Lb("Show");return n()})):i}return e.fallback},void 0,void 0)}let ms;function jb(e){let t;const[n,r]=G(t,void 0);return ms||(ms=new Set),ms.add(r),de(()=>ms.delete(r)),j(()=>{let o;if(o=n()){const i=e.fallback;return typeof i=="function"&&i.length?W(()=>i(o,()=>r())):i}return Tb(()=>e.children,r)},void 0,void 0)}const Bb=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Wb=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Bb]),Hb=new Set(["innerHTML","textContent","innerText","children"]),qb=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Ub=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function Vb(e,t){const n=Ub[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Kb=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Gb=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Yb={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Q=e=>j(()=>e());function Xb(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const u=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],u)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const u=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],u),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const u=c.get(t[s]);if(u!=null)if(a<u&&u<i){let d=s,p=1,h;for(;++d<o&&d<i&&!((h=c.get(t[d]))==null||h!==u+p);)p++;if(p>u-a){const f=t[s];for(;a<u;)e.insertBefore(n[a++],f)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Ld="_$DX_DELEGATE";function Zb(e,t,n,r={}){let o;return Vn(i=>{o=i,t===document?e():k(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function F(e,t,n,r){let o;const i=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},s=t?()=>W(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function Yt(e,t=window.document){const n=t[Ld]||(t[Ld]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,ov))}}function U(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Jb(e,t,n,r){r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}function Qb(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}function hr(e,t){t==null?e.removeAttribute("class"):e.className=t}function fo(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function ev(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(jd(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(jd(e,a,!0),n[a]=l)}return n}function Le(e,t,n){if(!t)return n?U(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function tv(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function P(e,t={},n,r){const o={};return r||re(()=>o.children=$i(e,t.children,o.children)),re(()=>typeof t.ref=="function"&&ie(t.ref,e)),re(()=>nv(e,t,n,!0,o,!0)),o}function ie(e,t,n){return W(()=>e(t,n))}function k(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return $i(e,t,r,n);re(o=>$i(e,t(),o,n),r)}function nv(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=Bd(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=Bd(e,s,a,o[s],n,i,t)}}function rv(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function jd(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function Bd(e,t,n,r,o,i,s){let a,l,c,u,d;if(t==="style")return Le(e,n,r);if(t==="classList")return ev(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const p=t.slice(3);r&&e.removeEventListener(p,r,typeof r!="function"&&r),n&&e.addEventListener(p,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const p=t.slice(10);r&&e.removeEventListener(p,r,!0),n&&e.addEventListener(p,n,!0)}else if(t.slice(0,2)==="on"){const p=t.slice(2).toLowerCase(),h=Kb.has(p);if(!h&&r){const f=Array.isArray(r)?r[0]:r;e.removeEventListener(p,f)}(h||n)&&(fo(e,p,n,h),h&&Yt([p]))}else if(t.slice(0,5)==="attr:")U(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Qb(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=Hb.has(t))||!o&&((u=Vb(t,e.tagName))||(l=Wb.has(t)))||(a=e.nodeName.includes("-")||"is"in s))d&&(t=t.slice(5),l=!0),t==="class"||t==="className"?hr(e,n):a&&!l&&!c?e[rv(t)]=n:(t==="value"||t==="defaultValue")&&(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA")?e[u||t]=n??"":e[u||t]=n;else{const p=o&&t.indexOf(":")>-1&&Yb[t.split(":")[0]];p?Jb(e,p,t,n):U(e,qb[t]||t,n)}return n}function ov(e){let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),s=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}});try{if(e.composedPath){const l=e.composedPath();i(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}finally{e=t=null}}function $i(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(s){let a=n[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),n=to(e,n,r,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean")n=to(e,n,r);else{if(i==="function")return re(()=>{let a=t();for(;typeof a=="function";)a=a();n=$i(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],l=n&&Array.isArray(n);if(hc(a,t,n,o))return re(()=>n=$i(e,a,n,r,!0)),()=>n;if(a.length===0){if(n=to(e,n,r),s)return n}else l?n.length===0?Wd(e,a,r):Xb(e,n,a):(n&&to(e),Wd(e,a));n=a}else if(t.nodeType){if(Array.isArray(n)){if(s)return n=to(e,n,r,t);to(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function hc(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=hc(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=hc(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o}else e.push(a),o=!0;else{const u=String(a);l&&l.nodeType===3&&l.data===u?e.push(l):e.push(document.createTextNode(u))}}return o}function Wd(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function to(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}const iv="http://www.w3.org/2000/svg";function om(e,t=!1,n=void 0){return t?document.createElementNS(iv,e):document.createElement(e,{is:n})}function sv(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=gu();let i;return ge(()=>{i||(i=Qh(o,()=>j(()=>e.children)));const s=r();if(s instanceof HTMLHeadElement){const[a,l]=G(!1),c=()=>l(!0);Vn(u=>k(s,()=>a()?u():i(),null)),de(c)}else{const a=om(e.isSVG?"g":"div",e.isSVG),l=t&&a.attachShadow?a.attachShadow({mode:"open"}):a;Object.defineProperty(a,"_$host",{get(){return n.parentNode},configurable:!0}),k(l,i),s.appendChild(a),e.ref&&e.ref(a),de(()=>s.contains(a)&&s.removeChild(a))}},void 0,{render:!0}),n}function av(e,t){const n=j(e);return j(()=>{const r=n();switch(typeof r){case"function":return W(()=>r(t));case"string":const o=Gb.has(r),i=om(r,o,W(()=>t.is));return P(i,t,o),i}})}function Qr(e){const[,t]=Vi(e,["component"]);return av(()=>e.component,t)}const lv="https://ui.exponential.at/catalogs/core/v1",cv="https://ui.exponential.at/catalogs/core-lite/v1",uv="Unknown",dv={variant:["default","secondary","outline","ghost","destructive","link"],size:["sm","default","lg","icon"],tone:["neutral","primary","success","warning","danger","info"],gap:["none","xs","sm","md","lg","xl"],align:["start","center","end","stretch"],justify:["start","center","end","between","around","evenly"],textVariant:["body","caption","muted","lead","code","label","title"],headingLevel:["h1","h2","h3","h4"],imageFit:["contain","cover","fill","none","scaleDown"],orientation:["horizontal","vertical"],side:["top","right","bottom","left"],inputType:["text","email","password","number","search","url","tel"],validateOn:["change","blur","submit"],alertType:["info","success","warning","error"],controlSize:["sm","default","lg"],spinnerSize:["xs","sm","default","lg"],tabClosable:["none","hover","always"],groupType:["single","multiple"],rowChevron:["none","right","selector"],rowSurface:["flat","card"],chipShape:["pill","rect"],density:["default","compact"],listDirection:["vertical","horizontal"],chartKind:["bar","stackedBar","line","area","pie","donut","sparkline"],segmentedVariant:["segmented","toggles","outline","bar"],liveTone:["live","attention","done","unread","idle","muted"],menuItemKind:["item","checkbox","separator","label","submenu"],openOn:["press","hover"],menuOpenOn:["press","contextmenu"],live:["off","polite","assertive"],selectable:["none","single","multiple"],cellType:["text","number","date","boolean","badge","slot","currency","percent","relativeTime"],sortDirection:["asc","desc"],imageLoading:["lazy","eager"],scrollDirection:["vertical","horizontal","both"],collapseBelow:["never","sm","md","lg","xl"],codeLanguage:["plain","json","js","ts","tsx","rust","swift","kotlin","python","bash","html","css","sql","yaml","markdown","ansi"],codeToken:["plain","keyword","string","number","comment","punctuation","operator","type","function","property","tag","attribute","success","warning","error"],codeBlockVariant:["default","destructive"],codeBlockSize:["default","sm"],switchSize:["default","compact"],traceStatus:["running","error","pending","done","skipped"],traceSize:["default","sm"],voiceWaveActivity:["idle","listening","thinking","speaking","muted"],voiceWaveSize:["sm","md","lg","xl"],messageSide:["in","out"],messageStatus:["sending","sent","read"],callState:["ringing","connecting","talking","ended"],voiceWaveVariant:["ring","bars"],qrLevel:["L","M","Q","H"],planState:["proposed","running","done","declined"],zoomInitial:["auto","fit","fitWidth","actual"],zoomControls:["auto","always","none"],motionDirection:["forward","reverse","alternate"],motionFit:["contain","cover","fill"],calendarView:["month","week"]},pv={option:{properties:{label:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},icon:{type:"icon"},disabled:{type:"boolean"},description:{type:"string"},image:{type:"url"},count:{type:"number",bindable:!0}}},check:{properties:{condition:{type:"boolean",required:!0,bindable:!0},message:{type:"string",required:!0}}},tab:{properties:{label:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},icon:{type:"icon"},count:{type:"number"}}},menuItem:{properties:{label:{type:"string"},value:{type:"string"},kind:{type:"enum",enum:"menuItemKind",default:"item"},icon:{type:"icon"},shortcut:{type:"string"},checked:{type:"boolean",bindable:!0},destructive:{type:"boolean"},disabled:{type:"boolean"},items:{type:"array",items:{type:"object",shape:"menuItem"},bindable:!0},searchable:{type:"boolean"},placeholder:{type:"string"}}},searchItem:{properties:{label:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},icon:{type:"icon"},identifier:{type:"string"},disabled:{type:"boolean"}}},accordionItem:{properties:{title:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},count:{type:"number"}}},segment:{properties:{value:{type:"number",required:!0},tone:{type:"enum",enum:"tone"},label:{type:"string"}}},series:{properties:{name:{type:"string",required:!0},values:{type:"array",items:{type:"number"},required:!0},tone:{type:"enum",enum:"tone"}}},pageItem:{properties:{title:{type:"string"}}},step:{properties:{label:{type:"string",required:!0},description:{type:"string"}}},column:{properties:{key:{type:"string",required:!0},label:{type:"string",required:!0},type:{type:"enum",enum:"cellType",default:"text"},slot:{type:"string"},width:{type:"number"},align:{type:"enum",values:["start","center","end"],default:"start"},sortable:{type:"boolean",default:!1},currency:{type:"string"},decimals:{type:"number"},truncate:{type:"boolean",default:!1}}},sort:{properties:{key:{type:"string",required:!0},direction:{type:"enum",enum:"sortDirection",required:!0}}},panel:{properties:{min:{type:"number"},max:{type:"number"},collapsible:{type:"boolean"}}},file:{properties:{name:{type:"string",required:!0},size:{type:"number"},type:{type:"string"},url:{type:"url"}}},planStep:{properties:{title:{type:"string",required:!0},detail:{type:"string"},icon:{type:"icon"},status:{type:"enum",enum:"traceStatus"}}},outlineItem:{properties:{id:{type:"string",required:!0},title:{type:"string",required:!0,bindable:!0},count:{type:"number",bindable:!0}}},picture:{properties:{src:{type:"url",required:!0},alt:{type:"string"}}}},fv={names:["required","regex","length","numeric","email","formatString","formatNumber","formatCurrency","formatDate","pluralize","openUrl","and","or","not","percent","add","sub","eq","lt","clamp","cond","fallback","concat","coalesce","text","map","len","fill","set","formatPercent","formatRelativeTime","filter","bind","mul","div","mod","round","floor","ceil","abs","min","max","today","now","dateAdd","dateDiff","startOf","endOf","weekday","isoWeek","hours","formatDuration","orElse","expr"]},hv={"Accordion.trigger":"ui-chevron-down","Carousel.previous":"ui-chevron-left","Carousel.next":"ui-chevron-right","Checkbox.check":"ui-check","ChipInput.remove":"ui-close","CodeBlock.copy":"ui-copy","CodeBlock.copied":"ui-check","Composer.attachment":"ui-attach","Composer.send":"ui-send","Composer.stop":"ui-stop","DatePicker.trigger":"calendar","DatePicker.previousMonth":"ui-chevron-left","DatePicker.nextMonth":"ui-chevron-right","DateRangePicker.trigger":"calendar","Dialog.close":"ui-close","Menu.check":"ui-check","Menu.submenuIndicator":"ui-chevron-right","FileUpload.icon":"upload","FileUpload.file":"ui-file","FileUpload.remove":"ui-close","Image.fallback":"ui-icon-placeholder","NumberField.decrement":"ui-minus","NumberField.increment":"ui-add","Select.trigger":"ui-selector","Select.search":"search","Select.check":"ui-check","SearchList.search":"search","SearchList.check":"ui-check","Table.sortIcon.asc":"ui-chevron-up","Table.sortIcon.desc":"ui-chevron-down","Tabs.close":"ui-close","Tabs.new":"ui-add","TimePicker.trigger":"ui-clock","Toast.close":"ui-close","Toast.icon.info":"ui-info","Toast.icon.success":"ui-success","Toast.icon.warning":"ui-warning","Toast.icon.error":"ui-error","Unknown.root":"ui-warning","ZoomableImage.zoomOut":"ui-minus","ZoomableImage.zoomIn":"ui-add","ZoomableImage.fit":"ui-fullscreen"},mv=JSON.parse('{"Box":{"kind":"native","group":"layout","lite":true,"children":"many","props":{"style":{"type":"style"},"pressable":{"type":"boolean"}},"events":["press"]},"Stack":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"direction":{"type":"enum","enum":"orientation","default":"vertical","responsive":true,"bindable":true},"gap":{"type":"enum","enum":"gap","default":"md","responsive":true},"align":{"type":"enum","enum":"align","responsive":true,"bindable":true},"justify":{"type":"enum","enum":"justify","default":"start","responsive":true,"bindable":true},"wrap":{"type":"boolean","default":false,"responsive":true},"style":{"type":"style"}}},"Grid":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"columns":{"type":"number","default":2,"responsive":true},"gap":{"type":"enum","enum":"gap","default":"md","responsive":true},"style":{"type":"style"}}},"Card":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"title":{"type":"string"},"description":{"type":"string"},"padded":{"type":"boolean","default":true},"style":{"type":"style"}}},"Separator":{"kind":"macro","group":"layout","lite":true,"children":"none","props":{"orientation":{"type":"enum","enum":"orientation","default":"horizontal"}}},"List":{"kind":"native","group":"layout","lite":true,"children":"many","slots":["section"],"slotScope":"row","props":{"direction":{"type":"enum","enum":"listDirection","default":"vertical"},"gap":{"type":"enum","enum":"gap","default":"none"},"divided":{"type":"boolean","default":false},"sectionBy":{"type":"string"},"stickyHeaders":{"type":"boolean","default":false},"style":{"type":"style"}}},"Resizable":{"kind":"native","group":"layout","lite":true,"children":"many","props":{"direction":{"type":"enum","enum":"orientation","default":"horizontal","responsive":true},"sizes":{"type":"array","items":{"type":"number"},"bindable":true},"panels":{"type":"array","items":{"type":"object","shape":"panel"}},"handle":{"type":"boolean","default":false},"style":{"type":"style"}},"events":["change"]},"ScrollArea":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"direction":{"type":"enum","enum":"scrollDirection","default":"vertical"},"maxHeight":{"type":"number"},"style":{"type":"style"}}},"Sidebar":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["sidebar"],"props":{"side":{"type":"enum","values":["left","right"],"default":"left"},"width":{"type":"number","default":240},"collapseBelow":{"type":"enum","enum":"collapseBelow","default":"md"},"collapsed":{"type":"boolean","default":false,"bindable":true}}},"SplitView":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["list"],"props":{"open":{"type":"boolean","default":false,"bindable":true},"width":{"type":"number","default":320}},"events":["back"]},"AppBar":{"kind":"macro","group":"layout","lite":true,"children":"none","slots":["leading","trailing"],"props":{"title":{"type":"string","required":true,"bindable":true},"subtitle":{"type":"string","bindable":true},"back":{"type":"boolean","default":false}},"events":["back"]},"Page":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["leading","trailing"],"props":{"title":{"type":"string","required":true,"bindable":true},"subtitle":{"type":"string","bindable":true},"back":{"type":"boolean","default":false},"padded":{"type":"boolean","default":true}},"events":["back"]},"Toolbar":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["trailing"],"props":{"gap":{"type":"enum","enum":"gap","default":"sm"}}},"Section":{"kind":"macro","group":"list","lite":true,"children":"many","slots":["leading","trailing"],"props":{"title":{"type":"string","bindable":true},"caption":{"type":"string","bindable":true},"count":{"type":"number","bindable":true},"icon":{"type":"icon"},"collapsible":{"type":"boolean","default":false},"open":{"type":"boolean","default":true,"bindable":true},"tint":{"type":"enum","enum":"tone","default":"neutral"},"tree":{"type":"boolean","default":false},"loading":{"type":"boolean","default":false,"bindable":true},"style":{"type":"style"}},"events":["change"]},"Group":{"kind":"macro","group":"list","lite":true,"children":"many","props":{"title":{"type":"string"},"footer":{"type":"string"}}},"Text":{"kind":"native","group":"text","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"variant":{"type":"enum","enum":"textVariant","default":"body"},"align":{"type":"enum","values":["start","center","end"]},"lines":{"type":"number"},"tone":{"type":"enum","enum":"tone"},"shimmer":{"type":"boolean","default":false},"live":{"type":"enum","enum":"live","default":"off"},"style":{"type":"style"}}},"Heading":{"kind":"macro","group":"text","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"level":{"type":"enum","enum":"headingLevel","default":"h2"}}},"Markdown":{"kind":"native","group":"text","lite":true,"children":"none","props":{"text":{"type":"markdown","required":true,"bindable":true},"lines":{"type":"number"},"style":{"type":"style"}}},"CodeBlock":{"kind":"native","group":"text","lite":true,"children":"none","props":{"code":{"type":"string","required":true,"bindable":true},"language":{"type":"enum","enum":"codeLanguage","default":"plain"},"title":{"type":"string"},"lineNumbers":{"type":"boolean","default":false},"wrap":{"type":"boolean","default":false},"copyable":{"type":"boolean","default":true},"highlight":{"type":"array","items":{"type":"number"}},"maxLines":{"type":"number"},"variant":{"type":"enum","enum":"codeBlockVariant","default":"default","bindable":true},"size":{"type":"enum","enum":"codeBlockSize","default":"default"}}},"Kbd":{"kind":"macro","group":"text","lite":true,"children":"none","props":{"keys":{"type":"string","required":true}}},"Label":{"kind":"macro","group":"text","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"for":{"type":"string"},"required":{"type":"boolean","default":false}}},"Image":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","bindable":true},"alt":{"type":"string","required":true,"bindable":true},"fit":{"type":"enum","enum":"imageFit","default":"cover"},"width":{"type":"number"},"height":{"type":"number"},"aspectRatio":{"type":"number"},"fallback":{"type":"icon"},"loading":{"type":"enum","enum":"imageLoading","default":"lazy"},"focalX":{"type":"number"},"focalY":{"type":"number"},"style":{"type":"style"}}},"ZoomableImage":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","required":true,"bindable":true},"alt":{"type":"string","required":true,"bindable":true},"naturalWidth":{"type":"number"},"naturalHeight":{"type":"number"},"initial":{"type":"enum","enum":"zoomInitial","default":"auto"},"maxScale":{"type":"number","default":8},"controls":{"type":"enum","enum":"zoomControls","default":"auto"},"scale":{"type":"number","bindable":true},"style":{"type":"style"}},"events":["zoom","tap"]},"Icon":{"kind":"native","group":"media","lite":true,"children":"none","props":{"name":{"type":"icon","required":true,"bindable":true},"size":{"type":"enum","enum":"controlSize","default":"default"},"tone":{"type":"enum","enum":"tone","bindable":true},"label":{"type":"string"}}},"Video":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","required":true,"bindable":true},"poster":{"type":"url"},"durationMs":{"type":"number"},"autoplay":{"type":"boolean","default":false},"aspectRatio":{"type":"number","default":1.7777778},"style":{"type":"style"}}},"AudioPlayer":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","required":true,"bindable":true},"title":{"type":"string"},"durationMs":{"type":"number"}}},"Avatar":{"kind":"native","group":"media","lite":true,"children":"none","props":{"name":{"type":"string","required":true,"bindable":true},"src":{"type":"url","bindable":true},"size":{"type":"enum","enum":"controlSize","default":"default"},"seed":{"type":"string"}}},"QrCode":{"kind":"native","group":"media","lite":false,"children":"none","props":{"value":{"type":"string","required":true,"bindable":true},"size":{"type":"number","default":160},"level":{"type":"enum","enum":"qrLevel","default":"M"},"label":{"type":"string"}}},"Carousel":{"kind":"native","group":"media","lite":false,"children":"many","props":{"page":{"type":"number","default":0,"bindable":true},"loop":{"type":"boolean","default":false},"indicators":{"type":"boolean","default":true},"counter":{"type":"boolean","default":false},"thumbnails":{"type":"array","items":{"type":"url"}}},"events":["change"]},"Mosaic":{"kind":"macro","group":"media","lite":false,"children":"none","props":{"pictures":{"type":"array","items":{"type":"object","shape":"picture"},"required":true},"label":{"type":"string"}},"events":["select"]},"Tabs":{"kind":"native","group":"navigation","lite":true,"children":"many","props":{"tabs":{"type":"array","items":{"type":"object","shape":"tab"},"required":true},"value":{"type":"string","bindable":true},"fill":{"type":"boolean","default":false},"closable":{"type":"enum","enum":"tabClosable","default":"none"},"addable":{"type":"boolean","default":false}},"events":["change","close","new"]},"Segmented":{"kind":"native","group":"navigation","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"option"},"required":true},"type":{"type":"enum","enum":"groupType","default":"single"},"value":{"type":"string","bindable":true},"variant":{"type":"enum","enum":"segmentedVariant","default":"segmented"},"size":{"type":"enum","enum":"controlSize","default":"default"},"fill":{"type":"boolean","default":false},"orientation":{"type":"enum","enum":"orientation","default":"horizontal"}},"events":["change"]},"Accordion":{"kind":"native","group":"navigation","lite":false,"children":"many","props":{"items":{"type":"array","items":{"type":"object","shape":"accordionItem"},"required":true},"type":{"type":"enum","enum":"groupType","default":"single"},"value":{"type":"string","bindable":true}},"events":["change"]},"Collapsible":{"kind":"macro","group":"navigation","lite":true,"children":"many","props":{"title":{"type":"string","required":true},"open":{"type":"boolean","default":false,"bindable":true},"count":{"type":"number"}},"events":["change"]},"Trace":{"kind":"macro","group":"list","lite":true,"children":"many","props":{"size":{"type":"enum","enum":"traceSize","default":"default"}}},"TraceItem":{"kind":"macro","group":"list","lite":true,"children":"many","props":{"title":{"type":"string","required":true,"bindable":true},"icon":{"type":"icon"},"description":{"type":"string"},"status":{"type":"enum","enum":"traceStatus"},"size":{"type":"enum","enum":"traceSize","default":"default"},"collapsible":{"type":"boolean","default":false},"open":{"type":"boolean","default":false,"bindable":true}},"events":["change"]},"Plan":{"kind":"macro","group":"list","lite":true,"children":"none","props":{"title":{"type":"string","required":true,"bindable":true},"description":{"type":"string","bindable":true},"steps":{"type":"array","items":{"type":"object","shape":"planStep"}},"state":{"type":"enum","enum":"planState","default":"proposed","bindable":true},"progress":{"type":"number","bindable":true},"approveLabel":{"type":"string","default":"$string.yes"},"declineLabel":{"type":"string","default":"$string.no"},"stopLabel":{"type":"string","default":"$string.stop"}},"events":["approve","decline","stop"]},"Pagination":{"kind":"macro","group":"navigation","lite":false,"children":"none","props":{"totalPages":{"type":"number","required":true},"page":{"type":"number","default":1,"bindable":true}},"events":["change"]},"Breadcrumb":{"kind":"macro","group":"navigation","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"option"},"required":true}},"events":["select"]},"Outline":{"kind":"macro","group":"navigation","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"outlineItem"},"required":true},"value":{"type":"string","bindable":true},"caption":{"type":"string"}},"events":["select"]},"Stepper":{"kind":"macro","group":"navigation","lite":true,"children":"none","props":{"steps":{"type":"array","items":{"type":"object","shape":"step"},"required":true},"current":{"type":"number","default":0,"bindable":true},"orientation":{"type":"enum","enum":"orientation","default":"horizontal"}}},"Dialog":{"kind":"native","group":"overlay","lite":false,"children":"many","slots":["trigger","footer"],"props":{"title":{"type":"string"},"description":{"type":"string"},"open":{"type":"boolean","default":false,"bindable":true},"dismissible":{"type":"boolean","default":true}},"events":["change"]},"Drawer":{"kind":"native","group":"overlay","lite":false,"children":"many","slots":["trigger","footer"],"props":{"title":{"type":"string"},"description":{"type":"string"},"open":{"type":"boolean","default":false,"bindable":true},"side":{"type":"enum","enum":"side","default":"bottom","responsive":true},"dismissible":{"type":"boolean","default":true},"dragToDismiss":{"type":"boolean","default":true}},"events":["change"]},"DockCard":{"kind":"macro","group":"overlay","lite":false,"children":"many","slots":["footer"],"props":{"label":{"type":"string","required":true,"bindable":true},"title":{"type":"string","required":true,"bindable":true},"caption":{"type":"string","bindable":true},"meta":{"type":"string","bindable":true},"icon":{"type":"icon"},"tone":{"type":"enum","enum":"tone","default":"neutral"},"open":{"type":"boolean","default":false,"bindable":true}},"events":["press","change"]},"AlertDialog":{"kind":"macro","group":"overlay","lite":false,"children":"many","slots":["trigger"],"props":{"title":{"type":"string","required":true},"description":{"type":"string"},"confirmLabel":{"type":"string","default":"$string.confirm"},"cancelLabel":{"type":"string","default":"$string.cancel"},"destructive":{"type":"boolean","default":false},"open":{"type":"boolean","default":false,"bindable":true}},"events":["confirm","cancel","change"]},"Popover":{"kind":"native","group":"overlay","lite":false,"children":"many","slots":["trigger"],"props":{"open":{"type":"boolean","default":false,"bindable":true},"side":{"type":"enum","enum":"side","default":"bottom"},"openOn":{"type":"enum","enum":"openOn","default":"press"}},"events":["change"]},"Tooltip":{"kind":"native","group":"overlay","lite":false,"children":"many","props":{"content":{"type":"string","required":true},"side":{"type":"enum","enum":"side","default":"top"}}},"Menu":{"kind":"native","group":"overlay","lite":false,"children":"one","props":{"label":{"type":"string"},"icon":{"type":"icon"},"items":{"type":"array","items":{"type":"object","shape":"menuItem"},"required":true},"openOn":{"type":"enum","enum":"menuOpenOn","default":"press"}},"events":["select"]},"Toast":{"kind":"native","group":"overlay","lite":false,"children":"none","props":{"title":{"type":"string","required":true,"bindable":true},"description":{"type":"string","bindable":true},"type":{"type":"enum","enum":"alertType","default":"info"},"open":{"type":"boolean","default":true,"bindable":true},"duration":{"type":"number","default":5000},"actionLabel":{"type":"string"},"dismissible":{"type":"boolean","default":true}},"events":["dismiss","action","change"]},"Badge":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"variant":{"type":"enum","enum":"variant","default":"default","bindable":true},"icon":{"type":"icon"}}},"Alert":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"title":{"type":"string","required":true},"message":{"type":"string"},"type":{"type":"enum","enum":"alertType","default":"info"}}},"Chip":{"kind":"macro","group":"feedback","lite":true,"children":"none","slots":["leading"],"props":{"label":{"type":"string","required":true,"bindable":true},"shape":{"type":"enum","enum":"chipShape","default":"pill"},"selected":{"type":"boolean","default":false},"tone":{"type":"enum","enum":"tone","default":"neutral","bindable":true},"dot":{"type":"color"},"icon":{"type":"icon"},"image":{"type":"url"},"detail":{"type":"string"},"removable":{"type":"boolean","default":false},"pressable":{"type":"boolean","default":false}},"events":["press","remove"]},"EmptyState":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"icon":{"type":"icon","required":true},"title":{"type":"string","required":true},"description":{"type":"string"},"actionLabel":{"type":"string"},"size":{"type":"enum","values":["page","list"],"default":"page"}},"events":["press"]},"Progress":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"value":{"type":"number","required":true,"bindable":true},"max":{"type":"number","default":100},"label":{"type":"string"},"tone":{"type":"enum","enum":"tone","default":"primary"}}},"Meter":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"segments":{"type":"array","items":{"type":"object","shape":"segment"},"required":true},"max":{"type":"number","default":100},"label":{"type":"string"},"value":{"type":"string"}}},"Ring":{"kind":"native","group":"feedback","lite":true,"children":"none","props":{"value":{"type":"number","required":true,"bindable":true},"size":{"type":"enum","enum":"controlSize","default":"default"},"tone":{"type":"enum","enum":"tone","default":"primary"},"label":{"type":"string"}}},"Spinner":{"kind":"native","group":"feedback","lite":false,"children":"none","props":{"size":{"type":"enum","enum":"spinnerSize","default":"default"},"label":{"type":"string"}}},"Skeleton":{"kind":"native","group":"feedback","lite":true,"children":"none","props":{"width":{"type":"string"},"height":{"type":"string"},"rounded":{"type":"boolean","default":false},"rows":{"type":"number"},"rowHeight":{"type":"number"},"dot":{"type":"boolean","default":true}}},"VoiceWave":{"kind":"native","group":"feedback","lite":false,"children":"one","props":{"activity":{"type":"enum","enum":"voiceWaveActivity","default":"idle","bindable":true},"variant":{"type":"enum","enum":"voiceWaveVariant","default":"ring"},"level":{"type":"number","default":0,"bindable":true},"bands":{"type":"array","items":{"type":"number"},"bindable":true},"size":{"type":"enum","enum":"voiceWaveSize","default":"md"},"label":{"type":"string"}}},"CallSurface":{"kind":"macro","group":"media","lite":false,"children":"none","props":{"name":{"type":"string","required":true,"bindable":true},"avatar":{"type":"url","bindable":true},"state":{"type":"enum","enum":"callState","default":"talking","bindable":true},"activity":{"type":"enum","enum":"voiceWaveActivity","default":"speaking","bindable":true},"level":{"type":"number","bindable":true},"bands":{"type":"array","items":{"type":"number"},"bindable":true},"status":{"type":"string","bindable":true},"caption":{"type":"string","bindable":true},"muted":{"type":"boolean","default":false,"bindable":true},"speaker":{"type":"boolean","bindable":true}},"events":["mute","speaker","hangUp"]},"Table":{"kind":"native","group":"data","lite":false,"children":"none","slots":["*"],"slotScope":"row","props":{"columns":{"type":"array","items":{"type":"object","shape":"column"},"required":true},"rows":{"type":"array","items":{"type":"object"},"required":true,"bindable":true},"rowKey":{"type":"string","default":"id"},"sort":{"type":"object","shape":"sort","bindable":true},"selectable":{"type":"enum","enum":"selectable","default":"none"},"selected":{"type":"array","items":{"type":"string"},"bindable":true},"caption":{"type":"string"},"emptyText":{"type":"string","default":"$string.noResults"},"striped":{"type":"boolean","default":false},"density":{"type":"enum","enum":"density","default":"default"},"stickyHeader":{"type":"boolean","default":false}},"events":["sort","select","rowPress"]},"Chart":{"kind":"native","group":"data","lite":false,"children":"none","props":{"kind":{"type":"enum","enum":"chartKind","required":true},"categories":{"type":"array","items":{"type":"string"},"bindable":true},"series":{"type":"array","items":{"type":"object","shape":"series"},"required":true,"bindable":true},"title":{"type":"string"},"height":{"type":"number","default":200},"xLabel":{"type":"string"},"yLabel":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"},"showAxes":{"type":"boolean","default":true},"showGrid":{"type":"boolean","default":true},"showLegend":{"type":"boolean","default":true},"showValues":{"type":"boolean","default":false}}},"Sparkline":{"kind":"macro","group":"data","lite":false,"children":"none","props":{"values":{"type":"array","items":{"type":"number"},"required":true,"bindable":true},"tone":{"type":"enum","enum":"tone","default":"primary"},"height":{"type":"number","default":24}}},"StatTile":{"kind":"macro","group":"data","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"value":{"type":"string","required":true,"bindable":true},"delta":{"type":"string","bindable":true},"tone":{"type":"enum","enum":"tone","default":"neutral","bindable":true},"trend":{"type":"array","items":{"type":"number"},"bindable":true}}},"Button":{"kind":"native","group":"action","lite":true,"children":"one","props":{"label":{"type":"string","bindable":true},"icon":{"type":"icon","bindable":true},"href":{"type":"url"},"variant":{"type":"enum","enum":"variant","default":"default"},"size":{"type":"enum","enum":"size","default":"default"},"disabled":{"type":"boolean","default":false,"bindable":true},"loading":{"type":"boolean","default":false},"pendingLabel":{"type":"string"},"submit":{"type":"boolean","default":false},"hold":{"type":"boolean","default":false},"holdingLabel":{"type":"string"}},"events":["press","holdStart","holdEnd","holdCancel"]},"Link":{"kind":"native","group":"action","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"href":{"type":"url"},"external":{"type":"boolean","default":false}},"events":["press"]},"Toggle":{"kind":"native","group":"action","lite":false,"children":"none","props":{"label":{"type":"string","required":true},"icon":{"type":"icon"},"pressed":{"type":"boolean","default":false,"bindable":true},"variant":{"type":"enum","values":["default","outline"],"default":"default"},"size":{"type":"enum","enum":"controlSize","default":"default"}},"events":["change"]},"Form":{"kind":"native","group":"input","lite":true,"children":"many","props":{"name":{"type":"string","required":true},"disabled":{"type":"boolean","default":false,"bindable":true},"busy":{"type":"boolean","default":false,"bindable":true},"summary":{"type":"boolean","default":false}},"events":["submit","invalid","change"]},"FieldGroup":{"kind":"macro","group":"input","lite":true,"children":"many","props":{"columns":{"type":"number","default":2}}},"FormActions":{"kind":"macro","group":"input","lite":true,"children":"many","props":{"submit":{"type":"string","required":true,"bindable":true},"cancel":{"type":"boolean","default":false},"destructive":{"type":"boolean","default":false}},"events":["cancel"]},"Input":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true},"name":{"type":"string","required":true},"type":{"type":"enum","enum":"inputType","default":"text"},"placeholder":{"type":"string"},"value":{"type":"string","bindable":true},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"blur"}},"events":["change","submit","focus","blur"]},"Textarea":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true},"name":{"type":"string","required":true},"placeholder":{"type":"string"},"rows":{"type":"number","default":3},"autosize":{"type":"boolean","default":false},"maxRows":{"type":"number"},"value":{"type":"string","bindable":true},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"blur"}},"events":["change","focus","blur"]},"NumberField":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"number","bindable":true},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","default":1},"precision":{"type":"number"},"unit":{"type":"string"},"placeholder":{"type":"string"},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"blur"}},"events":["change","submit","focus","blur"]},"Checkbox":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"name":{"type":"string","required":true},"checked":{"type":"boolean","default":false,"bindable":true},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change"]},"Radio":{"kind":"native","group":"input","lite":false,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"options":{"type":"array","items":{"type":"object","shape":"option"},"required":true},"value":{"type":"string","bindable":true},"orientation":{"type":"enum","enum":"orientation","default":"vertical"},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change"]},"ChoiceTiles":{"kind":"native","group":"input","lite":false,"children":"none","props":{"name":{"type":"string","required":true},"options":{"type":"array","items":{"type":"object","shape":"option"},"required":true},"type":{"type":"enum","enum":"groupType","default":"single"},"value":{"type":"string","bindable":true},"columns":{"type":"number","default":2},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change"]},"Switch":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"name":{"type":"string","required":true},"checked":{"type":"boolean","default":false,"bindable":true},"description":{"type":"string"},"disabled":{"type":"boolean","default":false},"size":{"type":"enum","enum":"switchSize","default":"default"}},"events":["change"]},"Slider":{"kind":"native","group":"input","lite":false,"children":"none","props":{"label":{"type":"string"},"min":{"type":"number","default":0,"bindable":true},"max":{"type":"number","required":true,"bindable":true},"step":{"type":"number","default":1},"value":{"type":"number","bindable":true}},"events":["change"]},"Rating":{"kind":"macro","group":"input","lite":true,"children":"none","props":{"value":{"type":"number","default":0,"bindable":true},"max":{"type":"number","default":5,"minimum":1,"maximum":100},"readOnly":{"type":"boolean","default":false},"size":{"type":"enum","enum":"controlSize","default":"default"}},"events":["change"]},"Select":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"options":{"type":"array","items":{"type":"object","shape":"option"},"bindable":true},"source":{"type":"string"},"placeholder":{"type":"string"},"value":{"type":"string","bindable":true},"multiple":{"type":"boolean","default":false},"searchable":{"type":"boolean","default":false},"emptyText":{"type":"string","default":"$string.noResults"},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"change"}},"events":["change","search"]},"SearchList":{"kind":"native","group":"input","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"searchItem"},"required":true,"bindable":true},"query":{"type":"string","bindable":true},"placeholder":{"type":"string","default":"$string.search"},"value":{"type":"string","bindable":true},"emptyText":{"type":"string","default":"$string.noResults"},"maxRows":{"type":"number","default":8},"showCount":{"type":"boolean","default":true}},"events":["search","select"]},"ChipInput":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"values":{"type":"array","items":{"type":"string"},"bindable":true},"suggestions":{"type":"array","items":{"type":"object","shape":"option"},"bindable":true},"placeholder":{"type":"string"},"max":{"type":"number"},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change","add","remove"]},"DatePicker":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"value":{"type":"date","bindable":true},"min":{"type":"date"},"max":{"type":"date"},"placeholder":{"type":"string"},"firstDayOfWeek":{"type":"number"}},"events":["change"]},"DateRangePicker":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"start":{"type":"date","bindable":true},"end":{"type":"date","bindable":true},"min":{"type":"date"},"max":{"type":"date"},"placeholder":{"type":"string"},"firstDayOfWeek":{"type":"number"}},"events":["change"]},"TimePicker":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"value":{"type":"string","bindable":true},"min":{"type":"string"},"max":{"type":"string"},"step":{"type":"number","default":15},"placeholder":{"type":"string"},"disabled":{"type":"boolean","default":false}},"events":["change"]},"FileUpload":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"accept":{"type":"string"},"multiple":{"type":"boolean","default":false},"maxSize":{"type":"number"},"files":{"type":"array","items":{"type":"object","shape":"file"},"bindable":true},"hint":{"type":"string"},"disabled":{"type":"boolean","default":false}},"events":["upload","remove"]},"QrScanner":{"kind":"native","group":"input","lite":false,"children":"none","props":{"hint":{"type":"string","bindable":true},"formats":{"type":"array","items":{"type":"string"},"default":["qr"]},"label":{"type":"string","default":"$string.scanQrCode"},"disabled":{"type":"boolean","default":false}},"events":["scanned"]},"Composer":{"kind":"native","group":"input","lite":true,"children":"none","props":{"placeholder":{"type":"string"},"value":{"type":"string","bindable":true},"submitLabel":{"type":"string","default":"$string.send"},"attachments":{"type":"boolean","default":false},"busy":{"type":"boolean","default":false}},"events":["submit","change","stop"]},"Row":{"kind":"macro","group":"list","lite":true,"children":"none","slots":["leading","trailing"],"props":{"title":{"type":"string","required":true,"bindable":true},"identifier":{"type":"string","bindable":true},"subtitle":{"type":"string","bindable":true},"meta":{"type":"string","bindable":true},"value":{"type":"string","bindable":true},"placeholder":{"type":"string"},"icon":{"type":"icon","bindable":true},"chevron":{"type":"enum","enum":"rowChevron","default":"none","bindable":true},"selected":{"type":"boolean","default":false,"bindable":true},"density":{"type":"enum","enum":"density","default":"default"},"surface":{"type":"enum","enum":"rowSurface","default":"flat"},"pressable":{"type":"boolean","default":false},"href":{"type":"url"},"depth":{"type":"number","default":0}},"events":["press"]},"MessageBubble":{"kind":"macro","group":"list","lite":true,"children":"none","slots":["attachment"],"props":{"text":{"type":"markdown","required":true,"bindable":true},"side":{"type":"enum","enum":"messageSide","default":"in"},"time":{"type":"string","bindable":true},"status":{"type":"enum","enum":"messageStatus","bindable":true},"author":{"type":"string","bindable":true}}},"TreeGuides":{"kind":"native","group":"list","lite":true,"children":"none","hidden":true,"props":{"depth":{"type":"number","required":true},"elbowAt":{"type":"number"},"tee":{"type":"boolean","default":false},"passThrough":{"type":"array","items":{"type":"number"}}}},"Unknown":{"kind":"native","group":"feedback","lite":true,"children":"none","hidden":true,"props":{"component":{"type":"string","required":true},"catalogId":{"type":"string"}}},"Motion":{"kind":"native","group":"media","lite":true,"children":"none","props":{"layers":{"type":"array","items":{"type":"object"}},"size":{"type":"array","items":{"type":"number"}},"duration":{"type":"number"},"fps":{"type":"number","default":60},"assets":{"type":"object"},"markers":{"type":"array","items":{"type":"object"}},"lottie":{"type":"object"},"src":{"type":"url"},"autoplay":{"type":"boolean","default":true},"loop":{"type":"boolean","default":true},"plays":{"type":"number"},"direction":{"type":"enum","enum":"motionDirection","default":"forward"},"speed":{"type":"number","default":1},"segment":{"type":"array","items":{"type":"number"}},"marker":{"type":"string"},"progress":{"type":"number","bindable":true},"play":{"type":"boolean","bindable":true,"default":true},"poster":{"type":"number"},"fit":{"type":"enum","enum":"motionFit","default":"contain"},"slots":{"type":"object"},"stateMachine":{"type":"object"},"inputs":{"type":"object","bindable":true},"label":{"type":"string"},"style":{"type":"style"}},"events":["press","hover","visible","complete","state"]},"Calendar":{"kind":"macro","group":"data","lite":true,"children":"none","events":["select","open"],"props":{"source":{"type":"string"},"view":{"type":"enum","enum":"calendarView","default":"month"},"labelField":{"type":"string","default":"title"},"detailField":{"type":"string","default":"detail"},"metaField":{"type":"string","default":"status"},"style":{"type":"style"}}},"Timeline":{"kind":"macro","group":"data","lite":true,"children":"none","events":["open"],"props":{"source":{"type":"string"},"labelField":{"type":"string","default":"title"},"rowTitle":{"type":"string"},"showCount":{"type":"boolean","default":false},"style":{"type":"style"}}},"RecordForm":{"kind":"macro","group":"data","lite":true,"children":"none","props":{"kind":{"type":"string","required":true},"recordId":{"type":"string","bindable":true},"submitLabel":{"type":"string","default":"$string.save"},"readOnly":{"type":"boolean","default":false},"cancel":{"type":"boolean","default":false},"path":{"type":"string"},"fields":{"type":"array","items":{"type":"object"},"host":true},"missing":{"type":"boolean","default":false,"host":true}},"events":["submit","cancel"]},"RecordTable":{"kind":"macro","group":"data","lite":false,"children":"none","props":{"kind":{"type":"string","required":true},"query":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"add":{"type":"boolean","default":true},"editable":{"type":"boolean","default":true},"title":{"type":"string","host":true},"cols":{"type":"array","items":{"type":"object","shape":"column"},"host":true},"rows":{"type":"array","items":{"type":"object"},"bindable":true,"host":true},"count":{"type":"string","bindable":true,"host":true},"loading":{"type":"boolean","default":false,"bindable":true,"host":true},"fields":{"type":"array","items":{"type":"object"},"host":true},"path":{"type":"string","host":true},"editorOpen":{"type":"boolean","default":false,"bindable":true,"host":true},"editorId":{"type":"string","bindable":true,"host":true},"deleteOpen":{"type":"boolean","default":false,"bindable":true,"host":true},"missing":{"type":"boolean","default":false,"host":true}}}}'),gv={id:lv,liteId:cv,unknownComponent:uv,enums:dv,defs:pv,functions:fv,builtinIcons:hv,components:mv},yv="VAPP-85: the token NAMES the core catalog's macros and Box styles reference as `$<group>.<name>` (e.g. `$color.primary`, `$spacing.md`). VALUES come from a theme (VAPP-92); this file only fixes the vocabulary. `color` = the shadcn semantic set plus success/warning/info and the eight chart hues (round 1 added chart6..8); `spacing`/`radius`/`type` mirror packages/design-tokens' scales by NAME (xl2 because 2xl is not an identifier in Swift/Kotlin/Rust); `control` = the per-kind control heights the VAPP-4 spike asked for instead of px (round 1 adds `appBar`, `tabBar`, `toast`); `shadow` = the boxShadow presets, ALSO the elevation scale (none < sm < md < lg < xl: flat, card, popover, dialog, toast; paint order inside a layer stays tree order, overlays stack by layer, never by zIndex); `opacity` = the text-emphasis ladder; VAPP-92 adds `border` (the border-width ladder, px) and `motion` (durations, ms). Round 1 (docs/round-1-contract.md) adds `breakpoint` (px, the ONLY tokens a style CONDITION may reference: `\"@media (min-width: $breakpoint.md)\"`; resolved against the theme before matching), `ease` (cubic-bezier control points [x1, y1, x2, y2], referenced by `transitionEasing`) and `density` (multipliers over `control` and `spacing` for the surface density `compact`/`comfortable`; `default` = 1, never a token). Round 2 (docs/round-2-contract.md §2) adds `blur` (px radii, the ONLY values `backdropBlur` takes). EXP-1259 (EXP-1243, packages/design-tokens motion.scale) adds `scale` (unitless multipliers the PAINTERS read, never a style value): `press` = what a pressed button scales to, `popoverFrom` = what a popover or menu scales FROM while it fades in (never from 0); reduce motion = no scale. VAPP-162 appends `type.family.serif` (the platform's system serif, `ui-serif` in every built-in theme). Every group is append-only: a theme is validated against these names.",bv=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","destructive","destructiveForeground","success","successForeground","warning","warningForeground","info","infoForeground","border","input","ring","chart1","chart2","chart3","chart4","chart5","chart6","chart7","chart8"],vv=["none","xxs","xs","sm","md","lg","xl","xl2","xl3"],$v=["none","sm","md","lg","xl","xl2","xl3","full"],xv={size:["xs","sm","base","lg","xl","xl2","xl3"],lineHeight:["xs","sm","base","lg","xl","xl2","xl3"],weight:["regular","medium","semibold","bold"],family:["sans","mono","serif"]},wv=["buttonSm","buttonMd","buttonLg","buttonIcon","input","textarea","row","rowCompact","pill","badge","chip","toggle","switch","checkbox","slider","progress","meter","avatarSm","avatarMd","avatarLg","iconSm","iconMd","iconLg","hairline","appBar","tabBar","toast"],kv=["none","sm","md","lg","xl"],Sv=["primary","secondary","tertiary","quaternary","disabled"],Cv=["none","hairline","thick"],Av=["fast","standard","slow"],_v=["sm","md","lg","xl"],Ov=["standard","decelerate","accelerate"],Tv=["compact","comfortable"],Mv=["sm","md","lg","xl"],Ev=["press","popoverFrom"],Iv={$comment:yv,color:bv,spacing:vv,radius:$v,type:xv,control:wv,shadow:kv,opacity:Sv,border:Cv,motion:Av,breakpoint:_v,ease:Ov,density:Tv,blur:Mv,scale:Ev},Pv="https://a2ui.org/specification/v0_9/basic_catalog.json",Dv="v0.9",Rv="ui-icon-placeholder",Fv={Text:{to:"Text",props:{text:"text"},transform:"textVariant"},Image:{to:"Image",props:{src:"url",alt:{from:"description",default:""},fit:{from:"fit",default:"cover"}},transform:"imageVariant"},Icon:{to:"Icon",props:{},transform:"iconName"},Video:{to:"Video",props:{src:"url"}},AudioPlayer:{to:"AudioPlayer",props:{src:"url",title:"description"}},Row:{to:"Stack",children:"children",props:{direction:{const:"horizontal"},justify:{from:"justify",map:{spaceBetween:"between",spaceAround:"around",spaceEvenly:"evenly",stretch:"start"},default:"start"},align:{from:"align",default:"stretch"},gap:{const:"sm"}}},Column:{to:"Stack",children:"children",props:{direction:{const:"vertical"},justify:{from:"justify",map:{spaceBetween:"between",spaceAround:"around",spaceEvenly:"evenly",stretch:"start"},default:"start"},align:{from:"align",default:"stretch"},gap:{const:"sm"}}},List:{to:"List",children:"children",props:{direction:{from:"direction",default:"vertical"},gap:{const:"sm"}}},Card:{to:"Card",children:"child",props:{}},Tabs:{to:"Tabs",props:{},transform:"tabs"},Modal:{to:"Dialog",props:{},transform:"modal"},Divider:{to:"Separator",props:{orientation:{from:"axis",default:"horizontal"}}},Button:{to:"Button",props:{variant:{from:"variant",map:{primary:"default",default:"secondary",borderless:"ghost"},default:"secondary"}},transform:"buttonChild"},TextField:{to:"Input",props:{label:"label",value:"value",checks:"checks"},transform:"textField"},CheckBox:{to:"Checkbox",props:{label:"label",checked:"value",checks:"checks"},transform:"fieldName"},ChoicePicker:{to:"Radio",props:{label:"label",options:"options",checks:"checks"},transform:"choicePicker"},Slider:{to:"Slider",props:{label:"label",min:{from:"min",default:0},max:"max",value:"value"}},DateTimeInput:{to:"DatePicker",props:{label:"label",value:"value",min:"min",max:"max"},transform:"fieldName"}},zv={accountCircle:"ui-assignee",add:"ui-add",arrowBack:"ui-back",arrowForward:"ui-arrow-right",attachFile:"ui-attach",calendarToday:"calendar",call:"phone",camera:"camera",check:"ui-check",close:"ui-close",delete:"ui-delete",download:"ui-download",edit:"ui-edit",event:"ui-due-date",error:"ui-error",fastForward:"media-fast-forward",favorite:"heart",favoriteOff:"ui-favorite-off",folder:"ui-folder",help:"ui-help",home:"house",info:"ui-info",locationOn:"map-pin",lock:"ui-private",lockOpen:"ui-unlock",mail:"ui-mail",menu:"ui-menu",moreVert:"ui-more-vertical",moreHoriz:"ui-more",notificationsOff:"ui-unsubscribe",notifications:"ui-subscribe",pause:"run-pause",payment:"credit-card",person:"ui-avatar-placeholder",phone:"smartphone",photo:"image",play:"action-run",print:"ui-print",refresh:"ui-refresh",rewind:"media-rewind",search:"nav-search",send:"ui-send",settings:"nav-settings",share:"ui-share",shoppingCart:"shopping-cart",skipNext:"media-skip-next",skipPrevious:"media-skip-previous",star:"star",starHalf:"ui-star-half",starOff:"ui-star-off",stop:"ui-stop",upload:"sc-push",visibility:"ui-watch",visibilityOff:"ui-hide",volumeDown:"media-volume-down",volumeMute:"media-volume-mute",volumeOff:"media-volume-off",volumeUp:"media-volume-up",warning:"ui-warning"},yu={from:Pv,version:Dv,placeholderIcon:Rv,components:Fv,icons:zv},Nv=JSON.parse('{"Stack":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":{"$map":{"from":"props.direction","cases":{"horizontal":"row"},"default":"column"}},"flexWrap":{"$cond":["props.wrap","wrap","nowrap"]},"gap":"$spacing.{props.gap|md}","alignItems":{"$coalesce":["{props.align}",{"$map":{"from":"props.direction","cases":{"horizontal":"center"},"default":"stretch"}}]},"justifyContent":{"$map":{"from":"props.justify","cases":{"between":"space-between","around":"space-around","evenly":"space-evenly"},"default":"{props.justify|start}"}}},"children":["$children"]}},"Grid":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat({props.columns|2}, minmax(0, 1fr))","gap":"$spacing.{props.gap|md}"},"children":["$children"]}},"Card":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.title}"},"style":{"display":"flex","flexDirection":"column","borderRadius":"$radius.xl","overflow":"hidden"},"children":[{"part":"header","component":"Box","$any":["props.title","props.description"],"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","paddingTop":"$spacing.lg","paddingHorizontal":"$spacing.lg"},"children":[{"part":"title","component":"Text","$if":"props.title","props":{"text":"{props.title}","variant":"title"}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","variant":"muted"}}]},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.md","padding":{"$map":{"from":"props.padded","cases":{"false":"$spacing.none"},"default":"$spacing.lg"}}},"children":["$children"]}]}},"Separator":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"separator"},"style":{"alignSelf":"stretch","flexShrink":0,"width":{"$map":{"from":"props.orientation","cases":{"vertical":1},"default":"auto"}},"height":{"$map":{"from":"props.orientation","cases":{"vertical":"auto"},"default":1}}}}},"Section":{"recipeProps":["tint","tree","open","collapsible"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.sm"},"children":[{"part":"header","component":"Box","$if":["props.title",{"$not":"props.collapsible"}],"$a11y":{"role":"heading","level":3},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","height":"$control.row","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md"},"children":[{"part":"chevron","component":"Icon","$if":"props.collapsible","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"}},"$slot:leading",{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"muted","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"loading","component":"Spinner","$if":"props.loading","props":{"size":"xs","label":"$string.loading"}},{"part":"count","component":"Text","$if":"props.count","props":{"text":{"$text":"props.count"},"variant":"muted"}},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},"$slot:trailing"]},{"part":"header","component":"Box","$if":["props.title","props.collapsible"],"$a11y":{"role":"button","expanded":"{props.open|true}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","height":"$control.row","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md"},"$on":{"press":"change"},"$context":{"open":{"$not":"props.open|true"}},"$set":{"press":{"prop":"open","value":{"$not":"props.open|true"}}},"children":[{"part":"chevron","component":"Icon","$if":"props.collapsible","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"}},"$slot:leading",{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"muted","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"loading","component":"Spinner","$if":"props.loading","props":{"size":"xs","label":"$string.loading"}},{"part":"count","component":"Text","$if":"props.count","props":{"text":{"$text":"props.count"},"variant":"muted"}},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},"$slot:trailing"]},{"part":"body","component":"List","$if":"props.open|true","$a11y":{"role":{"$cond":["props.tree","tree","list"]}},"props":{"divided":true,"gap":"none","style":"{props.style}"},"children":["$children"]}]}},"Group":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.title}","description":"{props.footer}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs"},"children":[{"part":"title","component":"Text","$if":"props.title","props":{"text":"{props.title}","variant":"label"},"style":{"paddingHorizontal":"$spacing.md"}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","borderRadius":"$radius.lg","overflow":"hidden"},"children":["$children"]},{"part":"footer","component":"Text","$if":"props.footer","props":{"text":"{props.footer}","variant":"muted"},"style":{"paddingHorizontal":"$spacing.md"}}]}},"Heading":{"recipeProps":["level"],"root":{"part":"root","component":"Text","$a11y":{"role":"heading","level":{"$map":{"from":"props.level","cases":{"h1":1,"h2":2,"h3":3,"h4":4},"default":2}}},"props":{"text":"{props.text}","variant":"title"}}},"Collapsible":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs"},"children":[{"part":"trigger","component":"Box","$a11y":{"role":"button","expanded":"{props.open|false}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","minHeight":"$control.row","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.md"},"$recipe":{"open":"{props.open|false}"},"$on":{"press":"change"},"$context":{"open":"{!props.open}"},"$set":{"press":{"prop":"open","value":"{!props.open}"}},"children":[{"part":"chevron","component":"Icon","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"},"$recipe":{"open":"{props.open|false}"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label","lines":1},"style":{"flexGrow":1,"minWidth":0}},{"part":"count","component":"Text","$if":"props.count","props":{"text":{"$text":"props.count"},"variant":"muted"}}]},{"part":"body","component":"Box","$if":"props.open","style":{"display":"flex","flexDirection":"column","gap":"$spacing.md","paddingHorizontal":"$spacing.sm"},"children":["$children"]}]}},"Trace":{"recipeProps":["size"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minWidth":0},"children":["$children"]}},"TraceItem":{"recipeProps":["status","size","collapsible","open"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","minWidth":0},"children":[{"part":"line","component":"Box","$if":{"$not":"props.collapsible"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}},"alignSelf":"flex-start","maxWidth":"100%","minWidth":0,"borderRadius":"$radius.md"},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"},"style":{"width":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"height":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"flexShrink":0}},{"part":"title","component":"Text","props":{"text":"{props.title}","lines":1,"shimmer":{"$eq":["{props.status}","running"]}},"style":{"flexShrink":1,"minWidth":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","lines":1},"style":{"flexShrink":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}}]},{"part":"line","component":"Box","$if":"props.collapsible","$a11y":{"role":"button","expanded":"{props.open|false}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}},"alignSelf":"flex-start","maxWidth":"100%","minWidth":0,"borderRadius":"$radius.md"},"$on":{"press":"change"},"$context":{"open":"{!props.open}"},"$set":{"press":{"prop":"open","value":"{!props.open}"}},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"},"style":{"width":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"height":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"flexShrink":0}},{"part":"title","component":"Text","props":{"text":"{props.title}","lines":1,"shimmer":{"$eq":["{props.status}","running"]}},"style":{"flexShrink":1,"minWidth":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","lines":1},"style":{"flexShrink":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}},{"part":"chevron","component":"Icon","props":{"name":"trace-chevron","size":"sm"},"$recipe":{"open":"{props.open|false}"},"style":{"width":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"height":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"flexShrink":0,"marginLeft":{"$map":{"from":"props.size","cases":{"sm":-2},"default":-4}}}}]},{"part":"content","component":"Box","$if":["props.collapsible","props.open"],"style":{"display":"flex","flexDirection":"column","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minWidth":0,"marginTop":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"marginBottom":{"$map":{"from":"props.size","cases":{"sm":4},"default":4}},"marginLeft":{"$map":{"from":"props.size","cases":{"sm":6},"default":7}},"borderLeftWidth":1,"paddingLeft":{"$map":{"from":"props.size","cases":{"sm":13},"default":16}},"paddingRight":{"$map":{"from":"props.size","cases":{"sm":4},"default":4}}},"children":["$children"]}]}},"Pagination":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"navigation","label":"$string.pagination"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"prev","component":"Button","props":{"icon":"ui-chevron-left","variant":"outline","size":"icon","label":"$string.previous","disabled":{"$not":{"$lt":[1,"{props.page|1}"]}}},"$on":{"press":"change"},"$context":{"page":{"$clamp":[{"$add":["{props.page|1}",-1]},1,"{props.totalPages}"]}},"$set":{"press":{"prop":"page","value":{"$clamp":[{"$add":["{props.page|1}",-1]},1,"{props.totalPages}"]}}}},{"part":"label","component":"Text","props":{"text":"{props.page|1} / {props.totalPages}","variant":"muted"},"$a11y":{"role":"status","label":{"$fill":["$string.pageOf",{"page":"{props.page|1}","total":"{props.totalPages}"}]}}},{"part":"next","component":"Button","props":{"icon":"ui-chevron-right","variant":"outline","size":"icon","label":"$string.next","disabled":{"$not":{"$lt":["{props.page|1}","{props.totalPages}"]}}},"$on":{"press":"change"},"$context":{"page":{"$clamp":[{"$add":["{props.page|1}",1]},1,"{props.totalPages}"]}},"$set":{"press":{"prop":"page","value":{"$clamp":[{"$add":["{props.page|1}",1]},1,"{props.totalPages}"]}}}}]}},"Badge":{"recipeProps":["variant"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xxs","height":"$control.badge","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.full","alignSelf":"flex-start"},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"label","component":"Text","props":{"text":"{props.text}","variant":"caption","lines":1}}]}},"Alert":{"recipeProps":["type"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$map":{"from":"props.type","cases":{"warning":"alert","error":"alert"},"default":"status"}}},"style":{"display":"flex","flexDirection":"row","alignItems":"flex-start","gap":"$spacing.sm","padding":"$spacing.md","borderRadius":"$radius.lg"},"children":[{"part":"icon","component":"Icon","props":{"name":{"$map":{"from":"props.type","cases":{"success":"ui-success","warning":"ui-warning","error":"ui-error"},"default":"ui-info"}},"size":"sm","tone":{"$map":{"from":"props.type","cases":{"success":"success","warning":"warning","error":"danger"},"default":"info"}}}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","flexGrow":1,"minWidth":0},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label"}},{"part":"message","component":"Text","$if":"props.message","props":{"text":"{props.message}","variant":"muted"}}]}]}},"Chip":{"recipeProps":["shape","selected","tone"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$cond":["props.pressable","button","none"]},"pressed":{"$cond":["props.pressable","{props.selected|false}"]}},"props":{"pressable":"{props.pressable|false}"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xs","paddingHorizontal":"$spacing.sm","alignSelf":"flex-start","height":{"$map":{"from":"props.shape","cases":{"rect":"$control.chip"},"default":"$control.pill"}},"borderRadius":{"$map":{"from":"props.shape","cases":{"rect":"$radius.md"},"default":"$radius.full"}}},"children":["$slot:leading",{"part":"dot","component":"Box","$if":"props.dot","style":{"width":8,"height":8,"borderRadius":"$radius.full","backgroundColor":"{props.dot}","flexShrink":0}},{"part":"image","component":"Image","$if":"props.image","props":{"src":"{props.image}","alt":"{props.label}","width":16,"height":16,"fit":"cover"},"style":{"borderRadius":"$radius.full"}},{"part":"icon","component":"Icon","$if":["props.icon","!props.image"],"props":{"name":"{props.icon}","size":"sm"}},{"part":"label","component":"Text","props":{"text":"{props.label}","variant":"caption","lines":1}},{"part":"detail","component":"Text","$if":"props.detail","props":{"text":"{props.detail}","variant":"muted","lines":1}},{"part":"remove","component":"Button","$if":"props.removable","props":{"icon":"ui-close","variant":"ghost","size":"icon","label":"$string.remove"},"$on":{"press":"remove"}}]}},"EmptyState":{"recipeProps":["size"],"root":{"part":"root","component":"Box","$a11y":{"role":"status"},"style":{"display":"flex","flexDirection":"column","alignItems":"center","gap":{"$map":{"from":"props.size","cases":{"list":"$spacing.xs"},"default":"$spacing.md"}},"paddingVertical":{"$map":{"from":"props.size","cases":{"list":"$spacing.xl"},"default":"$spacing.xl3"}},"paddingHorizontal":{"$map":{"from":"props.size","cases":{"list":"$spacing.md"},"default":"$spacing.xl"}}},"children":[{"part":"disc","component":"Box","$if":{"$not":{"$eq":["{props.size|page}","list"]}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","width":48,"height":48,"borderRadius":"$radius.full","flexShrink":0},"children":[{"part":"icon","component":"Icon","props":{"name":"{props.icon}","size":"lg","tone":"neutral"}}]},{"part":"icon","component":"Icon","$if":{"$eq":["{props.size|page}","list"]},"props":{"name":"{props.icon}","size":"default","tone":"neutral"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":{"$map":{"from":"props.size","cases":{"list":"muted"},"default":"title"}},"align":"center"}},{"part":"description","component":"Text","$if":["props.description",{"$not":{"$eq":["{props.size|page}","list"]}}],"props":{"text":"{props.description}","variant":"muted","align":"center"}},{"part":"action","component":"Button","$if":["props.actionLabel",{"$not":{"$eq":["{props.size|page}","list"]}}],"props":{"label":"{props.actionLabel}","variant":"outline"},"$on":{"press":"press"}}]}},"Progress":{"recipeProps":["tone"],"root":{"part":"root","component":"Box","$a11y":{"role":"progressbar","label":"{props.label}","valueNow":"{props.value}","valueMin":0,"valueMax":"{props.max|100}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs","width":"100%"},"children":[{"part":"label","component":"Text","$if":"props.label","props":{"text":"{props.label}","variant":"caption"}},{"part":"track","component":"Box","style":{"height":"$control.progress","borderRadius":"$radius.full","overflow":"hidden","width":"100%"},"children":[{"part":"fill","component":"Box","style":{"height":"100%","width":{"$percent":["{props.value}","{props.max|100}"]},"borderRadius":"$radius.full"}}]}]}},"Meter":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"meter","label":"{props.label}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs","width":"100%"},"children":[{"part":"header","component":"Box","$any":["props.label","props.value"],"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"label","component":"Text","$if":"props.label","props":{"text":"{props.label}","variant":"caption"},"style":{"flexGrow":1,"minWidth":0}},{"part":"value","component":"Text","$if":"props.value","props":{"text":"{props.value}","variant":"muted"}}]},{"part":"track","component":"Box","style":{"display":"flex","flexDirection":"row","height":"$control.meter","borderRadius":"$radius.full","overflow":"hidden","width":"100%"},"children":[{"part":"segment","component":"Box","$each":"props.segments","$as":"item","style":{"height":"100%","width":{"$percent":["{item.value}","{props.max|100}"]}},"$recipe":{"tone":"{item.tone|neutral}"}}]}]}},"Row":{"recipeProps":["selected","density","surface","depth"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$cond":["props.pressable","button","none"]},"selected":{"$cond":["props.pressable","{props.selected|false}"]}},"props":{"pressable":"{props.pressable|false}","href":"{props.href}"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","minHeight":{"$map":{"from":"props.density","cases":{"compact":"$control.rowCompact"},"default":"$control.row"}},"paddingHorizontal":"$spacing.md","borderRadius":{"$map":{"from":"props.surface","cases":{"card":"$radius.lg"},"default":"$radius.md"}}},"children":[{"part":"guides","component":"TreeGuides","$if":{"$lt":[0,"{props.depth|0}"]},"props":{"depth":"{props.depth}"}},"$slot:leading",{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"identifier","component":"Text","$if":"props.identifier","props":{"text":"{props.identifier}","variant":"code","lines":1},"style":{"flexShrink":0}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","flexGrow":1,"minWidth":0,"paddingVertical":{"$map":{"from":"props.surface","cases":{"card":"$spacing.md"},"default":"$spacing.xs"}}},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"body","lines":1}},{"part":"subtitle","component":"Text","$if":"props.subtitle","props":{"text":"{props.subtitle}","variant":"muted","lines":1,"hostLinks":true}}]},{"part":"meta","component":"Text","$if":"props.meta","props":{"text":"{props.meta}","variant":"muted","lines":1}},{"part":"value","component":"Text","$any":["props.value","props.placeholder"],"props":{"text":{"$coalesce":["{props.value}","{props.placeholder}"]},"variant":{"$cond":["props.value","body","muted"]},"lines":1,"align":"end"}},"$slot:trailing",{"part":"chevron","component":"Icon","$if":{"$not":{"$eq":["{props.chevron|none}","none"]}},"props":{"name":{"$map":{"from":"props.chevron","cases":{"selector":"ui-selector"},"default":"ui-chevron-right"}},"size":"sm","tone":"neutral"}}]}},"ScrollArea":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"region"},"style":{"display":"flex","flexDirection":{"$map":{"from":"props.direction","cases":{"horizontal":"row"},"default":"column"}},"overflowX":{"$map":{"from":"props.direction","cases":{"horizontal":"auto","both":"auto"},"default":"hidden"}},"overflowY":{"$map":{"from":"props.direction","cases":{"vertical":"auto","both":"auto"},"default":"hidden"}},"minWidth":0,"minHeight":0,"maxHeight":"{props.maxHeight}"},"children":["$children"]}},"Sidebar":{"recipeProps":["side"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":{"$map":{"from":"props.side","cases":{"right":"row-reverse"},"default":"row"}},"alignItems":"stretch","gap":"$spacing.lg","width":"100%","minHeight":0},"children":[{"part":"sidebar","component":"Box","$if":"!props.collapsed","$a11y":{"role":"navigation"},"style":{"display":"flex","flexDirection":"column","width":"{props.width|240}","flexShrink":0,"minHeight":0,"@media (max-width: $breakpoint.{props.collapseBelow|md})":{"$cond":[{"$not":{"$eq":["{props.collapseBelow|md}","never"]}},{"display":"none"}]}},"children":["$slot:sidebar"]},{"part":"main","component":"Box","$a11y":{"role":"main"},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"minWidth":0,"minHeight":0},"children":["$children"]}]}},"AppBar":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"banner"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","height":"$control.appBar","paddingHorizontal":"$spacing.md","width":"100%"},"children":[{"part":"back","component":"Button","$if":"props.back","props":{"icon":"ui-back","variant":"ghost","size":"icon","label":"$string.back"},"$on":{"press":"back"}},"$slot:leading",{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","flexGrow":1,"minWidth":0},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"title","lines":1},"$a11y":{"role":"heading","level":1}},{"part":"subtitle","component":"Text","$if":"props.subtitle","props":{"text":"{props.subtitle}","variant":"muted","lines":1}}]},"$slot:trailing"]}},"Kbd":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","height":"$control.badge","paddingHorizontal":"$spacing.xs","borderRadius":"$radius.sm","alignSelf":"flex-start"},"children":[{"part":"label","component":"Text","props":{"text":"{props.keys}","variant":"code","lines":1}}]}},"Label":{"recipeProps":["required"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xxs"},"children":[{"part":"text","component":"Text","props":{"text":"{props.text}","variant":"label"}},{"part":"mark","component":"Text","$if":"props.required","props":{"text":"*","variant":"label","tone":"danger"}}]}},"Breadcrumb":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"navigation","label":"$string.breadcrumb"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","flexWrap":"wrap","gap":"$spacing.xs"},"children":[{"part":"item","component":"Box","$each":"props.items","$as":"item","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xs"},"$recipe":{"current":{"$eq":["{index}",{"$sub":["{len(props.items)}",1]}]}},"children":[{"part":"separator","component":"Icon","$if":{"$lt":[0,"{index}"]},"props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"},"$a11y":{"hidden":true}},{"part":"link","component":"Button","$if":{"$not":{"$eq":["{index}",{"$sub":["{len(props.items)}",1]}]}},"props":{"label":"{item.label}","icon":"{item.icon}","variant":"link","size":"sm"},"$on":{"press":"select"},"$context":{"value":"{item.value}"}},{"part":"current","component":"Text","$if":{"$eq":["{index}",{"$sub":["{len(props.items)}",1]}]},"props":{"text":"{item.label}","variant":"label","lines":1},"$a11y":{"current":"page"}}]}]}},"Outline":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"navigation","label":"{props.caption|$string.outline}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","minWidth":0},"children":[{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"caption","lines":1},"$a11y":{"hidden":true}},{"part":"row","component":"Box","$each":"props.items","$as":"item","props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xs","position":"relative","height":"$control.rowCompact","paddingHorizontal":"$spacing.sm","minWidth":0,"overflow":"hidden","cursor":"pointer"},"$recipe":{"active":{"$eq":["{item.id}","{props.value}"]}},"$a11y":{"role":"link","label":{"$cond":["item.count",{"$fill":["$string.outlineRow",{"title":"{item.title}","count":"{item.count}"}]},"{item.title}"]},"current":{"$cond":[{"$eq":["{item.id}","{props.value}"]},"location",false]}},"$on":{"press":"select"},"$context":{"id":"{item.id}"},"$set":{"press":{"prop":"value","value":"{item.id}"}},"children":[{"part":"bar","component":"Box","$if":{"$eq":["{item.id}","{props.value}"]},"$a11y":{"hidden":true},"style":{"position":"absolute","insetInlineStart":0,"top":0,"bottom":0,"width":2}},{"part":"title","component":"Text","props":{"text":"{item.title}","lines":1},"$recipe":{"active":{"$eq":["{item.id}","{props.value}"]}},"style":{"flexGrow":1,"flexShrink":1,"flexBasis":0,"minWidth":0}},{"part":"count","component":"Text","$if":"item.count","props":{"text":"· {item.count}","variant":"caption","lines":1},"$a11y":{"hidden":true},"style":{"flexShrink":0}}]}]}},"Stepper":{"recipeProps":["orientation"],"root":{"part":"root","component":"Box","$a11y":{"role":"list"},"style":{"display":"flex","flexDirection":{"$map":{"from":"props.orientation","cases":{"vertical":"column"},"default":"row"}},"alignItems":{"$map":{"from":"props.orientation","cases":{"vertical":"stretch"},"default":"flex-start"}},"gap":"$spacing.md","width":"100%"},"children":[{"part":"step","component":"Box","$each":"props.steps","$as":"step","style":{"display":"flex","flexDirection":{"$map":{"from":"props.orientation","cases":{"vertical":"row"},"default":"column"}},"alignItems":{"$map":{"from":"props.orientation","cases":{"vertical":"flex-start"},"default":"center"}},"gap":"$spacing.xs","flexGrow":1,"flexBasis":0,"minWidth":0},"$recipe":{"status":{"$cond":[{"$lt":["{index}","{props.current|0}"]},"done",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}]}},"$a11y":{"role":"listitem","current":{"$cond":[{"$eq":["{index}","{props.current|0}"]},"step",false]},"label":{"$fill":[{"$cond":[{"$lt":["{index}","{props.current|0}"]},"$string.stepDone",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"$string.stepCurrent","$string.stepUpcoming"]}]},{"step":{"$add":["{index}",1]},"total":"{len(props.steps)}","label":"{step.label}"}]}},"children":[{"part":"marker","component":"Box","$a11y":{"hidden":true},"style":{"display":"flex","alignItems":"center","justifyContent":"center","width":"$control.iconLg","height":"$control.iconLg","borderRadius":"$radius.full","flexShrink":0},"$recipe":{"status":{"$cond":[{"$lt":["{index}","{props.current|0}"]},"done",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}]}},"children":[{"part":"check","component":"Icon","$if":{"$lt":["{index}","{props.current|0}"]},"props":{"name":"ui-check","size":"sm"}},{"part":"number","component":"Text","$if":{"$not":{"$lt":["{index}","{props.current|0}"]}},"props":{"text":{"$text":{"$add":["{index}",1]}},"variant":"caption"},"$recipe":{"status":{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}}}]},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","minWidth":0},"children":[{"part":"label","component":"Text","props":{"text":"{step.label}","variant":"label","lines":1},"$recipe":{"status":{"$cond":[{"$lt":["{index}","{props.current|0}"]},"done",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}]}}},{"part":"description","component":"Text","$if":"step.description","props":{"text":"{step.description}","variant":"muted","lines":2}}]}]}]}},"Rating":{"recipeProps":["size","readOnly"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$cond":["props.readOnly","img","group"]},"label":{"$cond":["props.readOnly",{"$fill":["$string.ratingValue",{"value":"{props.value|0}","max":"{props.max|5}"}]}]}},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xxs","alignSelf":"flex-start"},"children":[{"part":"star","component":"Box","$each":"range(props.max|5)","$as":"star","props":{"pressable":{"$not":"props.readOnly"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center"},"$recipe":{"filled":{"$lt":["{index}","{props.value|0}"]}},"$a11y":{"role":{"$cond":["props.readOnly","hidden","button"]},"label":{"$fill":["$string.ratingStar",{"value":{"$add":["{index}",1]},"max":"{props.max|5}"}]},"pressed":{"$eq":[{"$add":["{index}",1]},"{props.value|0}"]}},"$on":{"press":"change"},"$context":{"value":{"$add":["{index}",1]}},"$set":{"press":{"prop":"value","value":{"$add":["{index}",1]}}},"children":[{"part":"icon","component":"Icon","props":{"name":"star","size":"{props.size|default}"},"$recipe":{"filled":{"$lt":["{index}","{props.value|0}"]}}}]}]}},"AlertDialog":{"recipeProps":["destructive"],"root":{"part":"root","component":"Dialog","$a11y":{"role":"alertdialog"},"props":{"title":"{props.title}","description":"{props.description}","open":"{props.open|false}","dismissible":false},"slots":{"trigger":"$slot:trigger","footer":{"part":"footer","component":"Box","style":{"display":"flex","flexDirection":"row","justifyContent":"flex-end","flexWrap":"wrap","gap":"$spacing.sm"},"children":[{"part":"cancel","component":"Button","props":{"label":"{props.cancelLabel|$string.cancel}","variant":"outline"},"$a11y":{"autoFocus":true},"$on":{"press":"cancel"},"$set":{"press":{"prop":"open","value":false}}},{"part":"confirm","component":"Button","props":{"label":"{props.confirmLabel|$string.confirm}","variant":{"$cond":["props.destructive","destructive","default"]}},"$on":{"press":"confirm"},"$set":{"press":{"prop":"open","value":false}}}]}},"$on":{"change":"change"},"children":["$children"]}},"DockCard":{"recipeProps":["tone"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column"},"children":[{"part":"trigger","component":"Box","$a11y":{"role":"button","label":"{props.label}: {props.title}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"flex-start","gap":"$spacing.sm","padding":"$spacing.md","borderRadius":"$radius.xl"},"$on":{"press":"press"},"$set":{"press":{"prop":"open","value":true}},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm","tone":"{props.tone|neutral}"},"style":{"flexShrink":0}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","flexGrow":1,"minWidth":0},"children":[{"part":"header","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"label","component":"Text","props":{"text":"{props.label}","variant":"caption","tone":"{props.tone|neutral}","lines":1}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"muted","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},{"part":"meta","component":"Text","$if":"props.meta","props":{"text":"{props.meta}","variant":"muted","lines":1}}]},{"part":"row","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","lines":1},"style":{"flexGrow":1,"minWidth":0}},{"part":"chevron","component":"Icon","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"}}]}]}]},{"part":"sheet","component":"Drawer","props":{"title":"{props.label}","description":"{props.caption}","open":"{props.open|false}","side":"bottom"},"slots":{"footer":"$slot:footer"},"$on":{"change":"change"},"children":["$children"]}]}},"Sparkline":{"recipeProps":["tone"],"root":{"part":"root","component":"Chart","props":{"kind":"sparkline","series":[{"name":"","values":"{props.values}","tone":"{props.tone|primary}"}],"height":"{props.height|24}","showAxes":false,"showGrid":false,"showLegend":false},"style":{"width":"100%"}}},"Page":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","flexGrow":1,"minHeight":0,"width":"100%"},"children":[{"part":"header","component":"AppBar","props":{"title":"{props.title}","subtitle":"{props.subtitle}","back":"{props.back|false}"},"slots":{"leading":"$slot:leading","trailing":"$slot:trailing"},"$on":{"back":"back"}},{"part":"body","component":"Box","$a11y":{"role":"main"},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"minHeight":0,"overflowY":"auto","gap":"$spacing.lg","padding":{"$map":{"from":"props.padded","cases":{"false":"$spacing.none"},"default":"$spacing.lg"}}},"children":["$children"]}]}},"Toolbar":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group"},"style":{"display":"flex","flexDirection":"row","flexWrap":"wrap","alignItems":"flex-end","gap":"$spacing.{props.gap|sm}","width":"100%"},"children":["$children",{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},"$slot:trailing"]}},"SplitView":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"stretch","width":"100%","flexGrow":1,"minHeight":0},"children":[{"part":"list","component":"Box","$a11y":{"role":"navigation"},"style":{"display":"flex","flexDirection":"column","width":"{props.width|320}","flexShrink":0,"minHeight":0,"overflowY":"auto","@media (max-width: $breakpoint.md)":{"width":"100%","flexShrink":1,"display":{"$cond":["props.open","none","flex"]}}},"children":["$slot:list"]},{"part":"divider","component":"Separator","props":{"orientation":"vertical"},"style":{"@media (max-width: $breakpoint.md)":{"display":"none"}}},{"part":"detail","component":"Box","$a11y":{"role":"main"},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"minWidth":0,"minHeight":0,"@media (max-width: $breakpoint.md)":{"display":{"$cond":["props.open","flex","none"]}}},"children":[{"part":"backBar","component":"Box","style":{"display":"none","flexDirection":"row","alignItems":"center","height":"$control.appBar","paddingHorizontal":"$spacing.sm","@media (max-width: $breakpoint.md)":{"display":"flex"}},"children":[{"part":"back","component":"Button","props":{"icon":"ui-back","variant":"ghost","size":"icon","label":"$string.back"},"$on":{"press":"back"},"$set":{"press":{"prop":"open","value":false}}}]},"$children"]}]}},"FieldGroup":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group"},"style":{"display":"grid","gridTemplateColumns":"repeat(1, minmax(0, 1fr))","gap":"$spacing.md","alignItems":"start","@media (min-width: $breakpoint.md)":{"gridTemplateColumns":"repeat({props.columns|2}, minmax(0, 1fr))"}},"children":["$children"]}},"FormActions":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group"},"style":{"display":"flex","flexDirection":"row","flexWrap":"wrap","justifyContent":"flex-end","alignItems":"center","gap":"$spacing.sm","width":"100%"},"children":["$children",{"part":"cancel","component":"Button","$if":"props.cancel","props":{"label":"$string.cancel","variant":"outline"},"$on":{"press":"cancel"}},{"part":"submit","component":"Button","props":{"label":"{props.submit}","variant":{"$cond":["props.destructive","destructive","default"]},"submit":true}}]}},"StatTile":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.label}"},"style":{"display":"flex","flexDirection":"column","minWidth":0},"children":[{"part":"card","component":"Card","children":[{"part":"header","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"label","component":"Text","props":{"text":"{props.label}","variant":"muted","lines":1},"style":{"flexGrow":1,"flexShrink":1,"minWidth":0}},{"part":"delta","component":"Text","$if":"props.delta","props":{"text":"{props.delta}","variant":"caption","tone":"{props.tone|neutral}"}}]},{"part":"value","component":"Text","props":{"text":"{props.value}","variant":"title","lines":1}},{"part":"trend","component":"Sparkline","$if":"props.trend","props":{"values":"{props.trend}","height":32}}]}]}},"CallSurface":{"recipeProps":["state","muted"],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.name}"},"style":{"display":"flex","flexDirection":"column","alignItems":"center","width":"100%","height":"100%","minHeight":0,"paddingHorizontal":"$spacing.xl","paddingTop":"$spacing.xl3","paddingBottom":"$spacing.xl3"},"children":[{"part":"head","component":"Box","style":{"display":"flex","flexDirection":"column","alignItems":"center","width":"100%","maxWidth":384,"minWidth":0},"children":[{"part":"wave","component":"VoiceWave","props":{"activity":{"$cond":["props.muted","muted",{"$map":{"from":"props.state","cases":{"ringing":"thinking","connecting":"thinking","ended":"idle"},"default":"{props.activity|speaking}"}}]},"level":"{props.level}","bands":"{props.bands}","size":"xl"},"$a11y":{"hidden":true},"children":[{"part":"avatar","component":"Avatar","props":{"name":"{props.name}","src":"{props.avatar}","size":"lg"}}]},{"part":"name","component":"Text","$a11y":{"role":"heading","level":2},"props":{"text":"{props.name}","variant":"title","align":"center","lines":1},"style":{"marginTop":"$spacing.sm","maxWidth":"100%"}},{"part":"status","component":"Text","$if":"props.status","props":{"text":"{props.status}","variant":"muted","align":"center","lines":1},"style":{"marginTop":"$spacing.xs"}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","align":"center","lines":4,"live":"polite"},"style":{"marginTop":"$spacing.xl2","maxWidth":"100%"}}]},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minHeight":"$spacing.xl"}},{"part":"controls","component":"Box","style":{"display":"flex","flexDirection":"row","justifyContent":"center","alignItems":"flex-start","gap":32},"children":[{"part":"muteTip","component":"Tooltip","$if":{"$not":{"$eq":["{props.state|talking}","ringing"]}},"props":{"content":{"$cond":["props.muted","$string.unmute","$string.mute"]}},"children":[{"part":"mute","component":"Button","props":{"variant":"secondary","size":"icon"},"$a11y":{"label":{"$cond":["props.muted","$string.unmute","$string.mute"]}},"style":{"width":56,"height":56,"borderRadius":"$radius.full","flexShrink":0},"$on":{"press":"mute"},"$context":{"muted":"{!props.muted}"},"$set":{"press":{"prop":"muted","value":"{!props.muted}"}},"children":[{"part":"muteIcon","component":"Icon","props":{"name":{"$cond":["props.muted","call-unmute","call-mute"]},"size":"lg"}}]}]},{"part":"speakerTip","component":"Tooltip","$if":[{"$not":{"$eq":["{props.state|talking}","ringing"]}},{"$not":{"$eq":["{props.speaker|none}","none"]}}],"props":{"content":{"$cond":["props.speaker","$string.speaker","$string.speakerOff"]}},"children":[{"part":"speaker","component":"Button","props":{"variant":"secondary","size":"icon"},"$a11y":{"label":{"$cond":["props.speaker","$string.speaker","$string.speakerOff"]}},"style":{"width":56,"height":56,"borderRadius":"$radius.full","flexShrink":0},"$on":{"press":"speaker"},"$context":{"speaker":"{!props.speaker}"},"$set":{"press":{"prop":"speaker","value":"{!props.speaker}"}},"children":[{"part":"speakerIcon","component":"Icon","props":{"name":{"$cond":["props.speaker","call-speaker","call-speaker-off"]},"size":"lg"}}]}]},{"part":"endTip","component":"Tooltip","$if":{"$not":{"$eq":["{props.state|talking}","ringing"]}},"props":{"content":"$string.endCall"},"children":[{"part":"end","component":"Button","props":{"variant":"destructive","size":"icon"},"$a11y":{"label":"$string.endCall"},"style":{"width":56,"height":56,"borderRadius":"$radius.full","flexShrink":0},"$on":{"press":"hangUp"},"children":[{"part":"endIcon","component":"Icon","props":{"name":"call-end","size":"lg"}}]}]},{"part":"cancel","component":"Box","$if":{"$eq":["{props.state|talking}","ringing"]},"style":{"display":"flex","flexDirection":"column","alignItems":"center","gap":"$spacing.xs"},"children":[{"part":"end","component":"Button","props":{"variant":"destructive","size":"icon"},"$a11y":{"label":"$string.cancel"},"style":{"width":56,"height":56,"borderRadius":"$radius.full","flexShrink":0},"$on":{"press":"hangUp"},"children":[{"part":"endIcon","component":"Icon","props":{"name":"call-end","size":"lg"}}]},{"part":"cancelLabel","component":"Text","props":{"text":"$string.cancel","variant":"caption"},"$a11y":{"hidden":true}}]}]}]}},"MessageBubble":{"recipeProps":["side","status"],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":{"$coalesce":["{props.author}","{props.time}"]}},"style":{"display":"flex","flexDirection":"column","alignItems":{"$map":{"from":"props.side","cases":{"out":"flex-end"},"default":"flex-start"}},"width":"100%","minWidth":0},"children":[{"part":"bubble","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","maxWidth":"80%","minWidth":0,"paddingHorizontal":"$spacing.md","paddingVertical":"$spacing.sm","borderRadius":"$radius.xl","borderTopLeftRadius":{"$map":{"from":"props.side","cases":{"out":"$radius.xl"},"default":6}}},"children":[{"part":"author","component":"Text","$if":["props.author",{"$not":{"$eq":["{props.side|in}","out"]}}],"props":{"text":"{props.author}","variant":"caption","lines":1}},"$slot:attachment",{"part":"text","component":"Markdown","props":{"text":"{props.text}"}},{"part":"footer","component":"Box","$any":["props.time","props.status"],"style":{"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"flex-end","alignSelf":"flex-end","gap":"$spacing.xs"},"children":[{"part":"time","component":"Text","$if":"props.time","props":{"text":"{props.time}","variant":"caption","lines":1}},{"part":"status","component":"Icon","$if":["props.status",{"$eq":["{props.side|in}","out"]}],"props":{"name":{"$map":{"from":"props.status","cases":{"sending":"ui-clock","sent":"ui-check","read":"ui-read"},"default":"ui-check"}},"size":"sm","label":{"$map":{"from":"props.status","cases":{"sending":"$string.sending","sent":"$string.sent","read":"$string.read"},"default":"$string.sent"}}},"style":{"width":14,"height":14,"flexShrink":0}}]}]}]}},"Plan":{"recipeProps":["state"],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.title}"},"style":{"display":"flex","flexDirection":"column","minWidth":0},"children":[{"part":"card","component":"Card","children":[{"part":"header","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","minWidth":0},"children":[{"part":"title","component":"Heading","props":{"text":"{props.title}","level":"h3"}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","variant":"muted"}}]},{"part":"steps","component":"Trace","$if":"props.steps","children":[{"part":"step","component":"TraceItem","$each":"props.steps","$as":"step","props":{"title":"{step.title}","icon":"{step.icon}","description":"{step.detail}","status":"{step.status}"}}]},{"part":"footer","component":"Box","$if":{"$eq":["{props.state|proposed}","proposed"]},"style":{"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"flex-end","flexWrap":"wrap","gap":"$spacing.sm"},"children":[{"part":"decline","component":"Button","props":{"label":"{props.declineLabel|$string.no}","variant":"outline"},"$on":{"press":"decline"}},{"part":"approve","component":"Button","props":{"label":"{props.approveLabel|$string.yes}","icon":"ui-check","variant":"default"},"$on":{"press":"approve"}}]},{"part":"running","component":"Box","$if":{"$eq":["{props.state|proposed}","running"]},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.md"},"children":[{"part":"progress","component":"Progress","props":{"value":"{props.progress|0}","max":1,"tone":"primary"},"style":{"flexGrow":1,"flexShrink":1,"flexBasis":0,"minWidth":0}},{"part":"stop","component":"Button","props":{"label":"{props.stopLabel|$string.stop}","icon":"ui-stop","variant":"destructive"},"$on":{"press":"stop"}}]}]}]}},"Mosaic":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.label}"},"style":{"display":"flex","flexDirection":"row","width":"100%","aspectRatio":1.6,"minWidth":0},"children":[{"part":"lead","component":"Box","$if":"props.pictures.0","props":{"pressable":true},"style":{"position":"relative","overflow":"hidden","minWidth":0,"minHeight":0,"cursor":"pointer","flexGrow":{"$cond":[{"$lt":[2,"{len(props.pictures)}"]},0,1]},"flexShrink":{"$cond":[{"$lt":[2,"{len(props.pictures)}"]},0,1]},"flexBasis":{"$cond":[{"$lt":[2,"{len(props.pictures)}"]},"60%",0]},"height":"100%"},"$recipe":{"size":{"$cond":[{"$lt":[2,"{len(props.pictures)}"]},"large",{"$cond":[{"$lt":[1,"{len(props.pictures)}"]},"half","large"]}]}},"$a11y":{"role":"button","label":"{props.pictures.0.alt}"},"$on":{"press":"select"},"$context":{"index":0},"children":[{"part":"image","component":"Image","props":{"src":"{props.pictures.0.src}","alt":"{props.pictures.0.alt}","fit":"cover"},"$a11y":{"hidden":true},"style":{"position":"absolute","inset":0,"width":"100%","height":"100%"}}]},{"part":"pair","component":"Box","$if":[{"$eq":["{len(props.pictures)}",2]}],"props":{"pressable":true},"style":{"position":"relative","overflow":"hidden","minWidth":0,"minHeight":0,"cursor":"pointer","flexGrow":1,"flexShrink":1,"flexBasis":0,"height":"100%"},"$recipe":{"size":"half"},"$a11y":{"role":"button","label":"{props.pictures.1.alt}"},"$on":{"press":"select"},"$context":{"index":1},"children":[{"part":"image","component":"Image","props":{"src":"{props.pictures.1.src}","alt":"{props.pictures.1.alt}","fit":"cover"},"$a11y":{"hidden":true},"style":{"position":"absolute","inset":0,"width":"100%","height":"100%"}}]},{"part":"side","component":"Box","$if":{"$lt":[2,"{len(props.pictures)}"]},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"flexShrink":1,"flexBasis":0,"minWidth":0,"height":"100%"},"children":[{"part":"top","component":"Box","$if":"props.pictures.1","props":{"pressable":true},"style":{"position":"relative","overflow":"hidden","minWidth":0,"minHeight":0,"cursor":"pointer","flexGrow":1,"flexShrink":1,"flexBasis":0,"width":"100%"},"$recipe":{"size":"small"},"$a11y":{"role":"button","label":"{props.pictures.1.alt}"},"$on":{"press":"select"},"$context":{"index":1},"children":[{"part":"image","component":"Image","props":{"src":"{props.pictures.1.src}","alt":"{props.pictures.1.alt}","fit":"cover"},"$a11y":{"hidden":true},"style":{"position":"absolute","inset":0,"width":"100%","height":"100%"}}]},{"part":"bottom","component":"Box","$if":"props.pictures.2","props":{"pressable":true},"style":{"position":"relative","overflow":"hidden","minWidth":0,"minHeight":0,"cursor":"pointer","flexGrow":1,"flexShrink":1,"flexBasis":0,"width":"100%"},"$recipe":{"size":"small"},"$a11y":{"role":"button","label":{"$cond":[{"$lt":[3,"{len(props.pictures)}"]},{"$fill":["$string.morePicturesLabel",{"alt":"{props.pictures.2.alt}","count":{"$sub":["{len(props.pictures)}",3]}}]},"{props.pictures.2.alt}"]}},"$on":{"press":"select"},"$context":{"index":2},"children":[{"part":"image","component":"Image","props":{"src":"{props.pictures.2.src}","alt":"{props.pictures.2.alt}","fit":"cover"},"$a11y":{"hidden":true},"style":{"position":"absolute","inset":0,"width":"100%","height":"100%"}},{"part":"more","component":"Box","$if":{"$lt":[3,"{len(props.pictures)}"]},"$a11y":{"hidden":true},"style":{"position":"absolute","inset":0,"display":"flex","alignItems":"center","justifyContent":"center"},"children":[{"part":"moreLabel","component":"Text","props":{"text":{"$fill":["$string.morePictures",{"count":{"$sub":["{len(props.pictures)}",3]}}]},"lines":1}}]}]}]}]}},"Calendar":{"recipeProps":["view"],"root":{"part":"root","component":"Box","$a11y":{"role":"table"},"style":{"display":"flex","flexDirection":"column","width":"100%","gap":"$spacing.none","@media (form-factor: phone)":{"gap":"$spacing.md"},"minHeight":"$control.row"},"children":[{"part":"frame","component":"Box","$if":"props.source","style":{"display":"flex","flexDirection":"column","width":"100%","overflow":"hidden","borderRadius":"$radius.lg","borderWidth":"$border.hairline","@media (form-factor: phone)":{"borderWidth":0,"borderRadius":0}},"children":[{"part":"head","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))"},"$template":{"path":"{props.source}/month/weeks/0/days","key":"date","item":{"part":"weekday","component":"Box","style":{"paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","@media (form-factor: phone)":{"display":"flex","justifyContent":"center"}},"children":[{"part":"weekdayName","component":"Text","props":{"text":{"path":"weekday"},"variant":"caption"},"style":{"@media (form-factor: phone)":{"display":"none"}}},{"part":"weekdayInitial","component":"Text","props":{"text":{"path":"initial"},"variant":"caption"},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex"}}}]}},"$if":{"$eq":["{props.view|month}","month"]}},{"part":"head","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))"},"$template":{"path":"{props.source}/week/days","key":"date","item":{"part":"weekday","component":"Box","style":{"paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","@media (form-factor: phone)":{"display":"flex","justifyContent":"center"}},"children":[{"part":"weekdayName","component":"Text","props":{"text":{"path":"weekday"},"variant":"caption"},"style":{"@media (form-factor: phone)":{"display":"none"}}},{"part":"weekdayInitial","component":"Text","props":{"text":{"path":"initial"},"variant":"caption"},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex"}}}]}},"$if":{"$eq":["{props.view|month}","week"]}},{"part":"weeks","component":"Box","$if":{"$eq":["{props.view|month}","month"]},"style":{"display":"flex","flexDirection":"column"},"$template":{"path":"{props.source}/month/weeks","key":"key","item":{"part":"week","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","minWidth":0},"children":[{"part":"shade","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1","@media (form-factor: phone)":{"display":"none"}},"$template":{"path":"days","key":"date","item":{"part":"shadeCell","component":"Box","$recipe":{"weekend":{"path":"weekend"}},"style":{"borderTopWidth":"$border.hairline","borderRightWidth":"$border.hairline","minWidth":0}}}},{"part":"cells","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1"},"$template":{"path":"days","key":"date","item":{"part":"day","component":"Box","props":{"pressable":true},"$on":{"press":"select"},"$a11y":{"role":"button","label":{"path":"date"},"selected":{"path":"selected"}},"style":{"display":"flex","flexDirection":"column","alignItems":"flex-start","padding":"$spacing.xs","minHeight":"$control.textarea","minWidth":0,"@media (form-factor: phone)":{"alignItems":"stretch","minHeight":0,"padding":"$spacing.xxs"}},"children":[{"part":"number","component":"Box","$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","minWidth":"$control.badge","height":"$control.badge","paddingHorizontal":"$spacing.xxs","borderRadius":"$radius.full","@media (form-factor: phone)":{"display":"none"}},"children":[{"part":"numberText","component":"Text","props":{"text":{"path":"day"},"variant":"caption"},"$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}}}]},{"part":"compact","component":"Box","$recipe":{"selected":{"path":"selected"}},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex","flexDirection":"column","alignItems":"center","gap":"$spacing.xxs","paddingVertical":"$spacing.sm","borderRadius":"$radius.lg"}},"children":[{"part":"compactNumber","component":"Box","$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","minWidth":"$control.badge","height":"$control.badge","paddingHorizontal":"$spacing.xxs","borderRadius":"$radius.full"},"children":[{"part":"compactNumberText","component":"Text","props":{"text":{"path":"day"},"variant":"caption"},"$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}}}]},{"part":"dots","component":"Box","style":{"display":"flex","flexDirection":"row","gap":"$spacing.xxs","justifyContent":"center","height":"$spacing.sm"},"$template":{"path":"dots","item":{"part":"dot","component":"Box","$recipe":{"tone":{"path":"tone"}},"style":{"width":"$radius.sm","height":"$radius.sm","borderRadius":"$radius.full"}}}}]}]}}},{"part":"bars","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1","alignContent":"start","rowGap":"$spacing.xxs","paddingTop":"$spacing.xl2","paddingBottom":"$spacing.xs","@media (form-factor: phone)":{"display":"none"}},"$template":{"path":"segments","key":"id","item":{"part":"segment","component":"Box","props":{"pressable":true},"$on":{"press":"open"},"$recipe":{"tone":{"path":"tone"},"marker":{"$lt":[0,{"path":"more"}]},"contL":{"path":"contL"},"contR":{"path":"contR"}},"style":{"display":"flex","alignItems":"center","height":"$control.badge","minWidth":0,"overflow":"hidden","paddingHorizontal":"$spacing.xs","borderRadius":"$radius.sm","gridColumn":{"call":"concat","args":{"values":[{"path":"col"}," / span ",{"path":"span"}]}},"gridRow":{"call":"concat","args":{"values":[{"call":"add","args":{"a":{"path":"lane"},"b":1}}," / span 1"]}},"marginLeft":{"$cond":[{"path":"contL"},0,"$spacing.xxs"]},"marginRight":{"$cond":[{"path":"contR"},0,"$spacing.xxs"]}},"children":[{"part":"label","component":"Text","$if":{"$eq":[{"path":"more"},0]},"props":{"text":{"path":"row/{props.labelField|title}"},"variant":"caption","lines":1}},{"part":"more","component":"Text","$if":{"$lt":[0,{"path":"more"}]},"props":{"text":{"$fill":["$string.calendarMore",{"count":{"path":"more"}}]},"variant":"caption","lines":1}}]}}}]}}},{"part":"week","component":"Box","$if":{"$eq":["{props.view|month}","week"]},"style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","minWidth":0,"minHeight":"$control.toast"},"children":[{"part":"shade","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1","@media (form-factor: phone)":{"display":"none"}},"$template":{"path":"{props.source}/week/days","key":"date","item":{"part":"shadeCell","component":"Box","$recipe":{"weekend":{"path":"weekend"}},"style":{"borderTopWidth":"$border.hairline","borderRightWidth":"$border.hairline","minWidth":0}}}},{"part":"cells","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1"},"$template":{"path":"{props.source}/week/days","key":"date","item":{"part":"day","component":"Box","props":{"pressable":true},"$on":{"press":"select"},"$a11y":{"role":"button","label":{"path":"date"},"selected":{"path":"selected"}},"style":{"display":"flex","flexDirection":"column","alignItems":"flex-start","padding":"$spacing.xs","minHeight":"$control.textarea","minWidth":0,"@media (form-factor: phone)":{"alignItems":"stretch","minHeight":0,"padding":"$spacing.xxs"}},"children":[{"part":"number","component":"Box","$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","minWidth":"$control.badge","height":"$control.badge","paddingHorizontal":"$spacing.xxs","borderRadius":"$radius.full","@media (form-factor: phone)":{"display":"none"}},"children":[{"part":"numberText","component":"Text","props":{"text":{"path":"day"},"variant":"caption"},"$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}}}]},{"part":"compact","component":"Box","$recipe":{"selected":{"path":"selected"}},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex","flexDirection":"column","alignItems":"center","gap":"$spacing.xxs","paddingVertical":"$spacing.sm","borderRadius":"$radius.lg"}},"children":[{"part":"compactNumber","component":"Box","$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","minWidth":"$control.badge","height":"$control.badge","paddingHorizontal":"$spacing.xxs","borderRadius":"$radius.full"},"children":[{"part":"compactNumberText","component":"Text","props":{"text":{"path":"day"},"variant":"caption"},"$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}}}]},{"part":"dots","component":"Box","style":{"display":"flex","flexDirection":"row","gap":"$spacing.xxs","justifyContent":"center","height":"$spacing.sm"},"$template":{"path":"dots","item":{"part":"dot","component":"Box","$recipe":{"tone":{"path":"tone"}},"style":{"width":"$radius.sm","height":"$radius.sm","borderRadius":"$radius.full"}}}}]}]}}},{"part":"bars","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1","alignContent":"start","rowGap":"$spacing.xxs","paddingTop":"$spacing.xl2","paddingBottom":"$spacing.xs","@media (form-factor: phone)":{"display":"none"}},"$template":{"path":"{props.source}/week/segments","key":"id","item":{"part":"segment","component":"Box","props":{"pressable":true},"$on":{"press":"open"},"$recipe":{"tone":{"path":"tone"},"marker":{"$lt":[0,{"path":"more"}]},"contL":{"path":"contL"},"contR":{"path":"contR"}},"style":{"display":"flex","alignItems":"center","height":"$control.badge","minWidth":0,"overflow":"hidden","paddingHorizontal":"$spacing.xs","borderRadius":"$radius.sm","gridColumn":{"call":"concat","args":{"values":[{"path":"col"}," / span ",{"path":"span"}]}},"gridRow":{"call":"concat","args":{"values":[{"call":"add","args":{"a":{"path":"lane"},"b":1}}," / span 1"]}},"marginLeft":{"$cond":[{"path":"contL"},0,"$spacing.xxs"]},"marginRight":{"$cond":[{"path":"contR"},0,"$spacing.xxs"]}},"children":[{"part":"label","component":"Text","$if":{"$eq":[{"path":"more"},0]},"props":{"text":{"path":"row/{props.labelField|title}"},"variant":"caption","lines":1}},{"part":"more","component":"Text","$if":{"$lt":[0,{"path":"more"}]},"props":{"text":{"$fill":["$string.calendarMore",{"count":{"path":"more"}}]},"variant":"caption","lines":1}}]}}}]}]},{"part":"agenda","component":"Section","$if":["props.source",{"$eq":["{props.view|month}","month"]}],"props":{"title":{"path":"{props.source}/month/agenda/label"},"count":{"path":"{props.source}/month/agenda/count"}},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex"}},"$template":{"path":"{props.source}/month/agenda/items","key":"id","item":{"part":"entry","component":"Row","props":{"title":{"path":"row/{props.labelField|title}"},"subtitle":{"path":"row/{props.detailField|detail}"},"meta":{"path":"row/{props.metaField|status}"},"pressable":true},"$on":{"press":"open"},"slots":{"leading":{"part":"entryTone","component":"Box","$recipe":{"tone":{"path":"tone"}},"style":{"width":"$spacing.xs","height":"$control.iconLg","borderRadius":"$radius.full"}}}}}}]}},"Timeline":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"table"},"style":{"display":"flex","flexDirection":"column","width":"100%","overflow":"hidden","borderRadius":"$radius.lg","borderWidth":"$border.hairline","minHeight":"$control.row"},"children":[{"part":"bandsRow","component":"Box","$if":"props.source","style":{"display":"flex","flexDirection":"row"},"children":[{"part":"corner","component":"Box","style":{"width":"18%","flexShrink":0,"minWidth":0,"@media (form-factor: phone)":{"width":"30%"},"paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","borderRightWidth":"$border.hairline"},"children":[{"part":"cornerLabel","component":"Text","$if":"props.rowTitle","props":{"text":"{props.rowTitle}","variant":"caption","lines":1}}]},{"part":"bands","component":"Box","style":{"display":"grid","gridTemplateColumns":{"call":"concat","args":{"values":["repeat(",{"call":"len","args":{"value":{"path":"{props.source}/timeline/columns"}}},", minmax(0, 1fr))"]}},"flexGrow":1,"minWidth":0},"$template":{"path":"{props.source}/timeline/bands","key":"col","item":{"part":"band","component":"Box","style":{"gridColumn":{"call":"concat","args":{"values":[{"path":"col"}," / span ",{"path":"span"}]}},"paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","minWidth":0,"borderLeftWidth":"$border.hairline"},"children":[{"part":"bandLabel","component":"Text","props":{"text":{"path":"label"},"variant":"label","lines":1}}]}}}]},{"part":"columnsRow","component":"Box","$if":"props.source","style":{"display":"flex","flexDirection":"row","borderTopWidth":"$border.hairline"},"children":[{"part":"columnsCorner","component":"Box","style":{"width":"18%","flexShrink":0,"minWidth":0,"@media (form-factor: phone)":{"width":"30%"},"borderRightWidth":"$border.hairline"}},{"part":"columns","component":"Box","style":{"display":"grid","gridTemplateColumns":{"call":"concat","args":{"values":["repeat(",{"call":"len","args":{"value":{"path":"{props.source}/timeline/columns"}}},", minmax(0, 1fr))"]}},"flexGrow":1,"minWidth":0},"$template":{"path":"{props.source}/timeline/columns","key":"key","item":{"part":"column","component":"Box","$recipe":{"today":{"path":"today"}},"style":{"paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","minWidth":0,"borderLeftWidth":"$border.hairline"},"children":[{"part":"columnLabel","component":"Text","$recipe":{"today":{"path":"today"}},"props":{"text":{"path":"label"},"variant":"caption","lines":1}}]}}}]},{"part":"rows","component":"Box","$if":"props.source","style":{"display":"flex","flexDirection":"column"},"$template":{"path":"{props.source}/timeline/rows","key":"key","item":{"part":"row","component":"Box","style":{"display":"flex","flexDirection":"row","minWidth":0,"borderTopWidth":"$border.hairline"},"children":[{"part":"rowHead","component":"Box","style":{"width":"18%","flexShrink":0,"minWidth":0,"@media (form-factor: phone)":{"width":"30%"},"display":"flex","flexDirection":"column","justifyContent":"center","gap":"$spacing.xxs","paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","borderRightWidth":"$border.hairline"},"children":[{"part":"rowLabel","component":"Text","props":{"text":{"path":"key"},"variant":"body","lines":1}},{"part":"rowCount","component":"Text","$if":"props.showCount","props":{"text":{"$text":{"path":"count"}},"variant":"muted","lines":1}}]},{"part":"track","component":"Box","style":{"display":"grid","flexGrow":1,"minWidth":0,"position":"relative"},"children":[{"part":"cells","component":"Box","style":{"display":"grid","gridTemplateColumns":{"call":"concat","args":{"values":["repeat(",{"call":"len","args":{"value":{"path":"{props.source}/timeline/columns"}}},", minmax(0, 1fr))"]}},"gridColumn":"1 / span 1","gridRow":"1 / span 1","minWidth":0},"$template":{"path":"{props.source}/timeline/columns","key":"key","item":{"part":"cell","component":"Box","style":{"minWidth":0,"borderLeftWidth":"$border.hairline"}}}},{"part":"bars","component":"Box","style":{"display":"grid","gridTemplateColumns":{"call":"concat","args":{"values":["repeat(",{"call":"len","args":{"value":{"path":"{props.source}/timeline/columns"}}},", minmax(0, 1fr))"]}},"gridColumn":"1 / span 1","gridRow":"1 / span 1","alignContent":"center","rowGap":"$spacing.xxs","paddingVertical":"$spacing.sm","minWidth":0},"$template":{"path":"items","key":"id","item":{"part":"bar","component":"Box","props":{"pressable":true},"$on":{"press":"open"},"$recipe":{"tone":{"path":"tone"},"contL":{"path":"contL"},"contR":{"path":"contR"}},"style":{"display":"flex","alignItems":"center","height":"$control.badge","minWidth":0,"overflow":"hidden","paddingHorizontal":"$spacing.xs","borderRadius":"$radius.sm","marginHorizontal":"$spacing.xxs","gridColumn":{"call":"concat","args":{"values":[{"path":"col"}," / span ",{"path":"span"}]}},"gridRow":{"call":"concat","args":{"values":[{"call":"add","args":{"a":{"path":"lane"},"b":1}}," / span 1"]}}},"children":[{"part":"barLabel","component":"Text","props":{"text":{"path":"row/{props.labelField|title}"},"variant":"caption","lines":1}}]}}},{"part":"now","component":"Box","$if":{"path":"{props.source}/timeline/now"},"style":{"position":"absolute","top":0,"bottom":0,"width":"$control.hairline","left":{"call":"concat","args":{"values":[{"path":"{props.source}/timeline/now/percent"},"%"]}}}}]}]}}}]}},"RecordForm":{"recipeProps":[],"root":{"part":"root","component":"Form","props":{"name":"{props.kind}","disabled":"{props.readOnly|false}"},"$on":{"submit":"submit"},"children":[{"part":"unknown","component":"EmptyState","$if":"props.missing","props":{"icon":"ui-error","title":"$string.unknownKind","size":"list"}},{"part":"fields","component":"FieldGroup","$if":{"$not":"props.missing"},"props":{"columns":2},"children":[{"part":"field","component":"Box","$each":"props.fields","$as":"field","style":{"display":"flex","flexDirection":"column","minWidth":0,"gridColumn":{"$cond":["field.wide","1 / -1","auto"]}},"children":[{"part":"text","component":"Input","$if":{"$eq":["{field.widget}","text"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","placeholder":"{field.placeholder}","checks":"{field.checks}"}},{"part":"textarea","component":"Textarea","$if":{"$eq":["{field.widget}","textarea"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","placeholder":"{field.placeholder}","rows":3,"autosize":true,"checks":"{field.checks}"}},{"part":"number","component":"NumberField","$if":{"$eq":["{field.widget}","number"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","min":"{field.min}","max":"{field.max}","step":"{field.step}","precision":"{field.precision}","placeholder":"{field.placeholder}","checks":"{field.checks}"}},{"part":"switch","component":"Switch","$if":{"$eq":["{field.widget}","switch"]},"props":{"label":"{field.label}","name":"{field.name}","checked":"{field.value}","description":"{field.placeholder}"}},{"part":"select","component":"Select","$if":{"$eq":["{field.widget}","select"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","options":"{field.options}","source":"{field.source}","searchable":"{field.searchable|false}","multiple":"{field.multiple|false}","placeholder":"{field.placeholder}","checks":"{field.checks}"}},{"part":"date","component":"DatePicker","$if":{"$eq":["{field.widget}","date"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","placeholder":"{field.placeholder}"}},{"part":"time","component":"TimePicker","$if":{"$eq":["{field.widget}","time"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","placeholder":"{field.placeholder}"}},{"part":"chips","component":"ChipInput","$if":{"$eq":["{field.widget}","chips"]},"props":{"label":"{field.label}","name":"{field.name}","values":"{field.value}","max":"{field.max}","placeholder":"{field.placeholder}","checks":"{field.checks}"}}]}]},{"part":"actions","component":"FormActions","$if":[{"$not":"props.readOnly"},{"$not":"props.missing"}],"props":{"submit":"{props.submitLabel|$string.save}","cancel":"{props.cancel|false}"},"$on":{"cancel":"cancel"}}]}},"RecordTable":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.md","minWidth":0},"children":[{"part":"unknown","component":"EmptyState","$if":"props.missing","props":{"icon":"ui-error","title":"$string.unknownKind","size":"list"}},{"part":"toolbar","component":"Toolbar","$if":{"$not":"props.missing"},"children":[{"part":"count","component":"Text","props":{"text":"{props.count}","variant":"muted"}}],"slots":{"trailing":{"part":"add","component":"Button","$if":{"$map":{"from":"props.add","cases":{"false":false},"default":true}},"props":{"label":"$string.add","icon":"ui-add","variant":"outline","size":"sm"},"$on":{"press":"add"}}}},{"part":"loading","component":"Skeleton","$if":[{"$not":"props.missing"},"props.loading"],"props":{"rows":3}},{"part":"table","component":"Table","$if":[{"$not":"props.missing"},{"$not":"props.loading"}],"props":{"columns":"{props.cols}","rows":"{props.rows}","density":"compact","stickyHeader":true,"emptyText":"$string.noRecords"},"style":{"@media (form-factor: phone)":{"display":"none"}},"slots":{"menu":{"part":"menu","component":"Box","style":{"display":"flex","flexDirection":"row","justifyContent":"flex-end","gap":"$spacing.xxs"},"children":[{"part":"edit","component":"Button","$if":{"$map":{"from":"props.editable","cases":{"false":false},"default":true}},"props":{"icon":"ui-edit","variant":"ghost","size":"icon"},"$a11y":{"label":"$string.edit"},"$on":{"press":"edit"}},{"part":"delete","component":"Button","$if":{"$map":{"from":"props.editable","cases":{"false":false},"default":true}},"props":{"icon":"ui-delete","variant":"ghost","size":"icon"},"$a11y":{"label":"$string.delete"},"$on":{"press":"delete"}}]}}},{"part":"list","component":"List","$if":[{"$not":"props.missing"},{"$not":"props.loading"}],"props":{"divided":true},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex"}},"children":["$children"]},{"part":"editor","component":"Drawer","$if":[{"$not":"props.missing"},{"$map":{"from":"props.editable","cases":{"false":false},"default":true}}],"props":{"title":"{props.title}","open":"{props.editorOpen|false}","side":"right"},"children":[{"part":"form","component":"RecordForm","props":{"kind":"{props.kind}","fields":"{props.fields}","path":"{props.path}","recordId":"{props.editorId}","cancel":true},"$on":{"submit":"submit","cancel":"cancel"}}]},{"part":"confirm","component":"Dialog","$if":[{"$not":"props.missing"},{"$map":{"from":"props.editable","cases":{"false":false},"default":true}}],"$a11y":{"role":"alertdialog"},"props":{"title":"$string.deleteRecord","description":"$string.deleteRecordBody","open":"{props.deleteOpen|false}"},"children":[{"part":"confirmForm","component":"Form","props":{"name":"delete"},"$on":{"submit":"confirm"},"children":[{"part":"confirmActions","component":"FormActions","props":{"submit":"$string.delete","cancel":true,"destructive":true},"$on":{"cancel":"cancelDelete"}}]}]}]}}}'),Lv={macros:Nv},Lt=gv,jr=Lt.id,bu=Lt.liteId,La=yu.from,vu=yu.version,xi=Lt.unknownComponent,jv=Lv.macros,yt=(()=>{const e={};for(const[t,n]of Object.entries(Iv))if(!t.startsWith("$"))if(Array.isArray(n))e[t]=n;else for(const[r,o]of Object.entries(n))e[`${t}.${r}`]=o;return e})(),Bv=/^\$([a-z][a-zA-Z0-9]*(?:\.[a-z][a-zA-Z0-9]*)*)\.([a-zA-Z0-9]+)$/;function tr(e){if(typeof e!="string")return null;const t=Bv.exec(e);return t?{group:t[1],name:t[2]}:null}function im(e){const t=tr(e);return t!==null&&(yt[t.group]?.includes(t.name)??!1)}function gs(e){return Object.assign(Object.create(null),e)}function Mo(e=[]){const t={components:gs(Lt.components),enums:gs(Lt.enums),defs:gs(Lt.defs),macros:gs(jv)};for(const n of e)Object.assign(t.components,n.components),Object.assign(t.enums,n.enums??{}),Object.assign(t.defs,n.defs??{}),Object.assign(t.macros,n.macros??{});return t}let Wv;const Hd=new WeakMap;function Ki(e=[]){if(e.length===0)return Wv??=Mo();let t=Hd.get(e);return t||Hd.set(e,t=Mo(e)),t}const Hv=["Box","Stack","Grid","Card","Separator","List","Resizable","ScrollArea","Sidebar","SplitView","AppBar","Page","Toolbar","Section","Group","Text","Heading","Markdown","CodeBlock","Kbd","Label","Image","ZoomableImage","Icon","Video","AudioPlayer","Avatar","QrCode","Carousel","Mosaic","Tabs","Segmented","Accordion","Collapsible","Trace","TraceItem","Plan","Pagination","Breadcrumb","Outline","Stepper","Dialog","Drawer","DockCard","AlertDialog","Popover","Tooltip","Menu","Toast","Badge","Alert","Chip","EmptyState","Progress","Meter","Ring","Spinner","Skeleton","VoiceWave","CallSurface","Table","Chart","Sparkline","StatTile","Button","Link","Toggle","Form","FieldGroup","FormActions","Input","Textarea","NumberField","Checkbox","Radio","ChoiceTiles","Switch","Slider","Rating","Select","SearchList","ChipInput","DatePicker","DateRangePicker","TimePicker","FileUpload","QrScanner","Composer","Row","MessageBubble","TreeGuides","Unknown","Motion","Calendar","Timeline","RecordForm","RecordTable"],sm=["a-large-small","action-chat","action-create","action-default","action-repository","action-run","action-suggestion","activity","anchor","app-editor-chat","archive","archive-restore","arrow-down","arrow-down-left","arrow-left","arrow-left-right","arrow-right","arrow-up-right","at-sign","atom","audio-lines","auth-passkey","award","ban","bell","bell-off","bold","book-open","bookmark","bot","boxes","braces","brain","briefcase","brush-cleaning","bug","building","building-2","calculator","calendar","calendar-days","call-end","call-incoming","call-mute","call-speaker","call-speaker-off","call-unmute","camera","car","chart-line","check","check-check","chevron-down","chevron-left","chevron-right","chevron-up","chevrons-up-down","ci-failed","ci-passed","ci-queued","ci-running","ci-skipped","circle","circle-arrow-up","circle-check","circle-dashed","circle-dot","circle-question-mark","circle-slash","circle-stop","circle-user","circle-x","clipboard-list","clock","cloud","code","coding-assistant","coding-command","coding-compact","coding-diff","coding-ended","coding-in-review","coding-needs-input","coding-plan","coding-running","coding-stop","coding-subagent","coding-tool","coffee","compass","computer","copy","corner-down-right","cpu","credit-card","crown","database","download","droplet","dumbbell","ear","editor-bold","editor-clear-formatting","editor-code","editor-emoji","editor-heading-1","editor-heading-2","editor-heading-3","editor-image","editor-issue-ref","editor-italic","editor-link","editor-list","editor-list-ordered","editor-list-todo","editor-mention","editor-quote","editor-strikethrough","editor-text","editor-text-format","editor-unlink","ellipsis","ellipsis-vertical","event-assignee-changed","event-board-moved","event-estimate-changed","event-label-added","event-label-removed","event-priority-changed","event-relation-added","event-relation-removed","event-status-changed","event-title-changed","external-link","eye","eye-off","fast-forward","file","file-diff","file-pen-line","file-text","fingerprint","flag","flame","flask-conical","fold-vertical","folder","folder-kanban","folder-open","gamepad-2","gauge","gem","gift","git-branch","git-merge","git-pull-request","github","globe","graduation-cap","guide-changes","hammer","hand","hard-drive","hash","heading-1","heading-2","heading-3","headphones","heart","heart-off","history","hourglass","house","image","images","inbox","info","italic","key","landmark","laptop","layers","layers-2","layout-grid","leaf","lightbulb","link","link-2","list","list-checks","list-end","list-ordered","list-todo","list-tree","loader-circle","lock","lock-open","log-in","log-out","mail","mail-open","map","map-pin","maximize-2","media-fast-forward","media-rewind","media-skip-next","media-skip-previous","media-volume-down","media-volume-mute","media-volume-off","media-volume-up","megaphone","menu","message-circle","message-square","message-square-plus","message-square-reply","mic","mic-off","microscope","minimize-2","minus","monitor","monitor-off","moon","mountain","move","music","nav-account","nav-actions","nav-admin","nav-apps","nav-boards","nav-changelog","nav-computer","nav-create-issue","nav-devices","nav-drafts","nav-files","nav-getting-started","nav-inbox","nav-issues","nav-my-issues","nav-notifications","nav-rail-collapse","nav-rail-expand","nav-report-bug","nav-search","nav-settings","nav-sign-out","nav-source-control","nav-team-switcher","nav-terminal","nav-threads","newspaper","notification-agent-message","notification-agent-signed-out","notification-issue-assigned","notification-issue-comment","notification-issue-created","notification-issue-mention","notification-issue-status-changed","notification-mark-read","notification-mute","notification-pr-merged","notification-pr-opened","notification-reporter-reply","notification-session-blocked","os-apple","os-linux","os-windows","package","paintbrush","palette","panel-left-close","panel-left-open","paperclip","pause","pen-tool","pencil","phone","phone-incoming","phone-off","pin","pin-off","plane","play","plug","plus","pr-batch","pr-closed","pr-draft","pr-merged","pr-open","pr-stack","printer","priority-high","priority-low","priority-medium","priority-none","priority-urgent","progress-1-4","progress-1-5","progress-2-4","progress-2-5","progress-3-4","progress-3-5","progress-4-5","puzzle","qr-code","quote","refresh-cw","relation-blocked-by","relation-blocks","relation-duplicate","relation-parent","relation-related","relation-section","relation-sub-issue","remove-formatting","repeat","rewind","rocket","rotate-ccw","run-pause","run-resume","sc-push","scale","scan-line","search","search-x","send","server","session-shell","session-tree","settings","settings-about","settings-account","settings-agents","settings-api","settings-billing","settings-boards","settings-general","settings-import","settings-issues","settings-labels","settings-licenses","settings-local-repos","settings-mcp","settings-members","settings-notifications","settings-rate","settings-repositories","settings-servers","settings-sessions","settings-statuses","settings-storage","settings-sync","settings-tools","settings-voice","settings-widget","share-2","shield","shield-check","shield-question-mark","shopping-bag","shopping-cart","signal-high","signal-low","signal-medium","skip-back","skip-forward","sliders-horizontal","smartphone","smile","sparkles","square","square-check","square-kanban","square-minus","square-pen","square-slash","square-terminal","star","star-half","star-off","status-backlog","status-cancelled","status-done","status-duplicate","status-in-progress","status-in-review","status-todo","stethoscope","store","strikethrough","sun","support-open","support-resolved","tag","target","terminal","thread-stories","tool-script","trace-background","trace-chevron","trace-completed","trace-edit","trace-failed","trace-fetch","trace-read","trace-reasoning","trace-search","trace-subagent","trace-task-done","trace-task-pending","trace-task-running","trace-terminal","trace-todo","trace-tool","trash-2","tree-pine","triangle-alert","trigger-event","trigger-schedule","trophy","truck","type","ui-add","ui-agent-source","ui-archive","ui-arrow-down","ui-arrow-right","ui-assignee","ui-attach","ui-avatar-placeholder","ui-back","ui-branch","ui-camera","ui-check","ui-checklist","ui-chevron-down","ui-chevron-left","ui-chevron-right","ui-chevron-up","ui-clean","ui-clear","ui-clock","ui-close","ui-cloud","ui-copy","ui-delete","ui-delete-account","ui-device","ui-device-default","ui-device-offline","ui-dock-side","ui-docs","ui-download","ui-due-date","ui-edit","ui-empty-search","ui-error","ui-estimate","ui-external-link","ui-favorite-off","ui-file","ui-float","ui-folder","ui-folder-open","ui-fullscreen","ui-fullscreen-exit","ui-github","ui-help","ui-hide","ui-history","ui-hold","ui-icon-placeholder","ui-indeterminate","ui-info","ui-invite","ui-issue","ui-link","ui-loading","ui-mail","ui-mark-read","ui-mark-unread","ui-mcp","ui-member","ui-menu","ui-minus","ui-more","ui-more-vertical","ui-offline","ui-organization","ui-owner","ui-permission","ui-photos","ui-pin","ui-print","ui-private","ui-properties","ui-qr-code","ui-queued","ui-read","ui-redock","ui-refresh","ui-remove-member","ui-repeat","ui-repository","ui-scan","ui-selected","ui-selector","ui-send","ui-server","ui-share","ui-sign-in","ui-sign-out","ui-staging","ui-star-half","ui-star-off","ui-stop","ui-submit","ui-subscribe","ui-success","ui-swap","ui-team","ui-unarchive","ui-unassigned","ui-undo","ui-undock","ui-unlock","ui-unpin","ui-unselected","ui-unsubscribe","ui-update","ui-usage","ui-warning","ui-watch","ui-widget","undo-2","unlink","upload","user","user-minus","user-plus","user-x","users","video","voice-call","voice-level","volume-1","volume-2","volume-off","volume-x","wallet","wifi-off","work-faces","work-results","workflow","wrench","x","zap"],qv=["required","regex","length","numeric","email","formatString","formatNumber","formatCurrency","formatDate","pluralize","openUrl","and","or","not","percent","add","sub","eq","lt","clamp","cond","fallback","concat","coalesce","text","map","len","fill","set","formatPercent","formatRelativeTime","filter","bind","mul","div","mod","round","floor","ceil","abs","min","max","today","now","dateAdd","dateDiff","startOf","endOf","weekday","isoWeek","hours","formatDuration","orElse","expr"],Uv={display:{enum:["flex","grid","block","none"]},flexDirection:{enum:["row","column","row-reverse","column-reverse"]},flexWrap:{enum:["nowrap","wrap","wrap-reverse"]},justifyContent:{enum:["flex-start","flex-end","start","end","center","stretch","space-between","space-around","space-evenly"]},alignItems:{enum:["flex-start","flex-end","start","end","center","stretch","baseline"]},alignContent:{enum:["flex-start","flex-end","start","end","center","stretch","space-between","space-around","space-evenly"]},alignSelf:{enum:["flex-start","flex-end","start","end","center","stretch","baseline"]},justifySelf:{enum:["flex-start","flex-end","start","end","center","stretch","baseline"]},flexGrow:{type:"number"},flexShrink:{type:"number"},flexBasis:{type:"length"},gap:{type:"length"},rowGap:{type:"length"},columnGap:{type:"length"},direction:{enum:["ltr","rtl"]},overflow:{enum:["visible","hidden","clip","scroll","auto"]},overflowX:{enum:["visible","hidden","clip","scroll","auto"]},overflowY:{enum:["visible","hidden","clip","scroll","auto"]},width:{type:"length"},height:{type:"length"},minWidth:{type:"length"},minHeight:{type:"length"},maxWidth:{type:"length"},maxHeight:{type:"length"},aspectRatio:{type:"ratio"},position:{enum:["relative","absolute","sticky"]},top:{type:"length"},right:{type:"length"},bottom:{type:"length"},left:{type:"length"},inset:{type:"length"},insetInlineStart:{type:"length"},insetInlineEnd:{type:"length"},insetBlockStart:{type:"length"},insetBlockEnd:{type:"length"},padding:{type:"length"},paddingTop:{type:"length"},paddingRight:{type:"length"},paddingBottom:{type:"length"},paddingLeft:{type:"length"},paddingHorizontal:{type:"length"},paddingVertical:{type:"length"},paddingInlineStart:{type:"length"},paddingInlineEnd:{type:"length"},margin:{type:"length"},marginTop:{type:"length"},marginRight:{type:"length"},marginBottom:{type:"length"},marginLeft:{type:"length"},marginHorizontal:{type:"length"},marginVertical:{type:"length"},marginInlineStart:{type:"length"},marginInlineEnd:{type:"length"},gridTemplateColumns:{type:"tracks"},gridTemplateRows:{type:"tracks"},gridTemplateAreas:{type:"areas"},gridArea:{type:"string"},gridColumn:{type:"string"},gridRow:{type:"string"}},Vv={backgroundColor:{type:"color"},backgroundGradient:{type:"gradient"},color:{type:"color"},borderWidth:{type:"number",layoutEffect:!0},borderTopWidth:{type:"number",layoutEffect:!0},borderRightWidth:{type:"number",layoutEffect:!0},borderBottomWidth:{type:"number",layoutEffect:!0},borderLeftWidth:{type:"number",layoutEffect:!0},borderColor:{type:"color"},borderStyle:{enum:["solid","dashed","dotted"]},borderRadius:{type:"length"},borderTopLeftRadius:{type:"length"},borderTopRightRadius:{type:"length"},borderBottomRightRadius:{type:"length"},borderBottomLeftRadius:{type:"length"},opacity:{type:"number"},boxShadow:{type:"token",group:"shadow"},fontSize:{type:"length"},fontWeight:{enum:[300,400,500,600,700,800]},lineHeight:{type:"length"},letterSpacing:{type:"length"},textAlign:{enum:["left","right","center","start","end","justify"]},textDecoration:{enum:["none","underline","line-through"]},textTransform:{enum:["none","uppercase","lowercase","capitalize"]},fontStyle:{enum:["normal","italic"]},fontFamily:{type:"token",group:"type.family"},transition:{type:"token",group:"motion"},transitionEasing:{type:"token",group:"ease"},transform:{type:"transform"},visibility:{enum:["visible","hidden"]},pointerEvents:{enum:["auto","none"]},userSelect:{enum:["auto","none","text"]},cursor:{enum:["auto","default","pointer","text","not-allowed","grab","grabbing","move","col-resize","row-resize"]},backdropBlur:{type:"token",group:"blur"},animation:{enum:["pulse","spin","fade-in","slide-in-up","slide-in-down","slide-in-left","slide-in-right","shimmer"]},animationDuration:{type:"token",group:"motion"}},Kv={pulse:{duration:"$motion.slow",factor:7,easing:"$ease.standard",iterations:"infinite",rest:0,keyframes:[{offset:0,opacity:1},{offset:.5,opacity:.5},{offset:1,opacity:1}]},spin:{duration:"$motion.slow",factor:4,easing:"linear",iterations:"infinite",rest:0,keyframes:[{offset:0,rotate:0},{offset:1,rotate:360}]},"fade-in":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0},{offset:1,opacity:1}]},"slide-in-up":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateY:8},{offset:1,opacity:1,translateY:0}]},"slide-in-down":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateY:-8},{offset:1,opacity:1,translateY:0}]},"slide-in-left":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateX:8},{offset:1,opacity:1,translateX:0}]},"slide-in-right":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateX:-8},{offset:1,opacity:1,translateX:0}]},shimmer:{duration:"$motion.slow",factor:5,easing:"linear",iterations:"infinite",rest:0,keyframes:[{offset:0,band:-1},{offset:1,band:1}],band:{color:"$color.background",stops:[{offset:0,alpha:0},{offset:.5,alpha:.5},{offset:1,alpha:0}]}}},Gv={media:"^@media \\((min-width|max-width|min-height|max-height): (\\d+(\\.\\d+)?px|\\$breakpoint\\.[a-zA-Z0-9]+)\\)$|^@media \\(orientation: (portrait|landscape)\\)$|^@media \\(hover: (hover|none)\\)$|^@media \\(prefers-reduced-motion: (reduce|no-preference)\\)$|^@media \\(form-factor: (phone|wide)\\)$",states:[":hover",":focus-visible",":pressed"],transform:"^((translate\\(-?\\d+(\\.\\d+)?px, -?\\d+(\\.\\d+)?px\\)|scale\\(-?\\d+(\\.\\d+)?\\)|rotate\\(-?\\d+(\\.\\d+)?deg\\))( (?=\\S)|$))+$"},Yv={durationMs:2e3,angleDeg:20,spreadPx:60,highlightLightnessMin:.8,highlightLightnessBoost:.4,highlightAlphaBoost:.4,lightAlphaFactor:.2},Xv={steps:120,radius:[.33,.3,.26],harmonics:[[11,17,23],[9,15,21],[7,13]],phase0:[.4,1.9,3.1],ringAmp:[1,.85,.45],ampBase:2,ampLevel:6,thinkingAmp:2.5,phaseSpeed:.9,fillAlpha:[.1,.1,.15],strokeAlpha:[.7,.8,.4],strokeWidth:[1.5,1.5,1],childScale:.3,childScaleLarge:.22,maxBands:8,bars:{count:20,minFraction:.12,envelope:.5,shapeFreq:1.7,shapeBase:.35,sizes:{sm:{height:16,barWidth:2,gap:2},md:{height:24,barWidth:3,gap:3},lg:{height:40,barWidth:4,gap:4},xl:{height:56,barWidth:5,gap:5}}}},Zv={quietZone:4},Jv={maxWidth:280,aspectRatio:1,cornerLength:24,cornerStroke:3,feedAlpha:.06,scanLineHeight:2,scanLineInset:16,sweepMs:2e3,placeholderIcon:"ui-scan",placeholderIconSize:32},Qv={tallAspect:.3333333333333333,maxScale:8,presets:[.25,.33,.5,.67,1,1.5,2,3,4,6,8],menuPresets:[0,.5,1,2,4],doubleTapFactor:2,wheelRate:.002,wheelLinePx:16,rubber:.55,momentumTauMs:325,autoHideMs:2e3,pill:{height:36,inset:16,padding:4,gap:2,percentMinWidth:56,dividerHeight:16}},on={layout:Uv,visual:Vv,animations:Kv,conditions:Gv,textShimmer:Yv,voiceWave:Xv,qrCode:Zv,qrScanner:Jv,zoomableImage:Qv},am=on.layout,$u=on.visual,e$=[...Object.keys(am),...Object.keys($u)];Object.entries($u).filter(([,e])=>e.layoutEffect).map(([e])=>e);const xu={...am,...$u},t$=new Set(e$),wu=new RegExp(on.conditions.media),lm=new RegExp(on.conditions.transform),n$=on.conditions.states,r$=/^-?\d+(\.\d+)?(px|%)$/,o$=/^\d+(\.\d+)?\/\d+(\.\d+)?$/,qd=new Set(["spacing","radius","control","type.size","type.lineHeight","opacity","border"]);function Ms(e,t){const n=tr(e);return n!==null&&t.has(n.group)&&im(e)}function cm(e){return Ms(e,new Set(["color"]))}function i$(e,t){const n=`${e}: expected {angle, stops: [{color, offset 0..1}, …]} with two or more stops`;if(typeof t!="object"||t===null||Array.isArray(t))return n;const r=t;if(typeof r.angle!="number"||!Number.isFinite(r.angle)||!Array.isArray(r.stops)||r.stops.length<2)return n;for(const o of r.stops){if(typeof o!="object"||o===null)return n;const i=o;if(!cm(i.color)||typeof i.offset!="number"||i.offset<0||i.offset>1)return n}for(const o of Object.keys(r))if(o!=="angle"&&o!=="stops")return n;return null}function s$(e,t){const n=xu[e];if(n.enum)return n.enum.includes(t)?null:`${e}: expected one of ${n.enum.join("|")}`;switch(n.type){case"number":return typeof t=="number"&&Number.isFinite(t)||Ms(t,qd)?null:`${e}: expected a number or a numeric token`;case"length":return typeof t=="number"&&Number.isFinite(t)||t==="auto"||typeof t=="string"&&r$.test(t)||Ms(t,qd)?null:`${e}: expected px, "N%", "auto" or a numeric token`;case"color":return cm(t)?null:`${e}: expected $color.<name>`;case"gradient":return i$(e,t);case"token":return Ms(t,new Set([n.group??""]))?null:`${e}: expected $${n.group}.<name>`;case"transform":return typeof t=="string"&&lm.test(t)?null:`${e}: expected translate(Xpx, Ypx), scale(N) and/or rotate(Ndeg)`;case"ratio":return typeof t=="number"&&t>0||typeof t=="string"&&o$.test(t)?null:`${e}: expected a number or "w/h"`;case"tracks":case"string":return typeof t=="string"?null:`${e}: expected a string`;case"areas":return Array.isArray(t)&&t.every(r=>typeof r=="string")?null:`${e}: expected an array of row strings`;default:return`${e}: unknown spec`}}function Ud(e){return xu[e]?.enum}function a$(e){return wu.test(e)||n$.includes(e)}function um(e,t={}){const n=[],r=t.path??"style",o=(i,s,a)=>{for(const[l,c]of Object.entries(i)){if(c===void 0)continue;if(a$(l)){const d=/\$breakpoint\.([a-zA-Z0-9]+)/.exec(l);d&&!yt.breakpoint.includes(d[1])&&n.push({path:`${s}.${l}`,message:`unknown breakpoint $breakpoint.${d[1]}; known: ${yt.breakpoint.join("|")}`}),a?n.push({path:`${s}.${l}`,message:"conditions do not nest"}):typeof c!="object"||c===null||Array.isArray(c)?n.push({path:`${s}.${l}`,message:"must be an object"}):o(c,`${s}.${l}`,!0);continue}if(!t$.has(l)){n.push({path:`${s}.${l}`,message:l.startsWith("@media")||l.startsWith(":")?"not a supported condition":"not in the Box style whitelist"});continue}xu[l].rootOnly&&t.root===!1&&n.push({path:`${s}.${l}`,message:"allowed on the root only"});const u=s$(l,c);u&&n.push({path:`${s}.${l}`,message:u})}};return typeof e!="object"||e===null||Array.isArray(e)?[{path:r,message:"expected an object"}]:(o(e,r,!1),n)}const l$=768;function c$(e){if(e.formFactor==="phone"||e.formFactor==="wide")return e.formFactor;const t=e.breakpoints?.md;return e.width<(typeof t=="number"?t:l$)?"phone":"wide"}const u$=/^@media \(([a-z-]+): ([^)]+)\)$/;function ku(e){if(!wu.test(e))return null;const t=u$.exec(e);return t?{feature:t[1],value:t[2]}:null}function d$(e,t){const n=tr(e);if(n){if(n.group!=="breakpoint")return null;const o=t.breakpoints?.[n.name];return typeof o=="number"?o:null}const r=parseFloat(e);return Number.isFinite(r)?r:null}function p$(e,t){switch(e.feature){case"min-width":case"max-width":case"min-height":case"max-height":{const n=d$(e.value,t);if(n===null)return!1;const r=e.feature.endsWith("width")?t.width:t.height;return r===void 0?!1:e.feature.startsWith("min")?r>=n:r<n}case"orientation":{const n=t.height!==void 0&&t.height>=t.width;return e.value===(n?"portrait":"landscape")}case"hover":return e.value===(t.hover?"hover":"none");case"prefers-reduced-motion":return e.value===(t.reducedMotion?"reduce":"no-preference");case"form-factor":return e.value===c$(t)}}function f$(e,t){let n=null;for(const r of yt.breakpoint){const o=t[r];typeof o=="number"&&e>=o&&(n=r)}return n}const h$={add:"Add",back:"Back",breadcrumb:"Breadcrumb",browse:"Browse",calendarMore:"+{count} more",cameraUnavailable:"Camera unavailable",cancel:"Cancel",carousel:"Carousel",chartSummary:"Chart of {series}, values from {min} to {max}",choose:"Choose",clear:"Clear",close:"Close",closeTab:"Close {name}",codeBlock:"Code",collapse:"Collapse",confirm:"Confirm",copied:"Copied",copy:"Copy",decrement:"Decrease",delete:"Delete",deleteRecord:"Delete this record?",deleteRecordBody:"The app stops showing it.",dialog:"Dialog",dismiss:"Dismiss",dropFiles:"Drop files here",edit:"Edit",endCall:"End call",expand:"Expand",fileTooLarge:"File too large",fileTooLargeNamed:"{name}: File too large",increment:"Increase",invalidFields:"Check the highlighted fields",invalidValue:"Invalid value",loading:"Loading",menu:"Menu",message:"Message",more:"More",morePictures:"+{count}",morePicturesLabel:"{alt}, {count} more",mute:"Mute",newTab:"New tab",next:"Next",nextMonth:"Next month",no:"No",noRecords:"No records yet",noResults:"No results",optional:"Optional",outline:"Outline",outlineRow:"{title}, {count}",pageCounter:"{page} / {total}",pageOf:"Page {page} of {total}",pagination:"Pagination",pause:"Pause",play:"Play",previous:"Previous",previousMonth:"Previous month",ratingStar:"{value} of {max}",ratingValue:"Rated {value} of {max}",read:"Read",recordCount:"{count} records",remove:"Remove",removeItem:"Remove {name}",required:"Required",resize:"Resize",save:"Save",scanQrCode:"Scan a QR code",search:"Search…",selectAll:"Select all",selectRow:"Select row",selectedCount:"{count} selected",send:"Send",sending:"Sending",sent:"Sent",showLess:"Show less",showMore:"Show more",slide:"Slide",sortAscending:"Sort ascending",sortByAscending:"{name}: Sort ascending",sortByDescending:"{name}: Sort descending",sortDescending:"Sort descending",sparklineSummary:"Trend from {first} to {last}, low {min}, high {max}",speaker:"Speaker",speakerOff:"Speaker off",stepCurrent:"Step {step} of {total}: {label}, current",stepDone:"Step {step} of {total}: {label}, completed",stepUpcoming:"Step {step} of {total}: {label}",stop:"Stop",submit:"Submit",table:"Table",today:"Today",unknownComponent:"Unknown component",unknownKind:"This record kind is not declared",unmute:"Unmute",unsupportedFile:"Unsupported file",unsupportedFileNamed:"{name}: Unsupported file",yes:"Yes",zoomFit:"Fit",zoomIn:"Zoom in",zoomLevel:"Zoom level",zoomOut:"Zoom out",zoomToFit:"Zoom to fit"},m$={strings:h$},ja=m$.strings,g$=/^\$string\.([a-zA-Z][a-zA-Z0-9]*)$/,y$=/\{([a-zA-Z][a-zA-Z0-9]*)\}/g;function Su(e){if(typeof e!="string")return null;const t=g$.exec(e);return t?t[1]:null}function b$(e){const t=Su(e);return t!==null&&t in ja}function v$(e={}){return{...ja,...e}}function dm(e,t={}){return e.replace(y$,(n,r)=>r in t&&t[r]!==void 0&&t[r]!==null?String(t[r]):n)}function $$(e,t=ja){const n=Su(e);return n===null?e:t[n]??n}const x$={default:1,regions:{0:["AG","AS","BD","BR","BS","BT","BW","BZ","CA","CN","CO","DM","DO","ET","GT","GU","HK","HN","ID","IL","IN","JM","JP","KE","KH","KR","LA","MH","MM","MO","MT","MX","MZ","NI","NP","PA","PE","PH","PK","PR","PT","PY","SA","SG","SV","TH","TT","TW","UM","US","VE","VI","WS","YE","ZA","ZW"],5:["MV"],6:["AE","AF","BH","DJ","DZ","EG","IQ","IR","JO","KW","LY","OM","QA","SD","SY"]}},w$={af:"ZA",am:"ET",ar:"EG",az:"AZ",be:"BY",bg:"BG",bn:"BD",bs:"BA",ca:"ES",ckb:"IQ",cs:"CZ",cy:"GB",da:"DK",de:"DE",dv:"MV",el:"GR",en:"US",es:"ES",et:"EE",eu:"ES",fa:"IR",fi:"FI",fil:"PH",fr:"FR",ga:"IE",gl:"ES",gu:"IN",ha:"NG",he:"IL",hi:"IN",hr:"HR",hu:"HU",hy:"AM",id:"ID",ig:"NG",is:"IS",it:"IT",ja:"JP",jv:"ID",ka:"GE",kk:"KZ",km:"KH",kn:"IN",ko:"KR",ku:"TR",ky:"KG",lo:"LA",lt:"LT",lv:"LV",mk:"MK",ml:"IN",mn:"MN",mr:"IN",ms:"MY",mt:"MT",my:"MM",nb:"NO",ne:"NP",nl:"NL",nn:"NO",no:"NO",or:"IN",pa:"IN",pl:"PL",ps:"AF",pt:"BR",ro:"RO",ru:"RU",sd:"PK",si:"LK",sk:"SK",sl:"SI",so:"SO",sq:"AL",sr:"RS",sv:"SE",sw:"TZ",ta:"IN",te:"IN",th:"TH",tl:"PH",tr:"TR",ug:"CN",uk:"UA",ur:"PK",uz:"UZ",vi:"VN",yi:"001",yo:"NG",zh:"CN",zu:"ZA"},k$={in:"id",iw:"he",ji:"yi",jw:"jv",mo:"ro",tl:"fil"},S$=["ar","ckb","dv","fa","he","ps","sd","ug","ur","yi"],C$=["ui-back","ui-chevron-left","ui-chevron-right","ui-arrow-right","ui-send","ui-undo","ui-external-link","arrow-left","arrow-right","chevron-left","chevron-right","send","undo-2","external-link"],A$={months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayPeriods:["AM","PM"],currencyPrefix:{USD:"$",EUR:"€",GBP:"£",JPY:"¥",CNY:"CN¥",INR:"₹",KRW:"₩",CAD:"CA$",AUD:"A$",MXN:"MX$",BRL:"R$",ILS:"₪",NZD:"NZ$",HKD:"HK$",TWD:"NT$",VND:"₫",PHP:"₱",XAF:"FCFA ",XOF:"F CFA "},currencyDigits:{JPY:0,KRW:0,VND:0,CLP:0,ISK:0,UGX:0,PYG:0,XAF:0,XOF:0,BHD:3,IQD:3,JOD:3,KWD:3,OMR:3,TND:3},relative:{units:{second:["second","seconds"],minute:["minute","minutes"],hour:["hour","hours"],day:["day","days"],week:["week","weeks"],month:["month","months"],year:["year","years"]},auto:{second:{0:"now"},day:{1:"tomorrow","-1":"yesterday"},week:{1:"next week","-1":"last week"},month:{1:"next month","-1":"last month"},year:{1:"next year","-1":"last year"}},past:"{value} {unit} ago",future:"in {value} {unit}"},unknownCurrency:"{code} ",datePatterns:{short:"M/d/yy",medium:"MMM d, y",long:"MMMM d, y",full:"EEEE, MMMM d, y"},timePattern:"h:mm a",dateTimeJoin:{short:"{date}, {time}",medium:"{date}, {time}",long:"{date} at {time}",full:"{date} at {time}"}},vr={default:"en-US",weekStart:x$,likelyRegion:w$,languageAliases:k$,rtl:S$,rtlMirroredIcons:C$,englishFallback:A$},pn=vr.englishFallback,Ht={second:1e3,minute:6e4,hour:36e5,day:864e5};function Eo(e){return typeof e=="string"?e:typeof e=="number"?Number.isFinite(e)?String(e):"":typeof e=="boolean"?String(e):""}function pm(e){const t=/^(\d+)(?:\.(\d+))?(?:e([+-]\d+))?$/.exec(String(e));if(!t)return{int:"0",frac:""};const n=t[1]+(t[2]??"");let r=t[1].length+(t[3]?Number(t[3]):0),o=n;return r<=0&&(o="0".repeat(1-r)+o,r=1),r>o.length&&(o=o+"0".repeat(r-o.length)),{int:o.slice(0,r).replace(/^0+(?=\d)/,""),frac:o.slice(r).replace(/0+$/,"")}}function _$(e,t){const n=e.frac+"0".repeat(Math.max(0,t-e.frac.length));return{int:(e.int+n.slice(0,t)).replace(/^0+(?=\d)/,""),frac:n.slice(t).replace(/0+$/,"")}}function fm(e,t,n){let{int:r,frac:o}=e;if(o.length>n){const i=o.charCodeAt(n)>=53;let s=r+o.slice(0,n);if(i){const l=s.split("");let c=l.length-1;for(;c>=0;c--)if(l[c]==="9")l[c]="0";else{l[c]=String(Number(l[c])+1);break}s=(c<0?"1":"")+l.join("")}const a=s.length-n;r=s.slice(0,a)||"0",o=s.slice(a).replace(/0+$/,"")}return o.length<t&&(o=o+"0".repeat(t-o.length)),{int:r,frac:o}}function hm(e,t){if(!t||e.length<4)return e;let n="";for(let r=0;r<e.length;r++)r>0&&(e.length-r)%3===0&&(n+=","),n+=e[r];return n}function ys(e,t,n,r){const o=e<0||Object.is(e,-0);if(Number.isNaN(e))return{sign:"",body:"NaN"};if(!Number.isFinite(e))return{sign:o?"-":"",body:"∞"};const i=fm(pm(Math.abs(e)),t,n);return{sign:o?"-":"",body:`${hm(i.int,r)}${i.frac?`.${i.frac}`:""}`}}const go=e=>typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.min(20,Math.trunc(e))):void 0;function O$(e){return pn.currencyDigits[e.toUpperCase()]??2}function wi(e){if(typeof e=="number")return Number.isFinite(e)?{ms:e,dateOnly:!1}:null;if(typeof e!="string"||e.trim()==="")return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(t){const o=Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isFinite(o)?{ms:o,dateOnly:!0}:null}if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?$/.test(e))return null;const n=/(Z|[+-]\d{2}:\d{2})$/.test(e)?e:`${e}Z`,r=Date.parse(n);return Number.isFinite(r)?{ms:r,dateOnly:!1}:null}function mm(e){const t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),weekday:t.getUTCDay(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}const or=(e,t)=>String(e).padStart(t,"0");function Es(e,t,n){let r="",o=0;for(;o<e.length;){const i=e[o];if(i==="'"){if(e[o+1]==="'"){r+="'",o+=2;continue}for(o++;o<e.length;){if(e[o]==="'"){if(e[o+1]==="'"){r+="'",o+=2;continue}o++;break}r+=e[o],o++}continue}if(!/[A-Za-z]/.test(i)){r+=i,o++;continue}let s=1;for(;e[o+s]===i;)s++;const a=e.slice(o,o+s);o+=s;const l=t.hour%12===0?12:t.hour%12;switch(i){case"y":r+=s===2?or(t.year%100,2):or(t.year,s);break;case"M":r+=s>=4?n.months[t.month-1]:s===3?n.monthsShort[t.month-1]:or(t.month,s);break;case"d":r+=or(t.day,s);break;case"E":r+=s>=4?n.weekdays[t.weekday]:n.weekdaysShort[t.weekday];break;case"h":r+=or(l,s);break;case"H":r+=or(t.hour,s);break;case"m":r+=or(t.minute,s);break;case"s":r+=or(t.second,s);break;case"a":r+=n.dayPeriods[t.hour<12?0:1];break;default:r+=a}}return r}const T$=pn.datePatterns,M$=pn.timePattern,E$=pn.dateTimeJoin,I$=e=>()=>e;function P$(e){const t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hourCycle:"h23"});return n=>{const r=Math.floor(n/1e3)*1e3,o=Object.fromEntries(t.formatToParts(new Date(r)).map(s=>[s.type,s.value])),i=Date.UTC(Number(o.year),Number(o.month)-1,Number(o.day),Number(o.hour)%24,Number(o.minute),Number(o.second));return Math.round((i-r)/6e4)}}function gm(e){const t=Math.abs(e),n=r=>Math.trunc(e/r)||0;return t<Ht.minute?{value:n(Ht.second),unit:"second"}:t<Ht.hour?{value:n(Ht.minute),unit:"minute"}:t<Ht.day?{value:n(Ht.hour),unit:"hour"}:t<7*Ht.day?{value:n(Ht.day),unit:"day"}:t<30*Ht.day?{value:n(7*Ht.day),unit:"week"}:t<365*Ht.day?{value:n(30*Ht.day),unit:"month"}:{value:n(365*Ht.day),unit:"year"}}const $l=pn;function D$(e=I$(0)){return{locale:"en-US",offsetMinutes:e,number(t,n={}){const r=go(n.decimals),{sign:o,body:i}=ys(t,r??0,r??3,n.grouping!==!1);return`${o}${i}`},currency(t,n,r={}){const o=n.toUpperCase(),i=go(r.decimals)??O$(o),{sign:s,body:a}=ys(t,i,i,r.grouping!==!1),l=pn.currencyPrefix[o]??pn.unknownCurrency.replace("{code}",o);return`${s}${l}${a}`},percent(t,n={}){const r=go(n.decimals)??0;if(!Number.isFinite(t)){const{sign:s,body:a}=ys(t,0,0,!0);return`${s}${a}%`}const o=t<0||Object.is(t,-0),i=fm(_$(pm(Math.abs(t)),2),r,r);return`${o?"-":""}${hm(i.int,!0)}${i.frac?`.${i.frac}`:""}%`},date(t,n={}){const r=wi(t);if(!r)return"";const o=mm(r.dateOnly?r.ms:r.ms+e(r.ms)*6e4);if(n.format)return Es(n.format,o,$l);const i=n.style??"medium",s=Es(T$[i],o,$l);if(!n.time)return s;const a=Es(M$,o,$l);return E$[i].replace("{date}",s).replace("{time}",a)},relativeTime(t,n){const r=wi(t);if(!r)return"";const{value:o,unit:i}=gm(r.ms-n),s=pn.relative.auto[i]?.[String(o)];if(s)return s;const[a,l]=pn.relative.units[i],c=ys(Math.abs(o),0,0,!0).body,u=Math.abs(o)===1?a:l;return(o<0?pn.relative.past:pn.relative.future).replace("{value}",c).replace("{unit}",u)},plural(t){return Math.abs(t)===1?"one":"other"}}}function ym(e,t="UTC"){const n=a=>new Intl.NumberFormat(e,a);let r=null;const o=()=>{if(r)return r;const a=(d,p)=>new Intl.DateTimeFormat(e,{...d,timeZone:"UTC"}).format(new Date(p)),l=Array.from({length:12},(d,p)=>Date.UTC(2026,p,1)),c=Array.from({length:7},(d,p)=>Date.UTC(2026,0,4+p)),u=d=>new Intl.DateTimeFormat(e,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2026,0,1,d))).find(p=>p.type==="dayPeriod")?.value??(d<12?"AM":"PM");return r={months:l.map(d=>a({month:"long"},d)),monthsShort:l.map(d=>a({month:"short"},d)),weekdays:c.map(d=>a({weekday:"long"},d)),weekdaysShort:c.map(d=>a({weekday:"short"},d)),dayPeriods:[u(9),u(15)]},r},i=a=>{const l=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",weekday:"short",hourCycle:"h23"}).formatToParts(new Date(a)),c=u=>l.find(d=>d.type===u)?.value??"0";return{year:Number(c("year")),month:Number(c("month")),day:Number(c("day")),weekday:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].indexOf(c("weekday")),hour:Number(c("hour"))%24,minute:Number(c("minute")),second:Number(c("second"))}},s=P$(t);return{locale:e,offsetMinutes:s,number(a,l={}){const c=go(l.decimals);return n({minimumFractionDigits:c??0,maximumFractionDigits:c??3,useGrouping:l.grouping!==!1}).format(a)},currency(a,l,c={}){const u=go(c.decimals);return n({style:"currency",currency:l,...u!==void 0?{minimumFractionDigits:u,maximumFractionDigits:u}:{},useGrouping:c.grouping!==!1}).format(a)},percent(a,l={}){const c=go(l.decimals)??0;return n({style:"percent",minimumFractionDigits:c,maximumFractionDigits:c}).format(a)},date(a,l={}){const c=wi(a);if(!c)return"";const u=c.dateOnly?"UTC":t;return l.format?Es(l.format,c.dateOnly?mm(c.ms):i(c.ms),o()):new Intl.DateTimeFormat(e,{dateStyle:l.style??"medium",...l.time?{timeStyle:"short"}:{},timeZone:u}).format(new Date(c.ms))},relativeTime(a,l){const c=wi(a);if(!c)return"";const{value:u,unit:d}=gm(c.ms-l);return new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(u,d)},plural(a){return new Intl.PluralRules(e).select(a)}}}const bm=["formatNumber","formatCurrency","formatPercent","formatDate","formatRelativeTime","pluralize"],R$=/^[ \t\n\r]*[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?[ \t\n\r]*$/,mc=e=>typeof e=="number"?e:typeof e=="string"&&R$.test(e)?Number(e):NaN,xl=e=>e==null?void 0:mc(e);function vm(e,t=()=>Date.now()){const n=(r,o)=>{const i=mc(r);return Number.isFinite(i)?o(i):""};return{formatNumber:({value:r,decimals:o,grouping:i})=>n(r,s=>e.number(s,{decimals:xl(o),grouping:i===void 0?void 0:i!==!1})),formatCurrency:({value:r,currency:o,decimals:i,grouping:s})=>n(r,a=>typeof o=="string"&&/^[A-Za-z]{3}$/.test(o)?e.currency(a,o,{decimals:xl(i),grouping:s===void 0?void 0:s!==!1}):""),formatPercent:({value:r,decimals:o})=>n(r,i=>e.percent(i,{decimals:xl(o)})),formatDate:({value:r,format:o,style:i,time:s})=>e.date(r,{...typeof o=="string"&&o?{format:o}:{},...i==="short"||i==="medium"||i==="long"||i==="full"?{style:i}:{},...s===!0?{time:!0}:{}}),formatRelativeTime:({value:r,now:o})=>e.relativeTime(r,typeof o=="number"?o:wi(o)?.ms??t()),pluralize:r=>{const o=mc(r.value);if(!Number.isFinite(o))return r.other;if(o===0&&r.zero!==void 0)return r.zero;const i=e.plural(o);return r[i]??r.other}}}const gc=vm(D$()),$m=/^\{([^{}]+)\}$/,F$=/\{([^{}]+)\}/g,z$=/^(len|range)\((.+)\)$/;function Ba(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.path=="string"&&Object.keys(e).length===1}function jo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.call=="string"}function Ue(e){return Ba(e)||jo(e)}function On(e){return e!=null&&e!==!1&&e!==""}function wt(e,t){const n={};for(const[r,o]of Object.entries(t))o!==void 0&&(n[r]=o);return{call:e,args:n}}function N$(e){return e==="true"?!0:e==="false"?!1:e==="null"?null:/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function L$(e,t){if(e==="id")return t.id;const[n,...r]=e.split(".");let o;if(n==="props")o=t.props;else if(n in t.vars)o=t.vars[n];else return;for(const i of r){if(o==null)return;o=o[i]}return o}function dt(e){return typeof e=="number"?e:Number(e??0)||0}function Vd(e){const t=e.trim();if(t==="")return;const n=Number(t);return Number.isFinite(n)?n:void 0}function Cu(e,t){return e===t?!0:typeof e=="number"&&typeof t=="string"?Vd(t)===e:typeof t=="number"&&typeof e=="string"?Vd(e)===t:!1}function xm(e,t,n){let r=dt(e);return n!=null&&(r=Math.min(r,dt(n))),t!=null&&(r=Math.max(r,dt(t))),r}function j$(e,t){const n=e==null?"":String(e);return dm(n,typeof t=="object"&&t!==null?t:{})}const B$=1e4;function Kn(e,t){const n=e.trim(),r=z$.exec(n);if(r){const i=Kn(r[2],t);if(r[1]==="len")return Ue(i)?wt("len",{value:i}):Array.isArray(i)||typeof i=="string"?i.length:0;if(Ue(i))return;const s=Math.min(B$,Math.max(0,Math.floor(dt(i)))||0);return Array.from({length:s},(a,l)=>l)}const o=n.indexOf("|");if(o>=0){const i=Kn(n.slice(0,o),t),s=N$(n.slice(o+1));return i==null?s:Ue(i)?wt("fallback",{value:i,default:s}):i}if(n.startsWith("!")){const i=Kn(n.slice(1),t);return Ue(i)?wt("not",{value:i}):!On(i)}return L$(n,t)}function W$(e){return jo(e)&&e.call==="fallback"&&Ue(e.args?.value)?e.args?.value:e}function gt(e,t){if(typeof e=="string"){const n=$m.exec(e);if(n)return Kn(n[1],t)}return Nt(e,t)}function ea(e,t){const n=typeof e=="string"?Kn(e,t):gt(e,t);return Ue(n)?n:On(n)}function H$(e,t){const n=[];let r=!1,o=0;for(const i of e.matchAll(F$)){const s=i.index??0;s>o&&n.push(e.slice(o,s));const a=Kn(i[1],t);Ue(a)&&(r=!0),n.push(a),o=s+i[0].length}return o<e.length&&n.push(e.slice(o)),r?wt("concat",{values:n.filter(i=>i!=null&&i!=="")}):n.map(i=>i==null?"":String(i)).join("")}function Nt(e,t){if(typeof e=="string"){const o=$m.exec(e);return o?W$(Kn(o[1],t)):H$(e,t)}if(Array.isArray(e))return e.map(o=>Nt(o,t)).filter(o=>o!==void 0);if(typeof e!="object"||e===null)return e;const n=e;if("$map"in n){const o=n.$map,i=Kn(o.from,t);if(Ue(i)){const l={};for(const[c,u]of Object.entries(o.cases)){const d=gt(u,t);d!==void 0&&(l[c]=d)}return wt("map",{value:i,cases:l,default:gt(o.default,t)})}const s=i==null?"":String(i),a=Object.prototype.hasOwnProperty.call(o.cases,s)?o.cases[s]:o.default;return gt(a,t)}if("$cond"in n){const[o,i,s]=n.$cond,a=ea(o,t);return Ue(a)?wt("cond",{if:a,then:gt(i,t),else:gt(s,t)}):gt(a?i:s,t)}if("$eq"in n){const[o,i]=n.$eq.map(s=>gt(s,t));return Ue(o)||Ue(i)?wt("eq",{a:o,b:i}):Cu(o,i)}if("$lt"in n){const[o,i]=n.$lt.map(s=>gt(s,t));return Ue(o)||Ue(i)?wt("lt",{a:o,b:i}):dt(o)<dt(i)}if("$add"in n){const[o,i]=n.$add.map(s=>gt(s,t));return Ue(o)||Ue(i)?wt("add",{a:o,b:i}):dt(o)+dt(i)}if("$sub"in n){const[o,i]=n.$sub.map(s=>gt(s,t));return Ue(o)||Ue(i)?wt("sub",{a:o,b:i}):dt(o)-dt(i)}if("$clamp"in n){const[o,i,s]=n.$clamp.map(a=>gt(a,t));return Ue(o)||Ue(i)||Ue(s)?wt("clamp",{value:o,min:i,max:s}):xm(o,i,s)}if("$fill"in n){const[o,i]=n.$fill,s={};for(const[a,l]of Object.entries(i??{})){const c=gt(l,t);c!==void 0&&(s[a]=c)}return wt("fill",{template:gt(o,t),params:s})}if("$percent"in n){const[o,i]=n.$percent.map(s=>gt(s,t));return Ue(o)||Ue(i)?wt("percent",{value:o,max:i}):wm(o,i)}if("$text"in n){const o=n.$text,i=typeof o=="string"?Kn(o,t):gt(o,t);return Ue(i)?wt("text",{value:i}):i==null?void 0:String(i)}if("$coalesce"in n){const o=[];for(const i of n.$coalesce){const s=gt(i,t);if(s!==void 0){if(Ue(s)){o.push(s);continue}if(On(s)){if(o.length===0)return s;o.push(s);break}}}return o.length===0?void 0:o.length===1?o[0]:wt("coalesce",{values:o})}if("$not"in n){const o=ea(n.$not,t);return Ue(o)?wt("not",{value:o}):!o}const r={};for(const[o,i]of Object.entries(n)){const s=Nt(i,t);if(s===void 0)continue;const a=o.includes("{")?Nt(o,t):o;r[typeof a=="string"?a:o]=s}return r}function wm(e,t){const n=dt(t),r=n>0?dt(e)/n*100:0,o=Math.min(100,Math.max(0,r));return`${Math.round(o*100)/100}%`}function q$(e,t,n,r){if(!Array.isArray(e))return[];const o=typeof t=="string"?t.trim().toLowerCase():typeof t=="number"?String(t):"",i=Array.isArray(n)?n.filter(l=>typeof l=="string"):null,s=typeof r=="object"&&r!==null&&!Array.isArray(r)?Object.entries(r).filter(([,l])=>l!=null&&l!==""):[],a=l=>typeof l=="string"?l:typeof l=="number"?String(l):null;return e.filter(l=>{const c=typeof l=="object"&&l!==null&&!Array.isArray(l)?l:null;for(const[d,p]of s)if(!Cu(c?.[d],p))return!1;return o===""?!0:(c?(i??Object.keys(c)).map(d=>c[d]):[l]).some(d=>a(d)?.toLowerCase().includes(o)??!1)})}const U$={percent:({value:e,max:t})=>wm(e,t),add:({a:e,b:t})=>dt(e)+dt(t),sub:({a:e,b:t})=>dt(e)-dt(t),eq:({a:e,b:t})=>Cu(e,t),lt:({a:e,b:t})=>dt(e)<dt(t),clamp:({value:e,min:t,max:n})=>xm(e,t,n),cond:({if:e,then:t,else:n})=>On(e)?t:n,fallback:({value:e,default:t})=>e??t,concat:({values:e})=>Array.isArray(e)?e.map(t=>t==null?"":String(t)).join(""):"",coalesce:({values:e})=>Array.isArray(e)?e.find(On):void 0,text:({value:e})=>e==null?void 0:String(e),map:({value:e,cases:t,default:n})=>{const r=e==null?"":String(e),o=t??{};return Object.prototype.hasOwnProperty.call(o,r)?o[r]:n},len:({value:e})=>Array.isArray(e)||typeof e=="string"?e.length:0,fill:({template:e,params:t})=>j$(e,t),filter:({items:e,query:t,fields:n,where:r})=>q$(e,t,n,r),formatPercent:gc.formatPercent,formatRelativeTime:gc.formatRelativeTime},Au=["mul","div","mod","round","floor","ceil","abs","min","max","today","now","dateAdd","dateDiff","startOf","endOf","weekday","isoWeek","hours","formatDuration","orElse","expr"],Kd=["day","week","month","quarter","year"],V$=e=>e!==void 0&&e>="0"&&e<="9",yo=(e,t,n)=>{for(let r=t;r<t+n;r++)if(!V$(e[r]))return!1;return!0};function km(e){return e%4===0&&e%100!==0||e%400===0}function Io(e,t){return t===2?km(e)?29:28:t===4||t===6||t===9||t===11?30:31}function Gi(e,t,n){const r=[0,3,2,5,0,3,5,1,4,6,2,4],o=t<3?e-1:e,i=(s,a)=>Math.floor(s/a);return((o+i(o,4)-i(o,100)+i(o,400)+r[t-1]+n)%7+7)%7}function K$(e,t,n){let r=n;for(let o=1;o<t;o++)r+=Io(e,o);return r}function Gd(e){const t=Gi(e,1,1);return t===4||t===3&&km(e)?53:52}function Sm(e,t,n){const r=Gi(e,t,n)||7,o=Math.floor((K$(e,t,n)-r+10)/7);return o<1?{year:e-1,week:Gd(e-1)}:o>Gd(e)?{year:e+1,week:1}:{year:e,week:o}}function Yi(e){if(e.length<10||!yo(e,0,4)||e[4]!=="-"||!yo(e,5,2)||e[7]!=="-"||!yo(e,8,2)||e.length>10&&e[10]!=="T"&&e[10]!==" ")return null;const t=Number(e.slice(0,4)),n=Number(e.slice(5,7)),r=Number(e.slice(8,10));return n<1||n>12||r<1||r>Io(t,n)?null:{y:t,m:n,d:r}}function G$(e){if(e.length<7||!yo(e,0,4)||e[4]!=="-"||!yo(e,5,2)||e.length>7&&e[7]!=="-")return null;const t=Number(e.slice(5,7));return t>=1&&t<=12?{y:Number(e.slice(0,4)),m:t}:null}function Y$(e){return e.length<4||!yo(e,0,4)||e.length>4&&e[4]!=="-"?null:Number(e.slice(0,4))}const jn=(e,t)=>String(e).padStart(t,"0");function Xi(e){return`${jn(e.y,4)}-${jn(e.m,2)}-${jn(e.d,2)}`}function Cm(e,t){if(t==="day"||t==="week"){const r=Yi(e);if(!r)return null;if(t==="day")return Xi(r);const o=Sm(r.y,r.m,r.d);return`${jn(o.year,4)}-W${jn(o.week,2)}`}if(t==="year"){const r=Y$(e);return r===null?null:jn(r,4)}const n=G$(e);return n?t==="month"?`${jn(n.y,4)}-${jn(n.m,2)}`:`${jn(n.y,4)}-Q${Math.floor((n.m-1)/3)+1}`:null}function bn(e,t,n){const r=t<=2?e-1:e,o=Math.floor(r/400),i=r-o*400,s=Math.floor((153*(t+(t>2?-3:9))+2)/5)+n-1,a=i*365+Math.floor(i/4)-Math.floor(i/100)+s;return o*146097+a-719468}function vt(e){const t=e+719468,n=Math.floor(t/146097),r=t-n*146097,o=Math.floor((r-Math.floor(r/1460)+Math.floor(r/36524)-Math.floor(r/146096))/365),i=r-(365*o+Math.floor(o/4)-Math.floor(o/100)),s=Math.floor((5*i+2)/153),a=i-Math.floor((153*s+2)/5)+1,l=s<10?s+3:s-9;return{y:o+n*400+(l<=2?1:0),m:l,d:a}}const Po={maxLength:1e3,maxDepth:32,maxSteps:1e4},X$=["set","records.upsert","records.delete","records.batch"],Z$=["openUrl","bind","app.navigate"],J$=["actions.","harness.","exponential.","tools.","upstream."];function ki(e){return X$.includes(e)?"write":Z$.includes(e)||J$.some(t=>e.startsWith(t))?"host":"pure"}function ta(e,t){return`${e} ${t==="write"?"writes":"is a host function"}`}class Bo extends Error{}const se=e=>{throw new Bo(e)},Dr=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function We(e){return e==null?"null":typeof e=="number"?"number":typeof e=="string"?"string":typeof e=="boolean"?"bool":Array.isArray(e)?"list":"map"}function st(e){return Number.isFinite(e)||se("number out of range"),e===0?0:e}const Wa=e=>String(e);function na(e,t){if(e=e??null,t=t??null,e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((n,r)=>na(n,t[r]));if(Dr(e)&&Dr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&na(e[o],t[o]))}return!1}function Am(e){const t=Math.abs(e),n=Math.floor(t),r=t-n>=.5?n+1:n;return e<0?-r:r}const et=864e5,bo={second:1e3,minute:6e4,hour:36e5},_u=["second","minute","hour","day","week","month","quarter","year"],_m=["day","week","month","quarter","year"],Om=["h:mm","hh:mm"],Q$=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})?$/;function Ha(e){const t=Q$.exec(e);if(!t)return null;const n=Yi(e.slice(0,10));if(!n)return null;const r=Number(t[4]),o=Number(t[5]),i=t[6]===void 0?0:Number(t[6]);if(r>23||o>59||i>59)return null;const s=t[7]===void 0?0:Number(t[7].slice(0,3).padEnd(3,"0"));let a=0;if(t[8]!==void 0&&t[8]!=="Z"){const l=Number(t[8].slice(1,3)),c=Number(t[8].slice(4,6));if(l>23||c>59)return null;a=(t[8][0]==="-"?-1:1)*(l*60+c)}return bn(n.y,n.m,n.d)*et+r*36e5+o*6e4+i*1e3+s-a*6e4}const ho=(e,t)=>String(e).padStart(t,"0"),Tm=-719528,Mm=2932896,ex=4e6;function Si(e){e>=Tm*et&&e<(Mm+1)*et||se("date out of range");const t=Math.floor(e/et),n=e-t*et,r=vt(t);return(r.y<0||r.y>9999)&&se("date out of range"),`${Xi(r)}T${ho(Math.floor(n/36e5),2)}:${ho(Math.floor(n/6e4)%60,2)}:${ho(Math.floor(n/1e3)%60,2)}.${ho(n%1e3,3)}Z`}function ra(e){e>=Tm&&e<=Mm||se("date out of range");const t=vt(e);return(t.y<0||t.y>9999)&&se("date out of range"),Xi(t)}const Zi=(e,t)=>t+e.offset(t)*6e4;function oa(e,t){const n=e.offset(t),r=t-n*6e4,o=e.offset(r);return o===n?r:t-o*6e4}function Ci(e,t){if(typeof t!="string")return se(`${e} needs a date, got ${We(t)}`);if(t.length===10){const r=Yi(t);if(r)return{date:!0,day:bn(r.y,r.m,r.d)}}const n=Ha(t);return n===null&&se(`not a date: ${t}`),{date:!1,ms:n}}const Yd=(e,t)=>t.date?t.day*et:Zi(e,t.ms);function Ou(e,t,n){return typeof t!="string"?se(`${e} needs a string, got ${We(t)}`):(n.includes(t)||se(`unknown unit ${t}`),t)}function tx(e,t){const n=vt(e),r=n.y*12+(n.m-1)+t,o=Math.floor(r/12),i=r-o*12+1;return bn(o,i,Math.min(n.d,Io(o,i)))}function yc(e,t,n){return Math.abs(t)<=ex||se("date out of range"),n==="day"?e+t:n==="week"?e+7*t:tx(e,t*(n==="month"?1:n==="quarter"?3:12))}function bc(e,t){const n=vt(e);return t==="day"?e:t==="week"?e-((Gi(n.y,n.m,n.d)||7)-1):t==="month"?bn(n.y,n.m,1):t==="quarter"?bn(n.y,Math.floor((n.m-1)/3)*3+1,1):bn(n.y,1,1)}function nx(e,t){return yc(bc(e,t),1,t)}function rx(e,t){const n=_t(e,t);return Number.isInteger(n)||se(`${e} needs a whole number, got ${Wa(n)}`),n}function _t(e,t){return typeof t!="number"?se(`${e} needs a number, got ${We(t)}`):t}function ox(e,t){return typeof t!="string"?se(`${e} needs a string, got ${We(t)}`):t}const mt=e=>()=>e,wl=e=>e[0]==="date"||e[0]==="timestamp"?e[0]:"dyn";function ix(e,t){const n=Ci("dateAdd",e[0]),r=rx("dateAdd",e[1]),o=Ou("dateAdd",e[2],_u);if(n.date)return bo[o]!==void 0&&se(`unit ${o} needs a timestamp`),ra(yc(n.day,r,o));if(bo[o]!==void 0)return Si(st(n.ms+r*bo[o]));const i=Zi(t,n.ms),s=Math.floor(i/et);return Si(oa(t,yc(s,r,o)*et+(i-s*et)))}function sx(e,t){const n=Ci("dateDiff",e[0]),r=Ci("dateDiff",e[1]),o=Ou("dateDiff",e[2],_u);if(bo[o]!==void 0){const f=y=>y.date?oa(t,y.day*et):y.ms;return st(Math.trunc((f(r)-f(n))/bo[o]))}const i=Yd(t,n),s=Yd(t,r);if(o==="day"||o==="week")return st(Math.trunc((s-i)/(o==="day"?et:7*et)));const a=Math.floor(i/et),l=Math.floor(s/et),c=vt(a),u=vt(l);let d=(u.y-c.y)*12+(u.m-c.m);const p=c.d*et+(i-a*et),h=u.d*et+(s-l*et);return d>0&&h<p?d--:d<0&&h>p&&d++,st(Math.trunc(d/(o==="month"?1:o==="quarter"?3:12)))}function Xd(e,t,n){const r=Ci(e,t[0]),o=Ou(e,t[1],_m),i=r.date?r.day:Math.floor(Zi(n,r.ms)/et);if(e==="startOf")return r.date?ra(bc(i,o)):Si(oa(n,bc(i,o)*et));const s=nx(i,o);return r.date?ra(s-1):Si(oa(n,s*et)-1)}function Zd(e,t,n){const r=Ci(e,t);return vt(r.date?r.day:Math.floor(Zi(n,r.ms)/et))}function ax(e){const t=_t("formatDuration",e[0]),n=ox("formatDuration",e[1]);Om.includes(n)||se(`unknown duration format ${n}`);const r=Am(Math.abs(t)*60);r>1e15&&se("number out of range");const o=Math.floor(r/60),i=r-o*60;return`${t<0&&r>0?"-":""}${n==="hh:mm"?ho(o,2):String(o)}:${ho(i,2)}`}function lx(e){const t=_t("round",e[0]),n=e.length>1?e[1]:0;(typeof n!="number"||!Number.isInteger(n)||n<0||n>10)&&se("round needs 0 to 10 digits");let r=1;for(let o=0;o<n;o++)r*=10;return st(Am(t*r)/r)}function cx(e){return typeof e=="string"?[...e].length:Array.isArray(e)?e.length:Dr(e)?Object.keys(e).length:se(`size needs a list, string or map, got ${We(e)}`)}const Ai={mul:{params:["number","number"],args:["a","b"],run:([e,t])=>st(_t("mul",e)*_t("mul",t)),returns:mt("number")},div:{params:["number","number"],args:["a","b"],run:([e,t])=>{const n=_t("div",e),r=_t("div",t);return r===0&&se("division by zero"),st(n/r)},returns:mt("number")},mod:{params:["number","number"],args:["a","b"],run:([e,t])=>{const n=_t("mod",e),r=_t("mod",t);return r===0&&se("modulo by zero"),st(n%r)},returns:mt("number")},round:{params:["number","number"],min:1,args:["value","digits"],run:lx,returns:mt("number")},floor:{params:["number"],args:["value"],run:([e])=>st(Math.floor(_t("floor",e))),returns:mt("number")},ceil:{params:["number"],args:["value"],run:([e])=>st(Math.ceil(_t("ceil",e))),returns:mt("number")},abs:{params:["number"],args:["value"],run:([e])=>st(Math.abs(_t("abs",e))),returns:mt("number")},min:{params:["number"],variadic:!0,args:["values"],run:e=>st(Math.min(...e.map(t=>_t("min",t)))),returns:mt("number")},max:{params:["number"],variadic:!0,args:["values"],run:e=>st(Math.max(...e.map(t=>_t("max",t)))),returns:mt("number")},today:{params:[],args:[],run:(e,t)=>ra(Math.floor(Zi(t,t.now)/et)),returns:mt("date")},now:{params:[],args:[],run:(e,t)=>Si(t.now),returns:mt("timestamp")},dateAdd:{params:["temporal","number","string"],args:["date","n","unit"],run:ix,returns:wl},dateDiff:{params:["temporal","temporal","string"],args:["a","b","unit"],run:sx,returns:mt("number")},startOf:{params:["temporal","string"],args:["date","unit"],run:(e,t)=>Xd("startOf",e,t),returns:wl},endOf:{params:["temporal","string"],args:["date","unit"],run:(e,t)=>Xd("endOf",e,t),returns:wl},weekday:{params:["temporal"],args:["date"],run:([e],t)=>{const n=Zd("weekday",e,t);return Gi(n.y,n.m,n.d)||7},returns:mt("number")},isoWeek:{params:["temporal"],args:["date"],run:([e],t)=>{const n=Zd("isoWeek",e,t);return Sm(n.y,n.m,n.d).week},returns:mt("number")},hours:{params:["number"],args:["minutes"],run:([e])=>st(_t("hours",e)/60),returns:mt("number")},formatDuration:{params:["number","string"],args:["hours","format"],run:ax,returns:mt("string")},size:{params:["sized"],args:["value"],run:([e])=>cx(e),returns:mt("number")},orElse:{params:["any","any"],args:["value","default"],run:([e,t])=>e??t??null,returns:e=>{const t=Pt(e[0]);return t==="null"?Pt(e[1]):t}}},ux=Object.fromEntries(Au.map(e=>[e,t=>Em(e,t)?.value])),dx=new Set(["map","filter","all","exists"]);function Tu(e){return{now:Math.floor(e.now??Date.now()),offset:e.offset??(()=>0)}}function Mu(e,t,n){const r=t.variadic?1:t.min??t.params.length,o=t.variadic?1/0:t.params.length;return n>=r&&n<=o?null:t.variadic?`${e} takes at least 1 argument`:r===o?`${e} takes ${r} argument${r===1?"":"s"}`:`${e} takes ${r} or ${o} arguments`}function Em(e,t,n={}){const r={value:t.default};if(e==="expr"){if(typeof t.expr!="string")return r;const s=Eu(t.expr,Dr(t.vars)?t.vars:{},n);return"value"in s?{value:s.value}:r}if(e==="size"||!Object.prototype.hasOwnProperty.call(Ai,e))return;const o=Ai[e];let i;if(o.variadic)i=Array.isArray(t.values)?t.values:[];else for(i=o.args.map(s=>t[s]);i.length>(o.min??o.params.length)&&i[i.length-1]===void 0;)i.pop();if(Mu(e,o,i.length))return r;try{return{value:o.run(i,Tu(n))}}catch(s){if(s instanceof Bo)return r;throw s}}const px=["==","!=","<=",">=","&&","||"],fx="+-*/%<>!()[],.?:",sr=e=>e!==void 0&&e>="0"&&e<="9",Im=e=>e!==void 0&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="_"),hx=e=>Im(e)||sr(e);function mx(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r===" "||r===" "||r===`
1
+ const _b=(e,t)=>e===t,Ks=Symbol("solid-proxy"),Yh=typeof Proxy=="function",Xh=Symbol("solid-track"),Gs={equals:_b};let di=null,Zh=nm;const Rn=1,Ys=2,Jh={owned:null,cleanups:null,context:null,owner:null};var Re=null;let bl=null,Ob=null,Xe=null,kt=null,yn=null,Na=0;function Vn(e,t){const n=Xe,r=Re,o=e.length===0,i=t===void 0?r:t,s=o?Jh:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>W(()=>vi(s)));Re=s,Xe=null;try{return Jr(a,!0)}finally{Xe=n,Re=r}}function G(e,t){t=t?Object.assign({},Gs,t):Gs;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),tm(n,o));return[em.bind(n),r]}function Qn(e,t,n){const r=qi(e,t,!0,Rn);Lo(r)}function re(e,t,n){const r=qi(e,t,!1,Rn);Lo(r)}function ge(e,t,n){Zh=Ib;const r=qi(e,t,!1,Rn);(!n||!n.render)&&(r.user=!0),yn?yn.push(r):Lo(r)}function j(e,t,n){n=n?Object.assign({},Gs,n):Gs;const r=qi(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Lo(r),em.bind(r)}function uc(e){return Jr(e,!1)}function W(e){if(Xe===null)return e();const t=Xe;Xe=null;try{return e()}finally{Xe=t}}function Ne(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const l=W(()=>t(a,o,s));return o=a,l}}function ot(e){ge(()=>W(e))}function de(e){return Re===null||(Re.cleanups===null?Re.cleanups=[e]:Re.cleanups.push(e)),e}function Tb(e,t){di||(di=Symbol("error")),Re=qi(void 0,void 0,!0),Re.context={...Re.context,[di]:[t]};try{return e()}catch(n){Ui(n)}finally{Re=Re.owner}}function gu(){return Re}function Qh(e,t){const n=Re,r=Xe;Re=e,Xe=null;try{return Jr(t,!0)}catch(o){Ui(o)}finally{Re=n,Xe=r}}const[Fz,zz]=G(!1);function br(e,t){const n=Symbol("context");return{id:n,Provider:Db(n),defaultValue:e}}function er(e){let t;return Re&&Re.context&&(t=Re.context[e.id])!==void 0?t:e.defaultValue}function Xs(e){const t=j(e),n=j(()=>dc(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}function em(){if(this.sources&&this.state)if(this.state===Rn)Lo(this);else{const e=kt;kt=null,Jr(()=>Js(this),!1),kt=e}if(Xe){const e=this.observers;if(!e||e[e.length-1]!==Xe){const t=e?e.length:0;Xe.sources?(Xe.sources.push(this),Xe.sourceSlots.push(t)):(Xe.sources=[this],Xe.sourceSlots=[t]),e?(e.push(Xe),this.observerSlots.push(Xe.sources.length-1)):(this.observers=[Xe],this.observerSlots=[Xe.sources.length-1])}}return this.value}function tm(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Jr(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=bl&&bl.running;s&&bl.disposed.has(i),(s?!i.tState:!i.state)&&(i.pure?kt.push(i):yn.push(i),i.observers&&rm(i)),s||(i.state=Rn)}if(kt.length>1e6)throw kt=[],new Error},!1)),t}function Lo(e){if(!e.fn)return;vi(e);const t=Na;Mb(e,e.value,t)}function Mb(e,t,n){let r;const o=Re,i=Xe;Xe=Re=e;try{r=e.fn(t)}catch(s){return e.pure&&(e.state=Rn,e.owned&&e.owned.forEach(vi),e.owned=null),e.updatedAt=n+1,Ui(s)}finally{Xe=i,Re=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?tm(e,r):e.value=r,e.updatedAt=n)}function qi(e,t,n,r=Rn,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Re,context:Re?Re.context:null,pure:n};return Re===null||Re!==Jh&&(Re.owned?Re.owned.push(i):Re.owned=[i]),i}function Zs(e){if(e.state===0)return;if(e.state===Ys)return Js(e);if(e.suspense&&W(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Na);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Rn)Lo(e);else if(e.state===Ys){const r=kt;kt=null,Jr(()=>Js(e,t[0]),!1),kt=r}}function Jr(e,t){if(kt)return e();let n=!1;t||(kt=[]),yn?n=!0:yn=[],Na++;try{const r=e();return Eb(n),r}catch(r){n||(yn=null),kt=null,Ui(r)}}function Eb(e){if(kt&&(nm(kt),kt=null),e)return;const t=yn;yn=null,t.length&&Jr(()=>Zh(t),!1)}function nm(e){for(let t=0;t<e.length;t++)Zs(e[t])}function Ib(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Zs(r)}for(t=0;t<n;t++)Zs(e[t])}function Js(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const o=r.state;o===Rn?r!==t&&(!r.updatedAt||r.updatedAt<Na)&&Zs(r):o===Ys&&Js(r,t)}}}function rm(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Ys,n.pure?kt.push(n):yn.push(n),n.observers&&rm(n))}}function vi(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)vi(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)vi(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Pb(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Nd(e,t,n){try{for(const r of t)r(e)}catch(r){Ui(r,n&&n.owner||null)}}function Ui(e,t=Re){const n=di&&t&&t.context&&t.context[di],r=Pb(e);if(!n)throw r;yn?yn.push({fn(){Nd(r,n,t)},state:Rn}):Nd(r,n,t)}function dc(e){if(typeof e=="function"&&!e.length)return dc(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=dc(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let o=0;o<r.length;o++)t.push(r[o]);else t.push(r)}return t}return e}function Db(e,t){return function(r){let o;return re(()=>o=W(()=>(Re.context={...Re.context,[e]:r.value},Xs(()=>r.children))),void 0),o}}const pc=Symbol("fallback");function Qs(e){for(let t=0;t<e.length;t++)e[t]()}function Rb(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return de(()=>Qs(i)),()=>{let l=e()||[],c=l.length,u,d;return l[Xh],W(()=>{let h,f,y,g,v,m,b,x,$;if(c===0)s!==0&&(Qs(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[pc],o[0]=Vn(S=>(i[0]=S,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=l[d],o[d]=Vn(p);s=c}else{for(y=new Array(c),g=new Array(c),a&&(v=new Array(c)),m=0,b=Math.min(s,c);m<b&&r[m]===l[m];m++);for(b=s-1,x=c-1;b>=m&&x>=m&&r[b]===l[x];b--,x--)y[x]=o[b],g[x]=i[b],a&&(v[x]=a[b]);for(h=new Map,f=new Array(x+1),d=x;d>=m;d--)$=l[d],u=h.get($),f[d]=u===void 0?-1:u,h.set($,d);for(u=m;u<=b;u++)$=r[u],d=h.get($),d!==void 0&&d!==-1?(y[d]=o[u],g[d]=i[u],a&&(v[d]=a[u]),d=f[d],h.set($,d)):i[u]();for(d=m;d<c;d++)d in y?(o[d]=y[d],i[d]=g[d],a&&(a[d]=v[d],a[d](d))):o[d]=Vn(p);o=o.slice(0,s=c),r=l.slice(0)}return o});function p(h){if(i[d]=h,a){const[f,y]=G(d);return a[d]=y,t(l[d],f)}return t(l[d])}}}function Fb(e,t,n={}){let r=[],o=[],i=[],s=[],a=0,l;return de(()=>Qs(i)),()=>{const c=e()||[],u=c.length;return c[Xh],W(()=>{if(u===0)return a!==0&&(Qs(i),i=[],r=[],o=[],a=0,s=[]),n.fallback&&(r=[pc],o[0]=Vn(p=>(i[0]=p,n.fallback())),a=1),o;for(r[0]===pc&&(i[0](),i=[],r=[],o=[],a=0),l=0;l<u;l++)l<r.length&&r[l]!==c[l]?s[l](()=>c[l]):l>=r.length&&(o[l]=Vn(d));for(;l<r.length;l++)i[l]();return a=s.length=i.length=u,r=c.slice(0),o=o.slice(0,a)});function d(p){i[l]=p;const[h,f]=G(c[l]);return s[l]=f,t(h,l)}}}function w(e,t){return W(()=>e(t||{}))}function hs(){return!0}const fc={get(e,t,n){return t===Ks?n:e.get(t)},has(e,t){return t===Ks?!0:e.has(t)},set:hs,deleteProperty:hs,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:hs,deleteProperty:hs}},ownKeys(e){return e.keys()}};function vl(e){return(e=typeof e=="function"?e():e)?e:{}}function zb(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function T(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&Ks in a,e[s]=typeof a=="function"?(t=!0,j(a)):a}if(Yh&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const l=vl(e[a])[s];if(l!==void 0)return l}},has(s){for(let a=e.length-1;a>=0;a--)if(s in vl(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(vl(e[a])));return[...new Set(s)]}},fc);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:zb.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const p=n[u];p&&(d.get?p.push(d.get.bind(a)):d.value!==void 0&&p.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],l=r[a];l&&l.get?Object.defineProperty(o,a,l):o[a]=l?l.value:void 0}return o}function Vi(e,...t){const n=t.length;if(Yh&&Ks in e){const o=n>1?t.flat():t[0],i=new Set,s=t.map(a=>{const l=a.filter(c=>!i.has(c)&&(i.add(c),!0));return new Proxy({get(c){return l.includes(c)?e[c]:void 0},has(c){return l.includes(c)&&c in e},keys(){return l.filter(c=>c in e)}},fc)});return s.push(new Proxy({get(a){return o.includes(a)?void 0:e[a]},has(a){return o.includes(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.includes(a))}},fc)),s}const r=[];for(let o=0;o<=n;o++)r[o]={};for(const o of Object.getOwnPropertyNames(e)){let i=n;for(let l=0;l<t.length;l++)if(t[l].includes(o)){i=l;break}const s=Object.getOwnPropertyDescriptor(e,o);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?r[i][o]=s.value:Object.defineProperty(r[i],o,s)}return r}let Nb=0;function Fe(){return`cl-${Nb++}`}const Lb=e=>`Stale read from <${e}>.`;function Te(e){const t="fallback"in e&&{fallback:()=>e.fallback};return j(Rb(()=>e.each,e.children,t||void 0))}function tn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return j(Fb(()=>e.each,e.children,t||void 0))}function ee(e){const t=e.keyed,n=j(()=>e.when,void 0,void 0),r=t?n:j(n,void 0,{equals:(o,i)=>!o==!i});return j(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?W(()=>i(t?o:()=>{if(!W(r))throw Lb("Show");return n()})):i}return e.fallback},void 0,void 0)}let ms;function jb(e){let t;const[n,r]=G(t,void 0);return ms||(ms=new Set),ms.add(r),de(()=>ms.delete(r)),j(()=>{let o;if(o=n()){const i=e.fallback;return typeof i=="function"&&i.length?W(()=>i(o,()=>r())):i}return Tb(()=>e.children,r)},void 0,void 0)}const Bb=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],Wb=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Bb]),Hb=new Set(["innerHTML","textContent","innerText","children"]),qb=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Ub=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function Vb(e,t){const n=Ub[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Kb=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Gb=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Yb={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Q=e=>j(()=>e());function Xb(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const u=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],u)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const u=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],u),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const u=c.get(t[s]);if(u!=null)if(a<u&&u<i){let d=s,p=1,h;for(;++d<o&&d<i&&!((h=c.get(t[d]))==null||h!==u+p);)p++;if(p>u-a){const f=t[s];for(;a<u;)e.insertBefore(n[a++],f)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Ld="_$DX_DELEGATE";function Zb(e,t,n,r={}){let o;return Vn(i=>{o=i,t===document?e():k(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function F(e,t,n,r){let o;const i=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},s=t?()=>W(()=>document.importNode(o||(o=i()),!0)):()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function Yt(e,t=window.document){const n=t[Ld]||(t[Ld]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,ov))}}function U(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Jb(e,t,n,r){r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}function Qb(e,t,n){n?e.setAttribute(t,""):e.removeAttribute(t)}function hr(e,t){t==null?e.removeAttribute("class"):e.className=t}function fo(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function ev(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(jd(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(jd(e,a,!0),n[a]=l)}return n}function Le(e,t,n){if(!t)return n?U(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function tv(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function P(e,t={},n,r){const o={};return r||re(()=>o.children=$i(e,t.children,o.children)),re(()=>typeof t.ref=="function"&&ie(t.ref,e)),re(()=>nv(e,t,n,!0,o,!0)),o}function ie(e,t,n){return W(()=>e(t,n))}function k(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return $i(e,t,r,n);re(o=>$i(e,t(),o,n),r)}function nv(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=Bd(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=Bd(e,s,a,o[s],n,i,t)}}function rv(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function jd(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function Bd(e,t,n,r,o,i,s){let a,l,c,u,d;if(t==="style")return Le(e,n,r);if(t==="classList")return ev(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const p=t.slice(3);r&&e.removeEventListener(p,r,typeof r!="function"&&r),n&&e.addEventListener(p,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const p=t.slice(10);r&&e.removeEventListener(p,r,!0),n&&e.addEventListener(p,n,!0)}else if(t.slice(0,2)==="on"){const p=t.slice(2).toLowerCase(),h=Kb.has(p);if(!h&&r){const f=Array.isArray(r)?r[0]:r;e.removeEventListener(p,f)}(h||n)&&(fo(e,p,n,h),h&&Yt([p]))}else if(t.slice(0,5)==="attr:")U(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Qb(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=Hb.has(t))||!o&&((u=Vb(t,e.tagName))||(l=Wb.has(t)))||(a=e.nodeName.includes("-")||"is"in s))d&&(t=t.slice(5),l=!0),t==="class"||t==="className"?hr(e,n):a&&!l&&!c?e[rv(t)]=n:(t==="value"||t==="defaultValue")&&(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA")?e[u||t]=n??"":e[u||t]=n;else{const p=o&&t.indexOf(":")>-1&&Yb[t.split(":")[0]];p?Jb(e,p,t,n):U(e,qb[t]||t,n)}return n}function ov(e){let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),s=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}});try{if(e.composedPath){const l=e.composedPath();i(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}finally{e=t=null}}function $i(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(s){let a=n[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),n=to(e,n,r,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean")n=to(e,n,r);else{if(i==="function")return re(()=>{let a=t();for(;typeof a=="function";)a=a();n=$i(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],l=n&&Array.isArray(n);if(hc(a,t,n,o))return re(()=>n=$i(e,a,n,r,!0)),()=>n;if(a.length===0){if(n=to(e,n,r),s)return n}else l?n.length===0?Wd(e,a,r):Xb(e,n,a):(n&&to(e),Wd(e,a));n=a}else if(t.nodeType){if(Array.isArray(n)){if(s)return n=to(e,n,r,t);to(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function hc(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=hc(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=hc(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o}else e.push(a),o=!0;else{const u=String(a);l&&l.nodeType===3&&l.data===u?e.push(l):e.push(document.createTextNode(u))}}return o}function Wd(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function to(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}const iv="http://www.w3.org/2000/svg";function om(e,t=!1,n=void 0){return t?document.createElementNS(iv,e):document.createElement(e,{is:n})}function sv(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=gu();let i;return ge(()=>{i||(i=Qh(o,()=>j(()=>e.children)));const s=r();if(s instanceof HTMLHeadElement){const[a,l]=G(!1),c=()=>l(!0);Vn(u=>k(s,()=>a()?u():i(),null)),de(c)}else{const a=om(e.isSVG?"g":"div",e.isSVG),l=t&&a.attachShadow?a.attachShadow({mode:"open"}):a;Object.defineProperty(a,"_$host",{get(){return n.parentNode},configurable:!0}),k(l,i),s.appendChild(a),e.ref&&e.ref(a),de(()=>s.contains(a)&&s.removeChild(a))}},void 0,{render:!0}),n}function av(e,t){const n=j(e);return j(()=>{const r=n();switch(typeof r){case"function":return W(()=>r(t));case"string":const o=Gb.has(r),i=om(r,o,W(()=>t.is));return P(i,t,o),i}})}function Qr(e){const[,t]=Vi(e,["component"]);return av(()=>e.component,t)}const lv="https://ui.exponential.at/catalogs/core/v1",cv="https://ui.exponential.at/catalogs/core-lite/v1",uv="Unknown",dv={variant:["default","secondary","outline","ghost","destructive","link"],size:["sm","default","lg","icon"],tone:["neutral","primary","success","warning","danger","info"],gap:["none","xs","sm","md","lg","xl"],align:["start","center","end","stretch"],justify:["start","center","end","between","around","evenly"],textVariant:["body","caption","muted","lead","code","label","title"],headingLevel:["h1","h2","h3","h4"],imageFit:["contain","cover","fill","none","scaleDown"],orientation:["horizontal","vertical"],side:["top","right","bottom","left"],inputType:["text","email","password","number","search","url","tel"],validateOn:["change","blur","submit"],alertType:["info","success","warning","error"],controlSize:["sm","default","lg"],spinnerSize:["xs","sm","default","lg"],tabClosable:["none","hover","always"],groupType:["single","multiple"],rowChevron:["none","right","selector"],rowSurface:["flat","card"],chipShape:["pill","rect"],density:["default","compact"],listDirection:["vertical","horizontal"],chartKind:["bar","stackedBar","line","area","pie","donut","sparkline"],segmentedVariant:["segmented","toggles","outline","bar"],liveTone:["live","attention","done","unread","idle","muted"],menuItemKind:["item","checkbox","separator","label","submenu"],openOn:["press","hover"],menuOpenOn:["press","contextmenu"],live:["off","polite","assertive"],selectable:["none","single","multiple"],cellType:["text","number","date","boolean","badge","slot","currency","percent","relativeTime"],sortDirection:["asc","desc"],imageLoading:["lazy","eager"],scrollDirection:["vertical","horizontal","both"],collapseBelow:["never","sm","md","lg","xl"],codeLanguage:["plain","json","js","ts","tsx","rust","swift","kotlin","python","bash","html","css","sql","yaml","markdown","ansi"],codeToken:["plain","keyword","string","number","comment","punctuation","operator","type","function","property","tag","attribute","success","warning","error"],codeBlockVariant:["default","destructive"],codeBlockSize:["default","sm"],switchSize:["default","compact"],traceStatus:["running","error","pending","done","skipped"],traceSize:["default","sm"],voiceWaveActivity:["idle","listening","thinking","speaking","muted"],voiceWaveSize:["sm","md","lg","xl"],messageSide:["in","out"],messageStatus:["sending","sent","read"],callState:["ringing","connecting","talking","ended"],voiceWaveVariant:["ring","bars"],qrLevel:["L","M","Q","H"],planState:["proposed","running","done","declined"],zoomInitial:["auto","fit","fitWidth","actual"],zoomControls:["auto","always","none"],motionDirection:["forward","reverse","alternate"],motionFit:["contain","cover","fill"],calendarView:["month","week"]},pv={option:{properties:{label:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},icon:{type:"icon"},disabled:{type:"boolean"},description:{type:"string"},image:{type:"url"},count:{type:"number",bindable:!0}}},check:{properties:{condition:{type:"boolean",required:!0,bindable:!0},message:{type:"string",required:!0}}},tab:{properties:{label:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},icon:{type:"icon"},count:{type:"number"}}},menuItem:{properties:{label:{type:"string"},value:{type:"string"},kind:{type:"enum",enum:"menuItemKind",default:"item"},icon:{type:"icon"},shortcut:{type:"string"},checked:{type:"boolean",bindable:!0},destructive:{type:"boolean"},disabled:{type:"boolean"},items:{type:"array",items:{type:"object",shape:"menuItem"},bindable:!0},searchable:{type:"boolean"},placeholder:{type:"string"}}},searchItem:{properties:{label:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},icon:{type:"icon"},identifier:{type:"string"},disabled:{type:"boolean"}}},accordionItem:{properties:{title:{type:"string",required:!0,bindable:!0},value:{type:"string",required:!0},count:{type:"number"}}},segment:{properties:{value:{type:"number",required:!0},tone:{type:"enum",enum:"tone"},label:{type:"string"}}},series:{properties:{name:{type:"string",required:!0},values:{type:"array",items:{type:"number"},required:!0},tone:{type:"enum",enum:"tone"}}},pageItem:{properties:{title:{type:"string"}}},step:{properties:{label:{type:"string",required:!0},description:{type:"string"}}},column:{properties:{key:{type:"string",required:!0},label:{type:"string",required:!0},type:{type:"enum",enum:"cellType",default:"text"},slot:{type:"string"},width:{type:"number"},align:{type:"enum",values:["start","center","end"],default:"start"},sortable:{type:"boolean",default:!1},currency:{type:"string"},decimals:{type:"number"},truncate:{type:"boolean",default:!1}}},sort:{properties:{key:{type:"string",required:!0},direction:{type:"enum",enum:"sortDirection",required:!0}}},panel:{properties:{min:{type:"number"},max:{type:"number"},collapsible:{type:"boolean"}}},file:{properties:{name:{type:"string",required:!0},size:{type:"number"},type:{type:"string"},url:{type:"url"}}},planStep:{properties:{title:{type:"string",required:!0},detail:{type:"string"},icon:{type:"icon"},status:{type:"enum",enum:"traceStatus"}}},outlineItem:{properties:{id:{type:"string",required:!0},title:{type:"string",required:!0,bindable:!0},count:{type:"number",bindable:!0}}},picture:{properties:{src:{type:"url",required:!0},alt:{type:"string"}}}},fv={names:["required","regex","length","numeric","email","formatString","formatNumber","formatCurrency","formatDate","pluralize","openUrl","and","or","not","percent","add","sub","eq","lt","clamp","cond","fallback","concat","coalesce","text","map","len","fill","set","formatPercent","formatRelativeTime","filter","bind","mul","div","mod","round","floor","ceil","abs","min","max","today","now","dateAdd","dateDiff","startOf","endOf","weekday","isoWeek","hours","formatDuration","orElse","expr"]},hv={"Accordion.trigger":"ui-chevron-down","Carousel.previous":"ui-chevron-left","Carousel.next":"ui-chevron-right","Checkbox.check":"ui-check","ChipInput.remove":"ui-close","CodeBlock.copy":"ui-copy","CodeBlock.copied":"ui-check","Composer.attachment":"ui-attach","Composer.send":"ui-send","Composer.stop":"ui-stop","DatePicker.trigger":"calendar","DatePicker.previousMonth":"ui-chevron-left","DatePicker.nextMonth":"ui-chevron-right","DateRangePicker.trigger":"calendar","Dialog.close":"ui-close","Menu.check":"ui-check","Menu.submenuIndicator":"ui-chevron-right","FileUpload.icon":"upload","FileUpload.file":"ui-file","FileUpload.remove":"ui-close","Image.fallback":"ui-icon-placeholder","NumberField.decrement":"ui-minus","NumberField.increment":"ui-add","Select.trigger":"ui-selector","Select.search":"search","Select.check":"ui-check","SearchList.search":"search","SearchList.check":"ui-check","Table.sortIcon.asc":"ui-chevron-up","Table.sortIcon.desc":"ui-chevron-down","Tabs.close":"ui-close","Tabs.new":"ui-add","TimePicker.trigger":"ui-clock","Toast.close":"ui-close","Toast.icon.info":"ui-info","Toast.icon.success":"ui-success","Toast.icon.warning":"ui-warning","Toast.icon.error":"ui-error","Unknown.root":"ui-warning","ZoomableImage.zoomOut":"ui-minus","ZoomableImage.zoomIn":"ui-add","ZoomableImage.fit":"ui-fullscreen"},mv=JSON.parse('{"Box":{"kind":"native","group":"layout","lite":true,"children":"many","props":{"style":{"type":"style"},"pressable":{"type":"boolean"}},"events":["press"]},"Stack":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"direction":{"type":"enum","enum":"orientation","default":"vertical","responsive":true,"bindable":true},"gap":{"type":"enum","enum":"gap","default":"md","responsive":true},"align":{"type":"enum","enum":"align","responsive":true,"bindable":true},"justify":{"type":"enum","enum":"justify","default":"start","responsive":true,"bindable":true},"wrap":{"type":"boolean","default":false,"responsive":true},"style":{"type":"style"}}},"Grid":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"columns":{"type":"number","default":2,"responsive":true},"gap":{"type":"enum","enum":"gap","default":"md","responsive":true},"style":{"type":"style"}}},"Card":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"title":{"type":"string"},"description":{"type":"string"},"padded":{"type":"boolean","default":true},"style":{"type":"style"}}},"Separator":{"kind":"macro","group":"layout","lite":true,"children":"none","props":{"orientation":{"type":"enum","enum":"orientation","default":"horizontal"}}},"List":{"kind":"native","group":"layout","lite":true,"children":"many","slots":["section"],"slotScope":"row","props":{"direction":{"type":"enum","enum":"listDirection","default":"vertical"},"gap":{"type":"enum","enum":"gap","default":"none"},"divided":{"type":"boolean","default":false},"sectionBy":{"type":"string"},"stickyHeaders":{"type":"boolean","default":false},"style":{"type":"style"}}},"Resizable":{"kind":"native","group":"layout","lite":true,"children":"many","props":{"direction":{"type":"enum","enum":"orientation","default":"horizontal","responsive":true},"sizes":{"type":"array","items":{"type":"number"},"bindable":true},"panels":{"type":"array","items":{"type":"object","shape":"panel"}},"handle":{"type":"boolean","default":false},"style":{"type":"style"}},"events":["change"]},"ScrollArea":{"kind":"macro","group":"layout","lite":true,"children":"many","props":{"direction":{"type":"enum","enum":"scrollDirection","default":"vertical"},"maxHeight":{"type":"number"},"style":{"type":"style"}}},"Sidebar":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["sidebar"],"props":{"side":{"type":"enum","values":["left","right"],"default":"left"},"width":{"type":"number","default":240},"collapseBelow":{"type":"enum","enum":"collapseBelow","default":"md"},"collapsed":{"type":"boolean","default":false,"bindable":true}}},"SplitView":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["list"],"props":{"open":{"type":"boolean","default":false,"bindable":true},"width":{"type":"number","default":320}},"events":["back"]},"AppBar":{"kind":"macro","group":"layout","lite":true,"children":"none","slots":["leading","trailing"],"props":{"title":{"type":"string","required":true,"bindable":true},"subtitle":{"type":"string","bindable":true},"back":{"type":"boolean","default":false}},"events":["back"]},"Page":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["leading","trailing"],"props":{"title":{"type":"string","required":true,"bindable":true},"subtitle":{"type":"string","bindable":true},"back":{"type":"boolean","default":false},"padded":{"type":"boolean","default":true}},"events":["back"]},"Toolbar":{"kind":"macro","group":"layout","lite":true,"children":"many","slots":["trailing"],"props":{"gap":{"type":"enum","enum":"gap","default":"sm"}}},"Section":{"kind":"macro","group":"list","lite":true,"children":"many","slots":["leading","trailing"],"props":{"title":{"type":"string","bindable":true},"caption":{"type":"string","bindable":true},"count":{"type":"number","bindable":true},"icon":{"type":"icon"},"collapsible":{"type":"boolean","default":false},"open":{"type":"boolean","default":true,"bindable":true},"tint":{"type":"enum","enum":"tone","default":"neutral"},"tree":{"type":"boolean","default":false},"loading":{"type":"boolean","default":false,"bindable":true},"style":{"type":"style"}},"events":["change"]},"Group":{"kind":"macro","group":"list","lite":true,"children":"many","props":{"title":{"type":"string"},"footer":{"type":"string"}}},"Text":{"kind":"native","group":"text","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"variant":{"type":"enum","enum":"textVariant","default":"body"},"align":{"type":"enum","values":["start","center","end"]},"lines":{"type":"number"},"tone":{"type":"enum","enum":"tone"},"shimmer":{"type":"boolean","default":false},"live":{"type":"enum","enum":"live","default":"off"},"style":{"type":"style"}}},"Heading":{"kind":"macro","group":"text","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"level":{"type":"enum","enum":"headingLevel","default":"h2"}}},"Markdown":{"kind":"native","group":"text","lite":true,"children":"none","props":{"text":{"type":"markdown","required":true,"bindable":true},"lines":{"type":"number"},"style":{"type":"style"}}},"CodeBlock":{"kind":"native","group":"text","lite":true,"children":"none","props":{"code":{"type":"string","required":true,"bindable":true},"language":{"type":"enum","enum":"codeLanguage","default":"plain"},"title":{"type":"string"},"lineNumbers":{"type":"boolean","default":false},"wrap":{"type":"boolean","default":false},"copyable":{"type":"boolean","default":true},"highlight":{"type":"array","items":{"type":"number"}},"maxLines":{"type":"number"},"variant":{"type":"enum","enum":"codeBlockVariant","default":"default","bindable":true},"size":{"type":"enum","enum":"codeBlockSize","default":"default"}}},"Kbd":{"kind":"macro","group":"text","lite":true,"children":"none","props":{"keys":{"type":"string","required":true}}},"Label":{"kind":"macro","group":"text","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"for":{"type":"string"},"required":{"type":"boolean","default":false}}},"Image":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","bindable":true},"alt":{"type":"string","required":true,"bindable":true},"fit":{"type":"enum","enum":"imageFit","default":"cover"},"width":{"type":"number"},"height":{"type":"number"},"aspectRatio":{"type":"number"},"fallback":{"type":"icon"},"loading":{"type":"enum","enum":"imageLoading","default":"lazy"},"focalX":{"type":"number"},"focalY":{"type":"number"},"style":{"type":"style"}}},"ZoomableImage":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","required":true,"bindable":true},"alt":{"type":"string","required":true,"bindable":true},"naturalWidth":{"type":"number"},"naturalHeight":{"type":"number"},"initial":{"type":"enum","enum":"zoomInitial","default":"auto"},"maxScale":{"type":"number","default":8},"controls":{"type":"enum","enum":"zoomControls","default":"auto"},"scale":{"type":"number","bindable":true},"style":{"type":"style"}},"events":["zoom","tap"]},"Icon":{"kind":"native","group":"media","lite":true,"children":"none","props":{"name":{"type":"icon","required":true,"bindable":true},"size":{"type":"enum","enum":"controlSize","default":"default"},"tone":{"type":"enum","enum":"tone","bindable":true},"label":{"type":"string"}}},"Video":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","required":true,"bindable":true},"poster":{"type":"url"},"durationMs":{"type":"number"},"autoplay":{"type":"boolean","default":false},"aspectRatio":{"type":"number","default":1.7777778},"style":{"type":"style"}}},"AudioPlayer":{"kind":"native","group":"media","lite":false,"children":"none","props":{"src":{"type":"url","required":true,"bindable":true},"title":{"type":"string"},"durationMs":{"type":"number"}}},"Avatar":{"kind":"native","group":"media","lite":true,"children":"none","props":{"name":{"type":"string","required":true,"bindable":true},"src":{"type":"url","bindable":true},"size":{"type":"enum","enum":"controlSize","default":"default"},"seed":{"type":"string"}}},"QrCode":{"kind":"native","group":"media","lite":false,"children":"none","props":{"value":{"type":"string","required":true,"bindable":true},"size":{"type":"number","default":160},"level":{"type":"enum","enum":"qrLevel","default":"M"},"label":{"type":"string"}}},"Carousel":{"kind":"native","group":"media","lite":false,"children":"many","props":{"page":{"type":"number","default":0,"bindable":true},"loop":{"type":"boolean","default":false},"indicators":{"type":"boolean","default":true},"counter":{"type":"boolean","default":false},"thumbnails":{"type":"array","items":{"type":"url"}}},"events":["change"]},"Mosaic":{"kind":"macro","group":"media","lite":false,"children":"none","props":{"pictures":{"type":"array","items":{"type":"object","shape":"picture"},"required":true},"label":{"type":"string"}},"events":["select"]},"Tabs":{"kind":"native","group":"navigation","lite":true,"children":"many","props":{"tabs":{"type":"array","items":{"type":"object","shape":"tab"},"required":true},"value":{"type":"string","bindable":true},"fill":{"type":"boolean","default":false},"closable":{"type":"enum","enum":"tabClosable","default":"none"},"addable":{"type":"boolean","default":false}},"events":["change","close","new"]},"Segmented":{"kind":"native","group":"navigation","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"option"},"required":true},"type":{"type":"enum","enum":"groupType","default":"single"},"value":{"type":"string","bindable":true},"variant":{"type":"enum","enum":"segmentedVariant","default":"segmented"},"size":{"type":"enum","enum":"controlSize","default":"default"},"fill":{"type":"boolean","default":false},"orientation":{"type":"enum","enum":"orientation","default":"horizontal"}},"events":["change"]},"Accordion":{"kind":"native","group":"navigation","lite":false,"children":"many","props":{"items":{"type":"array","items":{"type":"object","shape":"accordionItem"},"required":true},"type":{"type":"enum","enum":"groupType","default":"single"},"value":{"type":"string","bindable":true}},"events":["change"]},"Collapsible":{"kind":"macro","group":"navigation","lite":true,"children":"many","props":{"title":{"type":"string","required":true},"open":{"type":"boolean","default":false,"bindable":true},"count":{"type":"number"}},"events":["change"]},"Trace":{"kind":"macro","group":"list","lite":true,"children":"many","props":{"size":{"type":"enum","enum":"traceSize","default":"default"}}},"TraceItem":{"kind":"macro","group":"list","lite":true,"children":"many","props":{"title":{"type":"string","required":true,"bindable":true},"icon":{"type":"icon"},"description":{"type":"string"},"status":{"type":"enum","enum":"traceStatus"},"size":{"type":"enum","enum":"traceSize","default":"default"},"collapsible":{"type":"boolean","default":false},"open":{"type":"boolean","default":false,"bindable":true}},"events":["change"]},"Plan":{"kind":"macro","group":"list","lite":true,"children":"none","props":{"title":{"type":"string","required":true,"bindable":true},"description":{"type":"string","bindable":true},"steps":{"type":"array","items":{"type":"object","shape":"planStep"}},"state":{"type":"enum","enum":"planState","default":"proposed","bindable":true},"progress":{"type":"number","bindable":true},"approveLabel":{"type":"string","default":"$string.yes"},"declineLabel":{"type":"string","default":"$string.no"},"stopLabel":{"type":"string","default":"$string.stop"}},"events":["approve","decline","stop"]},"Pagination":{"kind":"macro","group":"navigation","lite":false,"children":"none","props":{"totalPages":{"type":"number","required":true},"page":{"type":"number","default":1,"bindable":true}},"events":["change"]},"Breadcrumb":{"kind":"macro","group":"navigation","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"option"},"required":true}},"events":["select"]},"Outline":{"kind":"macro","group":"navigation","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"outlineItem"},"required":true},"value":{"type":"string","bindable":true},"caption":{"type":"string"}},"events":["select"]},"Stepper":{"kind":"macro","group":"navigation","lite":true,"children":"none","props":{"steps":{"type":"array","items":{"type":"object","shape":"step"},"required":true},"current":{"type":"number","default":0,"bindable":true},"orientation":{"type":"enum","enum":"orientation","default":"horizontal"}}},"Dialog":{"kind":"native","group":"overlay","lite":false,"children":"many","slots":["trigger","footer"],"props":{"title":{"type":"string"},"description":{"type":"string"},"open":{"type":"boolean","default":false,"bindable":true},"dismissible":{"type":"boolean","default":true}},"events":["change"]},"Drawer":{"kind":"native","group":"overlay","lite":false,"children":"many","slots":["trigger","footer"],"props":{"title":{"type":"string"},"description":{"type":"string"},"open":{"type":"boolean","default":false,"bindable":true},"side":{"type":"enum","enum":"side","default":"bottom","responsive":true},"dismissible":{"type":"boolean","default":true},"dragToDismiss":{"type":"boolean","default":true}},"events":["change"]},"DockCard":{"kind":"macro","group":"overlay","lite":false,"children":"many","slots":["footer"],"props":{"label":{"type":"string","required":true,"bindable":true},"title":{"type":"string","required":true,"bindable":true},"caption":{"type":"string","bindable":true},"meta":{"type":"string","bindable":true},"icon":{"type":"icon"},"tone":{"type":"enum","enum":"tone","default":"neutral"},"open":{"type":"boolean","default":false,"bindable":true}},"events":["press","change"]},"AlertDialog":{"kind":"macro","group":"overlay","lite":false,"children":"many","slots":["trigger"],"props":{"title":{"type":"string","required":true},"description":{"type":"string"},"confirmLabel":{"type":"string","default":"$string.confirm"},"cancelLabel":{"type":"string","default":"$string.cancel"},"destructive":{"type":"boolean","default":false},"open":{"type":"boolean","default":false,"bindable":true}},"events":["confirm","cancel","change"]},"Popover":{"kind":"native","group":"overlay","lite":false,"children":"many","slots":["trigger"],"props":{"open":{"type":"boolean","default":false,"bindable":true},"side":{"type":"enum","enum":"side","default":"bottom"},"openOn":{"type":"enum","enum":"openOn","default":"press"}},"events":["change"]},"Tooltip":{"kind":"native","group":"overlay","lite":false,"children":"many","props":{"content":{"type":"string","required":true},"side":{"type":"enum","enum":"side","default":"top"}}},"Menu":{"kind":"native","group":"overlay","lite":false,"children":"one","props":{"label":{"type":"string"},"icon":{"type":"icon"},"items":{"type":"array","items":{"type":"object","shape":"menuItem"},"required":true},"openOn":{"type":"enum","enum":"menuOpenOn","default":"press"}},"events":["select"]},"Toast":{"kind":"native","group":"overlay","lite":false,"children":"none","props":{"title":{"type":"string","required":true,"bindable":true},"description":{"type":"string","bindable":true},"type":{"type":"enum","enum":"alertType","default":"info"},"open":{"type":"boolean","default":true,"bindable":true},"duration":{"type":"number","default":5000},"actionLabel":{"type":"string"},"dismissible":{"type":"boolean","default":true}},"events":["dismiss","action","change"]},"Badge":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"text":{"type":"string","required":true,"bindable":true},"variant":{"type":"enum","enum":"variant","default":"default","bindable":true},"icon":{"type":"icon"}}},"Alert":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"title":{"type":"string","required":true},"message":{"type":"string"},"type":{"type":"enum","enum":"alertType","default":"info"}}},"Chip":{"kind":"macro","group":"feedback","lite":true,"children":"none","slots":["leading"],"props":{"label":{"type":"string","required":true,"bindable":true},"shape":{"type":"enum","enum":"chipShape","default":"pill"},"selected":{"type":"boolean","default":false},"tone":{"type":"enum","enum":"tone","default":"neutral","bindable":true},"dot":{"type":"color"},"icon":{"type":"icon"},"image":{"type":"url"},"detail":{"type":"string"},"removable":{"type":"boolean","default":false},"pressable":{"type":"boolean","default":false}},"events":["press","remove"]},"EmptyState":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"icon":{"type":"icon","required":true},"title":{"type":"string","required":true},"description":{"type":"string"},"actionLabel":{"type":"string"},"size":{"type":"enum","values":["page","list"],"default":"page"}},"events":["press"]},"Progress":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"value":{"type":"number","required":true,"bindable":true},"max":{"type":"number","default":100},"label":{"type":"string"},"tone":{"type":"enum","enum":"tone","default":"primary"}}},"Meter":{"kind":"macro","group":"feedback","lite":true,"children":"none","props":{"segments":{"type":"array","items":{"type":"object","shape":"segment"},"required":true},"max":{"type":"number","default":100},"label":{"type":"string"},"value":{"type":"string"}}},"Ring":{"kind":"native","group":"feedback","lite":true,"children":"none","props":{"value":{"type":"number","required":true,"bindable":true},"size":{"type":"enum","enum":"controlSize","default":"default"},"tone":{"type":"enum","enum":"tone","default":"primary"},"label":{"type":"string"}}},"Spinner":{"kind":"native","group":"feedback","lite":false,"children":"none","props":{"size":{"type":"enum","enum":"spinnerSize","default":"default"},"label":{"type":"string"}}},"Skeleton":{"kind":"native","group":"feedback","lite":true,"children":"none","props":{"width":{"type":"string"},"height":{"type":"string"},"rounded":{"type":"boolean","default":false},"rows":{"type":"number"},"rowHeight":{"type":"number"},"dot":{"type":"boolean","default":true}}},"VoiceWave":{"kind":"native","group":"feedback","lite":false,"children":"one","props":{"activity":{"type":"enum","enum":"voiceWaveActivity","default":"idle","bindable":true},"variant":{"type":"enum","enum":"voiceWaveVariant","default":"ring"},"level":{"type":"number","default":0,"bindable":true},"bands":{"type":"array","items":{"type":"number"},"bindable":true},"size":{"type":"enum","enum":"voiceWaveSize","default":"md"},"label":{"type":"string"}}},"CallSurface":{"kind":"macro","group":"media","lite":false,"children":"none","props":{"name":{"type":"string","required":true,"bindable":true},"avatar":{"type":"url","bindable":true},"state":{"type":"enum","enum":"callState","default":"talking","bindable":true},"activity":{"type":"enum","enum":"voiceWaveActivity","default":"speaking","bindable":true},"level":{"type":"number","bindable":true},"bands":{"type":"array","items":{"type":"number"},"bindable":true},"status":{"type":"string","bindable":true},"caption":{"type":"string","bindable":true},"muted":{"type":"boolean","default":false,"bindable":true},"speaker":{"type":"boolean","bindable":true}},"events":["mute","speaker","hangUp"]},"Table":{"kind":"native","group":"data","lite":false,"children":"none","slots":["*"],"slotScope":"row","props":{"columns":{"type":"array","items":{"type":"object","shape":"column"},"required":true},"rows":{"type":"array","items":{"type":"object"},"required":true,"bindable":true},"rowKey":{"type":"string","default":"id"},"sort":{"type":"object","shape":"sort","bindable":true},"selectable":{"type":"enum","enum":"selectable","default":"none"},"selected":{"type":"array","items":{"type":"string"},"bindable":true},"caption":{"type":"string"},"emptyText":{"type":"string","default":"$string.noResults"},"striped":{"type":"boolean","default":false},"density":{"type":"enum","enum":"density","default":"default"},"stickyHeader":{"type":"boolean","default":false}},"events":["sort","select","rowPress"]},"Chart":{"kind":"native","group":"data","lite":false,"children":"none","props":{"kind":{"type":"enum","enum":"chartKind","required":true},"categories":{"type":"array","items":{"type":"string"},"bindable":true},"series":{"type":"array","items":{"type":"object","shape":"series"},"required":true,"bindable":true},"title":{"type":"string"},"height":{"type":"number","default":200},"xLabel":{"type":"string"},"yLabel":{"type":"string"},"min":{"type":"number"},"max":{"type":"number"},"showAxes":{"type":"boolean","default":true},"showGrid":{"type":"boolean","default":true},"showLegend":{"type":"boolean","default":true},"showValues":{"type":"boolean","default":false}}},"Sparkline":{"kind":"macro","group":"data","lite":false,"children":"none","props":{"values":{"type":"array","items":{"type":"number"},"required":true,"bindable":true},"tone":{"type":"enum","enum":"tone","default":"primary"},"height":{"type":"number","default":24}}},"StatTile":{"kind":"macro","group":"data","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"value":{"type":"string","required":true,"bindable":true},"delta":{"type":"string","bindable":true},"tone":{"type":"enum","enum":"tone","default":"neutral","bindable":true},"trend":{"type":"array","items":{"type":"number"},"bindable":true}}},"Button":{"kind":"native","group":"action","lite":true,"children":"one","props":{"label":{"type":"string","bindable":true},"icon":{"type":"icon","bindable":true},"href":{"type":"url"},"variant":{"type":"enum","enum":"variant","default":"default"},"size":{"type":"enum","enum":"size","default":"default"},"disabled":{"type":"boolean","default":false,"bindable":true},"loading":{"type":"boolean","default":false},"pendingLabel":{"type":"string"},"submit":{"type":"boolean","default":false},"hold":{"type":"boolean","default":false},"holdingLabel":{"type":"string"}},"events":["press","holdStart","holdEnd","holdCancel"]},"Link":{"kind":"native","group":"action","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"href":{"type":"url"},"external":{"type":"boolean","default":false}},"events":["press"]},"Toggle":{"kind":"native","group":"action","lite":false,"children":"none","props":{"label":{"type":"string","required":true},"icon":{"type":"icon"},"pressed":{"type":"boolean","default":false,"bindable":true},"variant":{"type":"enum","values":["default","outline"],"default":"default"},"size":{"type":"enum","enum":"controlSize","default":"default"}},"events":["change"]},"Form":{"kind":"native","group":"input","lite":true,"children":"many","props":{"name":{"type":"string","required":true},"disabled":{"type":"boolean","default":false,"bindable":true},"busy":{"type":"boolean","default":false,"bindable":true},"summary":{"type":"boolean","default":false}},"events":["submit","invalid","change"]},"FieldGroup":{"kind":"macro","group":"input","lite":true,"children":"many","props":{"columns":{"type":"number","default":2}}},"FormActions":{"kind":"macro","group":"input","lite":true,"children":"many","props":{"submit":{"type":"string","required":true,"bindable":true},"cancel":{"type":"boolean","default":false},"destructive":{"type":"boolean","default":false}},"events":["cancel"]},"Input":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true},"name":{"type":"string","required":true},"type":{"type":"enum","enum":"inputType","default":"text"},"placeholder":{"type":"string"},"value":{"type":"string","bindable":true},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"blur"}},"events":["change","submit","focus","blur"]},"Textarea":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true},"name":{"type":"string","required":true},"placeholder":{"type":"string"},"rows":{"type":"number","default":3},"autosize":{"type":"boolean","default":false},"maxRows":{"type":"number"},"value":{"type":"string","bindable":true},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"blur"}},"events":["change","focus","blur"]},"NumberField":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true},"name":{"type":"string","required":true},"value":{"type":"number","bindable":true},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number","default":1},"precision":{"type":"number"},"unit":{"type":"string"},"placeholder":{"type":"string"},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"blur"}},"events":["change","submit","focus","blur"]},"Checkbox":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"name":{"type":"string","required":true},"checked":{"type":"boolean","default":false,"bindable":true},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change"]},"Radio":{"kind":"native","group":"input","lite":false,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"options":{"type":"array","items":{"type":"object","shape":"option"},"required":true},"value":{"type":"string","bindable":true},"orientation":{"type":"enum","enum":"orientation","default":"vertical"},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change"]},"ChoiceTiles":{"kind":"native","group":"input","lite":false,"children":"none","props":{"name":{"type":"string","required":true},"options":{"type":"array","items":{"type":"object","shape":"option"},"required":true},"type":{"type":"enum","enum":"groupType","default":"single"},"value":{"type":"string","bindable":true},"columns":{"type":"number","default":2},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change"]},"Switch":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string","required":true,"bindable":true},"name":{"type":"string","required":true},"checked":{"type":"boolean","default":false,"bindable":true},"description":{"type":"string"},"disabled":{"type":"boolean","default":false},"size":{"type":"enum","enum":"switchSize","default":"default"}},"events":["change"]},"Slider":{"kind":"native","group":"input","lite":false,"children":"none","props":{"label":{"type":"string"},"min":{"type":"number","default":0,"bindable":true},"max":{"type":"number","required":true,"bindable":true},"step":{"type":"number","default":1},"value":{"type":"number","bindable":true}},"events":["change"]},"Rating":{"kind":"macro","group":"input","lite":true,"children":"none","props":{"value":{"type":"number","default":0,"bindable":true},"max":{"type":"number","default":5,"minimum":1,"maximum":100},"readOnly":{"type":"boolean","default":false},"size":{"type":"enum","enum":"controlSize","default":"default"}},"events":["change"]},"Select":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"options":{"type":"array","items":{"type":"object","shape":"option"},"bindable":true},"source":{"type":"string"},"placeholder":{"type":"string"},"value":{"type":"string","bindable":true},"multiple":{"type":"boolean","default":false},"searchable":{"type":"boolean","default":false},"emptyText":{"type":"string","default":"$string.noResults"},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}},"validateOn":{"type":"enum","enum":"validateOn","default":"change"}},"events":["change","search"]},"SearchList":{"kind":"native","group":"input","lite":true,"children":"none","props":{"items":{"type":"array","items":{"type":"object","shape":"searchItem"},"required":true,"bindable":true},"query":{"type":"string","bindable":true},"placeholder":{"type":"string","default":"$string.search"},"value":{"type":"string","bindable":true},"emptyText":{"type":"string","default":"$string.noResults"},"maxRows":{"type":"number","default":8},"showCount":{"type":"boolean","default":true}},"events":["search","select"]},"ChipInput":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"values":{"type":"array","items":{"type":"string"},"bindable":true},"suggestions":{"type":"array","items":{"type":"object","shape":"option"},"bindable":true},"placeholder":{"type":"string"},"max":{"type":"number"},"disabled":{"type":"boolean","default":false},"checks":{"type":"array","items":{"type":"object","shape":"check"}}},"events":["change","add","remove"]},"DatePicker":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"value":{"type":"date","bindable":true},"min":{"type":"date"},"max":{"type":"date"},"placeholder":{"type":"string"},"firstDayOfWeek":{"type":"number"}},"events":["change"]},"DateRangePicker":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"start":{"type":"date","bindable":true},"end":{"type":"date","bindable":true},"min":{"type":"date"},"max":{"type":"date"},"placeholder":{"type":"string"},"firstDayOfWeek":{"type":"number"}},"events":["change"]},"TimePicker":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"value":{"type":"string","bindable":true},"min":{"type":"string"},"max":{"type":"string"},"step":{"type":"number","default":15},"placeholder":{"type":"string"},"disabled":{"type":"boolean","default":false}},"events":["change"]},"FileUpload":{"kind":"native","group":"input","lite":true,"children":"none","props":{"label":{"type":"string"},"name":{"type":"string","required":true},"accept":{"type":"string"},"multiple":{"type":"boolean","default":false},"maxSize":{"type":"number"},"files":{"type":"array","items":{"type":"object","shape":"file"},"bindable":true},"hint":{"type":"string"},"disabled":{"type":"boolean","default":false}},"events":["upload","remove"]},"QrScanner":{"kind":"native","group":"input","lite":false,"children":"none","props":{"hint":{"type":"string","bindable":true},"formats":{"type":"array","items":{"type":"string"},"default":["qr"]},"label":{"type":"string","default":"$string.scanQrCode"},"disabled":{"type":"boolean","default":false}},"events":["scanned"]},"Composer":{"kind":"native","group":"input","lite":true,"children":"none","props":{"placeholder":{"type":"string"},"value":{"type":"string","bindable":true},"submitLabel":{"type":"string","default":"$string.send"},"attachments":{"type":"boolean","default":false},"busy":{"type":"boolean","default":false}},"events":["submit","change","stop"]},"Row":{"kind":"macro","group":"list","lite":true,"children":"none","slots":["leading","trailing"],"props":{"title":{"type":"string","required":true,"bindable":true},"identifier":{"type":"string","bindable":true},"subtitle":{"type":"string","bindable":true},"meta":{"type":"string","bindable":true},"value":{"type":"string","bindable":true},"placeholder":{"type":"string"},"icon":{"type":"icon","bindable":true},"chevron":{"type":"enum","enum":"rowChevron","default":"none","bindable":true},"selected":{"type":"boolean","default":false,"bindable":true},"density":{"type":"enum","enum":"density","default":"default"},"surface":{"type":"enum","enum":"rowSurface","default":"flat"},"pressable":{"type":"boolean","default":false},"href":{"type":"url"},"depth":{"type":"number","default":0}},"events":["press"]},"MessageBubble":{"kind":"macro","group":"list","lite":true,"children":"none","slots":["attachment"],"props":{"text":{"type":"markdown","required":true,"bindable":true},"side":{"type":"enum","enum":"messageSide","default":"in"},"time":{"type":"string","bindable":true},"status":{"type":"enum","enum":"messageStatus","bindable":true},"author":{"type":"string","bindable":true}}},"TreeGuides":{"kind":"native","group":"list","lite":true,"children":"none","hidden":true,"props":{"depth":{"type":"number","required":true},"elbowAt":{"type":"number"},"tee":{"type":"boolean","default":false},"passThrough":{"type":"array","items":{"type":"number"}}}},"Unknown":{"kind":"native","group":"feedback","lite":true,"children":"none","hidden":true,"props":{"component":{"type":"string","required":true},"catalogId":{"type":"string"}}},"Motion":{"kind":"native","group":"media","lite":true,"children":"none","props":{"layers":{"type":"array","items":{"type":"object"}},"size":{"type":"array","items":{"type":"number"}},"duration":{"type":"number"},"fps":{"type":"number","default":60},"assets":{"type":"object"},"markers":{"type":"array","items":{"type":"object"}},"lottie":{"type":"object"},"src":{"type":"url"},"autoplay":{"type":"boolean","default":true},"loop":{"type":"boolean","default":true},"plays":{"type":"number"},"direction":{"type":"enum","enum":"motionDirection","default":"forward"},"speed":{"type":"number","default":1},"segment":{"type":"array","items":{"type":"number"}},"marker":{"type":"string"},"progress":{"type":"number","bindable":true},"play":{"type":"boolean","bindable":true,"default":true},"poster":{"type":"number"},"fit":{"type":"enum","enum":"motionFit","default":"contain"},"slots":{"type":"object"},"stateMachine":{"type":"object"},"inputs":{"type":"object","bindable":true},"label":{"type":"string"},"style":{"type":"style"}},"events":["press","hover","visible","complete","state"]},"Calendar":{"kind":"macro","group":"data","lite":true,"children":"none","events":["select","open"],"props":{"source":{"type":"string"},"view":{"type":"enum","enum":"calendarView","default":"month"},"labelField":{"type":"string","default":"title"},"detailField":{"type":"string","default":"detail"},"metaField":{"type":"string","default":"status"},"style":{"type":"style"}}},"Timeline":{"kind":"macro","group":"data","lite":true,"children":"none","events":["open"],"props":{"source":{"type":"string"},"labelField":{"type":"string","default":"title"},"rowTitle":{"type":"string"},"showCount":{"type":"boolean","default":false},"style":{"type":"style"}}},"RecordForm":{"kind":"macro","group":"data","lite":true,"children":"none","props":{"kind":{"type":"string","required":true},"recordId":{"type":"string","bindable":true},"submitLabel":{"type":"string","default":"$string.save"},"readOnly":{"type":"boolean","default":false},"cancel":{"type":"boolean","default":false},"path":{"type":"string"},"fields":{"type":"array","items":{"type":"object"},"host":true},"missing":{"type":"boolean","default":false,"host":true}},"events":["submit","cancel"]},"RecordTable":{"kind":"macro","group":"data","lite":false,"children":"none","props":{"kind":{"type":"string","required":true},"query":{"type":"string"},"columns":{"type":"array","items":{"type":"string"}},"add":{"type":"boolean","default":true},"editable":{"type":"boolean","default":true},"title":{"type":"string","host":true},"cols":{"type":"array","items":{"type":"object","shape":"column"},"host":true},"rows":{"type":"array","items":{"type":"object"},"bindable":true,"host":true},"count":{"type":"string","bindable":true,"host":true},"loading":{"type":"boolean","default":false,"bindable":true,"host":true},"fields":{"type":"array","items":{"type":"object"},"host":true},"path":{"type":"string","host":true},"editorOpen":{"type":"boolean","default":false,"bindable":true,"host":true},"editorId":{"type":"string","bindable":true,"host":true},"deleteOpen":{"type":"boolean","default":false,"bindable":true,"host":true},"missing":{"type":"boolean","default":false,"host":true}}}}'),gv={id:lv,liteId:cv,unknownComponent:uv,enums:dv,defs:pv,functions:fv,builtinIcons:hv,components:mv},yv="VAPP-85: the token NAMES the core catalog's macros and Box styles reference as `$<group>.<name>` (e.g. `$color.primary`, `$spacing.md`). VALUES come from a theme (VAPP-92); this file only fixes the vocabulary. `color` = the shadcn semantic set plus success/warning/info and the eight chart hues (round 1 added chart6..8); `spacing`/`radius`/`type` mirror packages/design-tokens' scales by NAME (xl2 because 2xl is not an identifier in Swift/Kotlin/Rust); `control` = the per-kind control heights the VAPP-4 spike asked for instead of px (round 1 adds `appBar`, `tabBar`, `toast`); `shadow` = the boxShadow presets, ALSO the elevation scale (none < sm < md < lg < xl: flat, card, popover, dialog, toast; paint order inside a layer stays tree order, overlays stack by layer, never by zIndex); `opacity` = the text-emphasis ladder; VAPP-92 adds `border` (the border-width ladder, px) and `motion` (durations, ms). Round 1 (docs/round-1-contract.md) adds `breakpoint` (px, the ONLY tokens a style CONDITION may reference: `\"@media (min-width: $breakpoint.md)\"`; resolved against the theme before matching), `ease` (cubic-bezier control points [x1, y1, x2, y2], referenced by `transitionEasing`) and `density` (multipliers over `control` and `spacing` for the surface density `compact`/`comfortable`; `default` = 1, never a token). Round 2 (docs/round-2-contract.md §2) adds `blur` (px radii, the ONLY values `backdropBlur` takes). EXP-1259 (EXP-1243, packages/design-tokens motion.scale) adds `scale` (unitless multipliers the PAINTERS read, never a style value): `press` = what a pressed button scales to, `popoverFrom` = what a popover or menu scales FROM while it fades in (never from 0); reduce motion = no scale. VAPP-162 appends `type.family.serif` (the platform's system serif, `ui-serif` in every built-in theme). Every group is append-only: a theme is validated against these names.",bv=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","destructive","destructiveForeground","success","successForeground","warning","warningForeground","info","infoForeground","border","input","ring","chart1","chart2","chart3","chart4","chart5","chart6","chart7","chart8"],vv=["none","xxs","xs","sm","md","lg","xl","xl2","xl3"],$v=["none","sm","md","lg","xl","xl2","xl3","full"],xv={size:["xs","sm","base","lg","xl","xl2","xl3"],lineHeight:["xs","sm","base","lg","xl","xl2","xl3"],weight:["regular","medium","semibold","bold"],family:["sans","mono","serif"]},wv=["buttonSm","buttonMd","buttonLg","buttonIcon","input","textarea","row","rowCompact","pill","badge","chip","toggle","switch","checkbox","slider","progress","meter","avatarSm","avatarMd","avatarLg","iconSm","iconMd","iconLg","hairline","appBar","tabBar","toast"],kv=["none","sm","md","lg","xl"],Sv=["primary","secondary","tertiary","quaternary","disabled"],Cv=["none","hairline","thick"],Av=["fast","standard","slow"],_v=["sm","md","lg","xl"],Ov=["standard","decelerate","accelerate"],Tv=["compact","comfortable"],Mv=["sm","md","lg","xl"],Ev=["press","popoverFrom"],Iv={$comment:yv,color:bv,spacing:vv,radius:$v,type:xv,control:wv,shadow:kv,opacity:Sv,border:Cv,motion:Av,breakpoint:_v,ease:Ov,density:Tv,blur:Mv,scale:Ev},Pv="https://a2ui.org/specification/v0_9/basic_catalog.json",Dv="v0.9",Rv="ui-icon-placeholder",Fv={Text:{to:"Text",props:{text:"text"},transform:"textVariant"},Image:{to:"Image",props:{src:"url",alt:{from:"description",default:""},fit:{from:"fit",default:"cover"}},transform:"imageVariant"},Icon:{to:"Icon",props:{},transform:"iconName"},Video:{to:"Video",props:{src:"url"}},AudioPlayer:{to:"AudioPlayer",props:{src:"url",title:"description"}},Row:{to:"Stack",children:"children",props:{direction:{const:"horizontal"},justify:{from:"justify",map:{spaceBetween:"between",spaceAround:"around",spaceEvenly:"evenly",stretch:"start"},default:"start"},align:{from:"align",default:"stretch"},gap:{const:"sm"}}},Column:{to:"Stack",children:"children",props:{direction:{const:"vertical"},justify:{from:"justify",map:{spaceBetween:"between",spaceAround:"around",spaceEvenly:"evenly",stretch:"start"},default:"start"},align:{from:"align",default:"stretch"},gap:{const:"sm"}}},List:{to:"List",children:"children",props:{direction:{from:"direction",default:"vertical"},gap:{const:"sm"}}},Card:{to:"Card",children:"child",props:{}},Tabs:{to:"Tabs",props:{},transform:"tabs"},Modal:{to:"Dialog",props:{},transform:"modal"},Divider:{to:"Separator",props:{orientation:{from:"axis",default:"horizontal"}}},Button:{to:"Button",props:{variant:{from:"variant",map:{primary:"default",default:"secondary",borderless:"ghost"},default:"secondary"}},transform:"buttonChild"},TextField:{to:"Input",props:{label:"label",value:"value",checks:"checks"},transform:"textField"},CheckBox:{to:"Checkbox",props:{label:"label",checked:"value",checks:"checks"},transform:"fieldName"},ChoicePicker:{to:"Radio",props:{label:"label",options:"options",checks:"checks"},transform:"choicePicker"},Slider:{to:"Slider",props:{label:"label",min:{from:"min",default:0},max:"max",value:"value"}},DateTimeInput:{to:"DatePicker",props:{label:"label",value:"value",min:"min",max:"max"},transform:"fieldName"}},zv={accountCircle:"ui-assignee",add:"ui-add",arrowBack:"ui-back",arrowForward:"ui-arrow-right",attachFile:"ui-attach",calendarToday:"calendar",call:"phone",camera:"camera",check:"ui-check",close:"ui-close",delete:"ui-delete",download:"ui-download",edit:"ui-edit",event:"ui-due-date",error:"ui-error",fastForward:"media-fast-forward",favorite:"heart",favoriteOff:"ui-favorite-off",folder:"ui-folder",help:"ui-help",home:"house",info:"ui-info",locationOn:"map-pin",lock:"ui-private",lockOpen:"ui-unlock",mail:"ui-mail",menu:"ui-menu",moreVert:"ui-more-vertical",moreHoriz:"ui-more",notificationsOff:"ui-unsubscribe",notifications:"ui-subscribe",pause:"run-pause",payment:"credit-card",person:"ui-avatar-placeholder",phone:"smartphone",photo:"image",play:"action-run",print:"ui-print",refresh:"ui-refresh",rewind:"media-rewind",search:"nav-search",send:"ui-send",settings:"nav-settings",share:"ui-share",shoppingCart:"shopping-cart",skipNext:"media-skip-next",skipPrevious:"media-skip-previous",star:"star",starHalf:"ui-star-half",starOff:"ui-star-off",stop:"ui-stop",upload:"sc-push",visibility:"ui-watch",visibilityOff:"ui-hide",volumeDown:"media-volume-down",volumeMute:"media-volume-mute",volumeOff:"media-volume-off",volumeUp:"media-volume-up",warning:"ui-warning"},yu={from:Pv,version:Dv,placeholderIcon:Rv,components:Fv,icons:zv},Nv=JSON.parse('{"Stack":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":{"$map":{"from":"props.direction","cases":{"horizontal":"row"},"default":"column"}},"flexWrap":{"$cond":["props.wrap","wrap","nowrap"]},"gap":"$spacing.{props.gap|md}","alignItems":{"$coalesce":["{props.align}",{"$map":{"from":"props.direction","cases":{"horizontal":"center"},"default":"stretch"}}]},"justifyContent":{"$map":{"from":"props.justify","cases":{"between":"space-between","around":"space-around","evenly":"space-evenly"},"default":"{props.justify|start}"}}},"children":["$children"]}},"Grid":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat({props.columns|2}, minmax(0, 1fr))","gap":"$spacing.{props.gap|md}"},"children":["$children"]}},"Card":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.title}"},"style":{"display":"flex","flexDirection":"column","borderRadius":"$radius.xl","overflow":"hidden"},"children":[{"part":"header","component":"Box","$any":["props.title","props.description"],"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","paddingTop":"$spacing.lg","paddingHorizontal":"$spacing.lg"},"children":[{"part":"title","component":"Text","$if":"props.title","props":{"text":"{props.title}","variant":"title"}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","variant":"muted"}}]},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.md","padding":{"$map":{"from":"props.padded","cases":{"false":"$spacing.none"},"default":"$spacing.lg"}}},"children":["$children"]}]}},"Separator":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"separator"},"style":{"alignSelf":"stretch","flexShrink":0,"width":{"$map":{"from":"props.orientation","cases":{"vertical":1},"default":"auto"}},"height":{"$map":{"from":"props.orientation","cases":{"vertical":"auto"},"default":1}}}}},"Section":{"recipeProps":["tint","tree","open","collapsible"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.sm"},"children":[{"part":"header","component":"Box","$if":["props.title",{"$not":"props.collapsible"}],"$a11y":{"role":"heading","level":3},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","height":"$control.row","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md"},"children":[{"part":"chevron","component":"Icon","$if":"props.collapsible","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"}},"$slot:leading",{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"muted","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"loading","component":"Spinner","$if":"props.loading","props":{"size":"xs","label":"$string.loading"}},{"part":"count","component":"Text","$if":"props.count","props":{"text":{"$text":"props.count"},"variant":"muted"}},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},"$slot:trailing"]},{"part":"header","component":"Box","$if":["props.title","props.collapsible"],"$a11y":{"role":"button","expanded":"{props.open|true}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","height":"$control.row","paddingHorizontal":"$spacing.md","borderRadius":"$radius.md"},"$on":{"press":"change"},"$context":{"open":{"$not":"props.open|true"}},"$set":{"press":{"prop":"open","value":{"$not":"props.open|true"}}},"children":[{"part":"chevron","component":"Icon","$if":"props.collapsible","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"}},"$slot:leading",{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"muted","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"loading","component":"Spinner","$if":"props.loading","props":{"size":"xs","label":"$string.loading"}},{"part":"count","component":"Text","$if":"props.count","props":{"text":{"$text":"props.count"},"variant":"muted"}},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},"$slot:trailing"]},{"part":"body","component":"List","$if":"props.open|true","$a11y":{"role":{"$cond":["props.tree","tree","list"]}},"props":{"divided":true,"gap":"none","style":"{props.style}"},"children":["$children"]}]}},"Group":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.title}","description":"{props.footer}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs"},"children":[{"part":"title","component":"Text","$if":"props.title","props":{"text":"{props.title}","variant":"label"},"style":{"paddingHorizontal":"$spacing.md"}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","borderRadius":"$radius.lg","overflow":"hidden"},"children":["$children"]},{"part":"footer","component":"Text","$if":"props.footer","props":{"text":"{props.footer}","variant":"muted"},"style":{"paddingHorizontal":"$spacing.md"}}]}},"Heading":{"recipeProps":["level"],"root":{"part":"root","component":"Text","$a11y":{"role":"heading","level":{"$map":{"from":"props.level","cases":{"h1":1,"h2":2,"h3":3,"h4":4},"default":2}}},"props":{"text":"{props.text}","variant":"title"}}},"Collapsible":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs"},"children":[{"part":"trigger","component":"Box","$a11y":{"role":"button","expanded":"{props.open|false}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","minHeight":"$control.row","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.md"},"$recipe":{"open":"{props.open|false}"},"$on":{"press":"change"},"$context":{"open":"{!props.open}"},"$set":{"press":{"prop":"open","value":"{!props.open}"}},"children":[{"part":"chevron","component":"Icon","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"},"$recipe":{"open":"{props.open|false}"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label","lines":1},"style":{"flexGrow":1,"minWidth":0}},{"part":"count","component":"Text","$if":"props.count","props":{"text":{"$text":"props.count"},"variant":"muted"}}]},{"part":"body","component":"Box","$if":"props.open","style":{"display":"flex","flexDirection":"column","gap":"$spacing.md","paddingHorizontal":"$spacing.sm"},"children":["$children"]}]}},"Trace":{"recipeProps":["size"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minWidth":0},"children":["$children"]}},"TraceItem":{"recipeProps":["status","size","collapsible","open"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","minWidth":0},"children":[{"part":"line","component":"Box","$if":{"$not":"props.collapsible"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}},"alignSelf":"flex-start","maxWidth":"100%","minWidth":0,"borderRadius":"$radius.md"},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"},"style":{"width":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"height":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"flexShrink":0}},{"part":"title","component":"Text","props":{"text":"{props.title}","lines":1,"shimmer":{"$eq":["{props.status}","running"]}},"style":{"flexShrink":1,"minWidth":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","lines":1},"style":{"flexShrink":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}}]},{"part":"line","component":"Box","$if":"props.collapsible","$a11y":{"role":"button","expanded":"{props.open|false}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}},"alignSelf":"flex-start","maxWidth":"100%","minWidth":0,"borderRadius":"$radius.md"},"$on":{"press":"change"},"$context":{"open":"{!props.open}"},"$set":{"press":{"prop":"open","value":"{!props.open}"}},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"},"style":{"width":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"height":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"flexShrink":0}},{"part":"title","component":"Text","props":{"text":"{props.title}","lines":1,"shimmer":{"$eq":["{props.status}","running"]}},"style":{"flexShrink":1,"minWidth":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","lines":1},"style":{"flexShrink":0,"fontSize":{"$map":{"from":"props.size","cases":{"sm":12},"default":14}},"lineHeight":{"$map":{"from":"props.size","cases":{"sm":18},"default":20}}}},{"part":"chevron","component":"Icon","props":{"name":"trace-chevron","size":"sm"},"$recipe":{"open":"{props.open|false}"},"style":{"width":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"height":{"$map":{"from":"props.size","cases":{"sm":14},"default":16}},"flexShrink":0,"marginLeft":{"$map":{"from":"props.size","cases":{"sm":-2},"default":-4}}}}]},{"part":"content","component":"Box","$if":["props.collapsible","props.open"],"style":{"display":"flex","flexDirection":"column","gap":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"minWidth":0,"marginTop":{"$map":{"from":"props.size","cases":{"sm":6},"default":8}},"marginBottom":{"$map":{"from":"props.size","cases":{"sm":4},"default":4}},"marginLeft":{"$map":{"from":"props.size","cases":{"sm":6},"default":7}},"borderLeftWidth":1,"paddingLeft":{"$map":{"from":"props.size","cases":{"sm":13},"default":16}},"paddingRight":{"$map":{"from":"props.size","cases":{"sm":4},"default":4}}},"children":["$children"]}]}},"Pagination":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"navigation","label":"$string.pagination"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"prev","component":"Button","props":{"icon":"ui-chevron-left","variant":"outline","size":"icon","label":"$string.previous","disabled":{"$not":{"$lt":[1,"{props.page|1}"]}}},"$on":{"press":"change"},"$context":{"page":{"$clamp":[{"$add":["{props.page|1}",-1]},1,"{props.totalPages}"]}},"$set":{"press":{"prop":"page","value":{"$clamp":[{"$add":["{props.page|1}",-1]},1,"{props.totalPages}"]}}}},{"part":"label","component":"Text","props":{"text":"{props.page|1} / {props.totalPages}","variant":"muted"},"$a11y":{"role":"status","label":{"$fill":["$string.pageOf",{"page":"{props.page|1}","total":"{props.totalPages}"}]}}},{"part":"next","component":"Button","props":{"icon":"ui-chevron-right","variant":"outline","size":"icon","label":"$string.next","disabled":{"$not":{"$lt":["{props.page|1}","{props.totalPages}"]}}},"$on":{"press":"change"},"$context":{"page":{"$clamp":[{"$add":["{props.page|1}",1]},1,"{props.totalPages}"]}},"$set":{"press":{"prop":"page","value":{"$clamp":[{"$add":["{props.page|1}",1]},1,"{props.totalPages}"]}}}}]}},"Badge":{"recipeProps":["variant"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xxs","height":"$control.badge","paddingHorizontal":"$spacing.sm","borderRadius":"$radius.full","alignSelf":"flex-start"},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"label","component":"Text","props":{"text":"{props.text}","variant":"caption","lines":1}}]}},"Alert":{"recipeProps":["type"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$map":{"from":"props.type","cases":{"warning":"alert","error":"alert"},"default":"status"}}},"style":{"display":"flex","flexDirection":"row","alignItems":"flex-start","gap":"$spacing.sm","padding":"$spacing.md","borderRadius":"$radius.lg"},"children":[{"part":"icon","component":"Icon","props":{"name":{"$map":{"from":"props.type","cases":{"success":"ui-success","warning":"ui-warning","error":"ui-error"},"default":"ui-info"}},"size":"sm","tone":{"$map":{"from":"props.type","cases":{"success":"success","warning":"warning","error":"danger"},"default":"info"}}}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","flexGrow":1,"minWidth":0},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"label"}},{"part":"message","component":"Text","$if":"props.message","props":{"text":"{props.message}","variant":"muted"}}]}]}},"Chip":{"recipeProps":["shape","selected","tone"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$cond":["props.pressable","button","none"]},"pressed":{"$cond":["props.pressable","{props.selected|false}"]}},"props":{"pressable":"{props.pressable|false}"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xs","paddingHorizontal":"$spacing.sm","alignSelf":"flex-start","height":{"$map":{"from":"props.shape","cases":{"rect":"$control.chip"},"default":"$control.pill"}},"borderRadius":{"$map":{"from":"props.shape","cases":{"rect":"$radius.md"},"default":"$radius.full"}}},"children":["$slot:leading",{"part":"dot","component":"Box","$if":"props.dot","style":{"width":8,"height":8,"borderRadius":"$radius.full","backgroundColor":"{props.dot}","flexShrink":0}},{"part":"image","component":"Image","$if":"props.image","props":{"src":"{props.image}","alt":"{props.label}","width":16,"height":16,"fit":"cover"},"style":{"borderRadius":"$radius.full"}},{"part":"icon","component":"Icon","$if":["props.icon","!props.image"],"props":{"name":"{props.icon}","size":"sm"}},{"part":"label","component":"Text","props":{"text":"{props.label}","variant":"caption","lines":1}},{"part":"detail","component":"Text","$if":"props.detail","props":{"text":"{props.detail}","variant":"muted","lines":1}},{"part":"remove","component":"Button","$if":"props.removable","props":{"icon":"ui-close","variant":"ghost","size":"icon","label":"$string.remove"},"$on":{"press":"remove"}}]}},"EmptyState":{"recipeProps":["size"],"root":{"part":"root","component":"Box","$a11y":{"role":"status"},"style":{"display":"flex","flexDirection":"column","alignItems":"center","gap":{"$map":{"from":"props.size","cases":{"list":"$spacing.xs"},"default":"$spacing.md"}},"paddingVertical":{"$map":{"from":"props.size","cases":{"list":"$spacing.xl"},"default":"$spacing.xl3"}},"paddingHorizontal":{"$map":{"from":"props.size","cases":{"list":"$spacing.md"},"default":"$spacing.xl"}}},"children":[{"part":"disc","component":"Box","$if":{"$not":{"$eq":["{props.size|page}","list"]}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","width":48,"height":48,"borderRadius":"$radius.full","flexShrink":0},"children":[{"part":"icon","component":"Icon","props":{"name":"{props.icon}","size":"lg","tone":"neutral"}}]},{"part":"icon","component":"Icon","$if":{"$eq":["{props.size|page}","list"]},"props":{"name":"{props.icon}","size":"default","tone":"neutral"}},{"part":"title","component":"Text","props":{"text":"{props.title}","variant":{"$map":{"from":"props.size","cases":{"list":"muted"},"default":"title"}},"align":"center"}},{"part":"description","component":"Text","$if":["props.description",{"$not":{"$eq":["{props.size|page}","list"]}}],"props":{"text":"{props.description}","variant":"muted","align":"center"}},{"part":"action","component":"Button","$if":["props.actionLabel",{"$not":{"$eq":["{props.size|page}","list"]}}],"props":{"label":"{props.actionLabel}","variant":"outline"},"$on":{"press":"press"}}]}},"Progress":{"recipeProps":["tone"],"root":{"part":"root","component":"Box","$a11y":{"role":"progressbar","label":"{props.label}","valueNow":"{props.value}","valueMin":0,"valueMax":"{props.max|100}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs","width":"100%"},"children":[{"part":"label","component":"Text","$if":"props.label","props":{"text":"{props.label}","variant":"caption"}},{"part":"track","component":"Box","style":{"height":"$control.progress","borderRadius":"$radius.full","overflow":"hidden","width":"100%"},"children":[{"part":"fill","component":"Box","style":{"height":"100%","width":{"$percent":["{props.value}","{props.max|100}"]},"borderRadius":"$radius.full"}}]}]}},"Meter":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"meter","label":"{props.label}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xs","width":"100%"},"children":[{"part":"header","component":"Box","$any":["props.label","props.value"],"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"label","component":"Text","$if":"props.label","props":{"text":"{props.label}","variant":"caption"},"style":{"flexGrow":1,"minWidth":0}},{"part":"value","component":"Text","$if":"props.value","props":{"text":"{props.value}","variant":"muted"}}]},{"part":"track","component":"Box","style":{"display":"flex","flexDirection":"row","height":"$control.meter","borderRadius":"$radius.full","overflow":"hidden","width":"100%"},"children":[{"part":"segment","component":"Box","$each":"props.segments","$as":"item","style":{"height":"100%","width":{"$percent":["{item.value}","{props.max|100}"]}},"$recipe":{"tone":"{item.tone|neutral}"}}]}]}},"Row":{"recipeProps":["selected","density","surface","depth"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$cond":["props.pressable","button","none"]},"selected":{"$cond":["props.pressable","{props.selected|false}"]}},"props":{"pressable":"{props.pressable|false}","href":"{props.href}"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","minHeight":{"$map":{"from":"props.density","cases":{"compact":"$control.rowCompact"},"default":"$control.row"}},"paddingHorizontal":"$spacing.md","borderRadius":{"$map":{"from":"props.surface","cases":{"card":"$radius.lg"},"default":"$radius.md"}}},"children":[{"part":"guides","component":"TreeGuides","$if":{"$lt":[0,"{props.depth|0}"]},"props":{"depth":"{props.depth}"}},"$slot:leading",{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm"}},{"part":"identifier","component":"Text","$if":"props.identifier","props":{"text":"{props.identifier}","variant":"code","lines":1},"style":{"flexShrink":0}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","flexGrow":1,"minWidth":0,"paddingVertical":{"$map":{"from":"props.surface","cases":{"card":"$spacing.md"},"default":"$spacing.xs"}}},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"body","lines":1}},{"part":"subtitle","component":"Text","$if":"props.subtitle","props":{"text":"{props.subtitle}","variant":"muted","lines":1,"hostLinks":true}}]},{"part":"meta","component":"Text","$if":"props.meta","props":{"text":"{props.meta}","variant":"muted","lines":1}},{"part":"value","component":"Text","$any":["props.value","props.placeholder"],"props":{"text":{"$coalesce":["{props.value}","{props.placeholder}"]},"variant":{"$cond":["props.value","body","muted"]},"lines":1,"align":"end"}},"$slot:trailing",{"part":"chevron","component":"Icon","$if":{"$not":{"$eq":["{props.chevron|none}","none"]}},"props":{"name":{"$map":{"from":"props.chevron","cases":{"selector":"ui-selector"},"default":"ui-chevron-right"}},"size":"sm","tone":"neutral"}}]}},"ScrollArea":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"region"},"style":{"display":"flex","flexDirection":{"$map":{"from":"props.direction","cases":{"horizontal":"row"},"default":"column"}},"overflowX":{"$map":{"from":"props.direction","cases":{"horizontal":"auto","both":"auto"},"default":"hidden"}},"overflowY":{"$map":{"from":"props.direction","cases":{"vertical":"auto","both":"auto"},"default":"hidden"}},"minWidth":0,"minHeight":0,"maxHeight":"{props.maxHeight}"},"children":["$children"]}},"Sidebar":{"recipeProps":["side"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":{"$map":{"from":"props.side","cases":{"right":"row-reverse"},"default":"row"}},"alignItems":"stretch","gap":"$spacing.lg","width":"100%","minHeight":0},"children":[{"part":"sidebar","component":"Box","$if":"!props.collapsed","$a11y":{"role":"navigation"},"style":{"display":"flex","flexDirection":"column","width":"{props.width|240}","flexShrink":0,"minHeight":0,"@media (max-width: $breakpoint.{props.collapseBelow|md})":{"$cond":[{"$not":{"$eq":["{props.collapseBelow|md}","never"]}},{"display":"none"}]}},"children":["$slot:sidebar"]},{"part":"main","component":"Box","$a11y":{"role":"main"},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"minWidth":0,"minHeight":0},"children":["$children"]}]}},"AppBar":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"banner"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm","height":"$control.appBar","paddingHorizontal":"$spacing.md","width":"100%"},"children":[{"part":"back","component":"Button","$if":"props.back","props":{"icon":"ui-back","variant":"ghost","size":"icon","label":"$string.back"},"$on":{"press":"back"}},"$slot:leading",{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","flexGrow":1,"minWidth":0},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","variant":"title","lines":1},"$a11y":{"role":"heading","level":1}},{"part":"subtitle","component":"Text","$if":"props.subtitle","props":{"text":"{props.subtitle}","variant":"muted","lines":1}}]},"$slot:trailing"]}},"Kbd":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","height":"$control.badge","paddingHorizontal":"$spacing.xs","borderRadius":"$radius.sm","alignSelf":"flex-start"},"children":[{"part":"label","component":"Text","props":{"text":"{props.keys}","variant":"code","lines":1}}]}},"Label":{"recipeProps":["required"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xxs"},"children":[{"part":"text","component":"Text","props":{"text":"{props.text}","variant":"label"}},{"part":"mark","component":"Text","$if":"props.required","props":{"text":"*","variant":"label","tone":"danger"}}]}},"Breadcrumb":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"navigation","label":"$string.breadcrumb"},"style":{"display":"flex","flexDirection":"row","alignItems":"center","flexWrap":"wrap","gap":"$spacing.xs"},"children":[{"part":"item","component":"Box","$each":"props.items","$as":"item","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xs"},"$recipe":{"current":{"$eq":["{index}",{"$sub":["{len(props.items)}",1]}]}},"children":[{"part":"separator","component":"Icon","$if":{"$lt":[0,"{index}"]},"props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"},"$a11y":{"hidden":true}},{"part":"link","component":"Button","$if":{"$not":{"$eq":["{index}",{"$sub":["{len(props.items)}",1]}]}},"props":{"label":"{item.label}","icon":"{item.icon}","variant":"link","size":"sm"},"$on":{"press":"select"},"$context":{"value":"{item.value}"}},{"part":"current","component":"Text","$if":{"$eq":["{index}",{"$sub":["{len(props.items)}",1]}]},"props":{"text":"{item.label}","variant":"label","lines":1},"$a11y":{"current":"page"}}]}]}},"Outline":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"navigation","label":"{props.caption|$string.outline}"},"style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","minWidth":0},"children":[{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"caption","lines":1},"$a11y":{"hidden":true}},{"part":"row","component":"Box","$each":"props.items","$as":"item","props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xs","position":"relative","height":"$control.rowCompact","paddingHorizontal":"$spacing.sm","minWidth":0,"overflow":"hidden","cursor":"pointer"},"$recipe":{"active":{"$eq":["{item.id}","{props.value}"]}},"$a11y":{"role":"link","label":{"$cond":["item.count",{"$fill":["$string.outlineRow",{"title":"{item.title}","count":"{item.count}"}]},"{item.title}"]},"current":{"$cond":[{"$eq":["{item.id}","{props.value}"]},"location",false]}},"$on":{"press":"select"},"$context":{"id":"{item.id}"},"$set":{"press":{"prop":"value","value":"{item.id}"}},"children":[{"part":"bar","component":"Box","$if":{"$eq":["{item.id}","{props.value}"]},"$a11y":{"hidden":true},"style":{"position":"absolute","insetInlineStart":0,"top":0,"bottom":0,"width":2}},{"part":"title","component":"Text","props":{"text":"{item.title}","lines":1},"$recipe":{"active":{"$eq":["{item.id}","{props.value}"]}},"style":{"flexGrow":1,"flexShrink":1,"flexBasis":0,"minWidth":0}},{"part":"count","component":"Text","$if":"item.count","props":{"text":"· {item.count}","variant":"caption","lines":1},"$a11y":{"hidden":true},"style":{"flexShrink":0}}]}]}},"Stepper":{"recipeProps":["orientation"],"root":{"part":"root","component":"Box","$a11y":{"role":"list"},"style":{"display":"flex","flexDirection":{"$map":{"from":"props.orientation","cases":{"vertical":"column"},"default":"row"}},"alignItems":{"$map":{"from":"props.orientation","cases":{"vertical":"stretch"},"default":"flex-start"}},"gap":"$spacing.md","width":"100%"},"children":[{"part":"step","component":"Box","$each":"props.steps","$as":"step","style":{"display":"flex","flexDirection":{"$map":{"from":"props.orientation","cases":{"vertical":"row"},"default":"column"}},"alignItems":{"$map":{"from":"props.orientation","cases":{"vertical":"flex-start"},"default":"center"}},"gap":"$spacing.xs","flexGrow":1,"flexBasis":0,"minWidth":0},"$recipe":{"status":{"$cond":[{"$lt":["{index}","{props.current|0}"]},"done",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}]}},"$a11y":{"role":"listitem","current":{"$cond":[{"$eq":["{index}","{props.current|0}"]},"step",false]},"label":{"$fill":[{"$cond":[{"$lt":["{index}","{props.current|0}"]},"$string.stepDone",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"$string.stepCurrent","$string.stepUpcoming"]}]},{"step":{"$add":["{index}",1]},"total":"{len(props.steps)}","label":"{step.label}"}]}},"children":[{"part":"marker","component":"Box","$a11y":{"hidden":true},"style":{"display":"flex","alignItems":"center","justifyContent":"center","width":"$control.iconLg","height":"$control.iconLg","borderRadius":"$radius.full","flexShrink":0},"$recipe":{"status":{"$cond":[{"$lt":["{index}","{props.current|0}"]},"done",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}]}},"children":[{"part":"check","component":"Icon","$if":{"$lt":["{index}","{props.current|0}"]},"props":{"name":"ui-check","size":"sm"}},{"part":"number","component":"Text","$if":{"$not":{"$lt":["{index}","{props.current|0}"]}},"props":{"text":{"$text":{"$add":["{index}",1]}},"variant":"caption"},"$recipe":{"status":{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}}}]},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","minWidth":0},"children":[{"part":"label","component":"Text","props":{"text":"{step.label}","variant":"label","lines":1},"$recipe":{"status":{"$cond":[{"$lt":["{index}","{props.current|0}"]},"done",{"$cond":[{"$eq":["{index}","{props.current|0}"]},"current","upcoming"]}]}}},{"part":"description","component":"Text","$if":"step.description","props":{"text":"{step.description}","variant":"muted","lines":2}}]}]}]}},"Rating":{"recipeProps":["size","readOnly"],"root":{"part":"root","component":"Box","$a11y":{"role":{"$cond":["props.readOnly","img","group"]},"label":{"$cond":["props.readOnly",{"$fill":["$string.ratingValue",{"value":"{props.value|0}","max":"{props.max|5}"}]}]}},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.xxs","alignSelf":"flex-start"},"children":[{"part":"star","component":"Box","$each":"range(props.max|5)","$as":"star","props":{"pressable":{"$not":"props.readOnly"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center"},"$recipe":{"filled":{"$lt":["{index}","{props.value|0}"]}},"$a11y":{"role":{"$cond":["props.readOnly","hidden","button"]},"label":{"$fill":["$string.ratingStar",{"value":{"$add":["{index}",1]},"max":"{props.max|5}"}]},"pressed":{"$eq":[{"$add":["{index}",1]},"{props.value|0}"]}},"$on":{"press":"change"},"$context":{"value":{"$add":["{index}",1]}},"$set":{"press":{"prop":"value","value":{"$add":["{index}",1]}}},"children":[{"part":"icon","component":"Icon","props":{"name":"star","size":"{props.size|default}"},"$recipe":{"filled":{"$lt":["{index}","{props.value|0}"]}}}]}]}},"AlertDialog":{"recipeProps":["destructive"],"root":{"part":"root","component":"Dialog","$a11y":{"role":"alertdialog"},"props":{"title":"{props.title}","description":"{props.description}","open":"{props.open|false}","dismissible":false},"slots":{"trigger":"$slot:trigger","footer":{"part":"footer","component":"Box","style":{"display":"flex","flexDirection":"row","justifyContent":"flex-end","flexWrap":"wrap","gap":"$spacing.sm"},"children":[{"part":"cancel","component":"Button","props":{"label":"{props.cancelLabel|$string.cancel}","variant":"outline"},"$a11y":{"autoFocus":true},"$on":{"press":"cancel"},"$set":{"press":{"prop":"open","value":false}}},{"part":"confirm","component":"Button","props":{"label":"{props.confirmLabel|$string.confirm}","variant":{"$cond":["props.destructive","destructive","default"]}},"$on":{"press":"confirm"},"$set":{"press":{"prop":"open","value":false}}}]}},"$on":{"change":"change"},"children":["$children"]}},"DockCard":{"recipeProps":["tone"],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column"},"children":[{"part":"trigger","component":"Box","$a11y":{"role":"button","label":"{props.label}: {props.title}"},"props":{"pressable":true},"style":{"display":"flex","flexDirection":"row","alignItems":"flex-start","gap":"$spacing.sm","padding":"$spacing.md","borderRadius":"$radius.xl"},"$on":{"press":"press"},"$set":{"press":{"prop":"open","value":true}},"children":[{"part":"icon","component":"Icon","$if":"props.icon","props":{"name":"{props.icon}","size":"sm","tone":"{props.tone|neutral}"},"style":{"flexShrink":0}},{"part":"body","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","flexGrow":1,"minWidth":0},"children":[{"part":"header","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"label","component":"Text","props":{"text":"{props.label}","variant":"caption","tone":"{props.tone|neutral}","lines":1}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","variant":"muted","lines":1},"style":{"flexShrink":1,"minWidth":0}},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},{"part":"meta","component":"Text","$if":"props.meta","props":{"text":"{props.meta}","variant":"muted","lines":1}}]},{"part":"row","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"title","component":"Text","props":{"text":"{props.title}","lines":1},"style":{"flexGrow":1,"minWidth":0}},{"part":"chevron","component":"Icon","props":{"name":"ui-chevron-right","size":"sm","tone":"neutral"}}]}]}]},{"part":"sheet","component":"Drawer","props":{"title":"{props.label}","description":"{props.caption}","open":"{props.open|false}","side":"bottom"},"slots":{"footer":"$slot:footer"},"$on":{"change":"change"},"children":["$children"]}]}},"Sparkline":{"recipeProps":["tone"],"root":{"part":"root","component":"Chart","props":{"kind":"sparkline","series":[{"name":"","values":"{props.values}","tone":"{props.tone|primary}"}],"height":"{props.height|24}","showAxes":false,"showGrid":false,"showLegend":false},"style":{"width":"100%"}}},"Page":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","flexGrow":1,"minHeight":0,"width":"100%"},"children":[{"part":"header","component":"AppBar","props":{"title":"{props.title}","subtitle":"{props.subtitle}","back":"{props.back|false}"},"slots":{"leading":"$slot:leading","trailing":"$slot:trailing"},"$on":{"back":"back"}},{"part":"body","component":"Box","$a11y":{"role":"main"},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"minHeight":0,"overflowY":"auto","gap":"$spacing.lg","padding":{"$map":{"from":"props.padded","cases":{"false":"$spacing.none"},"default":"$spacing.lg"}}},"children":["$children"]}]}},"Toolbar":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group"},"style":{"display":"flex","flexDirection":"row","flexWrap":"wrap","alignItems":"flex-end","gap":"$spacing.{props.gap|sm}","width":"100%"},"children":["$children",{"part":"spacer","component":"Box","style":{"flexGrow":1,"minWidth":0}},"$slot:trailing"]}},"SplitView":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"stretch","width":"100%","flexGrow":1,"minHeight":0},"children":[{"part":"list","component":"Box","$a11y":{"role":"navigation"},"style":{"display":"flex","flexDirection":"column","width":"{props.width|320}","flexShrink":0,"minHeight":0,"overflowY":"auto","@media (max-width: $breakpoint.md)":{"width":"100%","flexShrink":1,"display":{"$cond":["props.open","none","flex"]}}},"children":["$slot:list"]},{"part":"divider","component":"Separator","props":{"orientation":"vertical"},"style":{"@media (max-width: $breakpoint.md)":{"display":"none"}}},{"part":"detail","component":"Box","$a11y":{"role":"main"},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"minWidth":0,"minHeight":0,"@media (max-width: $breakpoint.md)":{"display":{"$cond":["props.open","flex","none"]}}},"children":[{"part":"backBar","component":"Box","style":{"display":"none","flexDirection":"row","alignItems":"center","height":"$control.appBar","paddingHorizontal":"$spacing.sm","@media (max-width: $breakpoint.md)":{"display":"flex"}},"children":[{"part":"back","component":"Button","props":{"icon":"ui-back","variant":"ghost","size":"icon","label":"$string.back"},"$on":{"press":"back"},"$set":{"press":{"prop":"open","value":false}}}]},"$children"]}]}},"FieldGroup":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group"},"style":{"display":"grid","gridTemplateColumns":"repeat(1, minmax(0, 1fr))","gap":"$spacing.md","alignItems":"start","@media (min-width: $breakpoint.md)":{"gridTemplateColumns":"repeat({props.columns|2}, minmax(0, 1fr))"}},"children":["$children"]}},"FormActions":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group"},"style":{"display":"flex","flexDirection":"row","flexWrap":"wrap","justifyContent":"flex-end","alignItems":"center","gap":"$spacing.sm","width":"100%"},"children":["$children",{"part":"cancel","component":"Button","$if":"props.cancel","props":{"label":"$string.cancel","variant":"outline"},"$on":{"press":"cancel"}},{"part":"submit","component":"Button","props":{"label":"{props.submit}","variant":{"$cond":["props.destructive","destructive","default"]},"submit":true}}]}},"StatTile":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.label}"},"style":{"display":"flex","flexDirection":"column","minWidth":0},"children":[{"part":"card","component":"Card","children":[{"part":"header","component":"Box","style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.sm"},"children":[{"part":"label","component":"Text","props":{"text":"{props.label}","variant":"muted","lines":1},"style":{"flexGrow":1,"flexShrink":1,"minWidth":0}},{"part":"delta","component":"Text","$if":"props.delta","props":{"text":"{props.delta}","variant":"caption","tone":"{props.tone|neutral}"}}]},{"part":"value","component":"Text","props":{"text":"{props.value}","variant":"title","lines":1}},{"part":"trend","component":"Sparkline","$if":"props.trend","props":{"values":"{props.trend}","height":32}}]}]}},"CallSurface":{"recipeProps":["state","muted"],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.name}"},"style":{"display":"flex","flexDirection":"column","alignItems":"center","width":"100%","height":"100%","minHeight":0,"paddingHorizontal":"$spacing.xl","paddingTop":"$spacing.xl3","paddingBottom":"$spacing.xl3"},"children":[{"part":"head","component":"Box","style":{"display":"flex","flexDirection":"column","alignItems":"center","width":"100%","maxWidth":384,"minWidth":0},"children":[{"part":"wave","component":"VoiceWave","props":{"activity":{"$cond":["props.muted","muted",{"$map":{"from":"props.state","cases":{"ringing":"thinking","connecting":"thinking","ended":"idle"},"default":"{props.activity|speaking}"}}]},"level":"{props.level}","bands":"{props.bands}","size":"xl"},"$a11y":{"hidden":true},"children":[{"part":"avatar","component":"Avatar","props":{"name":"{props.name}","src":"{props.avatar}","size":"lg"}}]},{"part":"name","component":"Text","$a11y":{"role":"heading","level":2},"props":{"text":"{props.name}","variant":"title","align":"center","lines":1},"style":{"marginTop":"$spacing.sm","maxWidth":"100%"}},{"part":"status","component":"Text","$if":"props.status","props":{"text":"{props.status}","variant":"muted","align":"center","lines":1},"style":{"marginTop":"$spacing.xs"}},{"part":"caption","component":"Text","$if":"props.caption","props":{"text":"{props.caption}","align":"center","lines":4,"live":"polite"},"style":{"marginTop":"$spacing.xl2","maxWidth":"100%"}}]},{"part":"spacer","component":"Box","style":{"flexGrow":1,"minHeight":"$spacing.xl"}},{"part":"controls","component":"Box","style":{"display":"flex","flexDirection":"row","justifyContent":"center","alignItems":"flex-start","gap":32},"children":[{"part":"muteTip","component":"Tooltip","$if":{"$not":{"$eq":["{props.state|talking}","ringing"]}},"props":{"content":{"$cond":["props.muted","$string.unmute","$string.mute"]}},"children":[{"part":"mute","component":"Button","props":{"variant":"secondary","size":"icon"},"$a11y":{"label":{"$cond":["props.muted","$string.unmute","$string.mute"]}},"style":{"width":56,"height":56,"borderRadius":"$radius.full","flexShrink":0},"$on":{"press":"mute"},"$context":{"muted":"{!props.muted}"},"$set":{"press":{"prop":"muted","value":"{!props.muted}"}},"children":[{"part":"muteIcon","component":"Icon","props":{"name":{"$cond":["props.muted","call-unmute","call-mute"]},"size":"lg"}}]}]},{"part":"speakerTip","component":"Tooltip","$if":[{"$not":{"$eq":["{props.state|talking}","ringing"]}},{"$not":{"$eq":["{props.speaker|none}","none"]}}],"props":{"content":{"$cond":["props.speaker","$string.speaker","$string.speakerOff"]}},"children":[{"part":"speaker","component":"Button","props":{"variant":"secondary","size":"icon"},"$a11y":{"label":{"$cond":["props.speaker","$string.speaker","$string.speakerOff"]}},"style":{"width":56,"height":56,"borderRadius":"$radius.full","flexShrink":0},"$on":{"press":"speaker"},"$context":{"speaker":"{!props.speaker}"},"$set":{"press":{"prop":"speaker","value":"{!props.speaker}"}},"children":[{"part":"speakerIcon","component":"Icon","props":{"name":{"$cond":["props.speaker","call-speaker","call-speaker-off"]},"size":"lg"}}]}]},{"part":"endTip","component":"Tooltip","$if":{"$not":{"$eq":["{props.state|talking}","ringing"]}},"props":{"content":"$string.endCall"},"children":[{"part":"end","component":"Button","props":{"variant":"destructive","size":"icon"},"$a11y":{"label":"$string.endCall"},"style":{"width":56,"height":56,"borderRadius":"$radius.full","flexShrink":0},"$on":{"press":"hangUp"},"children":[{"part":"endIcon","component":"Icon","props":{"name":"call-end","size":"lg"}}]}]},{"part":"cancel","component":"Box","$if":{"$eq":["{props.state|talking}","ringing"]},"style":{"display":"flex","flexDirection":"column","alignItems":"center","gap":"$spacing.xs"},"children":[{"part":"end","component":"Button","props":{"variant":"destructive","size":"icon"},"$a11y":{"label":"$string.cancel"},"style":{"width":56,"height":56,"borderRadius":"$radius.full","flexShrink":0},"$on":{"press":"hangUp"},"children":[{"part":"endIcon","component":"Icon","props":{"name":"call-end","size":"lg"}}]},{"part":"cancelLabel","component":"Text","props":{"text":"$string.cancel","variant":"caption"},"$a11y":{"hidden":true}}]}]}]}},"MessageBubble":{"recipeProps":["side","status"],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":{"$coalesce":["{props.author}","{props.time}"]}},"style":{"display":"flex","flexDirection":"column","alignItems":{"$map":{"from":"props.side","cases":{"out":"flex-end"},"default":"flex-start"}},"width":"100%","minWidth":0},"children":[{"part":"bubble","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","maxWidth":"80%","minWidth":0,"paddingHorizontal":"$spacing.md","paddingVertical":"$spacing.sm","borderRadius":"$radius.xl","borderTopLeftRadius":{"$map":{"from":"props.side","cases":{"out":"$radius.xl"},"default":6}}},"children":[{"part":"author","component":"Text","$if":["props.author",{"$not":{"$eq":["{props.side|in}","out"]}}],"props":{"text":"{props.author}","variant":"caption","lines":1}},"$slot:attachment",{"part":"text","component":"Markdown","props":{"text":"{props.text}"}},{"part":"footer","component":"Box","$any":["props.time","props.status"],"style":{"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"flex-end","alignSelf":"flex-end","gap":"$spacing.xs"},"children":[{"part":"time","component":"Text","$if":"props.time","props":{"text":"{props.time}","variant":"caption","lines":1}},{"part":"status","component":"Icon","$if":["props.status",{"$eq":["{props.side|in}","out"]}],"props":{"name":{"$map":{"from":"props.status","cases":{"sending":"ui-clock","sent":"ui-check","read":"ui-read"},"default":"ui-check"}},"size":"sm","label":{"$map":{"from":"props.status","cases":{"sending":"$string.sending","sent":"$string.sent","read":"$string.read"},"default":"$string.sent"}}},"style":{"width":14,"height":14,"flexShrink":0}}]}]}]}},"Plan":{"recipeProps":["state"],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.title}"},"style":{"display":"flex","flexDirection":"column","minWidth":0},"children":[{"part":"card","component":"Card","children":[{"part":"header","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.xxs","minWidth":0},"children":[{"part":"title","component":"Heading","props":{"text":"{props.title}","level":"h3"}},{"part":"description","component":"Text","$if":"props.description","props":{"text":"{props.description}","variant":"muted"}}]},{"part":"steps","component":"Trace","$if":"props.steps","children":[{"part":"step","component":"TraceItem","$each":"props.steps","$as":"step","props":{"title":"{step.title}","icon":"{step.icon}","description":"{step.detail}","status":"{step.status}"}}]},{"part":"footer","component":"Box","$if":{"$eq":["{props.state|proposed}","proposed"]},"style":{"display":"flex","flexDirection":"row","alignItems":"center","justifyContent":"flex-end","flexWrap":"wrap","gap":"$spacing.sm"},"children":[{"part":"decline","component":"Button","props":{"label":"{props.declineLabel|$string.no}","variant":"outline"},"$on":{"press":"decline"}},{"part":"approve","component":"Button","props":{"label":"{props.approveLabel|$string.yes}","icon":"ui-check","variant":"default"},"$on":{"press":"approve"}}]},{"part":"running","component":"Box","$if":{"$eq":["{props.state|proposed}","running"]},"style":{"display":"flex","flexDirection":"row","alignItems":"center","gap":"$spacing.md"},"children":[{"part":"progress","component":"Progress","props":{"value":"{props.progress|0}","max":1,"tone":"primary"},"style":{"flexGrow":1,"flexShrink":1,"flexBasis":0,"minWidth":0}},{"part":"stop","component":"Button","props":{"label":"{props.stopLabel|$string.stop}","icon":"ui-stop","variant":"destructive"},"$on":{"press":"stop"}}]}]}]}},"Mosaic":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"group","label":"{props.label}"},"style":{"display":"flex","flexDirection":"row","width":"100%","aspectRatio":1.6,"minWidth":0},"children":[{"part":"lead","component":"Box","$if":"props.pictures.0","props":{"pressable":true},"style":{"position":"relative","overflow":"hidden","minWidth":0,"minHeight":0,"cursor":"pointer","flexGrow":{"$cond":[{"$lt":[2,"{len(props.pictures)}"]},0,1]},"flexShrink":{"$cond":[{"$lt":[2,"{len(props.pictures)}"]},0,1]},"flexBasis":{"$cond":[{"$lt":[2,"{len(props.pictures)}"]},"60%",0]},"height":"100%"},"$recipe":{"size":{"$cond":[{"$lt":[2,"{len(props.pictures)}"]},"large",{"$cond":[{"$lt":[1,"{len(props.pictures)}"]},"half","large"]}]}},"$a11y":{"role":"button","label":"{props.pictures.0.alt}"},"$on":{"press":"select"},"$context":{"index":0},"children":[{"part":"image","component":"Image","props":{"src":"{props.pictures.0.src}","alt":"{props.pictures.0.alt}","fit":"cover"},"$a11y":{"hidden":true},"style":{"position":"absolute","inset":0,"width":"100%","height":"100%"}}]},{"part":"pair","component":"Box","$if":[{"$eq":["{len(props.pictures)}",2]}],"props":{"pressable":true},"style":{"position":"relative","overflow":"hidden","minWidth":0,"minHeight":0,"cursor":"pointer","flexGrow":1,"flexShrink":1,"flexBasis":0,"height":"100%"},"$recipe":{"size":"half"},"$a11y":{"role":"button","label":"{props.pictures.1.alt}"},"$on":{"press":"select"},"$context":{"index":1},"children":[{"part":"image","component":"Image","props":{"src":"{props.pictures.1.src}","alt":"{props.pictures.1.alt}","fit":"cover"},"$a11y":{"hidden":true},"style":{"position":"absolute","inset":0,"width":"100%","height":"100%"}}]},{"part":"side","component":"Box","$if":{"$lt":[2,"{len(props.pictures)}"]},"style":{"display":"flex","flexDirection":"column","flexGrow":1,"flexShrink":1,"flexBasis":0,"minWidth":0,"height":"100%"},"children":[{"part":"top","component":"Box","$if":"props.pictures.1","props":{"pressable":true},"style":{"position":"relative","overflow":"hidden","minWidth":0,"minHeight":0,"cursor":"pointer","flexGrow":1,"flexShrink":1,"flexBasis":0,"width":"100%"},"$recipe":{"size":"small"},"$a11y":{"role":"button","label":"{props.pictures.1.alt}"},"$on":{"press":"select"},"$context":{"index":1},"children":[{"part":"image","component":"Image","props":{"src":"{props.pictures.1.src}","alt":"{props.pictures.1.alt}","fit":"cover"},"$a11y":{"hidden":true},"style":{"position":"absolute","inset":0,"width":"100%","height":"100%"}}]},{"part":"bottom","component":"Box","$if":"props.pictures.2","props":{"pressable":true},"style":{"position":"relative","overflow":"hidden","minWidth":0,"minHeight":0,"cursor":"pointer","flexGrow":1,"flexShrink":1,"flexBasis":0,"width":"100%"},"$recipe":{"size":"small"},"$a11y":{"role":"button","label":{"$cond":[{"$lt":[3,"{len(props.pictures)}"]},{"$fill":["$string.morePicturesLabel",{"alt":"{props.pictures.2.alt}","count":{"$sub":["{len(props.pictures)}",3]}}]},"{props.pictures.2.alt}"]}},"$on":{"press":"select"},"$context":{"index":2},"children":[{"part":"image","component":"Image","props":{"src":"{props.pictures.2.src}","alt":"{props.pictures.2.alt}","fit":"cover"},"$a11y":{"hidden":true},"style":{"position":"absolute","inset":0,"width":"100%","height":"100%"}},{"part":"more","component":"Box","$if":{"$lt":[3,"{len(props.pictures)}"]},"$a11y":{"hidden":true},"style":{"position":"absolute","inset":0,"display":"flex","alignItems":"center","justifyContent":"center"},"children":[{"part":"moreLabel","component":"Text","props":{"text":{"$fill":["$string.morePictures",{"count":{"$sub":["{len(props.pictures)}",3]}}]},"lines":1}}]}]}]}]}},"Calendar":{"recipeProps":["view"],"root":{"part":"root","component":"Box","$a11y":{"role":"table"},"style":{"display":"flex","flexDirection":"column","width":"100%","gap":"$spacing.none","@media (form-factor: phone)":{"gap":"$spacing.md"},"minHeight":"$control.row"},"children":[{"part":"frame","component":"Box","$if":"props.source","style":{"display":"flex","flexDirection":"column","width":"100%","overflow":"hidden","borderRadius":"$radius.lg","borderWidth":"$border.hairline","@media (form-factor: phone)":{"borderWidth":0,"borderRadius":0}},"children":[{"part":"head","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))"},"$template":{"path":"{props.source}/month/weeks/0/days","key":"date","item":{"part":"weekday","component":"Box","style":{"paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","@media (form-factor: phone)":{"display":"flex","justifyContent":"center"}},"children":[{"part":"weekdayName","component":"Text","props":{"text":{"path":"weekday"},"variant":"caption"},"style":{"@media (form-factor: phone)":{"display":"none"}}},{"part":"weekdayInitial","component":"Text","props":{"text":{"path":"initial"},"variant":"caption"},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex"}}}]}},"$if":{"$eq":["{props.view|month}","month"]}},{"part":"head","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))"},"$template":{"path":"{props.source}/week/days","key":"date","item":{"part":"weekday","component":"Box","style":{"paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","@media (form-factor: phone)":{"display":"flex","justifyContent":"center"}},"children":[{"part":"weekdayName","component":"Text","props":{"text":{"path":"weekday"},"variant":"caption"},"style":{"@media (form-factor: phone)":{"display":"none"}}},{"part":"weekdayInitial","component":"Text","props":{"text":{"path":"initial"},"variant":"caption"},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex"}}}]}},"$if":{"$eq":["{props.view|month}","week"]}},{"part":"weeks","component":"Box","$if":{"$eq":["{props.view|month}","month"]},"style":{"display":"flex","flexDirection":"column"},"$template":{"path":"{props.source}/month/weeks","key":"key","item":{"part":"week","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","minWidth":0},"children":[{"part":"shade","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1","@media (form-factor: phone)":{"display":"none"}},"$template":{"path":"days","key":"date","item":{"part":"shadeCell","component":"Box","$recipe":{"weekend":{"path":"weekend"}},"style":{"borderTopWidth":"$border.hairline","borderRightWidth":"$border.hairline","minWidth":0}}}},{"part":"cells","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1"},"$template":{"path":"days","key":"date","item":{"part":"day","component":"Box","props":{"pressable":true},"$on":{"press":"select"},"$a11y":{"role":"button","label":{"path":"date"},"selected":{"path":"selected"}},"style":{"display":"flex","flexDirection":"column","alignItems":"flex-start","padding":"$spacing.xs","minHeight":"$control.textarea","minWidth":0,"@media (form-factor: phone)":{"alignItems":"stretch","minHeight":0,"padding":"$spacing.xxs"}},"children":[{"part":"number","component":"Box","$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","minWidth":"$control.badge","height":"$control.badge","paddingHorizontal":"$spacing.xxs","borderRadius":"$radius.full","@media (form-factor: phone)":{"display":"none"}},"children":[{"part":"numberText","component":"Text","props":{"text":{"path":"day"},"variant":"caption"},"$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}}}]},{"part":"compact","component":"Box","$recipe":{"selected":{"path":"selected"}},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex","flexDirection":"column","alignItems":"center","gap":"$spacing.xxs","paddingVertical":"$spacing.sm","borderRadius":"$radius.lg"}},"children":[{"part":"compactNumber","component":"Box","$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","minWidth":"$control.badge","height":"$control.badge","paddingHorizontal":"$spacing.xxs","borderRadius":"$radius.full"},"children":[{"part":"compactNumberText","component":"Text","props":{"text":{"path":"day"},"variant":"caption"},"$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}}}]},{"part":"dots","component":"Box","style":{"display":"flex","flexDirection":"row","gap":"$spacing.xxs","justifyContent":"center","height":"$spacing.sm"},"$template":{"path":"dots","item":{"part":"dot","component":"Box","$recipe":{"tone":{"path":"tone"}},"style":{"width":"$radius.sm","height":"$radius.sm","borderRadius":"$radius.full"}}}}]}]}}},{"part":"bars","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1","alignContent":"start","rowGap":"$spacing.xxs","paddingTop":"$spacing.xl2","paddingBottom":"$spacing.xs","@media (form-factor: phone)":{"display":"none"}},"$template":{"path":"segments","key":"id","item":{"part":"segment","component":"Box","props":{"pressable":true},"$on":{"press":"open"},"$recipe":{"tone":{"path":"tone"},"marker":{"$lt":[0,{"path":"more"}]},"contL":{"path":"contL"},"contR":{"path":"contR"}},"style":{"display":"flex","alignItems":"center","height":"$control.badge","minWidth":0,"overflow":"hidden","paddingHorizontal":"$spacing.xs","borderRadius":"$radius.sm","gridColumn":{"call":"concat","args":{"values":[{"path":"col"}," / span ",{"path":"span"}]}},"gridRow":{"call":"concat","args":{"values":[{"call":"add","args":{"a":{"path":"lane"},"b":1}}," / span 1"]}},"marginLeft":{"$cond":[{"path":"contL"},0,"$spacing.xxs"]},"marginRight":{"$cond":[{"path":"contR"},0,"$spacing.xxs"]}},"children":[{"part":"label","component":"Text","$if":{"$eq":[{"path":"more"},0]},"props":{"text":{"path":"row/{props.labelField|title}"},"variant":"caption","lines":1}},{"part":"more","component":"Text","$if":{"$lt":[0,{"path":"more"}]},"props":{"text":{"$fill":["$string.calendarMore",{"count":{"path":"more"}}]},"variant":"caption","lines":1}}]}}}]}}},{"part":"week","component":"Box","$if":{"$eq":["{props.view|month}","week"]},"style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","minWidth":0,"minHeight":"$control.toast"},"children":[{"part":"shade","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1","@media (form-factor: phone)":{"display":"none"}},"$template":{"path":"{props.source}/week/days","key":"date","item":{"part":"shadeCell","component":"Box","$recipe":{"weekend":{"path":"weekend"}},"style":{"borderTopWidth":"$border.hairline","borderRightWidth":"$border.hairline","minWidth":0}}}},{"part":"cells","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1"},"$template":{"path":"{props.source}/week/days","key":"date","item":{"part":"day","component":"Box","props":{"pressable":true},"$on":{"press":"select"},"$a11y":{"role":"button","label":{"path":"date"},"selected":{"path":"selected"}},"style":{"display":"flex","flexDirection":"column","alignItems":"flex-start","padding":"$spacing.xs","minHeight":"$control.textarea","minWidth":0,"@media (form-factor: phone)":{"alignItems":"stretch","minHeight":0,"padding":"$spacing.xxs"}},"children":[{"part":"number","component":"Box","$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","minWidth":"$control.badge","height":"$control.badge","paddingHorizontal":"$spacing.xxs","borderRadius":"$radius.full","@media (form-factor: phone)":{"display":"none"}},"children":[{"part":"numberText","component":"Text","props":{"text":{"path":"day"},"variant":"caption"},"$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}}}]},{"part":"compact","component":"Box","$recipe":{"selected":{"path":"selected"}},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex","flexDirection":"column","alignItems":"center","gap":"$spacing.xxs","paddingVertical":"$spacing.sm","borderRadius":"$radius.lg"}},"children":[{"part":"compactNumber","component":"Box","$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}},"style":{"display":"flex","alignItems":"center","justifyContent":"center","minWidth":"$control.badge","height":"$control.badge","paddingHorizontal":"$spacing.xxs","borderRadius":"$radius.full"},"children":[{"part":"compactNumberText","component":"Text","props":{"text":{"path":"day"},"variant":"caption"},"$recipe":{"inMonth":{"path":"inMonth"},"today":{"path":"today"}}}]},{"part":"dots","component":"Box","style":{"display":"flex","flexDirection":"row","gap":"$spacing.xxs","justifyContent":"center","height":"$spacing.sm"},"$template":{"path":"dots","item":{"part":"dot","component":"Box","$recipe":{"tone":{"path":"tone"}},"style":{"width":"$radius.sm","height":"$radius.sm","borderRadius":"$radius.full"}}}}]}]}}},{"part":"bars","component":"Box","style":{"display":"grid","gridTemplateColumns":"repeat(7, minmax(0, 1fr))","gridColumn":"1 / span 7","gridRow":"1 / span 1","alignContent":"start","rowGap":"$spacing.xxs","paddingTop":"$spacing.xl2","paddingBottom":"$spacing.xs","@media (form-factor: phone)":{"display":"none"}},"$template":{"path":"{props.source}/week/segments","key":"id","item":{"part":"segment","component":"Box","props":{"pressable":true},"$on":{"press":"open"},"$recipe":{"tone":{"path":"tone"},"marker":{"$lt":[0,{"path":"more"}]},"contL":{"path":"contL"},"contR":{"path":"contR"}},"style":{"display":"flex","alignItems":"center","height":"$control.badge","minWidth":0,"overflow":"hidden","paddingHorizontal":"$spacing.xs","borderRadius":"$radius.sm","gridColumn":{"call":"concat","args":{"values":[{"path":"col"}," / span ",{"path":"span"}]}},"gridRow":{"call":"concat","args":{"values":[{"call":"add","args":{"a":{"path":"lane"},"b":1}}," / span 1"]}},"marginLeft":{"$cond":[{"path":"contL"},0,"$spacing.xxs"]},"marginRight":{"$cond":[{"path":"contR"},0,"$spacing.xxs"]}},"children":[{"part":"label","component":"Text","$if":{"$eq":[{"path":"more"},0]},"props":{"text":{"path":"row/{props.labelField|title}"},"variant":"caption","lines":1}},{"part":"more","component":"Text","$if":{"$lt":[0,{"path":"more"}]},"props":{"text":{"$fill":["$string.calendarMore",{"count":{"path":"more"}}]},"variant":"caption","lines":1}}]}}}]}]},{"part":"agenda","component":"Section","$if":["props.source",{"$eq":["{props.view|month}","month"]}],"props":{"title":{"path":"{props.source}/month/agenda/label"},"count":{"path":"{props.source}/month/agenda/count"}},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex"}},"$template":{"path":"{props.source}/month/agenda/items","key":"id","item":{"part":"entry","component":"Row","props":{"title":{"path":"row/{props.labelField|title}"},"subtitle":{"path":"row/{props.detailField|detail}"},"meta":{"path":"row/{props.metaField|status}"},"pressable":true},"$on":{"press":"open"},"slots":{"leading":{"part":"entryTone","component":"Box","$recipe":{"tone":{"path":"tone"}},"style":{"width":"$spacing.xs","height":"$control.iconLg","borderRadius":"$radius.full"}}}}}}]}},"Timeline":{"recipeProps":[],"root":{"part":"root","component":"Box","$a11y":{"role":"table"},"style":{"display":"flex","flexDirection":"column","width":"100%","overflow":"hidden","borderRadius":"$radius.lg","borderWidth":"$border.hairline","minHeight":"$control.row"},"children":[{"part":"bandsRow","component":"Box","$if":"props.source","style":{"display":"flex","flexDirection":"row"},"children":[{"part":"corner","component":"Box","style":{"width":"18%","flexShrink":0,"minWidth":0,"@media (form-factor: phone)":{"width":"30%"},"paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","borderRightWidth":"$border.hairline"},"children":[{"part":"cornerLabel","component":"Text","$if":"props.rowTitle","props":{"text":"{props.rowTitle}","variant":"caption","lines":1}}]},{"part":"bands","component":"Box","style":{"display":"grid","gridTemplateColumns":{"call":"concat","args":{"values":["repeat(",{"call":"len","args":{"value":{"path":"{props.source}/timeline/columns"}}},", minmax(0, 1fr))"]}},"flexGrow":1,"minWidth":0},"$template":{"path":"{props.source}/timeline/bands","key":"col","item":{"part":"band","component":"Box","style":{"gridColumn":{"call":"concat","args":{"values":[{"path":"col"}," / span ",{"path":"span"}]}},"paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","minWidth":0,"borderLeftWidth":"$border.hairline"},"children":[{"part":"bandLabel","component":"Text","props":{"text":{"path":"label"},"variant":"label","lines":1}}]}}}]},{"part":"columnsRow","component":"Box","$if":"props.source","style":{"display":"flex","flexDirection":"row","borderTopWidth":"$border.hairline"},"children":[{"part":"columnsCorner","component":"Box","style":{"width":"18%","flexShrink":0,"minWidth":0,"@media (form-factor: phone)":{"width":"30%"},"borderRightWidth":"$border.hairline"}},{"part":"columns","component":"Box","style":{"display":"grid","gridTemplateColumns":{"call":"concat","args":{"values":["repeat(",{"call":"len","args":{"value":{"path":"{props.source}/timeline/columns"}}},", minmax(0, 1fr))"]}},"flexGrow":1,"minWidth":0},"$template":{"path":"{props.source}/timeline/columns","key":"key","item":{"part":"column","component":"Box","$recipe":{"today":{"path":"today"}},"style":{"paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","minWidth":0,"borderLeftWidth":"$border.hairline"},"children":[{"part":"columnLabel","component":"Text","$recipe":{"today":{"path":"today"}},"props":{"text":{"path":"label"},"variant":"caption","lines":1}}]}}}]},{"part":"rows","component":"Box","$if":"props.source","style":{"display":"flex","flexDirection":"column"},"$template":{"path":"{props.source}/timeline/rows","key":"key","item":{"part":"row","component":"Box","style":{"display":"flex","flexDirection":"row","minWidth":0,"borderTopWidth":"$border.hairline"},"children":[{"part":"rowHead","component":"Box","style":{"width":"18%","flexShrink":0,"minWidth":0,"@media (form-factor: phone)":{"width":"30%"},"display":"flex","flexDirection":"column","justifyContent":"center","gap":"$spacing.xxs","paddingHorizontal":"$spacing.sm","paddingVertical":"$spacing.xs","borderRightWidth":"$border.hairline"},"children":[{"part":"rowLabel","component":"Text","props":{"text":{"path":"key"},"variant":"body","lines":1}},{"part":"rowCount","component":"Text","$if":"props.showCount","props":{"text":{"$text":{"path":"count"}},"variant":"muted","lines":1}}]},{"part":"track","component":"Box","style":{"display":"grid","flexGrow":1,"minWidth":0,"position":"relative"},"children":[{"part":"cells","component":"Box","style":{"display":"grid","gridTemplateColumns":{"call":"concat","args":{"values":["repeat(",{"call":"len","args":{"value":{"path":"{props.source}/timeline/columns"}}},", minmax(0, 1fr))"]}},"gridColumn":"1 / span 1","gridRow":"1 / span 1","minWidth":0},"$template":{"path":"{props.source}/timeline/columns","key":"key","item":{"part":"cell","component":"Box","style":{"minWidth":0,"borderLeftWidth":"$border.hairline"}}}},{"part":"bars","component":"Box","style":{"display":"grid","gridTemplateColumns":{"call":"concat","args":{"values":["repeat(",{"call":"len","args":{"value":{"path":"{props.source}/timeline/columns"}}},", minmax(0, 1fr))"]}},"gridColumn":"1 / span 1","gridRow":"1 / span 1","alignContent":"center","rowGap":"$spacing.xxs","paddingVertical":"$spacing.sm","minWidth":0},"$template":{"path":"items","key":"id","item":{"part":"bar","component":"Box","props":{"pressable":true},"$on":{"press":"open"},"$recipe":{"tone":{"path":"tone"},"contL":{"path":"contL"},"contR":{"path":"contR"}},"style":{"display":"flex","alignItems":"center","height":"$control.badge","minWidth":0,"overflow":"hidden","paddingHorizontal":"$spacing.xs","borderRadius":"$radius.sm","marginHorizontal":"$spacing.xxs","gridColumn":{"call":"concat","args":{"values":[{"path":"col"}," / span ",{"path":"span"}]}},"gridRow":{"call":"concat","args":{"values":[{"call":"add","args":{"a":{"path":"lane"},"b":1}}," / span 1"]}}},"children":[{"part":"barLabel","component":"Text","props":{"text":{"path":"row/{props.labelField|title}"},"variant":"caption","lines":1}}]}}},{"part":"now","component":"Box","$if":{"path":"{props.source}/timeline/now"},"style":{"position":"absolute","top":0,"bottom":0,"width":"$control.hairline","left":{"call":"concat","args":{"values":[{"path":"{props.source}/timeline/now/percent"},"%"]}}}}]}]}}}]}},"RecordForm":{"recipeProps":[],"root":{"part":"root","component":"Form","props":{"name":"{props.kind}","disabled":"{props.readOnly|false}"},"$on":{"submit":"submit"},"children":[{"part":"unknown","component":"EmptyState","$if":"props.missing","props":{"icon":"ui-error","title":"$string.unknownKind","size":"list"}},{"part":"fields","component":"FieldGroup","$if":{"$not":"props.missing"},"props":{"columns":2},"children":[{"part":"field","component":"Box","$each":"props.fields","$as":"field","style":{"display":"flex","flexDirection":"column","minWidth":0,"gridColumn":{"$cond":["field.wide","1 / -1","auto"]}},"children":[{"part":"text","component":"Input","$if":{"$eq":["{field.widget}","text"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","placeholder":"{field.placeholder}","checks":"{field.checks}"}},{"part":"textarea","component":"Textarea","$if":{"$eq":["{field.widget}","textarea"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","placeholder":"{field.placeholder}","rows":3,"autosize":true,"checks":"{field.checks}"}},{"part":"number","component":"NumberField","$if":{"$eq":["{field.widget}","number"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","min":"{field.min}","max":"{field.max}","step":"{field.step}","precision":"{field.precision}","placeholder":"{field.placeholder}","checks":"{field.checks}"}},{"part":"switch","component":"Switch","$if":{"$eq":["{field.widget}","switch"]},"props":{"label":"{field.label}","name":"{field.name}","checked":"{field.value}","description":"{field.placeholder}"}},{"part":"select","component":"Select","$if":{"$eq":["{field.widget}","select"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","options":"{field.options}","source":"{field.source}","searchable":"{field.searchable|false}","multiple":"{field.multiple|false}","placeholder":"{field.placeholder}","checks":"{field.checks}"}},{"part":"date","component":"DatePicker","$if":{"$eq":["{field.widget}","date"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","placeholder":"{field.placeholder}"}},{"part":"time","component":"TimePicker","$if":{"$eq":["{field.widget}","time"]},"props":{"label":"{field.label}","name":"{field.name}","value":"{field.value}","placeholder":"{field.placeholder}"}},{"part":"chips","component":"ChipInput","$if":{"$eq":["{field.widget}","chips"]},"props":{"label":"{field.label}","name":"{field.name}","values":"{field.value}","max":"{field.max}","placeholder":"{field.placeholder}","checks":"{field.checks}"}}]}]},{"part":"actions","component":"FormActions","$if":[{"$not":"props.readOnly"},{"$not":"props.missing"}],"props":{"submit":"{props.submitLabel|$string.save}","cancel":"{props.cancel|false}"},"$on":{"cancel":"cancel"}}]}},"RecordTable":{"recipeProps":[],"root":{"part":"root","component":"Box","style":{"display":"flex","flexDirection":"column","gap":"$spacing.md","minWidth":0},"children":[{"part":"unknown","component":"EmptyState","$if":"props.missing","props":{"icon":"ui-error","title":"$string.unknownKind","size":"list"}},{"part":"toolbar","component":"Toolbar","$if":{"$not":"props.missing"},"children":[{"part":"count","component":"Text","props":{"text":"{props.count}","variant":"muted"}}],"slots":{"trailing":{"part":"add","component":"Button","$if":{"$map":{"from":"props.add","cases":{"false":false},"default":true}},"props":{"label":"$string.add","icon":"ui-add","variant":"outline","size":"sm"},"$on":{"press":"add"}}}},{"part":"loading","component":"Skeleton","$if":[{"$not":"props.missing"},"props.loading"],"props":{"rows":3}},{"part":"table","component":"Table","$if":[{"$not":"props.missing"},{"$not":"props.loading"}],"props":{"columns":"{props.cols}","rows":"{props.rows}","density":"compact","stickyHeader":true,"emptyText":"$string.noRecords"},"style":{"@media (form-factor: phone)":{"display":"none"}},"slots":{"menu":{"part":"menu","component":"Box","style":{"display":"flex","flexDirection":"row","justifyContent":"flex-end","gap":"$spacing.xxs"},"children":[{"part":"edit","component":"Button","$if":{"$map":{"from":"props.editable","cases":{"false":false},"default":true}},"props":{"icon":"ui-edit","variant":"ghost","size":"icon"},"$a11y":{"label":"$string.edit"},"$on":{"press":"edit"}},{"part":"delete","component":"Button","$if":{"$map":{"from":"props.editable","cases":{"false":false},"default":true}},"props":{"icon":"ui-delete","variant":"ghost","size":"icon"},"$a11y":{"label":"$string.delete"},"$on":{"press":"delete"}}]}}},{"part":"list","component":"List","$if":[{"$not":"props.missing"},{"$not":"props.loading"}],"props":{"divided":true},"style":{"display":"none","@media (form-factor: phone)":{"display":"flex"}},"children":["$children"]},{"part":"editor","component":"Drawer","$if":[{"$not":"props.missing"},{"$map":{"from":"props.editable","cases":{"false":false},"default":true}}],"props":{"title":"{props.title}","open":"{props.editorOpen|false}","side":"right"},"children":[{"part":"form","component":"RecordForm","props":{"kind":"{props.kind}","fields":"{props.fields}","path":"{props.path}","recordId":"{props.editorId}","cancel":true},"$on":{"submit":"submit","cancel":"cancel"}}]},{"part":"confirm","component":"Dialog","$if":[{"$not":"props.missing"},{"$map":{"from":"props.editable","cases":{"false":false},"default":true}}],"$a11y":{"role":"alertdialog"},"props":{"title":"$string.deleteRecord","description":"$string.deleteRecordBody","open":"{props.deleteOpen|false}"},"children":[{"part":"confirmForm","component":"Form","props":{"name":"delete"},"$on":{"submit":"confirm"},"children":[{"part":"confirmActions","component":"FormActions","props":{"submit":"$string.delete","cancel":true,"destructive":true},"$on":{"cancel":"cancelDelete"}}]}]}]}}}'),Lv={macros:Nv},Lt=gv,jr=Lt.id,bu=Lt.liteId,La=yu.from,vu=yu.version,xi=Lt.unknownComponent,jv=Lv.macros,yt=(()=>{const e={};for(const[t,n]of Object.entries(Iv))if(!t.startsWith("$"))if(Array.isArray(n))e[t]=n;else for(const[r,o]of Object.entries(n))e[`${t}.${r}`]=o;return e})(),Bv=/^\$([a-z][a-zA-Z0-9]*(?:\.[a-z][a-zA-Z0-9]*)*)\.([a-zA-Z0-9]+)$/;function tr(e){if(typeof e!="string")return null;const t=Bv.exec(e);return t?{group:t[1],name:t[2]}:null}function im(e){const t=tr(e);return t!==null&&(yt[t.group]?.includes(t.name)??!1)}function gs(e){return Object.assign(Object.create(null),e)}function Mo(e=[]){const t={components:gs(Lt.components),enums:gs(Lt.enums),defs:gs(Lt.defs),macros:gs(jv)};for(const n of e)Object.assign(t.components,n.components),Object.assign(t.enums,n.enums??{}),Object.assign(t.defs,n.defs??{}),Object.assign(t.macros,n.macros??{});return t}let Wv;const Hd=new WeakMap;function Ki(e=[]){if(e.length===0)return Wv??=Mo();let t=Hd.get(e);return t||Hd.set(e,t=Mo(e)),t}const Hv=["Box","Stack","Grid","Card","Separator","List","Resizable","ScrollArea","Sidebar","SplitView","AppBar","Page","Toolbar","Section","Group","Text","Heading","Markdown","CodeBlock","Kbd","Label","Image","ZoomableImage","Icon","Video","AudioPlayer","Avatar","QrCode","Carousel","Mosaic","Tabs","Segmented","Accordion","Collapsible","Trace","TraceItem","Plan","Pagination","Breadcrumb","Outline","Stepper","Dialog","Drawer","DockCard","AlertDialog","Popover","Tooltip","Menu","Toast","Badge","Alert","Chip","EmptyState","Progress","Meter","Ring","Spinner","Skeleton","VoiceWave","CallSurface","Table","Chart","Sparkline","StatTile","Button","Link","Toggle","Form","FieldGroup","FormActions","Input","Textarea","NumberField","Checkbox","Radio","ChoiceTiles","Switch","Slider","Rating","Select","SearchList","ChipInput","DatePicker","DateRangePicker","TimePicker","FileUpload","QrScanner","Composer","Row","MessageBubble","TreeGuides","Unknown","Motion","Calendar","Timeline","RecordForm","RecordTable"],sm=["a-large-small","action-chat","action-create","action-default","action-repository","action-run","action-suggestion","activity","anchor","app-editor-chat","archive","archive-restore","arrow-down","arrow-down-left","arrow-left","arrow-left-right","arrow-right","arrow-up-right","at-sign","atom","audio-lines","auth-passkey","award","ban","bell","bell-off","bold","book-open","bookmark","bot","boxes","braces","brain","briefcase","brush-cleaning","bug","building","building-2","calculator","calendar","calendar-days","call-end","call-incoming","call-mute","call-speaker","call-speaker-off","call-unmute","camera","car","chart-line","check","check-check","chevron-down","chevron-left","chevron-right","chevron-up","chevrons-up-down","ci-failed","ci-passed","ci-queued","ci-running","ci-skipped","circle","circle-arrow-up","circle-check","circle-dashed","circle-dot","circle-question-mark","circle-slash","circle-stop","circle-user","circle-x","clipboard-list","clock","cloud","code","coding-assistant","coding-command","coding-compact","coding-diff","coding-ended","coding-in-review","coding-needs-input","coding-plan","coding-running","coding-stop","coding-subagent","coding-tool","coffee","compass","computer","copy","corner-down-right","cpu","credit-card","crown","database","download","droplet","dumbbell","ear","editor-bold","editor-clear-formatting","editor-code","editor-emoji","editor-heading-1","editor-heading-2","editor-heading-3","editor-image","editor-issue-ref","editor-italic","editor-link","editor-list","editor-list-ordered","editor-list-todo","editor-mention","editor-quote","editor-strikethrough","editor-text","editor-text-format","editor-unlink","ellipsis","ellipsis-vertical","event-assignee-changed","event-board-moved","event-estimate-changed","event-label-added","event-label-removed","event-priority-changed","event-relation-added","event-relation-removed","event-status-changed","event-title-changed","external-link","eye","eye-off","fast-forward","file","file-diff","file-pen-line","file-text","fingerprint","flag","flame","flask-conical","fold-vertical","folder","folder-kanban","folder-open","gamepad-2","gauge","gem","gift","git-branch","git-merge","git-pull-request","github","globe","graduation-cap","guide-changes","hammer","hand","hard-drive","hash","heading-1","heading-2","heading-3","headphones","heart","heart-off","history","hourglass","house","image","images","inbox","info","italic","key","landmark","laptop","layers","layers-2","layout-grid","leaf","lightbulb","link","link-2","list","list-checks","list-end","list-ordered","list-todo","list-tree","loader-circle","lock","lock-open","log-in","log-out","mail","mail-open","map","map-pin","maximize-2","media-fast-forward","media-rewind","media-skip-next","media-skip-previous","media-volume-down","media-volume-mute","media-volume-off","media-volume-up","megaphone","menu","message-circle","message-square","message-square-plus","message-square-reply","mic","mic-off","microscope","minimize-2","minus","monitor","monitor-off","moon","mountain","move","music","nav-account","nav-actions","nav-admin","nav-apps","nav-boards","nav-changelog","nav-computer","nav-create-issue","nav-devices","nav-drafts","nav-files","nav-getting-started","nav-inbox","nav-issues","nav-my-issues","nav-notifications","nav-rail-collapse","nav-rail-expand","nav-report-bug","nav-search","nav-settings","nav-sign-out","nav-source-control","nav-team-switcher","nav-terminal","nav-threads","newspaper","notification-agent-message","notification-agent-signed-out","notification-issue-assigned","notification-issue-comment","notification-issue-created","notification-issue-mention","notification-issue-status-changed","notification-mark-read","notification-mute","notification-pr-merged","notification-pr-opened","notification-reporter-reply","notification-session-blocked","os-apple","os-linux","os-windows","package","paintbrush","palette","panel-left-close","panel-left-open","paperclip","pause","pen-tool","pencil","phone","phone-incoming","phone-off","pin","pin-off","plane","play","plug","plus","pr-batch","pr-closed","pr-draft","pr-merged","pr-open","pr-stack","printer","priority-high","priority-low","priority-medium","priority-none","priority-urgent","progress-1-4","progress-1-5","progress-2-4","progress-2-5","progress-3-4","progress-3-5","progress-4-5","puzzle","qr-code","quote","refresh-cw","relation-blocked-by","relation-blocks","relation-duplicate","relation-parent","relation-related","relation-section","relation-sub-issue","remove-formatting","repeat","rewind","rocket","rotate-ccw","run-pause","run-resume","sc-push","scale","scan-line","search","search-x","send","server","session-shell","session-tree","settings","settings-about","settings-account","settings-agents","settings-api","settings-billing","settings-boards","settings-general","settings-import","settings-issues","settings-labels","settings-licenses","settings-local-repos","settings-mcp","settings-members","settings-notifications","settings-rate","settings-repositories","settings-servers","settings-sessions","settings-statuses","settings-storage","settings-sync","settings-tools","settings-voice","settings-widget","share-2","shield","shield-check","shield-question-mark","shopping-bag","shopping-cart","signal-high","signal-low","signal-medium","skip-back","skip-forward","sliders-horizontal","smartphone","smile","sparkles","square","square-check","square-kanban","square-minus","square-pen","square-slash","square-terminal","star","star-half","star-off","status-backlog","status-cancelled","status-done","status-duplicate","status-in-progress","status-in-review","status-todo","stethoscope","store","strikethrough","sun","support-open","support-resolved","tag","target","terminal","thread-stories","tool-script","trace-background","trace-chevron","trace-completed","trace-edit","trace-failed","trace-fetch","trace-read","trace-reasoning","trace-search","trace-subagent","trace-task-done","trace-task-pending","trace-task-running","trace-terminal","trace-todo","trace-tool","trash-2","tree-pine","triangle-alert","trigger-event","trigger-schedule","trophy","truck","type","ui-add","ui-agent-source","ui-archive","ui-arrow-down","ui-arrow-right","ui-assignee","ui-attach","ui-avatar-placeholder","ui-back","ui-branch","ui-camera","ui-check","ui-checklist","ui-chevron-down","ui-chevron-left","ui-chevron-right","ui-chevron-up","ui-clean","ui-clear","ui-clock","ui-close","ui-cloud","ui-copy","ui-delete","ui-delete-account","ui-device","ui-device-default","ui-device-offline","ui-dock-side","ui-docs","ui-download","ui-due-date","ui-edit","ui-empty-search","ui-error","ui-estimate","ui-external-link","ui-favorite-off","ui-file","ui-float","ui-folder","ui-folder-open","ui-fullscreen","ui-fullscreen-exit","ui-github","ui-help","ui-hide","ui-history","ui-hold","ui-icon-placeholder","ui-indeterminate","ui-info","ui-invite","ui-issue","ui-link","ui-loading","ui-mail","ui-mark-read","ui-mark-unread","ui-mcp","ui-member","ui-menu","ui-minus","ui-more","ui-more-vertical","ui-offline","ui-organization","ui-owner","ui-permission","ui-photos","ui-pin","ui-print","ui-private","ui-properties","ui-qr-code","ui-queued","ui-read","ui-redock","ui-refresh","ui-remove-member","ui-repeat","ui-repository","ui-scan","ui-selected","ui-selector","ui-send","ui-server","ui-share","ui-sign-in","ui-sign-out","ui-staging","ui-star-half","ui-star-off","ui-stop","ui-submit","ui-subscribe","ui-success","ui-swap","ui-team","ui-unarchive","ui-unassigned","ui-undo","ui-undock","ui-unlock","ui-unpin","ui-unselected","ui-unsubscribe","ui-update","ui-usage","ui-warning","ui-watch","ui-widget","undo-2","unlink","upload","user","user-minus","user-plus","user-x","users","video","voice-call","voice-level","volume-1","volume-2","volume-off","volume-x","wallet","wifi-off","work-faces","work-results","workflow","wrench","x","zap"],qv=["required","regex","length","numeric","email","formatString","formatNumber","formatCurrency","formatDate","pluralize","openUrl","and","or","not","percent","add","sub","eq","lt","clamp","cond","fallback","concat","coalesce","text","map","len","fill","set","formatPercent","formatRelativeTime","filter","bind","mul","div","mod","round","floor","ceil","abs","min","max","today","now","dateAdd","dateDiff","startOf","endOf","weekday","isoWeek","hours","formatDuration","orElse","expr"],Uv={display:{enum:["flex","grid","block","none"]},flexDirection:{enum:["row","column","row-reverse","column-reverse"]},flexWrap:{enum:["nowrap","wrap","wrap-reverse"]},justifyContent:{enum:["flex-start","flex-end","start","end","center","stretch","space-between","space-around","space-evenly"]},alignItems:{enum:["flex-start","flex-end","start","end","center","stretch","baseline"]},alignContent:{enum:["flex-start","flex-end","start","end","center","stretch","space-between","space-around","space-evenly"]},alignSelf:{enum:["flex-start","flex-end","start","end","center","stretch","baseline"]},justifySelf:{enum:["flex-start","flex-end","start","end","center","stretch","baseline"]},flexGrow:{type:"number"},flexShrink:{type:"number"},flexBasis:{type:"length"},gap:{type:"length"},rowGap:{type:"length"},columnGap:{type:"length"},direction:{enum:["ltr","rtl"]},overflow:{enum:["visible","hidden","clip","scroll","auto"]},overflowX:{enum:["visible","hidden","clip","scroll","auto"]},overflowY:{enum:["visible","hidden","clip","scroll","auto"]},width:{type:"length"},height:{type:"length"},minWidth:{type:"length"},minHeight:{type:"length"},maxWidth:{type:"length"},maxHeight:{type:"length"},aspectRatio:{type:"ratio"},position:{enum:["relative","absolute","sticky"]},top:{type:"length"},right:{type:"length"},bottom:{type:"length"},left:{type:"length"},inset:{type:"length"},insetInlineStart:{type:"length"},insetInlineEnd:{type:"length"},insetBlockStart:{type:"length"},insetBlockEnd:{type:"length"},padding:{type:"length"},paddingTop:{type:"length"},paddingRight:{type:"length"},paddingBottom:{type:"length"},paddingLeft:{type:"length"},paddingHorizontal:{type:"length"},paddingVertical:{type:"length"},paddingInlineStart:{type:"length"},paddingInlineEnd:{type:"length"},margin:{type:"length"},marginTop:{type:"length"},marginRight:{type:"length"},marginBottom:{type:"length"},marginLeft:{type:"length"},marginHorizontal:{type:"length"},marginVertical:{type:"length"},marginInlineStart:{type:"length"},marginInlineEnd:{type:"length"},gridTemplateColumns:{type:"tracks"},gridTemplateRows:{type:"tracks"},gridTemplateAreas:{type:"areas"},gridArea:{type:"string"},gridColumn:{type:"string"},gridRow:{type:"string"}},Vv={backgroundColor:{type:"color"},backgroundGradient:{type:"gradient"},color:{type:"color"},borderWidth:{type:"number",layoutEffect:!0},borderTopWidth:{type:"number",layoutEffect:!0},borderRightWidth:{type:"number",layoutEffect:!0},borderBottomWidth:{type:"number",layoutEffect:!0},borderLeftWidth:{type:"number",layoutEffect:!0},borderColor:{type:"color"},borderStyle:{enum:["solid","dashed","dotted"]},borderRadius:{type:"length"},borderTopLeftRadius:{type:"length"},borderTopRightRadius:{type:"length"},borderBottomRightRadius:{type:"length"},borderBottomLeftRadius:{type:"length"},opacity:{type:"number"},boxShadow:{type:"token",group:"shadow"},fontSize:{type:"length"},fontWeight:{enum:[300,400,500,600,700,800]},lineHeight:{type:"length"},letterSpacing:{type:"length"},textAlign:{enum:["left","right","center","start","end","justify"]},textDecoration:{enum:["none","underline","line-through"]},textTransform:{enum:["none","uppercase","lowercase","capitalize"]},fontStyle:{enum:["normal","italic"]},fontFamily:{type:"token",group:"type.family"},transition:{type:"token",group:"motion"},transitionEasing:{type:"token",group:"ease"},transform:{type:"transform"},visibility:{enum:["visible","hidden"]},pointerEvents:{enum:["auto","none"]},userSelect:{enum:["auto","none","text"]},cursor:{enum:["auto","default","pointer","text","not-allowed","grab","grabbing","move","col-resize","row-resize"]},backdropBlur:{type:"token",group:"blur"},animation:{enum:["pulse","spin","fade-in","slide-in-up","slide-in-down","slide-in-left","slide-in-right","shimmer"]},animationDuration:{type:"token",group:"motion"}},Kv={pulse:{duration:"$motion.slow",factor:7,easing:"$ease.standard",iterations:"infinite",rest:0,keyframes:[{offset:0,opacity:1},{offset:.5,opacity:.5},{offset:1,opacity:1}]},spin:{duration:"$motion.slow",factor:4,easing:"linear",iterations:"infinite",rest:0,keyframes:[{offset:0,rotate:0},{offset:1,rotate:360}]},"fade-in":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0},{offset:1,opacity:1}]},"slide-in-up":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateY:8},{offset:1,opacity:1,translateY:0}]},"slide-in-down":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateY:-8},{offset:1,opacity:1,translateY:0}]},"slide-in-left":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateX:8},{offset:1,opacity:1,translateX:0}]},"slide-in-right":{duration:"$motion.standard",factor:1,easing:"$ease.decelerate",iterations:1,rest:1,keyframes:[{offset:0,opacity:0,translateX:-8},{offset:1,opacity:1,translateX:0}]},shimmer:{duration:"$motion.slow",factor:5,easing:"linear",iterations:"infinite",rest:0,keyframes:[{offset:0,band:-1},{offset:1,band:1}],band:{color:"$color.background",stops:[{offset:0,alpha:0},{offset:.5,alpha:.5},{offset:1,alpha:0}]}}},Gv={media:"^@media \\((min-width|max-width|min-height|max-height): (\\d+(\\.\\d+)?px|\\$breakpoint\\.[a-zA-Z0-9]+)\\)$|^@media \\(orientation: (portrait|landscape)\\)$|^@media \\(hover: (hover|none)\\)$|^@media \\(prefers-reduced-motion: (reduce|no-preference)\\)$|^@media \\(form-factor: (phone|wide)\\)$",states:[":hover",":focus-visible",":pressed"],transform:"^((translate\\(-?\\d+(\\.\\d+)?px, -?\\d+(\\.\\d+)?px\\)|scale\\(-?\\d+(\\.\\d+)?\\)|rotate\\(-?\\d+(\\.\\d+)?deg\\))( (?=\\S)|$))+$"},Yv={durationMs:2e3,angleDeg:20,spreadPx:60,highlightLightnessMin:.8,highlightLightnessBoost:.4,highlightAlphaBoost:.4,lightAlphaFactor:.2},Xv={steps:120,radius:[.33,.3,.26],harmonics:[[11,17,23],[9,15,21],[7,13]],phase0:[.4,1.9,3.1],ringAmp:[1,.85,.45],ampBase:2,ampLevel:6,thinkingAmp:2.5,phaseSpeed:.9,fillAlpha:[.1,.1,.15],strokeAlpha:[.7,.8,.4],strokeWidth:[1.5,1.5,1],childScale:.3,childScaleLarge:.22,maxBands:8,bars:{count:20,minFraction:.12,envelope:.5,shapeFreq:1.7,shapeBase:.35,sizes:{sm:{height:16,barWidth:2,gap:2},md:{height:24,barWidth:3,gap:3},lg:{height:40,barWidth:4,gap:4},xl:{height:56,barWidth:5,gap:5}}}},Zv={quietZone:4},Jv={maxWidth:280,aspectRatio:1,cornerLength:24,cornerStroke:3,feedAlpha:.06,scanLineHeight:2,scanLineInset:16,sweepMs:2e3,placeholderIcon:"ui-scan",placeholderIconSize:32},Qv={tallAspect:.3333333333333333,maxScale:8,presets:[.25,.33,.5,.67,1,1.5,2,3,4,6,8],menuPresets:[0,.5,1,2,4],doubleTapFactor:2,wheelRate:.002,wheelLinePx:16,rubber:.55,momentumTauMs:325,autoHideMs:2e3,pill:{height:36,inset:16,padding:4,gap:2,percentMinWidth:56,dividerHeight:16}},on={layout:Uv,visual:Vv,animations:Kv,conditions:Gv,textShimmer:Yv,voiceWave:Xv,qrCode:Zv,qrScanner:Jv,zoomableImage:Qv},am=on.layout,$u=on.visual,e$=[...Object.keys(am),...Object.keys($u)];Object.entries($u).filter(([,e])=>e.layoutEffect).map(([e])=>e);const xu={...am,...$u},t$=new Set(e$),wu=new RegExp(on.conditions.media),lm=new RegExp(on.conditions.transform),n$=on.conditions.states,r$=/^-?\d+(\.\d+)?(px|%)$/,o$=/^\d+(\.\d+)?\/\d+(\.\d+)?$/,qd=new Set(["spacing","radius","control","type.size","type.lineHeight","opacity","border"]);function Ms(e,t){const n=tr(e);return n!==null&&t.has(n.group)&&im(e)}function cm(e){return Ms(e,new Set(["color"]))}function i$(e,t){const n=`${e}: expected {angle, stops: [{color, offset 0..1}, …]} with two or more stops`;if(typeof t!="object"||t===null||Array.isArray(t))return n;const r=t;if(typeof r.angle!="number"||!Number.isFinite(r.angle)||!Array.isArray(r.stops)||r.stops.length<2)return n;for(const o of r.stops){if(typeof o!="object"||o===null)return n;const i=o;if(!cm(i.color)||typeof i.offset!="number"||i.offset<0||i.offset>1)return n}for(const o of Object.keys(r))if(o!=="angle"&&o!=="stops")return n;return null}function s$(e,t){const n=xu[e];if(n.enum)return n.enum.includes(t)?null:`${e}: expected one of ${n.enum.join("|")}`;switch(n.type){case"number":return typeof t=="number"&&Number.isFinite(t)||Ms(t,qd)?null:`${e}: expected a number or a numeric token`;case"length":return typeof t=="number"&&Number.isFinite(t)||t==="auto"||typeof t=="string"&&r$.test(t)||Ms(t,qd)?null:`${e}: expected px, "N%", "auto" or a numeric token`;case"color":return cm(t)?null:`${e}: expected $color.<name>`;case"gradient":return i$(e,t);case"token":return Ms(t,new Set([n.group??""]))?null:`${e}: expected $${n.group}.<name>`;case"transform":return typeof t=="string"&&lm.test(t)?null:`${e}: expected translate(Xpx, Ypx), scale(N) and/or rotate(Ndeg)`;case"ratio":return typeof t=="number"&&t>0||typeof t=="string"&&o$.test(t)?null:`${e}: expected a number or "w/h"`;case"tracks":case"string":return typeof t=="string"?null:`${e}: expected a string`;case"areas":return Array.isArray(t)&&t.every(r=>typeof r=="string")?null:`${e}: expected an array of row strings`;default:return`${e}: unknown spec`}}function Ud(e){return xu[e]?.enum}function a$(e){return wu.test(e)||n$.includes(e)}function um(e,t={}){const n=[],r=t.path??"style",o=(i,s,a)=>{for(const[l,c]of Object.entries(i)){if(c===void 0)continue;if(a$(l)){const d=/\$breakpoint\.([a-zA-Z0-9]+)/.exec(l);d&&!yt.breakpoint.includes(d[1])&&n.push({path:`${s}.${l}`,message:`unknown breakpoint $breakpoint.${d[1]}; known: ${yt.breakpoint.join("|")}`}),a?n.push({path:`${s}.${l}`,message:"conditions do not nest"}):typeof c!="object"||c===null||Array.isArray(c)?n.push({path:`${s}.${l}`,message:"must be an object"}):o(c,`${s}.${l}`,!0);continue}if(!t$.has(l)){n.push({path:`${s}.${l}`,message:l.startsWith("@media")||l.startsWith(":")?"not a supported condition":"not in the Box style whitelist"});continue}xu[l].rootOnly&&t.root===!1&&n.push({path:`${s}.${l}`,message:"allowed on the root only"});const u=s$(l,c);u&&n.push({path:`${s}.${l}`,message:u})}};return typeof e!="object"||e===null||Array.isArray(e)?[{path:r,message:"expected an object"}]:(o(e,r,!1),n)}const l$=768;function c$(e){if(e.formFactor==="phone"||e.formFactor==="wide")return e.formFactor;const t=e.breakpoints?.md;return e.width<(typeof t=="number"?t:l$)?"phone":"wide"}const u$=/^@media \(([a-z-]+): ([^)]+)\)$/;function ku(e){if(!wu.test(e))return null;const t=u$.exec(e);return t?{feature:t[1],value:t[2]}:null}function d$(e,t){const n=tr(e);if(n){if(n.group!=="breakpoint")return null;const o=t.breakpoints?.[n.name];return typeof o=="number"?o:null}const r=parseFloat(e);return Number.isFinite(r)?r:null}function p$(e,t){switch(e.feature){case"min-width":case"max-width":case"min-height":case"max-height":{const n=d$(e.value,t);if(n===null)return!1;const r=e.feature.endsWith("width")?t.width:t.height;return r===void 0?!1:e.feature.startsWith("min")?r>=n:r<n}case"orientation":{const n=t.height!==void 0&&t.height>=t.width;return e.value===(n?"portrait":"landscape")}case"hover":return e.value===(t.hover?"hover":"none");case"prefers-reduced-motion":return e.value===(t.reducedMotion?"reduce":"no-preference");case"form-factor":return e.value===c$(t)}}function f$(e,t){let n=null;for(const r of yt.breakpoint){const o=t[r];typeof o=="number"&&e>=o&&(n=r)}return n}const h$={add:"Add",back:"Back",breadcrumb:"Breadcrumb",browse:"Browse",calendarMore:"+{count} more",cameraUnavailable:"Camera unavailable",cancel:"Cancel",carousel:"Carousel",chartSummary:"Chart of {series}, values from {min} to {max}",choose:"Choose",clear:"Clear",close:"Close",closeTab:"Close {name}",codeBlock:"Code",collapse:"Collapse",confirm:"Confirm",copied:"Copied",copy:"Copy",decrement:"Decrease",delete:"Delete",deleteRecord:"Delete this record?",deleteRecordBody:"The app stops showing it.",dialog:"Dialog",dismiss:"Dismiss",dropFiles:"Drop files here",edit:"Edit",endCall:"End call",expand:"Expand",fileTooLarge:"File too large",fileTooLargeNamed:"{name}: File too large",increment:"Increase",invalidFields:"Check the highlighted fields",invalidValue:"Invalid value",loading:"Loading",menu:"Menu",message:"Message",more:"More",morePictures:"+{count}",morePicturesLabel:"{alt}, {count} more",mute:"Mute",newTab:"New tab",next:"Next",nextMonth:"Next month",no:"No",noRecords:"No records yet",noResults:"No results",optional:"Optional",outline:"Outline",outlineRow:"{title}, {count}",pageCounter:"{page} / {total}",pageOf:"Page {page} of {total}",pagination:"Pagination",pause:"Pause",play:"Play",previous:"Previous",previousMonth:"Previous month",ratingStar:"{value} of {max}",ratingValue:"Rated {value} of {max}",read:"Read",recordCount:"{count} records",remove:"Remove",removeItem:"Remove {name}",required:"Required",resize:"Resize",save:"Save",scanQrCode:"Scan a QR code",search:"Search…",selectAll:"Select all",selectRow:"Select row",selectedCount:"{count} selected",send:"Send",sending:"Sending",sent:"Sent",showLess:"Show less",showMore:"Show more",slide:"Slide",sortAscending:"Sort ascending",sortByAscending:"{name}: Sort ascending",sortByDescending:"{name}: Sort descending",sortDescending:"Sort descending",sparklineSummary:"Trend from {first} to {last}, low {min}, high {max}",speaker:"Speaker",speakerOff:"Speaker off",stepCurrent:"Step {step} of {total}: {label}, current",stepDone:"Step {step} of {total}: {label}, completed",stepUpcoming:"Step {step} of {total}: {label}",stop:"Stop",submit:"Submit",table:"Table",today:"Today",unknownComponent:"Unknown component",unknownKind:"This record kind is not declared",unmute:"Unmute",unsupportedFile:"Unsupported file",unsupportedFileNamed:"{name}: Unsupported file",yes:"Yes",zoomFit:"Fit",zoomIn:"Zoom in",zoomLevel:"Zoom level",zoomOut:"Zoom out",zoomToFit:"Zoom to fit"},m$={strings:h$},ja=m$.strings,g$=/^\$string\.([a-zA-Z][a-zA-Z0-9]*)$/,y$=/\{([a-zA-Z][a-zA-Z0-9]*)\}/g;function Su(e){if(typeof e!="string")return null;const t=g$.exec(e);return t?t[1]:null}function b$(e){const t=Su(e);return t!==null&&t in ja}function v$(e={}){return{...ja,...e}}function dm(e,t={}){return e.replace(y$,(n,r)=>r in t&&t[r]!==void 0&&t[r]!==null?String(t[r]):n)}function $$(e,t=ja){const n=Su(e);return n===null?e:t[n]??n}const x$={default:1,regions:{0:["AG","AS","BD","BR","BS","BT","BW","BZ","CA","CN","CO","DM","DO","ET","GT","GU","HK","HN","ID","IL","IN","JM","JP","KE","KH","KR","LA","MH","MM","MO","MT","MX","MZ","NI","NP","PA","PE","PH","PK","PR","PT","PY","SA","SG","SV","TH","TT","TW","UM","US","VE","VI","WS","YE","ZA","ZW"],5:["MV"],6:["AE","AF","BH","DJ","DZ","EG","IQ","IR","JO","KW","LY","OM","QA","SD","SY"]}},w$={af:"ZA",am:"ET",ar:"EG",az:"AZ",be:"BY",bg:"BG",bn:"BD",bs:"BA",ca:"ES",ckb:"IQ",cs:"CZ",cy:"GB",da:"DK",de:"DE",dv:"MV",el:"GR",en:"US",es:"ES",et:"EE",eu:"ES",fa:"IR",fi:"FI",fil:"PH",fr:"FR",ga:"IE",gl:"ES",gu:"IN",ha:"NG",he:"IL",hi:"IN",hr:"HR",hu:"HU",hy:"AM",id:"ID",ig:"NG",is:"IS",it:"IT",ja:"JP",jv:"ID",ka:"GE",kk:"KZ",km:"KH",kn:"IN",ko:"KR",ku:"TR",ky:"KG",lo:"LA",lt:"LT",lv:"LV",mk:"MK",ml:"IN",mn:"MN",mr:"IN",ms:"MY",mt:"MT",my:"MM",nb:"NO",ne:"NP",nl:"NL",nn:"NO",no:"NO",or:"IN",pa:"IN",pl:"PL",ps:"AF",pt:"BR",ro:"RO",ru:"RU",sd:"PK",si:"LK",sk:"SK",sl:"SI",so:"SO",sq:"AL",sr:"RS",sv:"SE",sw:"TZ",ta:"IN",te:"IN",th:"TH",tl:"PH",tr:"TR",ug:"CN",uk:"UA",ur:"PK",uz:"UZ",vi:"VN",yi:"001",yo:"NG",zh:"CN",zu:"ZA"},k$={in:"id",iw:"he",ji:"yi",jw:"jv",mo:"ro",tl:"fil"},S$=["ar","ckb","dv","fa","he","ps","sd","ug","ur","yi"],C$=["ui-back","ui-chevron-left","ui-chevron-right","ui-arrow-right","ui-send","ui-undo","ui-external-link","arrow-left","arrow-right","chevron-left","chevron-right","send","undo-2","external-link"],A$={months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayPeriods:["AM","PM"],currencyPrefix:{USD:"$",EUR:"€",GBP:"£",JPY:"¥",CNY:"CN¥",INR:"₹",KRW:"₩",CAD:"CA$",AUD:"A$",MXN:"MX$",BRL:"R$",ILS:"₪",NZD:"NZ$",HKD:"HK$",TWD:"NT$",VND:"₫",PHP:"₱",XAF:"FCFA ",XOF:"F CFA "},currencyDigits:{JPY:0,KRW:0,VND:0,CLP:0,ISK:0,UGX:0,PYG:0,XAF:0,XOF:0,BHD:3,IQD:3,JOD:3,KWD:3,OMR:3,TND:3},relative:{units:{second:["second","seconds"],minute:["minute","minutes"],hour:["hour","hours"],day:["day","days"],week:["week","weeks"],month:["month","months"],year:["year","years"]},auto:{second:{0:"now"},day:{1:"tomorrow","-1":"yesterday"},week:{1:"next week","-1":"last week"},month:{1:"next month","-1":"last month"},year:{1:"next year","-1":"last year"}},past:"{value} {unit} ago",future:"in {value} {unit}"},unknownCurrency:"{code} ",datePatterns:{short:"M/d/yy",medium:"MMM d, y",long:"MMMM d, y",full:"EEEE, MMMM d, y"},timePattern:"h:mm a",dateTimeJoin:{short:"{date}, {time}",medium:"{date}, {time}",long:"{date} at {time}",full:"{date} at {time}"}},vr={default:"en-US",weekStart:x$,likelyRegion:w$,languageAliases:k$,rtl:S$,rtlMirroredIcons:C$,englishFallback:A$},pn=vr.englishFallback,Ht={second:1e3,minute:6e4,hour:36e5,day:864e5};function Eo(e){return typeof e=="string"?e:typeof e=="number"?Number.isFinite(e)?String(e):"":typeof e=="boolean"?String(e):""}function pm(e){const t=/^(\d+)(?:\.(\d+))?(?:e([+-]\d+))?$/.exec(String(e));if(!t)return{int:"0",frac:""};const n=t[1]+(t[2]??"");let r=t[1].length+(t[3]?Number(t[3]):0),o=n;return r<=0&&(o="0".repeat(1-r)+o,r=1),r>o.length&&(o=o+"0".repeat(r-o.length)),{int:o.slice(0,r).replace(/^0+(?=\d)/,""),frac:o.slice(r).replace(/0+$/,"")}}function _$(e,t){const n=e.frac+"0".repeat(Math.max(0,t-e.frac.length));return{int:(e.int+n.slice(0,t)).replace(/^0+(?=\d)/,""),frac:n.slice(t).replace(/0+$/,"")}}function fm(e,t,n){let{int:r,frac:o}=e;if(o.length>n){const i=o.charCodeAt(n)>=53;let s=r+o.slice(0,n);if(i){const l=s.split("");let c=l.length-1;for(;c>=0;c--)if(l[c]==="9")l[c]="0";else{l[c]=String(Number(l[c])+1);break}s=(c<0?"1":"")+l.join("")}const a=s.length-n;r=s.slice(0,a)||"0",o=s.slice(a).replace(/0+$/,"")}return o.length<t&&(o=o+"0".repeat(t-o.length)),{int:r,frac:o}}function hm(e,t){if(!t||e.length<4)return e;let n="";for(let r=0;r<e.length;r++)r>0&&(e.length-r)%3===0&&(n+=","),n+=e[r];return n}function ys(e,t,n,r){const o=e<0||Object.is(e,-0);if(Number.isNaN(e))return{sign:"",body:"NaN"};if(!Number.isFinite(e))return{sign:o?"-":"",body:"∞"};const i=fm(pm(Math.abs(e)),t,n);return{sign:o?"-":"",body:`${hm(i.int,r)}${i.frac?`.${i.frac}`:""}`}}const go=e=>typeof e=="number"&&Number.isFinite(e)?Math.max(0,Math.min(20,Math.trunc(e))):void 0;function O$(e){return pn.currencyDigits[e.toUpperCase()]??2}function wi(e){if(typeof e=="number")return Number.isFinite(e)?{ms:e,dateOnly:!1}:null;if(typeof e!="string"||e.trim()==="")return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(t){const o=Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isFinite(o)?{ms:o,dateOnly:!0}:null}if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?$/.test(e))return null;const n=/(Z|[+-]\d{2}:\d{2})$/.test(e)?e:`${e}Z`,r=Date.parse(n);return Number.isFinite(r)?{ms:r,dateOnly:!1}:null}function mm(e){const t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),weekday:t.getUTCDay(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}const or=(e,t)=>String(e).padStart(t,"0");function Es(e,t,n){let r="",o=0;for(;o<e.length;){const i=e[o];if(i==="'"){if(e[o+1]==="'"){r+="'",o+=2;continue}for(o++;o<e.length;){if(e[o]==="'"){if(e[o+1]==="'"){r+="'",o+=2;continue}o++;break}r+=e[o],o++}continue}if(!/[A-Za-z]/.test(i)){r+=i,o++;continue}let s=1;for(;e[o+s]===i;)s++;const a=e.slice(o,o+s);o+=s;const l=t.hour%12===0?12:t.hour%12;switch(i){case"y":r+=s===2?or(t.year%100,2):or(t.year,s);break;case"M":r+=s>=4?n.months[t.month-1]:s===3?n.monthsShort[t.month-1]:or(t.month,s);break;case"d":r+=or(t.day,s);break;case"E":r+=s>=4?n.weekdays[t.weekday]:n.weekdaysShort[t.weekday];break;case"h":r+=or(l,s);break;case"H":r+=or(t.hour,s);break;case"m":r+=or(t.minute,s);break;case"s":r+=or(t.second,s);break;case"a":r+=n.dayPeriods[t.hour<12?0:1];break;default:r+=a}}return r}const T$=pn.datePatterns,M$=pn.timePattern,E$=pn.dateTimeJoin,I$=e=>()=>e;function P$(e){const t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hourCycle:"h23"});return n=>{const r=Math.floor(n/1e3)*1e3,o=Object.fromEntries(t.formatToParts(new Date(r)).map(s=>[s.type,s.value])),i=Date.UTC(Number(o.year),Number(o.month)-1,Number(o.day),Number(o.hour)%24,Number(o.minute),Number(o.second));return Math.round((i-r)/6e4)}}function gm(e){const t=Math.abs(e),n=r=>Math.trunc(e/r)||0;return t<Ht.minute?{value:n(Ht.second),unit:"second"}:t<Ht.hour?{value:n(Ht.minute),unit:"minute"}:t<Ht.day?{value:n(Ht.hour),unit:"hour"}:t<7*Ht.day?{value:n(Ht.day),unit:"day"}:t<30*Ht.day?{value:n(7*Ht.day),unit:"week"}:t<365*Ht.day?{value:n(30*Ht.day),unit:"month"}:{value:n(365*Ht.day),unit:"year"}}const $l=pn;function D$(e=I$(0)){return{locale:"en-US",offsetMinutes:e,number(t,n={}){const r=go(n.decimals),{sign:o,body:i}=ys(t,r??0,r??3,n.grouping!==!1);return`${o}${i}`},currency(t,n,r={}){const o=n.toUpperCase(),i=go(r.decimals)??O$(o),{sign:s,body:a}=ys(t,i,i,r.grouping!==!1),l=pn.currencyPrefix[o]??pn.unknownCurrency.replace("{code}",o);return`${s}${l}${a}`},percent(t,n={}){const r=go(n.decimals)??0;if(!Number.isFinite(t)){const{sign:s,body:a}=ys(t,0,0,!0);return`${s}${a}%`}const o=t<0||Object.is(t,-0),i=fm(_$(pm(Math.abs(t)),2),r,r);return`${o?"-":""}${hm(i.int,!0)}${i.frac?`.${i.frac}`:""}%`},date(t,n={}){const r=wi(t);if(!r)return"";const o=mm(r.dateOnly?r.ms:r.ms+e(r.ms)*6e4);if(n.format)return Es(n.format,o,$l);const i=n.style??"medium",s=Es(T$[i],o,$l);if(!n.time)return s;const a=Es(M$,o,$l);return E$[i].replace("{date}",s).replace("{time}",a)},relativeTime(t,n){const r=wi(t);if(!r)return"";const{value:o,unit:i}=gm(r.ms-n),s=pn.relative.auto[i]?.[String(o)];if(s)return s;const[a,l]=pn.relative.units[i],c=ys(Math.abs(o),0,0,!0).body,u=Math.abs(o)===1?a:l;return(o<0?pn.relative.past:pn.relative.future).replace("{value}",c).replace("{unit}",u)},plural(t){return Math.abs(t)===1?"one":"other"}}}function ym(e,t="UTC"){const n=a=>new Intl.NumberFormat(e,a);let r=null;const o=()=>{if(r)return r;const a=(d,p)=>new Intl.DateTimeFormat(e,{...d,timeZone:"UTC"}).format(new Date(p)),l=Array.from({length:12},(d,p)=>Date.UTC(2026,p,1)),c=Array.from({length:7},(d,p)=>Date.UTC(2026,0,4+p)),u=d=>new Intl.DateTimeFormat(e,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(new Date(Date.UTC(2026,0,1,d))).find(p=>p.type==="dayPeriod")?.value??(d<12?"AM":"PM");return r={months:l.map(d=>a({month:"long"},d)),monthsShort:l.map(d=>a({month:"short"},d)),weekdays:c.map(d=>a({weekday:"long"},d)),weekdaysShort:c.map(d=>a({weekday:"short"},d)),dayPeriods:[u(9),u(15)]},r},i=a=>{const l=new Intl.DateTimeFormat("en-US",{timeZone:t,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",weekday:"short",hourCycle:"h23"}).formatToParts(new Date(a)),c=u=>l.find(d=>d.type===u)?.value??"0";return{year:Number(c("year")),month:Number(c("month")),day:Number(c("day")),weekday:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].indexOf(c("weekday")),hour:Number(c("hour"))%24,minute:Number(c("minute")),second:Number(c("second"))}},s=P$(t);return{locale:e,offsetMinutes:s,number(a,l={}){const c=go(l.decimals);return n({minimumFractionDigits:c??0,maximumFractionDigits:c??3,useGrouping:l.grouping!==!1}).format(a)},currency(a,l,c={}){const u=go(c.decimals);return n({style:"currency",currency:l,...u!==void 0?{minimumFractionDigits:u,maximumFractionDigits:u}:{},useGrouping:c.grouping!==!1}).format(a)},percent(a,l={}){const c=go(l.decimals)??0;return n({style:"percent",minimumFractionDigits:c,maximumFractionDigits:c}).format(a)},date(a,l={}){const c=wi(a);if(!c)return"";const u=c.dateOnly?"UTC":t;return l.format?Es(l.format,c.dateOnly?mm(c.ms):i(c.ms),o()):new Intl.DateTimeFormat(e,{dateStyle:l.style??"medium",...l.time?{timeStyle:"short"}:{},timeZone:u}).format(new Date(c.ms))},relativeTime(a,l){const c=wi(a);if(!c)return"";const{value:u,unit:d}=gm(c.ms-l);return new Intl.RelativeTimeFormat(e,{numeric:"auto"}).format(u,d)},plural(a){return new Intl.PluralRules(e).select(a)}}}const bm=["formatNumber","formatCurrency","formatPercent","formatDate","formatRelativeTime","pluralize"],R$=/^[ \t\n\r]*[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?[ \t\n\r]*$/,mc=e=>typeof e=="number"?e:typeof e=="string"&&R$.test(e)?Number(e):NaN,xl=e=>e==null?void 0:mc(e);function vm(e,t=()=>Date.now()){const n=(r,o)=>{const i=mc(r);return Number.isFinite(i)?o(i):""};return{formatNumber:({value:r,decimals:o,grouping:i})=>n(r,s=>e.number(s,{decimals:xl(o),grouping:i===void 0?void 0:i!==!1})),formatCurrency:({value:r,currency:o,decimals:i,grouping:s})=>n(r,a=>typeof o=="string"&&/^[A-Za-z]{3}$/.test(o)?e.currency(a,o,{decimals:xl(i),grouping:s===void 0?void 0:s!==!1}):""),formatPercent:({value:r,decimals:o})=>n(r,i=>e.percent(i,{decimals:xl(o)})),formatDate:({value:r,format:o,style:i,time:s})=>e.date(r,{...typeof o=="string"&&o?{format:o}:{},...i==="short"||i==="medium"||i==="long"||i==="full"?{style:i}:{},...s===!0?{time:!0}:{}}),formatRelativeTime:({value:r,now:o})=>e.relativeTime(r,typeof o=="number"?o:wi(o)?.ms??t()),pluralize:r=>{const o=mc(r.value);if(!Number.isFinite(o))return r.other;const i=a=>typeof a=="string"?a.replaceAll("{count}",e.number(o)):a;if(o===0&&r.zero!==void 0)return i(r.zero);const s=e.plural(o);return i(r[s]??r.other)}}}const gc=vm(D$()),$m=/^\{([^{}]+)\}$/,F$=/\{([^{}]+)\}/g,z$=/^(len|range)\((.+)\)$/;function Ba(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.path=="string"&&Object.keys(e).length===1}function jo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.call=="string"}function Ue(e){return Ba(e)||jo(e)}function On(e){return e!=null&&e!==!1&&e!==""}function wt(e,t){const n={};for(const[r,o]of Object.entries(t))o!==void 0&&(n[r]=o);return{call:e,args:n}}function N$(e){return e==="true"?!0:e==="false"?!1:e==="null"?null:/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function L$(e,t){if(e==="id")return t.id;const[n,...r]=e.split(".");let o;if(n==="props")o=t.props;else if(n in t.vars)o=t.vars[n];else return;for(const i of r){if(o==null)return;o=o[i]}return o}function dt(e){return typeof e=="number"?e:Number(e??0)||0}function Vd(e){const t=e.trim();if(t==="")return;const n=Number(t);return Number.isFinite(n)?n:void 0}function Cu(e,t){return e===t?!0:typeof e=="number"&&typeof t=="string"?Vd(t)===e:typeof t=="number"&&typeof e=="string"?Vd(e)===t:!1}function xm(e,t,n){let r=dt(e);return n!=null&&(r=Math.min(r,dt(n))),t!=null&&(r=Math.max(r,dt(t))),r}function j$(e,t){const n=e==null?"":String(e);return dm(n,typeof t=="object"&&t!==null?t:{})}const B$=1e4;function Kn(e,t){const n=e.trim(),r=z$.exec(n);if(r){const i=Kn(r[2],t);if(r[1]==="len")return Ue(i)?wt("len",{value:i}):Array.isArray(i)||typeof i=="string"?i.length:0;if(Ue(i))return;const s=Math.min(B$,Math.max(0,Math.floor(dt(i)))||0);return Array.from({length:s},(a,l)=>l)}const o=n.indexOf("|");if(o>=0){const i=Kn(n.slice(0,o),t),s=N$(n.slice(o+1));return i==null?s:Ue(i)?wt("fallback",{value:i,default:s}):i}if(n.startsWith("!")){const i=Kn(n.slice(1),t);return Ue(i)?wt("not",{value:i}):!On(i)}return L$(n,t)}function W$(e){return jo(e)&&e.call==="fallback"&&Ue(e.args?.value)?e.args?.value:e}function gt(e,t){if(typeof e=="string"){const n=$m.exec(e);if(n)return Kn(n[1],t)}return Nt(e,t)}function ea(e,t){const n=typeof e=="string"?Kn(e,t):gt(e,t);return Ue(n)?n:On(n)}function H$(e,t){const n=[];let r=!1,o=0;for(const i of e.matchAll(F$)){const s=i.index??0;s>o&&n.push(e.slice(o,s));const a=Kn(i[1],t);Ue(a)&&(r=!0),n.push(a),o=s+i[0].length}return o<e.length&&n.push(e.slice(o)),r?wt("concat",{values:n.filter(i=>i!=null&&i!=="")}):n.map(i=>i==null?"":String(i)).join("")}function Nt(e,t){if(typeof e=="string"){const o=$m.exec(e);return o?W$(Kn(o[1],t)):H$(e,t)}if(Array.isArray(e))return e.map(o=>Nt(o,t)).filter(o=>o!==void 0);if(typeof e!="object"||e===null)return e;const n=e;if("$map"in n){const o=n.$map,i=Kn(o.from,t);if(Ue(i)){const l={};for(const[c,u]of Object.entries(o.cases)){const d=gt(u,t);d!==void 0&&(l[c]=d)}return wt("map",{value:i,cases:l,default:gt(o.default,t)})}const s=i==null?"":String(i),a=Object.prototype.hasOwnProperty.call(o.cases,s)?o.cases[s]:o.default;return gt(a,t)}if("$cond"in n){const[o,i,s]=n.$cond,a=ea(o,t);return Ue(a)?wt("cond",{if:a,then:gt(i,t),else:gt(s,t)}):gt(a?i:s,t)}if("$eq"in n){const[o,i]=n.$eq.map(s=>gt(s,t));return Ue(o)||Ue(i)?wt("eq",{a:o,b:i}):Cu(o,i)}if("$lt"in n){const[o,i]=n.$lt.map(s=>gt(s,t));return Ue(o)||Ue(i)?wt("lt",{a:o,b:i}):dt(o)<dt(i)}if("$add"in n){const[o,i]=n.$add.map(s=>gt(s,t));return Ue(o)||Ue(i)?wt("add",{a:o,b:i}):dt(o)+dt(i)}if("$sub"in n){const[o,i]=n.$sub.map(s=>gt(s,t));return Ue(o)||Ue(i)?wt("sub",{a:o,b:i}):dt(o)-dt(i)}if("$clamp"in n){const[o,i,s]=n.$clamp.map(a=>gt(a,t));return Ue(o)||Ue(i)||Ue(s)?wt("clamp",{value:o,min:i,max:s}):xm(o,i,s)}if("$fill"in n){const[o,i]=n.$fill,s={};for(const[a,l]of Object.entries(i??{})){const c=gt(l,t);c!==void 0&&(s[a]=c)}return wt("fill",{template:gt(o,t),params:s})}if("$percent"in n){const[o,i]=n.$percent.map(s=>gt(s,t));return Ue(o)||Ue(i)?wt("percent",{value:o,max:i}):wm(o,i)}if("$text"in n){const o=n.$text,i=typeof o=="string"?Kn(o,t):gt(o,t);return Ue(i)?wt("text",{value:i}):i==null?void 0:String(i)}if("$coalesce"in n){const o=[];for(const i of n.$coalesce){const s=gt(i,t);if(s!==void 0){if(Ue(s)){o.push(s);continue}if(On(s)){if(o.length===0)return s;o.push(s);break}}}return o.length===0?void 0:o.length===1?o[0]:wt("coalesce",{values:o})}if("$not"in n){const o=ea(n.$not,t);return Ue(o)?wt("not",{value:o}):!o}const r={};for(const[o,i]of Object.entries(n)){const s=Nt(i,t);if(s===void 0)continue;const a=o.includes("{")?Nt(o,t):o;r[typeof a=="string"?a:o]=s}return r}function wm(e,t){const n=dt(t),r=n>0?dt(e)/n*100:0,o=Math.min(100,Math.max(0,r));return`${Math.round(o*100)/100}%`}function q$(e,t,n,r){if(!Array.isArray(e))return[];const o=typeof t=="string"?t.trim().toLowerCase():typeof t=="number"?String(t):"",i=Array.isArray(n)?n.filter(l=>typeof l=="string"):null,s=typeof r=="object"&&r!==null&&!Array.isArray(r)?Object.entries(r).filter(([,l])=>l!=null&&l!==""):[],a=l=>typeof l=="string"?l:typeof l=="number"?String(l):null;return e.filter(l=>{const c=typeof l=="object"&&l!==null&&!Array.isArray(l)?l:null;for(const[d,p]of s)if(!Cu(c?.[d],p))return!1;return o===""?!0:(c?(i??Object.keys(c)).map(d=>c[d]):[l]).some(d=>a(d)?.toLowerCase().includes(o)??!1)})}const U$={percent:({value:e,max:t})=>wm(e,t),add:({a:e,b:t})=>dt(e)+dt(t),sub:({a:e,b:t})=>dt(e)-dt(t),eq:({a:e,b:t})=>Cu(e,t),lt:({a:e,b:t})=>dt(e)<dt(t),clamp:({value:e,min:t,max:n})=>xm(e,t,n),cond:({if:e,then:t,else:n})=>On(e)?t:n,fallback:({value:e,default:t})=>e??t,concat:({values:e})=>Array.isArray(e)?e.map(t=>t==null?"":String(t)).join(""):"",coalesce:({values:e})=>Array.isArray(e)?e.find(On):void 0,text:({value:e})=>e==null?void 0:String(e),map:({value:e,cases:t,default:n})=>{const r=e==null?"":String(e),o=t??{};return Object.prototype.hasOwnProperty.call(o,r)?o[r]:n},len:({value:e})=>Array.isArray(e)||typeof e=="string"?e.length:0,fill:({template:e,params:t})=>j$(e,t),filter:({items:e,query:t,fields:n,where:r})=>q$(e,t,n,r),formatPercent:gc.formatPercent,formatRelativeTime:gc.formatRelativeTime},Au=["mul","div","mod","round","floor","ceil","abs","min","max","today","now","dateAdd","dateDiff","startOf","endOf","weekday","isoWeek","hours","formatDuration","orElse","expr"],Kd=["day","week","month","quarter","year"],V$=e=>e!==void 0&&e>="0"&&e<="9",yo=(e,t,n)=>{for(let r=t;r<t+n;r++)if(!V$(e[r]))return!1;return!0};function km(e){return e%4===0&&e%100!==0||e%400===0}function Io(e,t){return t===2?km(e)?29:28:t===4||t===6||t===9||t===11?30:31}function Gi(e,t,n){const r=[0,3,2,5,0,3,5,1,4,6,2,4],o=t<3?e-1:e,i=(s,a)=>Math.floor(s/a);return((o+i(o,4)-i(o,100)+i(o,400)+r[t-1]+n)%7+7)%7}function K$(e,t,n){let r=n;for(let o=1;o<t;o++)r+=Io(e,o);return r}function Gd(e){const t=Gi(e,1,1);return t===4||t===3&&km(e)?53:52}function Sm(e,t,n){const r=Gi(e,t,n)||7,o=Math.floor((K$(e,t,n)-r+10)/7);return o<1?{year:e-1,week:Gd(e-1)}:o>Gd(e)?{year:e+1,week:1}:{year:e,week:o}}function Yi(e){if(e.length<10||!yo(e,0,4)||e[4]!=="-"||!yo(e,5,2)||e[7]!=="-"||!yo(e,8,2)||e.length>10&&e[10]!=="T"&&e[10]!==" ")return null;const t=Number(e.slice(0,4)),n=Number(e.slice(5,7)),r=Number(e.slice(8,10));return n<1||n>12||r<1||r>Io(t,n)?null:{y:t,m:n,d:r}}function G$(e){if(e.length<7||!yo(e,0,4)||e[4]!=="-"||!yo(e,5,2)||e.length>7&&e[7]!=="-")return null;const t=Number(e.slice(5,7));return t>=1&&t<=12?{y:Number(e.slice(0,4)),m:t}:null}function Y$(e){return e.length<4||!yo(e,0,4)||e.length>4&&e[4]!=="-"?null:Number(e.slice(0,4))}const jn=(e,t)=>String(e).padStart(t,"0");function Xi(e){return`${jn(e.y,4)}-${jn(e.m,2)}-${jn(e.d,2)}`}function Cm(e,t){if(t==="day"||t==="week"){const r=Yi(e);if(!r)return null;if(t==="day")return Xi(r);const o=Sm(r.y,r.m,r.d);return`${jn(o.year,4)}-W${jn(o.week,2)}`}if(t==="year"){const r=Y$(e);return r===null?null:jn(r,4)}const n=G$(e);return n?t==="month"?`${jn(n.y,4)}-${jn(n.m,2)}`:`${jn(n.y,4)}-Q${Math.floor((n.m-1)/3)+1}`:null}function bn(e,t,n){const r=t<=2?e-1:e,o=Math.floor(r/400),i=r-o*400,s=Math.floor((153*(t+(t>2?-3:9))+2)/5)+n-1,a=i*365+Math.floor(i/4)-Math.floor(i/100)+s;return o*146097+a-719468}function vt(e){const t=e+719468,n=Math.floor(t/146097),r=t-n*146097,o=Math.floor((r-Math.floor(r/1460)+Math.floor(r/36524)-Math.floor(r/146096))/365),i=r-(365*o+Math.floor(o/4)-Math.floor(o/100)),s=Math.floor((5*i+2)/153),a=i-Math.floor((153*s+2)/5)+1,l=s<10?s+3:s-9;return{y:o+n*400+(l<=2?1:0),m:l,d:a}}const Po={maxLength:1e3,maxDepth:32,maxSteps:1e4},X$=["set","records.upsert","records.delete","records.batch"],Z$=["openUrl","bind","app.navigate"],J$=["actions.","harness.","exponential.","tools.","upstream."];function ki(e){return X$.includes(e)?"write":Z$.includes(e)||J$.some(t=>e.startsWith(t))?"host":"pure"}function ta(e,t){return`${e} ${t==="write"?"writes":"is a host function"}`}class Bo extends Error{}const se=e=>{throw new Bo(e)},Dr=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function We(e){return e==null?"null":typeof e=="number"?"number":typeof e=="string"?"string":typeof e=="boolean"?"bool":Array.isArray(e)?"list":"map"}function st(e){return Number.isFinite(e)||se("number out of range"),e===0?0:e}const Wa=e=>String(e);function na(e,t){if(e=e??null,t=t??null,e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((n,r)=>na(n,t[r]));if(Dr(e)&&Dr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&na(e[o],t[o]))}return!1}function Am(e){const t=Math.abs(e),n=Math.floor(t),r=t-n>=.5?n+1:n;return e<0?-r:r}const et=864e5,bo={second:1e3,minute:6e4,hour:36e5},_u=["second","minute","hour","day","week","month","quarter","year"],_m=["day","week","month","quarter","year"],Om=["h:mm","hh:mm"],Q$=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})?$/;function Ha(e){const t=Q$.exec(e);if(!t)return null;const n=Yi(e.slice(0,10));if(!n)return null;const r=Number(t[4]),o=Number(t[5]),i=t[6]===void 0?0:Number(t[6]);if(r>23||o>59||i>59)return null;const s=t[7]===void 0?0:Number(t[7].slice(0,3).padEnd(3,"0"));let a=0;if(t[8]!==void 0&&t[8]!=="Z"){const l=Number(t[8].slice(1,3)),c=Number(t[8].slice(4,6));if(l>23||c>59)return null;a=(t[8][0]==="-"?-1:1)*(l*60+c)}return bn(n.y,n.m,n.d)*et+r*36e5+o*6e4+i*1e3+s-a*6e4}const ho=(e,t)=>String(e).padStart(t,"0"),Tm=-719528,Mm=2932896,ex=4e6;function Si(e){e>=Tm*et&&e<(Mm+1)*et||se("date out of range");const t=Math.floor(e/et),n=e-t*et,r=vt(t);return(r.y<0||r.y>9999)&&se("date out of range"),`${Xi(r)}T${ho(Math.floor(n/36e5),2)}:${ho(Math.floor(n/6e4)%60,2)}:${ho(Math.floor(n/1e3)%60,2)}.${ho(n%1e3,3)}Z`}function ra(e){e>=Tm&&e<=Mm||se("date out of range");const t=vt(e);return(t.y<0||t.y>9999)&&se("date out of range"),Xi(t)}const Zi=(e,t)=>t+e.offset(t)*6e4;function oa(e,t){const n=e.offset(t),r=t-n*6e4,o=e.offset(r);return o===n?r:t-o*6e4}function Ci(e,t){if(typeof t!="string")return se(`${e} needs a date, got ${We(t)}`);if(t.length===10){const r=Yi(t);if(r)return{date:!0,day:bn(r.y,r.m,r.d)}}const n=Ha(t);return n===null&&se(`not a date: ${t}`),{date:!1,ms:n}}const Yd=(e,t)=>t.date?t.day*et:Zi(e,t.ms);function Ou(e,t,n){return typeof t!="string"?se(`${e} needs a string, got ${We(t)}`):(n.includes(t)||se(`unknown unit ${t}`),t)}function tx(e,t){const n=vt(e),r=n.y*12+(n.m-1)+t,o=Math.floor(r/12),i=r-o*12+1;return bn(o,i,Math.min(n.d,Io(o,i)))}function yc(e,t,n){return Math.abs(t)<=ex||se("date out of range"),n==="day"?e+t:n==="week"?e+7*t:tx(e,t*(n==="month"?1:n==="quarter"?3:12))}function bc(e,t){const n=vt(e);return t==="day"?e:t==="week"?e-((Gi(n.y,n.m,n.d)||7)-1):t==="month"?bn(n.y,n.m,1):t==="quarter"?bn(n.y,Math.floor((n.m-1)/3)*3+1,1):bn(n.y,1,1)}function nx(e,t){return yc(bc(e,t),1,t)}function rx(e,t){const n=_t(e,t);return Number.isInteger(n)||se(`${e} needs a whole number, got ${Wa(n)}`),n}function _t(e,t){return typeof t!="number"?se(`${e} needs a number, got ${We(t)}`):t}function ox(e,t){return typeof t!="string"?se(`${e} needs a string, got ${We(t)}`):t}const mt=e=>()=>e,wl=e=>e[0]==="date"||e[0]==="timestamp"?e[0]:"dyn";function ix(e,t){const n=Ci("dateAdd",e[0]),r=rx("dateAdd",e[1]),o=Ou("dateAdd",e[2],_u);if(n.date)return bo[o]!==void 0&&se(`unit ${o} needs a timestamp`),ra(yc(n.day,r,o));if(bo[o]!==void 0)return Si(st(n.ms+r*bo[o]));const i=Zi(t,n.ms),s=Math.floor(i/et);return Si(oa(t,yc(s,r,o)*et+(i-s*et)))}function sx(e,t){const n=Ci("dateDiff",e[0]),r=Ci("dateDiff",e[1]),o=Ou("dateDiff",e[2],_u);if(bo[o]!==void 0){const f=y=>y.date?oa(t,y.day*et):y.ms;return st(Math.trunc((f(r)-f(n))/bo[o]))}const i=Yd(t,n),s=Yd(t,r);if(o==="day"||o==="week")return st(Math.trunc((s-i)/(o==="day"?et:7*et)));const a=Math.floor(i/et),l=Math.floor(s/et),c=vt(a),u=vt(l);let d=(u.y-c.y)*12+(u.m-c.m);const p=c.d*et+(i-a*et),h=u.d*et+(s-l*et);return d>0&&h<p?d--:d<0&&h>p&&d++,st(Math.trunc(d/(o==="month"?1:o==="quarter"?3:12)))}function Xd(e,t,n){const r=Ci(e,t[0]),o=Ou(e,t[1],_m),i=r.date?r.day:Math.floor(Zi(n,r.ms)/et);if(e==="startOf")return r.date?ra(bc(i,o)):Si(oa(n,bc(i,o)*et));const s=nx(i,o);return r.date?ra(s-1):Si(oa(n,s*et)-1)}function Zd(e,t,n){const r=Ci(e,t);return vt(r.date?r.day:Math.floor(Zi(n,r.ms)/et))}function ax(e){const t=_t("formatDuration",e[0]),n=ox("formatDuration",e[1]);Om.includes(n)||se(`unknown duration format ${n}`);const r=Am(Math.abs(t)*60);r>1e15&&se("number out of range");const o=Math.floor(r/60),i=r-o*60;return`${t<0&&r>0?"-":""}${n==="hh:mm"?ho(o,2):String(o)}:${ho(i,2)}`}function lx(e){const t=_t("round",e[0]),n=e.length>1?e[1]:0;(typeof n!="number"||!Number.isInteger(n)||n<0||n>10)&&se("round needs 0 to 10 digits");let r=1;for(let o=0;o<n;o++)r*=10;return st(Am(t*r)/r)}function cx(e){return typeof e=="string"?[...e].length:Array.isArray(e)?e.length:Dr(e)?Object.keys(e).length:se(`size needs a list, string or map, got ${We(e)}`)}const Ai={mul:{params:["number","number"],args:["a","b"],run:([e,t])=>st(_t("mul",e)*_t("mul",t)),returns:mt("number")},div:{params:["number","number"],args:["a","b"],run:([e,t])=>{const n=_t("div",e),r=_t("div",t);return r===0&&se("division by zero"),st(n/r)},returns:mt("number")},mod:{params:["number","number"],args:["a","b"],run:([e,t])=>{const n=_t("mod",e),r=_t("mod",t);return r===0&&se("modulo by zero"),st(n%r)},returns:mt("number")},round:{params:["number","number"],min:1,args:["value","digits"],run:lx,returns:mt("number")},floor:{params:["number"],args:["value"],run:([e])=>st(Math.floor(_t("floor",e))),returns:mt("number")},ceil:{params:["number"],args:["value"],run:([e])=>st(Math.ceil(_t("ceil",e))),returns:mt("number")},abs:{params:["number"],args:["value"],run:([e])=>st(Math.abs(_t("abs",e))),returns:mt("number")},min:{params:["number"],variadic:!0,args:["values"],run:e=>st(Math.min(...e.map(t=>_t("min",t)))),returns:mt("number")},max:{params:["number"],variadic:!0,args:["values"],run:e=>st(Math.max(...e.map(t=>_t("max",t)))),returns:mt("number")},today:{params:[],args:[],run:(e,t)=>ra(Math.floor(Zi(t,t.now)/et)),returns:mt("date")},now:{params:[],args:[],run:(e,t)=>Si(t.now),returns:mt("timestamp")},dateAdd:{params:["temporal","number","string"],args:["date","n","unit"],run:ix,returns:wl},dateDiff:{params:["temporal","temporal","string"],args:["a","b","unit"],run:sx,returns:mt("number")},startOf:{params:["temporal","string"],args:["date","unit"],run:(e,t)=>Xd("startOf",e,t),returns:wl},endOf:{params:["temporal","string"],args:["date","unit"],run:(e,t)=>Xd("endOf",e,t),returns:wl},weekday:{params:["temporal"],args:["date"],run:([e],t)=>{const n=Zd("weekday",e,t);return Gi(n.y,n.m,n.d)||7},returns:mt("number")},isoWeek:{params:["temporal"],args:["date"],run:([e],t)=>{const n=Zd("isoWeek",e,t);return Sm(n.y,n.m,n.d).week},returns:mt("number")},hours:{params:["number"],args:["minutes"],run:([e])=>st(_t("hours",e)/60),returns:mt("number")},formatDuration:{params:["number","string"],args:["hours","format"],run:ax,returns:mt("string")},size:{params:["sized"],args:["value"],run:([e])=>cx(e),returns:mt("number")},orElse:{params:["any","any"],args:["value","default"],run:([e,t])=>e??t??null,returns:e=>{const t=Pt(e[0]);return t==="null"?Pt(e[1]):t}}},ux=Object.fromEntries(Au.map(e=>[e,t=>Em(e,t)?.value])),dx=new Set(["map","filter","all","exists"]);function Tu(e){return{now:Math.floor(e.now??Date.now()),offset:e.offset??(()=>0)}}function Mu(e,t,n){const r=t.variadic?1:t.min??t.params.length,o=t.variadic?1/0:t.params.length;return n>=r&&n<=o?null:t.variadic?`${e} takes at least 1 argument`:r===o?`${e} takes ${r} argument${r===1?"":"s"}`:`${e} takes ${r} or ${o} arguments`}function Em(e,t,n={}){const r={value:t.default};if(e==="expr"){if(typeof t.expr!="string")return r;const s=Eu(t.expr,Dr(t.vars)?t.vars:{},n);return"value"in s?{value:s.value}:r}if(e==="size"||!Object.prototype.hasOwnProperty.call(Ai,e))return;const o=Ai[e];let i;if(o.variadic)i=Array.isArray(t.values)?t.values:[];else for(i=o.args.map(s=>t[s]);i.length>(o.min??o.params.length)&&i[i.length-1]===void 0;)i.pop();if(Mu(e,o,i.length))return r;try{return{value:o.run(i,Tu(n))}}catch(s){if(s instanceof Bo)return r;throw s}}const px=["==","!=","<=",">=","&&","||"],fx="+-*/%<>!()[],.?:",sr=e=>e!==void 0&&e>="0"&&e<="9",Im=e=>e!==void 0&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="_"),hx=e=>Im(e)||sr(e);function mx(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r===" "||r===" "||r===`
2
2
  `||r==="\r"){n++;continue}const o=n;if(sr(r)){for(;sr(e[n]);)n++;if(e[n]==="."&&sr(e[n+1]))for(n++;sr(e[n]);)n++;if((e[n]==="e"||e[n]==="E")&&(sr(e[n+1])||(e[n+1]==="+"||e[n+1]==="-")&&sr(e[n+2])))for(n+=2;sr(e[n]);)n++;const s=e.slice(o,n).join("");t.push({t:"num",v:Number(s),at:o,text:s});continue}if(r==="'"||r==='"'){n++;let s="";for(;;){const a=e[n];if((a===void 0||a===`
3
3
  `)&&se(`at ${o}: unterminated string`),a===r)break;if(a==="\\"){const l=e[n+1],c={"\\":"\\","'":"'",'"':'"',n:`
4
4
  `,t:" ",r:"\r"};(l===void 0||c[l]===void 0)&&se(`at ${n}: unknown escape \\${l??""}`),s+=c[l],n+=2;continue}s+=a,n++}n++,t.push({t:"str",v:s,at:o,text:e.slice(o,n).join("")});continue}if(Im(r)){for(;hx(e[n]);)n++;const s=e.slice(o,n).join("");t.push({t:"id",v:s,at:o,text:s});continue}const i=r+(e[n+1]??"");if(px.includes(i)){t.push({t:"op",v:i,at:o,text:i}),n+=2;continue}if(fx.includes(r)){t.push({t:"op",v:r,at:o,text:r}),n++;continue}se(`at ${o}: unexpected ${r}`)}return t.push({t:"end",v:"",at:e.length,text:"end"}),t}function Pm(e){if(e.k==="id")return e.name;if(e.k!=="field")return null;const t=Pm(e.of);return t===null?null:`${t}.${e.name}`}function Do(e){if(e.k==="id")return e.name;if(e.k==="field"){const t=Do(e.of);return t===null?null:`${t}.${e.name}`}if(e.k==="index"){const t=Do(e.of),n=e.index.k==="lit"?e.index.v:void 0;if(t===null)return null;if(typeof n=="number")return`${t}[${Wa(n)}]`;if(typeof n=="string")return`${t}['${n}']`}return null}function Dm(e){const t=new Set,n=(r,o)=>{switch(r.k){case"lit":return;case"id":o.includes(r.name)||t.add(r.name);return;case"list":return r.items.forEach(i=>n(i,o));case"field":return n(r.of,o);case"has":return n(r.of,o);case"index":return n(r.of,o),n(r.index,o);case"unary":return n(r.arg,o);case"bin":return n(r.a,o),n(r.b,o);case"cond":return n(r.test,o),n(r.then,o),n(r.else,o);case"call":return r.args.forEach(i=>n(i,o));case"macro":return n(r.of,o),n(r.body,[...o,r.v])}};return n(e,[]),[...t].sort((r,o)=>r<o?-1:r>o?1:0)}const Rm=e=>e.k==="field"?Rm(e.of):e.at;class gx{constructor(t){this.tokens=t}tokens;i=0;depth=0;inBody=0;peek(){return this.tokens[this.i]}isOp(t){const n=this.peek();return n.t==="op"&&n.v===t}next(){return this.tokens[this.i++]}unexpected(){const t=this.peek();return se(`at ${t.at}: unexpected ${t.text}`)}expect(t){return this.isOp(t)||this.unexpected(),this.next()}enter(t){++this.depth>Po.maxDepth&&se(`at ${t}: expression is nested too deeply`)}parseAll(){const t=this.expr();return this.peek().t!=="end"&&this.unexpected(),t}expr(){const t=this.peek().at;this.enter(t);const n=this.or();let r=n;if(this.isOp("?")){this.next();const o=this.expr();this.expect(":");const i=this.expr();r={k:"cond",test:n,then:o,else:i,at:t}}return this.depth--,r}binary(t,n){let r=n();for(;;){const o=this.peek();if(o.t!=="op"||!t.includes(o.v))return r;this.next();const i=n();r={k:"bin",op:o.v,a:r,b:i,at:o.at}}}or(){return this.binary(["||"],()=>this.and())}and(){return this.binary(["&&"],()=>this.rel())}rel(){return this.binary(["==","!=","<","<=",">",">="],()=>this.add())}add(){return this.binary(["+","-"],()=>this.mul())}mul(){return this.binary(["*","/","%"],()=>this.unary())}unary(){const t=this.peek();if(t.t==="op"&&(t.v==="!"||t.v==="-")){this.next(),this.enter(t.at);const n=this.unary();return this.depth--,{k:"unary",op:t.v,arg:n,at:t.at}}return this.postfix()}postfix(){let t=this.primary();for(;;){if(this.isOp(".")){this.next();const n=this.peek();if(n.t!=="id"&&this.unexpected(),this.next(),this.isOp("(")){if(!dx.has(n.v)){const i=Pm(t),s=i===null?"pure":ki(`${i}.${n.v}`);s!=="pure"&&se(`at ${Rm(t)}: ${ta(`${i}.${n.v}`,s)}: an expression is pure, use an action step`),se(`at ${n.at}: unknown method ${n.v}`)}this.inBody>0&&se(`at ${n.at}: nested comprehensions are not allowed`),this.next();const r=this.peek();(r.t!=="id"||this.tokens[this.i+1]?.t!=="op"||this.tokens[this.i+1]?.v!==",")&&se(`at ${r.at}: ${n.v} needs a name first`),this.next(),this.next(),this.inBody++;const o=this.expr();this.inBody--,this.expect(")"),t={k:"macro",fn:n.v,of:t,v:r.v,body:o,at:n.at}}else t={k:"field",of:t,name:n.v,at:n.at};continue}if(this.isOp("[")){const n=this.next().at,r=this.expr();this.expect("]"),t={k:"index",of:t,index:r,at:n};continue}return t}}list(t){const n=[];if(this.isOp(t))return this.next(),n;for(;;){if(n.push(this.expr()),this.isOp(",")){if(this.next(),this.isOp(t)&&t==="]")return this.next(),n;continue}return this.expect(t),n}}primary(){const t=this.peek();if(t.t==="num")return this.next(),Number.isFinite(t.v)||se(`at ${t.at}: number out of range`),{k:"lit",v:t.v,at:t.at};if(t.t==="str")return this.next(),{k:"lit",v:t.v,at:t.at};if(t.t==="id"){this.next();const n=t.v;if(n==="true"||n==="false")return{k:"lit",v:n==="true",at:t.at};if(n==="null")return{k:"lit",v:null,at:t.at};if(n==="has"&&this.isOp("(")){this.next();const r=this.expr();return this.expect(")"),r.k!=="field"&&se(`at ${t.at}: has needs a field: has(a.b)${r.k==="id"?`; for a name write ${r.name} != null`:""}`),{k:"has",of:r,at:t.at}}if(this.isOp("(")){if(!Object.prototype.hasOwnProperty.call(Ai,n)){const r=ki(n);r!=="pure"&&se(`at ${t.at}: ${ta(n,r)}: an expression is pure, use an action step`),se(`at ${t.at}: unknown function ${n}`)}return this.next(),{k:"call",fn:n,args:this.list(")"),at:t.at}}return{k:"id",name:n,at:t.at}}if(t.t==="op"&&t.v==="("){this.next();const n=this.expr();return this.expect(")"),n}return t.t==="op"&&t.v==="["?(this.next(),{k:"list",items:this.list("]"),at:t.at}):this.unexpected()}}function Wo(e){try{const t=Array.from(e);return t.length>Po.maxLength&&se(`expression is longer than ${Po.maxLength} characters`),{ast:new gx(mx(t)).parseAll()}}catch(t){if(t instanceof Bo)return{error:t.message};throw t}}class Fm{constructor(t,n,r){this.vars=t,this.env=n,this.maxSteps=r}vars;env;maxSteps;steps=0;step(){++this.steps>this.maxSteps&&se("step limit exceeded")}ev(t,n){switch(this.step(),t.k){case"lit":return t.v;case"list":return t.items.map(r=>this.ev(r,n));case"id":{for(let r=n;r;r=r.parent)if(r.name===t.name)return r.value;return Object.prototype.hasOwnProperty.call(this.vars,t.name)||se(`unknown name ${t.name}`),this.vars[t.name]??null}case"has":{const r=this.ev(t.of.of,n);return r==null?!1:Dr(r)?Object.prototype.hasOwnProperty.call(r,t.of.name)&&r[t.of.name]!==null&&r[t.of.name]!==void 0:se(`no field ${t.of.name} on ${We(r)}`)}case"field":{const r=this.ev(t.of,n);return r==null?null:Dr(r)?Object.prototype.hasOwnProperty.call(r,t.name)?r[t.name]??null:null:se(`no field ${t.name} on ${We(r)}`)}case"index":{const r=this.ev(t.of,n),o=this.ev(t.index,n);return Array.isArray(r)?typeof o!="number"?se(`a list index is a number, got ${We(o)}`):(Number.isInteger(o)||se(`a list index is a whole number, got ${Wa(o)}`),r[o]??null):Dr(r)?typeof o!="string"?se(`a map key is a string, got ${We(o)}`):Object.prototype.hasOwnProperty.call(r,o)?r[o]??null:null:r==null?null:se(`cannot index ${We(r)}`)}case"unary":{const r=this.ev(t.arg,n);return t.op==="-"?(typeof r!="number"&&se(`cannot apply - to ${We(r)}`),st(-r)):(typeof r!="boolean"&&se(`cannot apply ! to ${We(r)}`),!r)}case"cond":{const r=this.ev(t.test,n);return typeof r!="boolean"&&se(`cannot use ${We(r)} as a condition`),this.ev(r?t.then:t.else,n)}case"bin":return this.binary(t,n);case"call":{const r=t.args.map(s=>this.ev(s,n)),o=Ai[t.fn],i=Mu(t.fn,o,r.length);return i&&se(i),o.run(r,this.env)}case"macro":{const r=this.ev(t.of,n);if(!Array.isArray(r))return se(`${t.fn} needs a list, got ${We(r)}`);const o=[];for(const i of r){this.step();const s=this.ev(t.body,{name:t.v,value:i??null,parent:n});if(t.fn==="map"){o.push(s);continue}if(typeof s!="boolean"&&se(`${t.fn} needs a bool, got ${We(s)}`),t.fn==="filter")s&&o.push(i??null);else{if(t.fn==="all"&&!s)return!1;if(t.fn==="exists"&&s)return!0}}return t.fn==="all"?!0:t.fn==="exists"?!1:o}}}binary(t,n){if(t.op==="&&"||t.op==="||"){const i=this.ev(t.a,n);if(typeof i!="boolean"&&se(`cannot apply ${t.op} to ${We(i)}`),t.op==="&&"?!i:i)return i;const s=this.ev(t.b,n);return typeof s!="boolean"&&se(`cannot apply ${t.op} to ${We(s)}`),s}const r=this.ev(t.a,n)??null,o=this.ev(t.b,n)??null;switch(t.op){case"==":return na(r,o);case"!=":return!na(r,o);case"<":case"<=":case">":case">=":{typeof r=="number"&&typeof o=="number"||typeof r=="string"&&typeof o=="string"||se(`cannot compare ${We(r)} and ${We(o)}`);const i=r<o?-1:r>o?1:0;return t.op==="<"?i<0:t.op==="<="?i<=0:t.op===">"?i>0:i>=0}case"+":return typeof r=="number"&&typeof o=="number"?st(r+o):typeof r=="string"&&typeof o=="string"?r+o:Array.isArray(r)&&Array.isArray(o)?[...r,...o]:se(`cannot apply + to ${We(r)} and ${We(o)}`);default:return typeof r!="number"||typeof o!="number"?se(`cannot apply ${t.op} to ${We(r)} and ${We(o)}`):t.op==="-"?st(r-o):t.op==="*"?st(r*o):(o===0&&se(t.op==="/"?"division by zero":"modulo by zero"),st(t.op==="/"?r/o:r%o))}}}function yx(e,t,n={}){const r=new Fm(t,Tu(n),n.maxSteps??Po.maxSteps);try{return{result:{value:r.ev(e,null)??null},steps:r.steps}}catch(o){if(o instanceof Bo)return{result:{error:o.message},steps:r.steps};throw o}}function Eu(e,t={},n={}){let r;if(typeof e=="string"){const o=Wo(e);if("error"in o)return o;r=o.ast}else r=e;try{return{value:new Fm(t,Tu(n),n.maxSteps??Po.maxSteps).ev(r,null)??null}}catch(o){if(o instanceof Bo)return{error:o.message};throw o}}const Ot=e=>typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===1&&Object.prototype.hasOwnProperty.call(e,"?"),Ze=e=>Ot(e)||e==="null"?e:{"?":e},Pt=e=>Ot(e)?e["?"]:e;function Be(e){return Ot(e)?`${Be(e["?"])}?`:typeof e=="string"?e:Array.isArray(e)?"list":"map"}const Is=e=>typeof e=="object"&&!Array.isArray(e)&&!Ot(e),Xt=e=>e==="string"||e==="date"||e==="timestamp",Ye=e=>e==="dyn"||e==="null";function bx(e,t){return e==="any"||Ye(t)?!0:e==="number"?t==="number":e==="string"||e==="temporal"?Xt(t):t==="string"||t==="map"||Array.isArray(t)||Is(t)}const vx={number:"a number",string:"a string",temporal:"a date",sized:"a list, string or map",any:"a value"};function pi(e){return e.k==="lit"?e.v:void 0}function Mr(e){if(e.k==="has"){const t=Do(e.of);return{yes:t===null?[]:[t],no:[]}}if(e.k==="bin"&&(e.op==="=="||e.op==="!=")){const t=pi(e.a)===null&&e.a.k==="lit"?e.b:pi(e.b)===null&&e.b.k==="lit"?e.a:null,n=t?Do(t):null;return n===null?{yes:[],no:[]}:e.op==="!="?{yes:[n],no:[]}:{yes:[],no:[n]}}if(e.k==="bin"&&e.op==="&&"){const t=Mr(e.a),n=Mr(e.b);return{yes:[...t.yes,...n.yes],no:[]}}if(e.k==="bin"&&e.op==="||"){const t=Mr(e.a),n=Mr(e.b);return{yes:[],no:[...t.no,...n.no]}}if(e.k==="unary"&&e.op==="!"){const t=Mr(e.arg);return{yes:t.no,no:t.yes}}return{yes:[],no:[]}}function kl(e){const t=Do(e);return se(`${t??`the value at ${e.at}`} may be missing: guard it with has(), a null check or orElse()`)}class $x{constructor(t){this.types=t}types;present=[];within(t,n,r){const o=this.present;this.present=[...o,...t];try{return this.tc(n,r)}finally{this.present=o}}need(t,n){const r=this.tc(t,n);return Ot(r)&&kl(t),r}tc(t,n){const r=this.type(t,n),o=t.k==="id"||t.k==="field"||t.k==="index"?Do(t):null;return o!==null&&this.present.includes(o)?Pt(r):r}type(t,n){switch(t.k){case"lit":return We(t.v);case"list":{const r=t.items.map(o=>this.tc(o,n));return r.length===0?["dyn"]:[r.every(o=>JSON.stringify(o)===JSON.stringify(r[0]))?r[0]:"dyn"]}case"id":{for(let r=n;r;r=r.parent)if(r.name===t.name)return r.type;return Object.prototype.hasOwnProperty.call(this.types,t.name)?this.types[t.name]:se(`unknown name ${t.name}`)}case"field":case"has":{const r=t.k==="has"?t.of:t,o=this.tc(r.of,n),i=Pt(o);let s;if(i==="map")s=Ze("dyn");else if(i==="dyn"||i==="null")s="dyn";else if(Is(i)){if(!Object.prototype.hasOwnProperty.call(i,r.name))return se(`unknown field ${r.name}`);s=i[r.name]}else return se(`no field ${r.name} on ${Be(i)}`);return t.k==="has"?"bool":Ot(o)?Ze(s):s}case"index":{const r=this.tc(t.of,n),o=Pt(r),i=this.need(t.index,n),s=a=>Ot(r)?Ze(a):a;if(Array.isArray(o))return!Ye(i)&&i!=="number"&&se(`a list index is a number, got ${Be(i)}`),Ze(o[0]);if(Is(o)||o==="map"){!Ye(i)&&!Xt(i)&&se(`a map key is a string, got ${Be(i)}`);const a=pi(t.index);return Is(o)&&typeof a=="string"?(Object.prototype.hasOwnProperty.call(o,a)||se(`unknown field ${a}`),s(o[a])):Ze("dyn")}return Ye(o)?s("dyn"):se(`cannot index ${Be(o)}`)}case"unary":{const r=this.need(t.arg,n),o=t.op==="-"?"number":"bool";return!Ye(r)&&r!==o&&se(`cannot apply ${t.op} to ${Be(r)}`),o}case"cond":{const r=this.need(t.test,n);!Ye(r)&&r!=="bool"&&se(`cannot use ${Be(r)} as a condition`);const o=Mr(t.test),i=this.within(o.yes,t.then,n),s=this.within(o.no,t.else,n);return JSON.stringify(i)===JSON.stringify(s)?i:i==="null"?Ze(s):s==="null"?Ze(i):JSON.stringify(Pt(i))===JSON.stringify(Pt(s))?Ze(Pt(i)):Ot(i)||Ot(s)?Ze("dyn"):"dyn"}case"bin":return this.binary(t,n);case"call":return this.call(t,n);case"macro":{const r=this.need(t.of,n);!Array.isArray(r)&&!Ye(r)&&se(`${t.fn} needs a list, got ${Be(r)}`);const o=Array.isArray(r)?r[0]:"dyn",i=this.tc(t.body,{name:t.v,type:o,parent:n});return t.fn==="map"?[i]:(Ot(i)&&kl(t.body),!Ye(i)&&i!=="bool"&&se(`${t.fn} needs a bool, got ${Be(i)}`),t.fn==="filter"?Array.isArray(r)?r:["dyn"]:"bool")}}}binary(t,n){if(t.op==="&&"||t.op==="||"){const a=this.need(t.a,n),l=Mr(t.a),c=this.within(t.op==="&&"?l.yes:l.no,t.b,n);Ot(c)&&kl(t.b);for(const u of[a,c])!Ye(u)&&u!=="bool"&&se(`cannot apply ${t.op} to ${Be(u)}`);return"bool"}if(t.op==="=="||t.op==="!="){const a=Pt(this.tc(t.a,n)),l=Pt(this.tc(t.b,n));return Ye(a)||Ye(l)||Xt(a)&&Xt(l)||Be(a)===Be(l)||se(`cannot compare ${Be(a)} and ${Be(l)}`),"bool"}const r=this.need(t.a,n),o=this.need(t.b,n),i=Be(r),s=Be(o);switch(t.op){case"<":case"<=":case">":case">=":{const a=l=>Ye(l)||l==="number"||Xt(l);return(!a(r)||!a(o)||r==="number"&&Xt(o)||o==="number"&&Xt(r))&&se(`cannot compare ${i} and ${s}`),"bool"}case"+":return Ye(r)&&Ye(o)?"dyn":(r==="number"||Ye(r))&&(o==="number"||Ye(o))?"number":(Xt(r)||Ye(r))&&(Xt(o)||Ye(o))?"string":(Array.isArray(r)||Ye(r))&&(Array.isArray(o)||Ye(o))?Array.isArray(r)&&Array.isArray(o)&&JSON.stringify(r)===JSON.stringify(o)?r:["dyn"]:se(`cannot apply + to ${i} and ${s}`);default:return(r==="number"||Ye(r))&&(o==="number"||Ye(o))||se(`cannot apply ${t.op} to ${i} and ${s}`),(t.op==="/"||t.op==="%")&&pi(t.b)===0&&se(t.op==="/"?"division by zero":"modulo by zero"),"number"}}call(t,n){const r=Ai[t.fn],o=Mu(t.fn,r,t.args.length);o&&se(o);const i=t.args.map((u,d)=>t.fn==="orElse"&&d===0?this.tc(u,n):this.need(u,n));if(i.forEach((u,d)=>{const p=r.params[Math.min(d,r.params.length-1)];bx(p,Pt(u))||se(`${t.fn} needs ${vx[p]}, got ${Be(u)}`)}),t.fn==="orElse"){const u=Pt(i[0]),d=i[1];!Ye(u)&&!Ye(d)&&!(Xt(u)&&Xt(d))&&Be(u)!==Be(d)&&se(`orElse needs a ${Be(u)} default, got ${Be(d)}`)}const s=u=>t.args[u]?pi(t.args[u]):void 0,a=t.fn==="dateAdd"||t.fn==="dateDiff"?2:t.fn==="startOf"||t.fn==="endOf"?1:-1,l=a>=0?s(a):void 0;if(typeof l=="string"&&((a===2?_u:_m).includes(l)||se(`unknown unit ${l}`),t.fn==="dateAdd"&&i[0]==="date"&&bo[l]!==void 0&&se(`unit ${l} needs a timestamp`)),t.fn==="dateAdd"&&typeof s(1)=="number"&&!Number.isInteger(s(1))&&se(`dateAdd needs a whole number, got ${Wa(s(1))}`),t.fn==="round"&&t.args.length>1){const u=s(1);typeof u=="number"&&(!Number.isInteger(u)||u<0||u>10)&&se("round needs 0 to 10 digits")}t.fn==="div"&&s(1)===0&&se("division by zero"),t.fn==="mod"&&s(1)===0&&se("modulo by zero");const c=t.fn==="formatDuration"?s(1):void 0;return typeof c=="string"&&!Om.includes(c)&&se(`unknown duration format ${c}`),r.returns(i)}}function qa(e,t){const n=Wo(e);if("error"in n)return n;try{return{type:new $x(t).tc(n.ast,null)}}catch(r){if(r instanceof Bo)return{error:r.message};throw r}}const xx="VAPP-103: the input LIMITS every core enforces (the TS reference, the Rust core and through it Swift, Compose and gpui). An agent's input past a limit is refused with an issue, never worked on. `maxComponents` = nodes the reducer places in one surface's tree, template nodes included (the rest is dropped: `surface: more than N components; the rest is dropped`); a renderer's build holds at most `maxComponents` nodes too: the reduced tree's (after expansion, children and slots) plus, per template ITEM, its template subtree's (nested items charged when they are instantiated); the first item that does not fit and every later one are not rendered, with ONE issue on the template component (the same message). `maxDepth` = nesting levels of the REDUCED tree, after macro expansion (the root and every lifted template = 1, children and slots one level down; a Card, Section or Group macro adds a level; a deeper node is the Unknown placeholder, its subtree dropped: `nesting deeper than N levels`); 48 keeps every tree a core emits (2 JSON levels per node) inside serde_json's default recursion limit of 128, so reduced trees, fixtures and the FFI's JSON round-trip; the Rust core's recursive passes switch to a heap-allocated stack segment when the host thread runs low, so an iOS secondary thread's 512 KB never decides (a 48-level surface lays out on a 128 KB thread, debug build). `maxMessageBytes` = one server message as UTF-8 JSON (host routers refuse it: INVALID_MESSAGE). `maxTemplateItems` = template items one surface instantiates (beyond it the items are not rendered: `template: more than N items; the rest is not rendered`). `maxPointerBytes` / `maxPointerSegments` = a data pointer's length and token count (a longer write is refused). Generated into every target; src/limits.ts reads it.",wx=2e4,kx=48,Sx=4194304,Cx=1e4,Ax=1024,_x=64,Ox={$comment:"EXP-1584/1602: the eUI Motion (Lottie) limits, enforced by the one engine (apps/desktop/crates/eui-motion, src/validate.rs Limits) on every renderer through its WASM and uniffi builds. A source past maxBytes (UTF-8 JSON), maxShapes (shape items: objects with a string `ty` inside a layer's `shapes` or a group's `it`) or maxSeconds ((op − ip) / fr) is refused with an issue (`limit-bytes`, `limit-shapes`, `limit-duration`; expressions are refused too: `expression`); maxVertices = path vertices in one sampled frame (checked per frame by the player, not by the validator); maxFps = the highest frame rate a player samples at; maxPlayingPerSurface = Motion components one surface animates at once. Cases: fixtures/motion-validate.json.",maxBytes:2097152,maxShapes:5e3,maxVertices:1e5,maxSeconds:120,maxFps:60,maxPlayingPerSurface:8},eo={$comment:xx,maxComponents:wx,maxDepth:kx,maxMessageBytes:Sx,maxTemplateItems:Cx,maxPointerBytes:Ax,maxPointerSegments:_x,motion:Ox};Object.fromEntries(Object.entries(eo).filter(([e,t])=>!e.startsWith("$")&&typeof t=="number"));const Ji=eo.maxComponents,_i=eo.maxDepth,Rr=eo.maxMessageBytes,zm=eo.maxTemplateItems,Nm=eo.maxPointerBytes,Lm=eo.maxPointerSegments,$n={usedTwice:"id used twice; only its first place renders",depth:`nesting deeper than ${_i} levels`,components:`surface: more than ${Ji} components; the rest is dropped`,templateItems:`template: more than ${zm} items; the rest is not rendered`,messageBytes:`message larger than ${Rr} bytes`},jm=e=>e.replace(/~1/g,"/").replace(/~0/g,"~");function Bm(e,t={}){if(e.startsWith("/"))return e;const n=t.base??"";return e===""?n:`${n}/${e}`}function Tx(e){return e!==void 0&&Object.prototype.hasOwnProperty.call(e,"item")}const Wm=/^[0-9]+$/;function Ua(e,t){if(t===""||t==="/")return e;let n=e;for(const r of(t.startsWith("/")?t.slice(1):t).split("/")){if(n==null||typeof n!="object")return;const o=jm(r);Array.isArray(n)?n=o==="-"?n.at(-1):Wm.test(o)?n[Number(o)]:void 0:n=Object.prototype.hasOwnProperty.call(n,o)?n[o]:void 0}return n}const Mx=e=>new TextEncoder().encode(e).length;function Ex(e){if(Mx(e)>Nm)return ia.bytes;if(e===""||e==="/")return[];const t=(e.startsWith("/")?e.slice(1):e).split("/");return t.length>Lm?ia.segments:t.map(jm)}const ia={bytes:`data: pointer longer than ${Nm} bytes`,segments:`data: pointer has more than ${Lm} segments`,notIndex:e=>`data: ${JSON.stringify(e)} is not an array index`,pastEnd:(e,t)=>`data: index ${e} is past the end of the array (${t} items)`};function Ix(e,t){if(e==="-")return t;if(!Wm.test(e))return ia.notIndex(e);const n=Number(e);return n<=t?n:ia.pastEnd(e,t)}function Sl(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Iu(e,t,n){const r=Ex(t);if(typeof r=="string")return{data:e,error:r};if(r.length===0)return{data:n===void 0?{}:n};const o=[],i=[];let s=e;for(let a=0;a<r.length;a++){const l=r[a],c=a===r.length-1;if(Array.isArray(s)){const u=Ix(l,s.length);if(typeof u=="string")return{data:e,error:u};const d=[...s];c?n===void 0?u<d.length&&d.splice(u,1):d[u]=n:s=d[u],o.push(d),i.push(u)}else{const u={};if(s!==null&&typeof s=="object")for(const[d,p]of Object.entries(s))Sl(u,d,p);c?n===void 0?delete u[l]:Sl(u,l,n):s=Object.prototype.hasOwnProperty.call(u,l)?u[l]:void 0,o.push(u),i.push(l)}}for(let a=o.length-2;a>=0;a--){const l=o[a];Array.isArray(l)?l[i[a]]=o[a+1]:Sl(l,i[a],o[a+1])}return{data:o[0]}}({...gc,...ux});new Set(bm);new Set(Au);function Px(e,t,n,r={}){let o=e;for(const[i,s]of Object.entries(n??{})){const a=t[i];Ba(a)&&(!a.path.startsWith("/")&&Tx(r)||(o=Iu(o,Bm(a.path,r),s).data))}return o}const Dx=["Dialog","Drawer","AlertDialog","Popover","Tooltip","Menu","Toast"];new Set(Dx);function Pu(e){return e?e.type==="object"?e.shape===void 0:e.type==="array"?e.items!==void 0&&Pu(e.items):!1:!1}function Jd(e,t,n){for(let r=t+1;r<e.length;r+=1){const o=e[r];if(o<=n)return!1;if(o===n+1)return!0}return!1}function Rx(e){return e.map((t,n)=>{if(t<=0)return{elbowAt:null,tee:!1,passThrough:[]};const r=[];for(let o=0;o<=t-2;o+=1)Jd(e,n,o)&&r.push(o);return{elbowAt:t-1,tee:Jd(e,n,t-1),passThrough:r}})}function Du(e){return e.recipe?.macro==="Row"&&e.recipe.part==="root"}function Fx(e){const t=Du(e)?e.recipe?.props.depth:e.props.depth;return typeof t=="number"&&Number.isFinite(t)&&t>0?Math.floor(t):0}function zx(e){return!Du(e)&&e.component!=="TreeGuides"&&typeof e.props.depth=="number"}function Qd(e,t){const n={depth:e};return t.elbowAt!==null&&(n.elbowAt=t.elbowAt),n.tee=t.tee,n.passThrough=t.passThrough,n}function Cl(e){const t=e.map(Fx),n=Rx(t);e.forEach((r,o)=>{const i=n[o];if(Du(r)){const s=Nx(r);s&&(s.props=Qd(t[o],i))}else if(zx(r)){const{depth:s,...a}=Qd(t[o],i);r.props={...r.props,guide:a}}})}function Nx(e){return e.children.find(t=>t.component==="TreeGuides"&&t.recipe?.part==="guides")}function ep(e){const t=n=>{Cl(n.children);for(const r of Object.values(n.slots??{}))Cl([r]),t(r);n.children.forEach(t)};return Cl([e]),t(e),e}const tp=16,Va=yt.breakpoint;function Hm(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}const Lx=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Ka(e){return!Lx(e)||!("base"in e)?!1:Object.keys(e).every(t=>t==="base"||Va.includes(t))}function qm(e,t){let n=e.base;if(t===null)return n;for(const r of Va)if(r in e&&(n=e[r]),r===t)break;return n}function Um(e,t){const n={};for(const[r,o]of Object.entries(e))n[r]=Ka(o)?qm(o,t):o;return n}function jx(e){const t=new Set;for(const n of Object.values(e))if(Ka(n))for(const r of Object.keys(n))r!=="base"&&t.add(r);return Va.filter(n=>t.has(n)).map(n=>({breakpoint:n,props:Um(e,n)}))}function Bx(e,t){if(!e&&!t)return;const n={...e??{}};for(const[r,o]of Object.entries(t??{})){const i=typeof o=="object"&&o!==null&&!Array.isArray(o);n[r]=i?{...n[r]??{},...o}:o}return n}function Wx(e,t){const n=Hm(e);return t&&n.event&&(n.event.context={...n.event.context??{},...t}),n}function Hx(e,t,n){const r={},o=e.view.components[e.macro]?.props??{};for(const i of e.def.recipeProps){const s=e.baseProps[i]??o[i]?.default;s!==void 0&&(r[i]=s)}if(n){const i=Nt(n,t);for(const[s,a]of Object.entries(i))r[s]=a}return r}function np(e,t){return e.length===1?e[0]:{call:t,args:{values:e}}}function qx(e,t){const n=[];if(e.$if!==void 0){const r=Array.isArray(e.$if)?e.$if:[e.$if];for(const o of r){const i=ea(o,t);if(i===!1)return!1;i!==!0&&n.push(i)}}if(e.$any!==void 0){let r=!1;const o=[];for(const i of e.$any){const s=ea(i,t);if(s===!0){r=!0;break}s!==!1&&o.push(s)}if(!r){if(o.length===0)return!1;n.push(np(o,"or"))}}return n.length===0?!0:np(n,"and")}function Ps(e,t,n,r){const o=qx(e,n);if(o===!1)return[];const i=o===!0?void 0:o;if(e.$each!==void 0){const a=Nt(`{${e.$each}}`,n);if(!Array.isArray(a))return[];const l=e.$as??"item";return a.map((c,u)=>op(e,t,{...n,vars:{...n.vars,[l]:c,index:u}},`${r}.${e.part}.${u}`,i))}const s=e.part==="root"?t.source.id:`${r}.${e.part}`;return[op(e,t,n,s,i)]}const rp=e=>JSON.stringify(e);function Ux(e,t,n){if(!e.style)return;const r=Nt(e.style,n);let o=r;for(const i of t.variants){const s=Nt(e.style,{...n,props:i.props}),a={};for(const[l,c]of Object.entries(s))!l.startsWith("@")&&!l.startsWith(":")&&rp(o[l])!==rp(c)&&(a[l]=c);if(Object.keys(a).length>0){const l=`@media (min-width: $breakpoint.${i.breakpoint})`;r[l]={...r[l]??{},...a}}o=s}return Object.keys(r).length>0?r:void 0}function op(e,t,n,r,o){const i=Nt(e.props??{},n)??{},s=Ux(e,t,n),a={id:r,component:e.component,props:i,children:[]};if(s&&(a.style=s),o!==void 0&&(a.visible=o),a.recipe={macro:t.macro,part:e.part,props:Hx(t,n,e.$recipe)},e.$on){const l={};for(const[c,u]of Object.entries(e.$on)){const d=t.source.on?.[u];if(!d)continue;t.claimed.add(u);const p=e.$context?Nt(e.$context,n):void 0;l[c]=Wx(d,p)}Object.keys(l).length>0&&(a.on=l)}if(e.$set)for(const[l,c]of Object.entries(e.$set)){const u=t.baseProps[c.prop];if(!Ba(u))continue;const d=a.on??={};if(d[l]?.functionCall){const f=`on.${e.$on?.[l]??l}: a function action replaces the two-way set of props.${c.prop}; write it in that function's handler or use an event`;t.issues?.some(y=>y.id===t.source.id&&y.message===f)||t.issues?.push({id:t.source.id,message:f});continue}const p=Nt(c.value,n);d[l]={...d[l]??{},functionCall:{call:"set",args:p===void 0?{path:u.path}:{path:u.path,value:p}}}}if(e.$a11y){const l=Nt(e.$a11y,n);Object.keys(l).length>0&&(a.accessibility=l)}if(e.slots)for(const[l,c]of Object.entries(e.slots)){if(typeof c=="string"){const d=c.startsWith("$slot:")?c.slice(6):null,p=d?t.source.slots?.[d]:void 0;p&&((a.slots??={})[l]=p);continue}const[u]=Ps(c,t,n,r);u&&((a.slots??={})[l]=u)}if(e.$template){const l=Nt(e.$template.path,n),c=e.$template.key===void 0?void 0:Nt(e.$template.key,n),[u]=typeof l=="string"&&l?Ps(e.$template.item,t,n,r):[];u&&(t.built.push(u),a.template=typeof c=="string"&&c?{component:u.id,path:l,key:c}:{component:u.id,path:l})}for(const l of e.children??[]){if(l==="$children"){a.children.push(...t.source.children),t.source.template&&(a.template=t.source.template);continue}if(typeof l=="string"){if(l.startsWith("$slot:")){const c=t.source.slots?.[l.slice(6)];c&&a.children.push(c)}continue}a.children.push(...Ps(l,t,n,r))}return a}function Vx(e,t,n,r,o,i,s){if(o>tp)throw new Error(`macro ${t}: expansion deeper than ${tp}`);const a=Um(e.props,null);(e.on?.press||a.href)&&a.pressable===void 0&&r.components[t]?.props.pressable&&(a.pressable=!0);const l={view:r,macro:t,def:n,source:e,baseProps:a,variants:jx(e.props),claimed:new Set,issues:i,built:[]},c={id:e.id,props:a,vars:{}},[u]=Ps(n.root,l,c,e.id);u.style=Bx(u.style,e.style),u.style&&Object.keys(u.style).length===0&&delete u.style;const d=e.recipe?[...e.recipe.authored??[]]:Object.keys(e.style??{}).sort();d.length>0&&u.recipe&&(u.recipe={...u.recipe,authored:d}),e.visible!==void 0&&(u.visible=e.visible),e.accessibility&&(u.accessibility={...u.accessibility??{},...e.accessibility});const p={...u.on??{}};for(const[f,y]of Object.entries(e.on??{}))l.claimed.has(f)||(p[f]=y);Object.keys(p).length>0?u.on=p:delete u.on;const h=Oi(u,r,o+1,i,s);for(const f of l.built)s.push(Oi(f,r,o+1,i,s));return h}function Oi(e,t,n,r,o){const i={...e,children:e.children.map(a=>Oi(a,t,n,r,o))};if(e.slots){i.slots={};for(const[a,l]of Object.entries(e.slots))i.slots[a]=Oi(l,t,n,r,o)}const s=t.macros[i.component];return s&&t.components[i.component]?.kind==="macro"?Vx(i,i.component,s,t,n,r,o):i}function ip(e,t={}){const n=[],r=ep(Oi(Hm(e),Ki(t.extensions),0,t.issues,n));for(const o of n)t.templates?.push(ep(o));return r}const Kx=new Set(sm),Vm=e=>Ki(e),Gx=new Set(qv),Yx=/^\d{4}-\d{2}-\d{2}$/;function sp(e,t,n,r,o){switch(e.type){case"string":case"markdown":case"url":typeof t!="string"?o.push({path:n,message:"expected a string"}):Su(t)!==null&&!b$(t)&&o.push({path:n,message:`unknown built-in string ${t} (catalog/strings.json)`});return;case"date":(typeof t!="string"||t!==""&&!Yx.test(t))&&o.push({path:n,message:"expected yyyy-mm-dd"});return;case"number":typeof t!="number"||!Number.isFinite(t)?o.push({path:n,message:"expected a number"}):e.minimum!==void 0&&t<e.minimum?o.push({path:n,message:`expected at least ${e.minimum}`}):e.maximum!==void 0&&t>e.maximum&&o.push({path:n,message:`expected at most ${e.maximum}`});return;case"boolean":typeof t!="boolean"&&o.push({path:n,message:"expected a boolean"});return;case"enum":{const i=e.values??(e.enum?r.enums[e.enum]:void 0);i?i.includes(t)||o.push({path:n,message:`expected one of ${i.join("|")}`}):o.push({path:n,message:`enum ${e.enum} is not defined`});return}case"icon":(typeof t!="string"||!Kx.has(t))&&o.push({path:n,message:"not an icons.json name"});return;case"color":if(im(t)&&tr(t)?.group==="color")return;o.push({path:n,message:"expected $color.<name>"});return;case"style":for(const i of um(t,{path:n,root:!1}))o.push(i);return;case"array":if(!Array.isArray(t)){o.push({path:n,message:"expected an array"});return}e.items&&t.forEach((i,s)=>Km(e.items,i,`${n}[${s}]`,r,o));return;case"object":{if(typeof t!="object"||t===null||Array.isArray(t)){o.push({path:n,message:"expected an object"});return}if(!e.shape)return;const i=r.defs[e.shape];if(!i){o.push({path:n,message:`shape ${e.shape} is not defined`});return}Gm(i.properties,t,n,r,o);return}}}function Km(e,t,n,r,o){if(!(e.bindable&&Ue(t))){if(e.responsive&&Ka(t)){for(const[i,s]of Object.entries(t))sp(e,s,`${n}.${i}`,r,o);return}if(e.responsive&&typeof t=="object"&&t!==null&&!Array.isArray(t)&&!Ue(t)){o.push({path:n,message:`a responsive value needs base and only ${Va.join("|")} besides`});return}sp(e,t,n,r,o)}}function Gm(e,t,n,r,o){for(const[i,s]of Object.entries(e)){const a=t[i];if(a==null){s.required&&o.push({path:`${n}.${i}`,message:"required"});continue}Km(s,a,`${n}.${i}`,r,o)}for(const i of Object.keys(t))i in e||o.push({path:`${n}.${i}`,message:"unknown prop"})}function Xx(e){return Gx.has(e)||/^[A-Za-z_][\w-]*(\.[A-Za-z_][\w-]*)+$/.test(e)}function Ru(e,t,n){Xx(e.call)||n.push({path:t,message:`unknown function "${e.call}"; known: the catalog functions, or a namespaced host function (app.toast)`})}function Br(e,t,n){if(Array.isArray(e)){e.forEach((r,o)=>Br(r,`${t}[${o}]`,n));return}if(!(typeof e!="object"||e===null)){jo(e)&&Ru(e,t,n);for(const[r,o]of Object.entries(e))Br(o,`${t}.${r}`,n)}}function vc(e,t,n,r,o){if(jo(e)){Ru(e,n,o),Br(e.args,`${n}.args`,o);return}if(!t||Pu(t))return;if(t.type==="style")return Br(e,n,o);if(t.type==="array"&&t.items&&Array.isArray(e)){e.forEach((s,a)=>vc(s,t.items,`${n}[${a}]`,r,o));return}const i=t.type==="object"&&t.shape?r.defs[t.shape]:void 0;if(i&&typeof e=="object"&&e!==null&&!Array.isArray(e))for(const[s,a]of Object.entries(e))vc(a,i.properties[s],`${n}.${s}`,r,o)}function Zx(e,t,n){if(typeof e!="object"||e===null)return;const{functionCall:r,event:o}=e;jo(r)&&(Ru(r,`${t}.functionCall`,n),Br(r.args,`${t}.functionCall.args`,n)),typeof o=="object"&&o!==null&&Br(o.context,`${t}.event.context`,n)}function Ym(e,t={}){const n=[],r=Vm(t.extensions),o=r.components[e.component];if(e.style!==void 0)for(const i of um(e.style,{path:"style"}))n.push(i);for(const[i,s]of Object.entries(e.props))vc(s,o?.props[i],`props.${i}`,r,n);e.visible!==void 0&&Br(e.visible,"visible",n);for(const[i,s]of Object.entries(e.on??{}))Zx(s,`on.${i}`,n);if(e.component==="Table"&&Array.isArray(e.props.columns)){const i=Object.keys(e.slots??{});e.props.columns.forEach((s,a)=>{if(typeof s!="object"||s===null||s.type!=="slot")return;const l=s.slot;typeof l!="string"?n.push({path:`props.columns[${a}].slot`,message:"a slot column names one of the Table's slots"}):i.includes(l)||n.push({path:`props.columns[${a}].slot`,message:`no slot "${l}" on this Table; slots: ${i.join("|")||"none"}`})})}return n}function Xm(e,t,n={}){const r=[];return Gm(e.props,t,n.path??"props",Vm(n.extensions),r),r}const Jx="Round 2 (docs/round-2-contract.md §7): the layout NUMBERS every painter shares where no theme token decides (px unless noted). `windowThreshold` = items past which List and Table window; `windowOverscan` = items rendered beyond each viewport edge; `resizeStep` = percentage points per arrow key on a Resizable handle; `panelMin` = a panel's min (percent) when unset; `resizeHandleHit` = a handle's hit area across its hairline; `fieldIntrinsicWidth` = the max-content width of a text field (Input, Textarea, NumberField, ChipInput: never the browser's `size` default) — picker triggers (Select, DatePicker, DateRangePicker, TimePicker) size to their content; `mediaIntrinsicWidth` = the max-content width of an Image/Video without a width (its min-content is 0); `mediaAspectRatio` = width/height of an Image without `aspectRatio` or a height (Video: its `aspectRatio` default); `treeGuideColumn` = one TreeGuides gutter column (the recipe's `line` width is the STROKE; round 3: 14, the ×4 app indent, the elbow lands on the parent's lead glyph); `treeGuideRadius` = the elbow's corner radius; `treeGuideBridge` = how far the guide verticals overshoot the row's TOP edge (paint only) so a Section's hairline divider never breaks the line. EXP-1259 (packages/domain-contract/fixtures/feedback-states.json + search-list.json): `pendingDelayMs` = how long a `loading` Button waits before it shows the spinner and its `pendingLabel` (a fast action never flashes; presses are refused at once); `skeletonPulseMs` / `skeletonOpacityLow` / `skeletonOpacityHigh` = the placeholder's ONE opacity pulse (low → high → low, ease-in-out), `skeletonReducedOpacity` = its static opacity under reduce motion; `searchListFade` = the bottom fade over a SearchList (or a searchable submenu) while more rows sit below. EXP-1548: `tableColumnMin` = the narrowest a Table column without a `width` gets; a table whose columns need more than its box scrolls horizontally. Generated into every target; src/layout.ts reads it.",Qx=50,ew=5,tw=10,nw=10,rw=8,ow=160,iw=320,sw=1.7777778,aw=14,lw=3,cw=1,uw=150,dw=1600,pw=.45,fw=.9,hw=.6,mw=24,gw=120,ft={$comment:Jx,windowThreshold:Qx,windowOverscan:ew,resizeStep:tw,panelMin:nw,resizeHandleHit:rw,fieldIntrinsicWidth:ow,mediaIntrinsicWidth:iw,mediaAspectRatio:sw,treeGuideColumn:aw,treeGuideRadius:lw,treeGuideBridge:cw,pendingDelayMs:uw,skeletonPulseMs:dw,skeletonOpacityLow:pw,skeletonOpacityHigh:fw,skeletonReducedOpacity:hw,searchListFade:mw,tableColumnMin:gw};Object.fromEntries(Object.entries(ft).filter(([e])=>!e.startsWith("$")));const Fu=ft.windowThreshold,Zm=ft.windowOverscan,yw=ft.resizeStep,bw=ft.panelMin,ap=ft.resizeHandleHit,Jm=ft.mediaIntrinsicWidth,$c=ft.mediaAspectRatio,Al=ft.treeGuideColumn,vw=ft.treeGuideRadius,_l=ft.treeGuideBridge,$w=ft.pendingDelayMs,xw=ft.skeletonPulseMs,lp=ft.skeletonOpacityLow,ww=ft.skeletonOpacityHigh,kw=ft.skeletonReducedOpacity,Sw=ft.searchListFade,Qm=ft.tableColumnMin;function eg(e,t){const n=new Set;return e.map((r,o)=>{let i=String(o);if(t!==void 0){const s=Ua(r,t.startsWith("/")?t:`/${t}`),a=s==null||s===""?null:typeof s=="object"?JSON.stringify(s):String(s);for(i=a!==null&&!n.has(a)?a:`#${o}`;n.has(i);)i=`#${i}`}return n.add(i),i})}const Cw=e=>e.replace(/~/g,"~0").replace(/\//g,"~1");function Aw(e,t="id"){return eg(e,`/${Cw(t)}`)}const _w=e=>e.replace(/~/g,"~0").replace(/\./g,"~1"),tg=(e,t)=>`${e}\0${t}`;function cp(e){let t=0;const n=[e];for(;n.length;){const r=n.pop();t++;for(const o of Object.values(r.slots??{}))n.push(o);for(const o of r.children)n.push(o)}return t}function Ow(e,t,n){const r=new Map,o=new Map,i=u=>{let d=o.get(u);return d===void 0&&o.set(u,d=cp(u)),d};let s=0,a=cp(e),l=null;const c=[{node:e,scope:""}];for(;c.length;){const u=c.pop();if("site"in u){if(l||u.index>=u.length||(s>=zm?l={id:u.component,message:$n.templateItems}:a+u.size>Ji&&(l={id:u.component,message:$n.components}),l))continue;s++,a+=u.size,r.set(u.site,u.index+1),c.push({...u,index:u.index+1}),c.push({node:u.tpl,scope:`${u.path}/${u.index}`});continue}const{node:d,scope:p}=u,h=[];for(const g of Object.values(d.slots??{}))h.push({node:g,scope:p});for(const g of d.children)h.push({node:g,scope:p});const f=d.template,y=f?n(f.component):void 0;if(f&&y){const g=Bm(f.path,{base:p}),v=Ua(t,g),m=Array.isArray(v)&&d.component==="List"&&d.children.length+v.length>Fu;if(Array.isArray(v)&&!m){const b=tg(d.id,p);r.set(b,0),h.push({site:b,component:f.component,tpl:y,path:g,size:i(y),index:0,length:v.length})}}for(let g=h.length-1;g>=0;g--)c.push(h[g])}return{allowed:r,issue:l}}function zu(e,t=0){const n=new Array(e.length+1);let r=0;for(let o=0;o<e.length;o++)n[o]=r,r+=e[o]+(o<e.length-1?t:0);return n[e.length]=r,n}function Tw(e,t){let n=0,r=0;for(const i of e)typeof i=="number"&&(n+=i,r++);const o=r?n/r:t;return e.map(i=>typeof i=="number"?i:o)}function xc(e,t,n){for(;e<t;){const r=e+t>>>1;n(r)?t=r:e=r+1}return e}function Mw(e,t,n,r,o=Zm,i){const s=e.length,a=i??zu(e,t),l=a[s];let c=xc(0,s,h=>a[h]+e[h]>=n),u=xc(c,s,h=>a[h]>=n+r);if(c=Math.max(0,c-o),u=Math.min(s,u+o),u<=c)return{start:c,end:c,before:0,after:l,total:l};const d=a[c],p=l-(a[u-1]+e[u-1]);return{start:c,end:u,before:d,after:p,total:l}}function Ew(e,t,n,r,o,i="nearest",s=0,a){const l=zu(e,t),c=l[e.length];if(n<0||n>=e.length)return o;const u=l[n],d=e[n];let p=o;return i==="start"?p=u-s:i==="end"?p=u+d-r:i==="center"?p=u+d/2-(r+s)/2:u-s<o?p=u-s:u+d>o+r&&(p=u+d-r),Math.max(0,Math.min(Math.max(0,c-r),p))}function Iw(e,t){const n=[],r=t.startsWith("/")?t:`/${t}`;return e.forEach((o,i)=>{const s=Ua(o,r),a=s==null?"":typeof s=="object"?JSON.stringify(s):String(s),l=n.at(-1);l&&l.value===a?l.count++:n.push({value:a,start:i,count:1})}),n}function Pw(e){const t=[];return e.forEach((n,r)=>{t.push({header:r});for(let o=0;o<n.count;o++)t.push({item:n.start+o})}),t}function Dw(e,t,n,r){const o=xc(0,n.length,c=>e[n[c]]>r)-1;if(o<0)return null;const i=n[o],s=n[o+1],a=t[i],l=s===void 0?r:Math.min(r,e[s]-a);return{row:i,offset:l}}const rn=on.zoomableImage,Yn=1e-6,vo=e=>{const t=Math.round(e*1e6)/1e6;return Object.is(t,-0)?0:t},Nu=e=>({scale:vo(e.scale),x:vo(e.x),y:vo(e.y)}),Ga=(e,t,n)=>Math.max(t,Math.min(n,e)),qn=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:0;function nr(e){return{iw:qn(e.natural.width),ih:qn(e.natural.height),vw:qn(e.viewport.width),vh:qn(e.viewport.height)}}function ng(e){const t=qn(e.width),n=qn(e.height);return t>0&&n>0&&t/n<rn.tallAspect}function Rw(e){const{iw:t,ih:n,vw:r,vh:o}=nr(e);return t===0||n===0||r===0||o===0?1:Math.min(1,r/t,o/n)}function $r(e){const t=Rw(e),n=qn(e.maxScale)||rn.maxScale;return{min:t,max:Math.max(t,n)}}function Ya(e){const{iw:t,vw:n}=nr(e),{min:r,max:o}=$r(e),i=e.initial??"auto",s=i==="auto"?ng(e.natural)?"fitWidth":"fit":i;let a=r;return s==="fitWidth"?a=t>0&&n>0?Math.min(1,n/t):1:s==="actual"&&(a=1),Ga(a,r,o)}function up(e,t,n){return t<=n+Yn?(n-t)/2:Ga(e,n-t,0)}function Ho(e,t){const{iw:n,ih:r,vw:o,vh:i}=nr(t),{min:s,max:a}=$r(t),l=Ga(e.scale,s,a);return Nu({scale:l,x:up(e.x,n*l,o),y:up(e.y,r*l,i)})}function Xa(e){const{iw:t,vw:n}=nr(e),r=Ya(e);return Ho({scale:r,x:(n-t*r)/2,y:0},e)}function Za(e,t){return Math.abs(e.scale-Ya(t))<1e-4}function Qi(e,t,n,r){const{min:o,max:i}=$r(r),s=Ga(t,o,i),a=e.scale>0?s/e.scale:1;return Ho({scale:s,x:n.x-(n.x-e.x)*a,y:n.y-(n.y-e.y)*a},r)}function Lu(e){const{vw:t,vh:n}=nr(e);return{x:t/2,y:n/2}}function Fw(e,t="pixel"){const n=t==="line"?e*rn.wheelLinePx:e;return Math.exp(-n*rn.wheelRate)}function zw(e,t,n,r,o){return Qi(e,e.scale*Fw(t,n),r,o)}function Nw(e,t,n,r){return Ho({scale:e.scale,x:e.x-t,y:e.y-n},r)}function Lw(e){const{min:t,max:n}=$r(e),r=Ya(e),o=[...rn.presets,t,r,n].filter(s=>s>=t-Yn&&s<=n+Yn),i=[];for(const s of o.sort((a,l)=>a-l))(i.length===0||s-i[i.length-1]>1e-4)&&i.push(vo(s));return i}function jw(e,t,n){const r=Lw(n);if(t>0)return r.find(o=>o>e+1e-4)??r[r.length-1];for(let o=r.length-1;o>=0;o--)if(r[o]<e-1e-4)return r[o];return r[0]}function wc(e,t,n){return Qi(e,jw(e.scale,t,n),Lu(n),n)}function Bw(e){const{max:t}=$r(e);return vo(Math.min(t,Math.max(1,rn.doubleTapFactor*Ya(e))))}function Ww(e,t,n){return Za(e,n)?Qi(e,Bw(n),t,n):Xa(n)}function Hw(e,t,n){return t==="+"||t==="="?wc(e,1,n):t==="-"||t==="−"||t==="_"?wc(e,-1,n):t==="0"?Xa(n):t==="1"?Qi(e,1,Lu(n),n):null}function sa(e,t){if(t<=0||e===0)return 0;const n=e<0?-1:1,r=Math.abs(e);return vo(n*(1-1/(r*rn.rubber/t+1))*t)}function aa(e,t,n){const r=t<=n+Yn?(n-t)/2:n-t,o=t<=n+Yn?(n-t)/2:0;return e>o?o+sa(e-o,n):e<r?r+sa(e-r,n):e}function qw(e,t,n,r){const{iw:o,ih:i,vw:s,vh:a}=nr(r);return Nu({scale:e.scale,x:aa(e.x+t,o*e.scale,s),y:aa(e.y+n,i*e.scale,a)})}function Uw(e,t,n,r){const{iw:o,ih:i,vw:s,vh:a}=nr(r),{min:l,max:c}=$r(r),u=e.scale*t;let d=u;u>c?d=c+sa(u-c,c):u<l&&(d=l+sa(u-l,l));const p=e.scale>0?d/e.scale:1;return Nu({scale:d,x:aa(n.x-(n.x-e.x)*p,o*d,s),y:aa(n.y-(n.y-e.y)*p,i*d,a)})}function Vw(e,t,n,r,o){const i=rn.momentumTauMs,s=i*(1-Math.exp(-Math.max(0,r)/i));return Ho({scale:e.scale,x:e.x+t*s,y:e.y+n*s},o)}function Kw(e,t,n){const r=Math.exp(-Math.max(0,n)/rn.momentumTauMs);return Math.hypot(e,t)*r>.01}function Gw(e,t){const{iw:n,ih:r,vw:o,vh:i}=nr(t);return{x:n*e.scale>o+Yn,y:r*e.scale>i+Yn}}function Yw(e,t,n){const r={...n,viewport:t};if(Za(e,r))return Xa(n);const{vw:o,vh:i}=nr(n),s=qn(t.width)/2,a=qn(t.height)/2;return Ho({scale:e.scale,x:o/2-(s-e.x),y:i/2-(a-e.y)},n)}function ju(e){return`${Math.round(e*100)}%`}function rg(e,t,n){const{min:r,max:o}=$r(t),i=Za(e,t),s=[];for(const a of rn.menuPresets)a===0?s.push({scale:null,label:n,checked:i}):a>=r-Yn&&a<=o+Yn&&s.push({scale:a,label:ju(a),checked:!i&&Math.abs(e.scale-a)<1e-4});return s}function Xw(e,t){const{min:n,max:r}=$r(t);return{atMin:e.scale<=n+1e-4,atMax:e.scale>=r-1e-4}}const Un=1e-9,$o=(e,t,n)=>Math.max(t,Math.min(n,e)),Vt=e=>{const t=Math.round(e*1e6)/1e6;return Object.is(t,-0)?0:t};function Ti(e,t,n){const r=e?.[t]??{},o=100/Math.max(1,n),i=$o(typeof r.min=="number"&&Number.isFinite(r.min)?r.min:bw,0,o),s=$o(typeof r.max=="number"&&Number.isFinite(r.max)?r.max:100,i,100);return{min:i,max:s,collapsible:r.collapsible===!0}}function Zw(e,t,n){if(t<=0)return[];const r=Array.from({length:t},(c,u)=>{const d=e?.[u];return typeof d=="number"&&Number.isFinite(d)&&d>=0?d:null}),o=r.filter(c=>c===null).length;let i;if(o===t)i=r.map(()=>100/t);else{const c=r.reduce((d,p)=>d+(p??0),0),u=Math.max(0,100-c);i=r.map(d=>d??u/o)}const s=i.reduce((c,u)=>c+u,0);i=s>Un?i.map(c=>c*100/s):i.map(()=>100/t);const a=i.map((c,u)=>Ti(n,u,t));i=i.map((c,u)=>a[u].collapsible&&c<=Un?0:$o(c,a[u].min,a[u].max));let l=100-i.reduce((c,u)=>c+u,0);for(let c=0;c<t&&Math.abs(l)>Un;c++){if(a[c].collapsible&&i[c]===0)continue;const u=l>0?a[c].max-i[c]:a[c].min-i[c],d=l>0?Math.min(l,u):Math.max(l,u);i[c]+=d,l-=d}return i.map(Vt)}function Ds(e,t,n,r){const o=[...e],i=t,s=t+1;if(i<0||s>=e.length||!Number.isFinite(n))return o.map(Vt);const a=Ti(r,i,e.length),l=Ti(r,s,e.length),c=Math.max(a.min-e[i],e[s]-l.max),u=Math.min(a.max-e[i],e[s]-l.min);let d=$o(n,Math.min(c,0),Math.max(u,0));return a.collapsible&&n<0&&e[i]>0&&e[i]+n<a.min/2&&e[s]+e[i]<=l.max+Un?d=-e[i]:l.collapsible&&n>0&&e[s]>0&&e[s]-n<l.min/2&&e[i]+e[s]<=a.max+Un?d=e[s]:a.collapsible&&e[i]===0?d=n>=a.min/2&&u>=a.min-Un?$o(n,a.min,u):0:l.collapsible&&e[s]===0&&(d=-n>=l.min/2&&-c>=l.min-Un?-$o(-n,l.min,-c):0),o[i]=e[i]+d,o[s]=e[s]-d,o.map(Vt)}function Jw(e,t,n,r,o="ltr",i){const s=t,a=t+1;if(s<0||a>=e.length)return e.map(Vt);const l=Ti(i,s,e.length),c=Ti(i,a,e.length),u=r==="horizontal"&&o==="rtl"?-1:1,d=p=>Ds(e,t,p*yw,i);switch(n){case"ArrowRight":return r==="horizontal"?d(u):e.map(Vt);case"ArrowLeft":return r==="horizontal"?d(-u):e.map(Vt);case"ArrowDown":return r==="vertical"?d(1):e.map(Vt);case"ArrowUp":return r==="vertical"?d(-1):e.map(Vt);case"Home":return Ds(e,t,l.min-e[s],i);case"End":return Ds(e,t,l.max-e[s],i);case"Enter":{const p=[...e];if(l.collapsible){const h=e[s]>0?-e[s]:Math.min(l.min,e[a]-c.min);if(e[a]-h>c.max+Un||h===0)return e.map(Vt);p[s]+=h,p[a]-=h}else if(c.collapsible){const h=e[a]>0?e[a]:-Math.min(c.min,e[s]-l.min);if(e[s]+h>l.max+Un||h===0)return e.map(Vt);p[s]+=h,p[a]-=h}return p.map(Vt)}default:return e.map(Vt)}}function Qw(e,t,n,r,o="ltr",i=1){const s=Math.max(1,t-Math.max(0,n-1)*i),a=r==="horizontal"&&o==="rtl"?-1:1;return Vt(e*100/s*a)}const e1=["Input","Textarea","NumberField","Checkbox","Radio","ChoiceTiles","Switch","Select","ChipInput","DatePicker","DateRangePicker","TimePicker","FileUpload","Slider"],t1=["records.","actions."];function n1(e){return t1.some(t=>e.startsWith(t))}function r1(e){if(!e||typeof e!="object")return!1;const t=e.functionCall?.call;return typeof t=="string"&&n1(t)}function o1(e){const t=Object.values(e.on??{});return t.length>0?t.some(r1):e1.includes(e.component)}function la(e){let t=e.children;for(let i=0;i<e.children.length;i++){const s=la(e.children[i]);s!==e.children[i]&&(t===e.children&&(t=e.children.slice()),t[i]=s)}let n=e.slots;if(e.slots)for(const[i,s]of Object.entries(e.slots)){const a=la(s);a!==s&&(n={...n===e.slots?e.slots:n,[i]:a})}const r=o1(e)&&e.props.disabled!==!0;if(!r&&t===e.children&&n===e.slots)return e;const o={...e,children:t};return n&&(o.slots=n),r&&(o.props={...e.props,disabled:!0}),o}function i1(e){let t=null;for(const[n,r]of Object.entries(e)){const o=la(r);o!==r&&((t??={...e})[n]=o)}return t??e}const es=Object.fromEntries(Object.entries(on.animations).filter(([e])=>!e.startsWith("$"))),s1=Object.keys(es),a1=e=>{const t=Math.round(e*1e4)/1e4;return Object.is(t,-0)?0:t},xr=e=>String(a1(e)),l1='@property --xui-a-opacity{syntax:"<number>";inherits:false;initial-value:1}@property --xui-band{syntax:"<number>";inherits:true;initial-value:1}';function c1(e){return es[e]?.keyframes.some(t=>t.opacity!==void 0)??!1}function u1(e){const t=es[e];if(!t)return"";const n=t.keyframes.map(r=>{const o=[];return r.opacity!==void 0&&o.push(`--xui-a-opacity:${xr(r.opacity)}`),(r.translateX!==void 0||r.translateY!==void 0)&&o.push(`translate:${xr(r.translateX??0)}px ${xr(r.translateY??0)}px`),r.rotate!==void 0&&o.push(`rotate:${xr(r.rotate)}deg`),r.scale!==void 0&&o.push(`scale:${xr(r.scale)}`),r.band!==void 0&&o.push(`--xui-band:${xr(r.band)}`),`${xr(r.offset*100)}%{${o.join(";")}}`});return`@keyframes xui-${e}{${n.join("")}}`}const og=vr.default,d1=vr.languageAliases;function ig(e){const t=e.replace(/_/g,"-").split("-").filter(Boolean),n=(t[0]??"").toLowerCase(),r=d1[n]??n,o=t.slice(1).find(i=>/^[A-Za-z]{2}$|^\d{3}$/.test(i));return{language:r,region:o?o.toUpperCase():null}}const dp=(()=>{const e={};for(const[t,n]of Object.entries(vr.weekStart.regions))for(const r of n)e[r]=Number(t);return e})();function p1(e){const{language:t,region:n}=ig(e);return n??vr.likelyRegion[t]??null}function f1(e){const t=p1(e);return t!==null&&t in dp?dp[t]:vr.weekStart.default}function h1(e){return vr.rtl.includes(ig(e).language)?"rtl":"ltr"}const m1=vr.rtlMirroredIcons,g1={operators:"+-*/%=&|<>!?^~:@#",punctuation:"()[]{},.;"},y1={plain:{plain:!0},json:{strings:['"'],keywords:["true","false","null"],keyStrings:!0},js:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"',"'","`"],multiline:["`"],types:"capitalized",keywords:["async","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","if","import","in","instanceof","let","new","null","of","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]},ts:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"',"'","`"],multiline:["`"],types:"capitalized",typeNames:["any","bigint","boolean","never","number","object","string","symbol","unknown"],keywords:["abstract","as","async","await","break","case","catch","class","const","continue","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","if","implements","import","in","infer","instanceof","interface","is","keyof","let","namespace","new","null","of","private","protected","public","readonly","return","satisfies","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","yield"]},tsx:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"',"'","`"],multiline:["`"],types:"capitalized",typeNames:["any","bigint","boolean","never","number","object","string","symbol","unknown"],keywords:["abstract","as","async","await","break","case","catch","class","const","continue","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","if","implements","import","in","infer","instanceof","interface","is","keyof","let","namespace","new","null","of","private","protected","public","readonly","return","satisfies","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","yield"]},rust:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"'],multiline:['"'],types:"capitalized",typeNames:["bool","char","f32","f64","i8","i16","i32","i64","i128","isize","str","u8","u16","u32","u64","u128","usize"],keywords:["as","async","await","break","const","continue","crate","dyn","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","Self","static","struct","super","trait","true","type","unsafe","use","where","while"]},swift:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"'],types:"capitalized",keywords:["any","as","associatedtype","async","await","break","case","catch","class","continue","default","defer","do","else","enum","extension","fallthrough","false","for","func","guard","if","import","in","init","inout","internal","is","let","nil","private","protocol","public","repeat","rethrows","return","self","Self","some","static","struct","subscript","super","switch","throw","throws","true","try","typealias","var","where","while"]},kotlin:{lineComment:["//"],blockComment:[["/*","*/"]],strings:['"',"'"],types:"capitalized",keywords:["as","break","by","catch","class","companion","constructor","continue","data","do","else","enum","false","finally","for","fun","if","import","in","init","interface","internal","is","lateinit","null","object","open","override","package","private","protected","public","return","sealed","super","suspend","this","throw","true","try","typealias","val","var","when","while"]},python:{lineComment:["#"],strings:['"',"'"],types:"capitalized",keywords:["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","self","try","while","with","yield"]},bash:{lineComment:["#"],strings:['"',"'"],multiline:['"',"'"],keywords:["case","do","done","echo","elif","else","esac","exit","export","fi","for","function","if","in","local","readonly","return","then","until","while"]},html:{markup:!0,blockComment:[["<!--","-->"]],strings:['"',"'"],numbers:!1},css:{blockComment:[["/*","*/"]],strings:['"',"'"],identExtra:"-@",keyIdents:!0,operators:"+*/%=&|<>!?^~:#",keywords:["@container","@font-face","@import","@keyframes","@layer","@media","@supports","auto","important","inherit","initial","none","unset"]},sql:{lineComment:["--"],blockComment:[["/*","*/"]],strings:["'",'"'],caseInsensitive:!0,keywords:["all","alter","and","as","asc","between","by","case","create","default","delete","desc","distinct","drop","else","end","exists","foreign","from","group","having","in","index","inner","insert","into","is","join","key","left","like","limit","not","null","offset","on","or","order","outer","primary","references","returning","right","select","set","table","then","union","update","values","when","where","with"]},yaml:{lineComment:["#"],strings:['"',"'"],keyIdents:!0,identExtra:"-",keywords:["true","false","null","yes","no"]},markdown:{lineKinds:{"#":"keyword",">":"comment"},strings:["`"],numbers:!1,operators:"",punctuation:""},ansi:{ansi:!0,numbers:!1,operators:"",punctuation:"",lineKinds:{"$ ":"comment","> ":"comment","BUILD SUCCESSFUL":"success","BUILD FAILED":"error","PASS ":"success","FAIL ":"error",FAILED:"error","(pass)":"success","(fail)":"error","test result: ok":"success","test result: FAILED":"error","error:":"error","error[":"error","Error:":"error","warning:":"warning","✓":"success","✔":"success","✗":"error","✘":"error"}}},kc={defaults:g1,languages:y1},Sc=kc.languages,no=e=>e!==void 0&&e>="0"&&e<="9",ro=e=>e!==void 0&&(e>="a"&&e<="z"||e>="A"&&e<="Z"),cr=e=>e===" "||e===" ";function pp(e,t){let n=t;for(;cr(e[n]);)n++;return e[n]}function sg(e,t,n=!0){const r=[],o=e.length,i=t.operators??kc.defaults.operators,s=t.punctuation??kc.defaults.punctuation,a=t.identExtra??"",l=g=>ro(g)||g==="_"||g==="$"||g!==void 0&&a.includes(g),c=g=>l(g)||no(g),u=new Set(t.keywords??[]),d=new Set(t.typeNames??[]),p=(g,v)=>r.push({kind:g,text:v}),h=()=>{for(let g=r.length-1;g>=0;g--)if(r[g].text.trim()!=="")return r[g]};if(t.plain)return e?[{kind:"plain",text:e}]:[];let f=0,y=!1;for(;f<o;){const g=e[f];if(g===`
@@ -20,7 +20,7 @@ Source of truth: packages/exponential-ui/themes/*.theme.json, themes/exponential
20
20
  `);if(i<0)return n;this.skipping=!1,r=i+1}let o=t.indexOf(`
21
21
  `,r);for(;o>=0;){const i=t.slice(r,o),s=this.bytes+Mc(i)>Rr;n.push(s?null:this.parts.length?this.parts.join("")+i:i),this.parts=[],this.bytes=0,r=o+1,o=t.indexOf(`
22
22
  `,r)}if(r<t.length){const i=t.slice(r);this.parts.push(i),this.bytes+=Mc(i)}return this.bytes>Rr&&(n.push(null),this.parts=[],this.bytes=0,this.skipping=!0),n}end(){const t=this.skipping,n=this.parts.join("");return this.parts=[],this.bytes=0,this.skipping=!1,t?null:n}}const Fg=(e,t)=>({at:e,message:`${t} ${e}: ${$n.messageBytes}`});class zg{lines=new Rg;line=0;push(t){const n={messages:[],issues:[]};for(const r of this.lines.push(t))this.line+=1,r===null?n.issues.push(Fg(this.line,"line")):Pp(r,this.line,n);return n}end(){const t={messages:[],issues:[]},n=this.lines.end();return n!==null&&n.trim()&&(this.line+=1,Pp(n,this.line,t)),t}}function Ng(e){const t=e.trim();if(t.startsWith("["))try{const i=JSON.parse(t);if(Array.isArray(i))return{messages:i,issues:[]}}catch{}const n=new zg,r=n.push(e),o=n.end();return{messages:[...r.messages,...o.messages],issues:[...r.issues,...o.issues]}}class oS{retryMs;lines=new Rg;data=[];dataBytes=0;oversized=!1;event="";count=0;push(t){const n={messages:[],issues:[]};for(const r of this.lines.push(t))r===null?this.dropData():this.line(r.endsWith("\r")?r.slice(0,-1):r,n);return n}end(){const t={messages:[],issues:[]},n=this.lines.end();return n===null?this.dropData():n&&this.line(n,t),this.dispatch(t),t}dropData(){this.data=[],this.dataBytes=0,this.oversized=!0}line(t,n){if(t==="")return this.dispatch(n);if(t.startsWith(":"))return;const r=t.indexOf(":"),o=r<0?t:t.slice(0,r);let i=r<0?"":t.slice(r+1);if(i.startsWith(" ")&&(i=i.slice(1)),o==="data"){if(this.oversized)return;if(this.dataBytes+=Mc(i)+1,this.dataBytes>Rr)return this.dropData();this.data.push(i)}else o==="event"?this.event=i:o==="retry"&&/^\d+$/.test(i)&&(this.retryMs=Number(i))}dispatch(t){if(this.dataBytes=0,this.oversized){this.oversized=!1,this.count+=1,this.data=[],this.event="",t.issues.push(Fg(this.count,"event"));return}if(!this.data.length){this.event="";return}this.count+=1;const n=this.event||"message",r=this.data.join(`
23
- `);if(this.data=[],this.event="",!j2.includes(n))return;const o=Ng(r);t.messages.push(...o.messages),o.issues.length&&t.issues.push({at:this.count,message:`event ${this.count} is not JSON`})}}const Ec=/^[a-z][a-z0-9_]{0,31}$/,iS=["id","createdAt","updatedAt","createdBy","authorId","author"],Dp=["string","number","integer","boolean","array"],Rp=["string","number","integer","boolean"],xs=["date","date-time","time","attachment"],sS=/^\/api\/attachments\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/,Zt=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Rl=e=>Array.isArray(e)&&e.every(t=>typeof t=="string");function Lg(e,t){const n=[];if(!Zt(e)||e.type!=="object"||!Zt(e.properties))return[{path:t,message:'a record schema is {type: "object", properties}'}];for(const r of Object.keys(e.properties).sort()){const o=e.properties[r],i=`${t}/properties/${r}`;if(iS.includes(r)&&n.push({path:i,message:`${r} is a reserved record key`}),!Zt(o)||typeof o.type!="string"||!Dp.includes(o.type)){n.push({path:i,message:`a field is {type: ${Dp.join("|")}}`});continue}if(o.enum!==void 0&&(!Rl(o.enum)||!o.enum.length||o.type!=="string")&&n.push({path:`${i}/enum`,message:"enum is a non-empty list of strings on a string field"}),o.type==="array"){const s=o.items;!Zt(s)||typeof s.type!="string"||!Rp.includes(s.type)?n.push({path:`${i}/items`,message:`items is {type: ${Rp.join("|")}}`}):(s.enum!==void 0&&(!Rl(s.enum)||!s.enum.length||s.type!=="string")&&n.push({path:`${i}/items/enum`,message:"enum is a non-empty list of strings on a string item"}),s.format!==void 0&&(typeof s.format!="string"||!xs.includes(s.format)||s.type!=="string")&&n.push({path:`${i}/items/format`,message:`format is ${xs.join("|")} on a string item`}))}else o.items!==void 0&&n.push({path:`${i}/items`,message:"items belongs to an array field"});o.format!==void 0&&(typeof o.format!="string"||!xs.includes(o.format)||o.type!=="string")&&n.push({path:`${i}/format`,message:`format is ${xs.join("|")} on a string field`});for(const s of["maxLength","minimum","maximum"])o[s]!==void 0&&typeof o[s]!="number"&&n.push({path:`${i}/${s}`,message:`${s} is a number`})}return e.required!==void 0&&(Rl(e.required)?e.required.forEach((r,o)=>{Object.prototype.hasOwnProperty.call(e.properties,r)||n.push({path:`${t}/required/${o}`,message:`${r} is not a declared field`})}):n.push({path:`${t}/required`,message:"required is a list of field names"})),e.additionalProperties!==void 0&&typeof e.additionalProperties!="boolean"&&n.push({path:`${t}/additionalProperties`,message:"additionalProperties is a boolean"}),n}const aS=/^\d{4}-\d{2}-\d{2}$/,lS=/^\d{2}:\d{2}(:\d{2})?$/,cS=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})$/;function Fp(e,t,n,r){const o=[];switch(e){case"string":return typeof t!="string"?[{path:n,message:"a string"}]:(r.enum&&!r.enum.includes(t)&&o.push({path:n,message:`one of ${r.enum.join("|")}`}),r.maxLength!==void 0&&[...t].length>r.maxLength&&o.push({path:n,message:`at most ${r.maxLength} characters`}),r.format==="date"&&!aS.test(t)&&o.push({path:n,message:"a date (YYYY-MM-DD)"}),r.format==="date-time"&&!cS.test(t)&&o.push({path:n,message:"a date-time (ISO 8601)"}),r.format==="time"&&!lS.test(t)&&o.push({path:n,message:"a time (HH:MM)"}),r.format==="attachment"&&!sS.test(t)&&o.push({path:n,message:"an attachment (/api/attachments/<id>)"}),o);case"number":case"integer":return typeof t!="number"||!Number.isFinite(t)?[{path:n,message:"a number"}]:e==="integer"&&!Number.isInteger(t)?[{path:n,message:"an integer"}]:(r.minimum!==void 0&&t<r.minimum&&o.push({path:n,message:`at least ${r.minimum}`}),r.maximum!==void 0&&t>r.maximum&&o.push({path:n,message:`at most ${r.maximum}`}),o);case"boolean":return typeof t=="boolean"?[]:[{path:n,message:"a boolean"}];default:return[]}}function Pi(e,t){if(!Zt(t))return[{path:"",message:"a record is an object"}];const n=[],r=new Set(e.required??[]);for(const o of Object.keys(e.properties).sort()){const i=e.properties[o],s=t[o];if(s==null){r.has(o)&&n.push({path:`/${o}`,message:"required"});continue}if(i.type==="array"){if(!Array.isArray(s)){n.push({path:`/${o}`,message:"a list"});continue}i.maxLength!==void 0&&s.length>i.maxLength&&n.push({path:`/${o}`,message:`at most ${i.maxLength} items`});const a=i.items??{type:"string"};s.forEach((l,c)=>n.push(...Fp(a.type,l,`/${o}/${c}`,{enum:a.enum,format:a.format})));continue}n.push(...Fp(i.type,s,`/${o}`,i))}if(e.additionalProperties!==!0)for(const o of Object.keys(t).sort())Object.prototype.hasOwnProperty.call(e.properties,o)||n.push({path:`/${o}`,message:"not in the schema"});return n}function uS(e,t,n){if(!Zt(e)||e.refs===void 0)return[];const r=e.refs;if(!Zt(r))return[{path:`${t}/refs`,message:'refs is {field: {kind} | "issue" | "member"}'}];const o=Zt(e.schema)&&Zt(e.schema.properties)?e.schema.properties:{},i=[];for(const s of Object.keys(r).sort()){const a=`${t}/refs/${s}`,l=r[s],c=Object.prototype.hasOwnProperty.call(o,s)?o[s]:void 0;if(Zt(c)?c.type!=="string"&&i.push({path:a,message:"a ref is a string field"}):i.push({path:a,message:`${s} is not a declared field`}),!(l==="issue"||l==="member")){if(!Zt(l)||Object.keys(l).length!==1||typeof l.kind!="string"||!l.kind){i.push({path:a,message:'a ref is {kind}, "issue" or "member"'});continue}(!Zt(n)||!Object.prototype.hasOwnProperty.call(n,l.kind))&&i.push({path:`${a}/kind`,message:`records:${l.kind} names no declared kind`})}}return i}const jg=["read","create","update","delete"],Bg=["member","author","owners"],dS={read:"member",create:"member",update:"author",delete:"author"},ws={none:"You have no access to this app",readOnly:"You have read-only access to this app",author:{read:"Only the record's author or a team owner can read it",update:"Only the record's author or a team owner can change it",delete:"Only the record's author or a team owner can change it"},owners:{read:"Only team owners can read these records",create:"Only team owners can add these records",update:"Only team owners can change these records",delete:"Only team owners can change these records"}},Ic=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Wg=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function pS(e,t){if(!Ic(e))return[{path:t,message:"policy is {read?, create?, update?, delete?}"}];const n=[];for(const r of Object.keys(e).sort()){const o=e[r];jg.includes(r)?r==="create"&&o==="author"?n.push({path:`${t}/create`,message:"create is member or owners: a new record has no author yet"}):(typeof o!="string"||!Bg.includes(o))&&n.push({path:`${t}/${r}`,message:`${r} is member, author or owners`}):n.push({path:`${t}/${r}`,message:`unknown policy op ${r}: read, create, update or delete`})}return n}function Pc(e){const t={...dS},n=Ic(e)&&Ic(e.policy)?e.policy:null;if(!n)return t;for(const r of jg){const o=Wg(n,r)?n[r]:void 0;typeof o=="string"&&Bg.includes(o)&&!(r==="create"&&o==="author")&&(t[r]=o)}return t}const Hg=e=>e?.authorId??e?.createdBy??null;function Dc(e,t,n,r){const o=n.access??"write";if(n.id===null||n.role===null||o==="none")return ws.none;if(o==="read"&&t!=="read")return ws.readOnly;if(n.role==="owner")return null;const i=e[t];if(i==="member")return null;if(i==="owners"||t==="create")return ws.owners[t];const s=Hg(r);return s!==null&&s===n.id?null:ws.author[t]}const fS=(e,t,n,r)=>Dc(e,t,n,r)===null;function zp(e,t,n){const r=new Map,o=i=>{let s=r.get(i);return s||r.set(i,s=Pc(t&&Wg(t,i)?t[i]:void 0)),s};return e.filter(i=>fS(o(i.kind),"read",n,i))}const zs="transitions",hS=["member","author","owners"],mS=["field","initial","from","who"],ma="->",Dt=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Er=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Rc=e=>Array.isArray(e)&&e.every(t=>typeof t=="string");function gS(e){const t=Dt(e)?e.transitions:void 0;if(!Dt(t)||typeof t.field!="string"||!t.field||!Dt(t.from))return null;const n={};for(const o of Object.keys(t.from))Rc(t.from[o])&&(n[o]=t.from[o]);const r={};if(Dt(t.who))for(const o of Object.keys(t.who))typeof t.who[o]=="string"&&(r[o]=t.who[o]);return{field:t.field,...Rc(t.initial)?{initial:t.initial}:{},from:n,who:r}}function yS(e){if(e.initial)return[...e.initial];const t=Object.keys(e.from).sort(),n=new Set(Object.values(e.from).flat()),r=t.filter(o=>!n.has(o));return r.length?r:t}const qg=(e,t)=>{const n=e?.[t];return typeof n=="string"&&n!==""?n:null};function bS(e,t,n){const r=e.who??{};return Er(r,`${t}${ma}${n}`)?r[`${t}${ma}${n}`]:Er(r,n)?r[n]:"member"}function vS(e,t,n,r,o,i){if(e==="member"||r.role==="owner")return null;if(e==="owners")return`Only team owners can move ${t} to ${n}`;if(e==="author"){const s=Hg(i);return s!==null&&s===r.id?null:`Only the record's author or a team owner can move ${t} to ${n}`}if(e.startsWith("role:")){const s=e.slice(5),a=qg(o,s);return a!==null&&a===r.id?null:`Only the record's ${s} or a team owner can move ${t} to ${n}`}return`Nobody can move ${t} to ${n}`}function $S(e,t,n,r){if(!e)return[];const o=qg(t,e.field);if(o===null)return yS(e);const i=Er(e.from,o)?e.from[o]:[];return n?i.filter(s=>vS(bS(e,o,s),e.field,s,n,t,r)===null):[...i]}function xS(e,t,n){if(!Dt(e)||e.transitions===void 0)return[];const r=e.transitions,o=`${t}/transitions`;if(!Dt(r))return[{path:o,message:"transitions is {field, from, initial?, who?}"}];const i=[];for(const p of Object.keys(r).sort())mS.includes(p)||i.push({path:`${o}/${p}`,message:`unknown key ${p}`});const s=Dt(e.schema)&&Dt(e.schema.properties)?e.schema.properties:{},a=typeof r.field=="string"?r.field:null,l=a!==null&&Er(s,a)?s[a]:void 0;let c=null;a===null||!a?i.push({path:`${o}/field`,message:"field is the name of an enum field"}):Dt(l)?l.type!=="string"||!Rc(l.enum)?i.push({path:`${o}/field`,message:`${a} is not an enum field`}):c=l.enum:i.push({path:`${o}/field`,message:`${a} is not a declared field`});const u=(p,h)=>{typeof p!="string"?i.push({path:h,message:"a state is a string"}):c&&!c.includes(p)&&i.push({path:h,message:`${p} is not a state of ${a}`})};if(!Dt(r.from))i.push({path:`${o}/from`,message:"from is {state: [next state…]}"});else for(const p of Object.keys(r.from).sort()){u(p,`${o}/from/${p}`);const h=r.from[p];Array.isArray(h)?h.forEach((f,y)=>u(f,`${o}/from/${p}/${y}`)):i.push({path:`${o}/from/${p}`,message:"the next states are a list"})}if(r.initial!==void 0&&(!Array.isArray(r.initial)||!r.initial.length?i.push({path:`${o}/initial`,message:"initial is a non-empty list of states"}):r.initial.forEach((p,h)=>u(p,`${o}/initial/${h}`))),r.who!==void 0)if(!Dt(r.who))i.push({path:`${o}/who`,message:'who is {"a->b" | state: level}'});else{const p=Dt(e.refs)?e.refs:{};for(const h of Object.keys(r.who).sort()){const f=`${o}/who/${h}`,y=h.indexOf(ma);if(y>=0){const v=h.slice(0,y),m=h.slice(y+ma.length);Dt(r.from)&&Array.isArray(r.from[v])&&r.from[v].includes(m)||i.push({path:f,message:`${v} → ${m} is not a declared transition`})}else u(h,f);const g=r.who[h];if(typeof g=="string"&&g.startsWith("role:")){const v=g.slice(5);Er(p,v)&&p[v]==="member"||i.push({path:f,message:`${g}: ${v} is not a member ref of ${n}`})}else(typeof g!="string"||!hS.includes(g))&&i.push({path:f,message:"a level is member, author, owners or role:<field>"})}}const d=Dt(e.computed)?e.computed:{};return(Er(s,zs)||Er(d,zs))&&i.push({path:o,message:`a kind with transitions declares no field ${zs} (its rows carry the next states there)`}),i}const Np=64,Lp=32,Ug=["rename","default","drop","map","renameKind"],ar=e=>!!e&&typeof e=="object"&&!Array.isArray(e),jp=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),wS=/^(0|[1-9]\d*|x|\*)(?:\.(0|[1-9]\d*|x|\*))?(?:\.(0|[1-9]\d*|x|\*))?$/,kS=/^(>=|<=|>|<|=|\^|~)?(.+)$/,SS=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?$/,CS=e=>{const t=SS.exec(e);return t?[Number(t[1]),Number(t[2]??0),Number(t[3]??0)]:null},AS=(e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2];function _S(e,t){const n=kS.exec(e);if(!n)return null;const r=n[1]??"",o=n[2];if(r===""||r==="="){const a=wS.exec(o);return a?[a[1],a[2],a[3]].every((c,u)=>c===void 0||c==="x"||c==="*"||Number(c)===t[u]):null}const i=CS(o);if(!i)return null;const s=AS(t,i);return r===">="?s>=0:r===">"?s>0:r==="<="?s<=0:r==="<"?s<0:r==="~"?t[0]===i[0]&&t[1]===i[1]&&s>=0:i[0]>0?t[0]===i[0]&&s>=0:i[1]>0?t[0]===0&&t[1]===i[1]&&s>=0:s===0}function OS(e){if(typeof e!="string"||!e.trim())return null;const t=e.split("||").map(n=>n.trim().split(/\s+/).filter(Boolean));if(t.some(n=>!n.length))return null;for(const n of t)for(const r of n)if(_S(r,[0,0,0])===null)return null;return t}const TS=e=>OS(e)!==null,MS=e=>{if(!ar(e))return null;const t=Object.keys(e);return t.length===1&&Ug.includes(t[0])?t[0]:null};function ES(e){if(!ar(e)||e.migrations===void 0)return[];const t=e.migrations;if(!Array.isArray(t))return[{path:"/migrations",message:"migrations is a list of {from, kind, ops}"}];const n=[];t.length>Np&&n.push({path:"/migrations",message:`at most ${Np} migrations`});const r=ar(e.records)?e.records:{},o=i=>typeof i=="string"&&i.length>0;return t.forEach((i,s)=>{const a=`/migrations/${s}`;if(!ar(i))return void n.push({path:a,message:"a migration is {from, kind, ops}"});for(const c of Object.keys(i).sort())["from","kind","ops"].includes(c)||n.push({path:`${a}/${c}`,message:`unknown key ${c}`});(typeof i.from!="string"||!TS(i.from))&&n.push({path:`${a}/from`,message:"from is a version or a range (1.2.3, 1.x, ^1.2.0, >=1.0.0 <2.0.0)"});let l=typeof i.kind=="string"&&Ec.test(i.kind)?i.kind:null;if(l===null&&n.push({path:`${a}/kind`,message:"kind is a kind name"}),!Array.isArray(i.ops))return void n.push({path:`${a}/ops`,message:"ops is a list"});i.ops.length>Lp&&n.push({path:`${a}/ops`,message:`at most ${Lp} ops`}),i.ops.forEach((c,u)=>{const d=`${a}/ops/${u}`,p=MS(c);if(!p)return void n.push({path:d,message:`an op is one of ${Ug.join(", ")}`});const h=c[p],f=y=>n.push({path:`${d}/${p}`,message:`${p} is ${y}`});if(p==="rename"&&!(ar(h)&&o(h.from)&&o(h.to)&&Object.keys(h).length===2))f("{from, to}");else if(p==="default"&&!(ar(h)&&o(h.field)&&jp(h,"value")&&Object.keys(h).length===2))f("{field, value}");else if(p==="drop"&&!(ar(h)&&o(h.field)&&Object.keys(h).length===1))f("{field}");else if(p==="map")if(!(ar(h)&&o(h.field)&&typeof h.expr=="string"&&Object.keys(h).length===2))f("{field, expr}");else{const y=Wo(h.expr);"error"in y&&n.push({path:`${d}/map/expr`,message:y.error})}else p==="renameKind"&&(typeof h!="string"||!Ec.test(h)?f("a kind name"):l=h)}),l!==null&&!jp(r,l)&&n.push({path:`${a}/kind`,message:`the migration ends in ${l}, which the package does not declare`})}),n}const Vg=3,Kg=8,Gg=12,Yg=52,Fc=["week","month","quarter"],IS=["chart1","chart2","chart3","chart4","chart5","chart6","chart7","chart8"],PS=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Bp=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zr=["January","February","March","April","May","June","July","August","September","October","November","December"];function ur(e){const t=Yi(e);return t?bn(t.y,t.m,t.d):null}function DS(e,t){const n=ur(e);if(n===null)return null;const r=t===null?null:ur(t);return{start:n,end:r!==null&&r>=n?r:n}}const Tt=e=>Xi(vt(e)),Xg=e=>((e+3)%7+7)%7,Gu=e=>e-Xg(e);function RS(e){const t=[...new Set(e.filter(r=>r!==""&&!/^[1-8]$/.test(r)))].sort((r,o)=>r<o?-1:r>o?1:0),n=new Map(t.map((r,o)=>[r,o]));return e.map(r=>/^[1-8]$/.test(r)?`chart${r}`:r===""?"chart1":IS[n.get(r)%8])}function Zg(e,t,n){return e.filter(r=>r.end>=t&&r.start<=n).sort((r,o)=>Math.max(r.start,t)-Math.max(o.start,t)||Math.min(o.end,n)-Math.max(o.start,t)-(Math.min(r.end,n)-Math.max(r.start,t))||r.order-o.order)}function Jg(e,t,n,r){for(let o=0;o<r;o++){const i=e[o]??=[];let s=!0;for(let a=t;a<=n;a++)i[a]&&(s=!1);if(s){for(let a=t;a<=n;a++)i[a]=!0;return o}}return null}function Qg(e,t,n){const r=e+6,o=Zg(t,e,r),i=[],s=[0,0,0,0,0,0,0],a=[];for(const c of o){const u=Math.max(c.start,e)-e,d=Math.min(c.end,r)-e,p=Jg(i,u,d,n.lanes);if(p===null){for(let h=u;h<=d;h++)s[h]+=1;continue}a.push({id:c.id,col:u+1,span:d-u+1,lane:p,contL:c.start<e,contR:c.end>r,tone:c.tone,more:0,row:c.value})}s.forEach((c,u)=>{c>0&&a.push({id:`more:${Tt(e+u)}`,col:u+1,span:1,lane:n.lanes,contL:!1,contR:!1,tone:null,more:c,row:null})});const l=[];for(let c=0;c<7;c++){const u=e+c,d=vt(u),p=o.filter(h=>h.start<=u&&h.end>=u);l.push({date:Xi(d),day:d.d,weekday:Bp[c],initial:Bp[c].slice(0,1),inMonth:n.month===null||d.m===n.month,weekend:c>=5,today:u===n.today,selected:u===n.selected,total:p.length,dots:p.slice(0,3).map(h=>({tone:h.tone}))})}return{key:Tt(e),days:l,segments:a}}function ey(e,t){const n=vt(e),r=vt(t),o=`${r.d} ${zr[r.m-1]} ${r.y}`;return n.y!==r.y?`${n.d} ${zr[n.m-1]} ${n.y} – ${o}`:n.m!==r.m?`${n.d} ${zr[n.m-1]} – ${o}`:`${n.d} – ${o}`}function FS(e){const t=vt(e);return`${PS[Xg(e)]}, ${t.d} ${zr[t.m-1]}`}function zS(e,t,n,r,o){const i=bn(e,t,1),s=bn(e,t,n),a=o.day===null?null:ur(o.day),l=a!==null&&a>=i&&a<=s?a:o.today>=i&&o.today<=s?o.today:i,c=[];for(let d=Gu(i);d<=s;d+=7)c.push(Qg(d,r,{lanes:o.lanes,today:o.today,selected:l,month:t}));const u=Zg(r,l,l).map(d=>({id:d.id,tone:d.tone,start:Tt(d.start),end:Tt(d.end),days:d.end-d.start+1,row:d.value}));return{weeks:c,day:Tt(l),agenda:{date:Tt(l),label:FS(l),count:u.length,items:u}}}function NS(e,t,n){const r=Gu(e),o=Qg(r,t,{lanes:n.lanes,today:n.today,selected:null,month:null});return{key:o.key,label:ey(r,r+6),prev:Tt(r-7),next:Tt(r+7),today:Tt(n.today),days:o.days,segments:o.segments}}function zc(e,t){if(t==="week")return Gu(e);const n=vt(e);return bn(n.y,t==="month"?n.m:Math.floor((n.m-1)/3)*3+1,1)}function Nc(e,t,n){if(t==="week")return e+7*n;const r=vt(e),o=r.y*12+(r.m-1)+n*(t==="month"?1:3);return bn(Math.floor(o/12),(o%12+12)%12+1,1)}function LS(e,t){const n=zr[e.m-1].slice(0,3);return t==="week"?`${e.d} ${n}`:t==="month"?n:`Q${Math.floor((e.m-1)/3)+1}`}function jS(e,t,n){const r=zc(e,n.scale),o=[];for(let h=0;h<=n.columns;h++)o.push(Nc(r,n.scale,h));const i=o[n.columns]-1,s=h=>{let f=0;for(;f+1<n.columns&&o[f+1]<=h;)f++;return f},a=vt(r).y,l=o.slice(0,n.columns).map((h,f)=>({key:Tt(h),label:LS(vt(h),n.scale),end:Tt(o[f+1]-1),today:n.today>=h&&n.today<o[f+1]})),c=[];o.slice(0,n.columns).forEach((h,f)=>{const y=vt(h),g=n.scale==="week"?y.y===a?zr[y.m-1]:`${zr[y.m-1]} ${y.y}`:String(y.y),v=c[c.length-1];v&&v.label===g?v.span+=1:c.push({label:g,col:f+1,span:1})});const u=[],d=new Map;for(const h of[...t].sort((f,y)=>f.order-y.order)){if(h.end<r||h.start>i)continue;const f=h.rowKey??h.id,y=d.get(f);y?y.push(h):d.set(f,[h])}for(const[h,f]of d){const y=u.length,g=[],v=[],m=f.map(b=>({s:b,first:s(Math.max(b.start,r)),last:s(Math.min(b.end,i))})).sort((b,x)=>b.first-x.first||x.last-x.first-(b.last-b.first)||b.s.order-x.s.order);for(const{s:b,first:x,last:$}of m){const S=Jg(g,x,$,Number.MAX_SAFE_INTEGER);v.push({id:b.id,rowIndex:y,col:x+1,span:$-x+1,lane:S,contL:b.start<r,contR:b.end>i,tone:b.tone,row:b.value})}u.push({key:h,index:y,lanes:Math.max(1,g.length),count:v.length,items:v})}let p=null;if(n.today>=r&&n.today<=i){const h=s(n.today),f=(n.today-o[h])/(o[h+1]-o[h]);p={col:h+1,percent:Math.round((h+f)/n.columns*1e4)/100}}return{scale:n.scale,key:Tt(r),label:ey(r,i),prev:Tt(Nc(r,n.scale,-n.columns)),next:Tt(o[n.columns]),today:Tt(n.today),columns:l,bands:c,rows:u,now:p}}const BS=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function Wr(e){if(e===null||typeof e=="boolean"||typeof e=="string")return JSON.stringify(e);if(typeof e=="number"){if(!Number.isFinite(e))throw new Error(`canonicalJson: ${e} has no JSON form`);return JSON.stringify(e)}if(Array.isArray(e))return`[${e.map(t=>t===void 0?"null":Wr(t)).join(",")}]`;if(BS(e))return`{${Object.keys(e).filter(n=>e[n]!==void 0).sort().map(n=>`${JSON.stringify(n)}:${Wr(e[n])}`).join(",")}}`;throw new Error(`canonicalJson: a ${typeof e} has no JSON form`)}Uint8Array.from([48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32]);const Hr="records",Hn={sortDefault:"createdAt",orderDefault:"desc",limitDefault:100,limitMax:500},WS=["app","before","by","columns","day","expand","lanes","limit","mine","month","order","q","query","row","scale","sort","start","sum","tone","until","user","view"],HS=["id","createdAt","updatedAt","createdBy","authorId","author"],qS=["eq","gt","gte","lt","lte","in","between"],US={"=":"eq","==":"eq",">":"gt",">=":"gte","<":"lt","<=":"lte"},Wp=["sum","avg","min","max","count","countDistinct","first","last"],Hp=["sum","count","avg","min","max"],VS=["count","sum","running","rows"],KS=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],GS=["January","February","March","April","May","June","July","August","September","October","November","December"],ty=/^\d{4}-(0[1-9]|1[0-2])$/,YS=["gt","gte","lt","lte","in","between"],XS=["in","between"],Rt=e=>e?.trim()||null,ko=e=>typeof e=="string"&&e.length===10&&Yi(e)?e:null,Lc=(e,t)=>{const n=typeof e=="number"?e:typeof e=="string"&&e.trim()?Number(e):NaN;return Number.isInteger(n)&&n>=1&&n<=t?n:null},bt=e=>!!e&&typeof e=="object"&&!Array.isArray(e),mr=(e,t)=>e<t?-1:e>t?1:0;function ny(e,t){const n=Rt(t);if(e.q!==void 0&&e.q.trim()){let d=null;try{d=JSON.parse(e.q)}catch{d=null}return Yu(bt(d)?d:{},n).query}const r=Number(e.limit),o=[];for(const d of Object.keys(e).sort()){if(WS.includes(d)||!d)continue;const p=d.lastIndexOf("."),h=p>=0?d.slice(p+1):"",f=e[d];p>0&&YS.includes(h)?o.push({field:d.slice(0,p),op:h,value:XS.includes(h)?f.split(","):f}):o.push({field:d,op:"eq",value:f})}o.sort((d,p)=>mr(d.field,p.field)||mr(d.op,p.op));const i=Rt(e.by),s=Rt(e.before),a=e.view==="week"||e.view==="timeline"?e.view:"month",l=Rt(e.until),c=Rt(e.tone),u=Lc(e.lanes,Kg)??Vg;return{from:n,app:Rt(e.app),mine:e.mine==="1"||e.mine==="true",user:Rt(e.user),where:o,or:[],sort:[{field:Rt(e.sort)??Hn.sortDefault,order:e.order==="asc"?"asc":e.order==="desc"?"desc":Hn.orderDefault}],limit:Number.isInteger(r)&&r>0?Math.min(r,Hn.limitMax):Hn.limitDefault,sum:Rt(e.sum),month:i&&a==="month"?{field:i,key:e.month&&ty.test(e.month)?e.month:null,until:l,day:ko(e.day),lanes:u,tone:c}:null,week:i&&a==="week"?{field:i,key:ko(e.day),until:l,lanes:u,tone:c}:null,timeline:i&&a==="timeline"?{field:i,until:l,row:Rt(e.row),scale:Fc.includes(e.scale)?e.scale:"week",start:ko(e.start),columns:Lc(e.columns,Yg)??Gg,tone:c}:null,group:[],aggregate:[],running:[],before:s?{field:i??Hn.sortDefault,date:s}:null,expand:[...new Set((e.expand??"").split(",").map(d=>d.trim()).filter(Boolean))]}}function ry(e){return e.scheme===Hr?ny(e.params,e.name):null}function qp(e){return e===null?"":typeof e=="string"?e:typeof e=="boolean"?e?"true":"false":typeof e=="number"&&Number.isFinite(e)?String(e):null}function Up(e,t,n){if(!Array.isArray(e)||e.length<3)return n.push({path:t,message:"a condition is [field, op, value]"}),null;const[r,o,...i]=e;if(typeof r!="string"||!r.trim())return n.push({path:`${t}/0`,message:"a condition's field is a non-empty string"}),null;const s=typeof o=="string"?US[o]??(qS.includes(o)?o:null):null;if(!s)return n.push({path:`${t}/1`,message:`unknown operator ${String(o)}`}),null;const a=r.trim();if(s==="in"){const c=i.length===1&&Array.isArray(i[0])?i[0].map(qp):null;return!c||c.some(u=>u===null)?(n.push({path:`${t}/2`,message:"in takes one list of values"}),null):{field:a,op:s,value:c}}const l=i.map(qp);return l.some(c=>c===null)||l.length!==(s==="between"?2:1)?(n.push({path:`${t}/2`,message:s==="between"?"between takes a low and a high value":`${s} takes one value`}),null):{field:a,op:s,value:s==="between"?l:l[0]}}const ZS=["from","app","mine","user","where","sort","limit","sum","month","week","timeline","group","aggregate","running","before","expand"],Vp={month:["field","key","until","day","lanes","tone"],week:["field","key","until","lanes","tone"],timeline:["field","until","row","scale","start","columns","tone"]};function JS(e,t,n){if(!bt(t)||typeof t.field!="string"||!t.field.trim())return n.push({path:`/${e}`,message:`${e} is {${Vp[e].map(o=>o==="field"?o:`${o}?`).join(", ")}}`}),null;const r={field:t.field.trim()};for(const o of Object.keys(t).sort()){if(o==="field")continue;const i=t[o],s=`/${e}/${o}`;if(!Vp[e].includes(o))n.push({path:s,message:`unknown key ${o}`});else{if(i==null)continue;if(o==="lanes"||o==="columns"){const a=o==="lanes"?Kg:Yg,l=Lc(i,a);l===null?n.push({path:s,message:`${o} is an integer 1–${a}`}):r[o]=l}else o==="scale"?Fc.includes(i)?r[o]=i:n.push({path:s,message:`scale is ${Fc.join("|")}`}):typeof i!="string"?n.push({path:s,message:`${o} is a string`}):r[o]=i.trim()||null}}return r}function Yu(e,t){const n=[],r=ny({},null);if(r.sort=[{field:Hn.sortDefault,order:Hn.orderDefault}],!bt(e))return n.push({path:"",message:"a query is an object"}),r.from=Rt(t),{query:r,issues:n};for(const i of Object.keys(e).sort())!ZS.includes(i)&&!i.startsWith("$")&&n.push({path:`/${i}`,message:`unknown key ${i}`});const o=i=>{const s=e[i];return s==null?null:typeof s!="string"?(n.push({path:`/${i}`,message:`${i} is a string`}),null):Rt(s)};if(r.from=Rt(t)??o("from"),r.app=o("app"),r.user=o("user"),r.sum=o("sum"),e.mine!==void 0&&(typeof e.mine!="boolean"?n.push({path:"/mine",message:"mine is a boolean"}):r.mine=e.mine),e.where!==void 0&&(Array.isArray(e.where)?e.where.forEach((i,s)=>{const a=`/where/${s}`;if(bt(i)){if(Object.keys(i).length!==1||!Array.isArray(i.or))return void n.push({path:a,message:"an alternative is {or: [[condition…]…]}"});if(r.or.length)return void n.push({path:a,message:"one or per query"});i.or.forEach((c,u)=>{if(!Array.isArray(c))return void n.push({path:`${a}/or/${u}`,message:"an alternative is a list of conditions"});const d=[];c.forEach((p,h)=>{const f=Up(p,`${a}/or/${u}/${h}`,n);f&&d.push(f)}),r.or.push(d)});return}const l=Up(i,a,n);l&&r.where.push(l)}):n.push({path:"/where",message:"where is a list of conditions"})),e.sort!==void 0){const i=typeof e.sort=="string"?[e.sort]:Array.isArray(e.sort)?e.sort:null;if(!i)n.push({path:"/sort",message:"sort is a field or a list of [field, order]"});else{const s=[];i.forEach((a,l)=>{const[c,u]=typeof a=="string"?[a,"asc"]:Array.isArray(a)?[a[0],a.length>1?a[1]:"asc"]:[null,null];if(typeof c!="string"||!c.trim()||u!=="asc"&&u!=="desc")return void n.push({path:typeof e.sort=="string"?"/sort":`/sort/${l}`,message:"a sort key is field or [field, asc|desc]"});s.push({field:c.trim(),order:u})}),s.length&&(r.sort=s)}}if(e.limit!==void 0){const i=typeof e.limit=="number"?e.limit:typeof e.limit=="string"&&e.limit.trim()?Number(e.limit):NaN;!Number.isInteger(i)||i<1?n.push({path:"/limit",message:"limit is a positive integer"}):r.limit=Math.min(i,Hn.limitMax)}for(const i of["month","week","timeline"]){if(e[i]===void 0||e[i]===null)continue;if(r.month||r.week||r.timeline){n.push({path:`/${i}`,message:"one calendar view per query"});continue}const s=JS(i,e[i],n);if(!s)continue;const a=c=>typeof s[c]=="string"?s[c]:null,l=typeof s.lanes=="number"?s.lanes:Vg;i==="month"?r.month={field:s.field,key:a("key")&&ty.test(a("key"))?a("key"):null,until:a("until"),day:ko(a("day")),lanes:l,tone:a("tone")}:i==="week"?r.week={field:s.field,key:ko(a("key")),until:a("until"),lanes:l,tone:a("tone")}:r.timeline={field:s.field,until:a("until"),row:a("row"),scale:a("scale")??"week",start:ko(a("start")),columns:typeof s.columns=="number"?s.columns:Gg,tone:a("tone")}}if(e.group!==void 0&&(Array.isArray(e.group)?e.group.forEach((i,s)=>{const a=`/group/${s}`;let l=null;if(typeof i=="string"&&i.trim()?l={field:i.trim(),bucket:null}:bt(i)&&typeof i.bucket=="string"&&i.bucket.trim()&&Kd.includes(i.by)&&Object.keys(i).length===2&&(l={field:i.bucket.trim(),bucket:i.by}),!l)return void n.push({path:a,message:`a group key is a field or {bucket: field, by: ${Kd.join("|")}}`});if(r.group.some(c=>c.field===l.field||l.field==="author"&&c.field==="authorId"||l.field==="authorId"&&c.field==="author"))return void n.push({path:a,message:`duplicate group ${l.field}`});r.group.push(l)}):n.push({path:"/group",message:"group is a list of keys"})),e.aggregate!==void 0)if(!bt(e.aggregate))n.push({path:"/aggregate",message:"aggregate is {name: [op, field?]}"});else for(const i of Object.keys(e.aggregate).sort()){const s=e.aggregate[i],a=`/aggregate/${i}`;if(!i.trim()||VS.includes(i)||r.group.some(u=>u.field===i||u.field==="author"&&i==="authorId")){n.push({path:a,message:`the name ${i} is taken`});continue}const l=Array.isArray(s)&&Wp.includes(s[0])?s[0]:null,c=Array.isArray(s)&&s.length>1&&typeof s[1]=="string"&&s[1].trim()?s[1].trim():null;if(!l||!Array.isArray(s)||s.length>2||s.length>1&&!c||l!=="count"&&!c){n.push({path:a,message:`an aggregate is [${Wp.join("|")}, field] (count: the field is optional)`});continue}r.aggregate.push({name:i,op:l,field:c})}if(e.running!==void 0)if(!bt(e.running))n.push({path:"/running",message:"running is {field: op}"});else for(const i of Object.keys(e.running).sort()){const s=e.running[i];if(!i.trim()||!Hp.includes(s)){n.push({path:`/running/${i}`,message:`a running value is {field: ${Hp.join("|")}}`});continue}r.running.push({field:i,op:s})}if(e.before!==void 0&&e.before!==null){const i=e.before,s=r.group.find(a=>a.bucket!==null)?.field??r.month?.field??r.week?.field??r.timeline?.field??Hn.sortDefault;typeof i=="string"?r.before=Rt(i)?{field:s,date:i.trim()}:null:bt(i)&&typeof i.field=="string"&&i.field.trim()&&typeof i.date=="string"?r.before=i.date.trim()?{field:i.field.trim(),date:i.date.trim()}:null:n.push({path:"/before",message:"before is a date or {field, date}"})}return e.expand!==void 0&&(Array.isArray(e.expand)?e.expand.forEach((i,s)=>{if(typeof i!="string"||!i.trim())return void n.push({path:`/expand/${s}`,message:"an expanded field is a non-empty string"});if(r.expand.includes(i.trim()))return void n.push({path:`/expand/${s}`,message:`duplicate expand ${i.trim()}`});r.expand.push(i.trim())}):n.push({path:"/expand",message:"expand is a list of ref fields"})),{query:r,issues:n}}function jc(e,t){return typeof e=="string"?e.replace(/\$\{([^}]*)\}/g,(n,r)=>t[r.trim()]??""):Array.isArray(e)?e.map(n=>jc(n,t)):bt(e)?Object.fromEntries(Object.keys(e).map(n=>[n,jc(e[n],t)])):e}function Xu(e,t){const n=Qt(e),r=n?.params.query;if(!n||r===void 0||!bt(t)||!Object.prototype.hasOwnProperty.call(t,r))return e;const{query:o,...i}=n.params,s=t[r],a=jc(s,i),l=e.trim(),c=l.includes("?")?l.slice(0,l.indexOf("?")):l;return Ku(c,{q:Wr(a)})}const In=e=>{if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="string"&&e.trim()!==""){const t=Number(e);return Number.isFinite(t)?t:null}return null},tt=e=>e==null?"":typeof e=="string"?e:typeof e=="object"?Wr(e):String(e);function ga(e,t){const n=In(e),r=In(t);return n!==null&&r!==null?n<r?-1:n>r?1:0:mr(tt(e),tt(t))}const Di=e=>{const t=In(e);return{n:t,t:t===null?tt(e):""}};function fi(e,t,n,r){return e.n!==null&&t.n!==null?e.n<t.n?-1:e.n>t.n?1:0:mr(e.n===null?e.t:tt(n),t.n===null?t.t:tt(r))}function Kp(e){const t=Array.isArray(e.value)?e.value:[e.value],n=e.op==="between"?t.length===2?t:[]:t.length===1?t:[tt(e.value)];return{filter:e,list:t,eq:tt(e.value),bounds:n.map(r=>({key:Di(r),v:r}))}}function Gp(e,t){const n=e.filter.op;if(n==="eq")return tt(t)===e.eq;if(n==="in")return e.list.includes(tt(t));const r=Di(t);if(n==="between")return e.bounds.length===2&&fi(r,e.bounds[0].key,t,e.bounds[0].v)>=0&&fi(r,e.bounds[1].key,t,e.bounds[1].v)<=0;const o=e.bounds[0],i=fi(r,o.key,t,o.v);return n==="gt"?i>0:n==="gte"?i>=0:n==="lt"?i<0:i<=0}function Yp(e,t){const n=t.map(o=>{const i=e.map(l=>_n(l,o.field)),s=i.map(Di),a=o.order==="asc"?1:-1;if(s.every(l=>l.n!==null)){const l=Float64Array.from(s,c=>c.n);return(c,u)=>a*(l[c]<l[u]?-1:l[c]>l[u]?1:0)}if(s.every(l=>l.n===null)){const l=[...new Set(s.map(d=>d.t))].sort(mr),c=new Map(l.map((d,p)=>[d,p])),u=Uint32Array.from(s,d=>c.get(d.t));return(d,p)=>a*(u[d]-u[p])}return(l,c)=>a*fi(s[l],s[c],i[l],i[c])}),r=e.map((o,i)=>i);return r.sort((o,i)=>{for(const s of n){const a=s(o,i);if(a!==0)return a}return mr(e[o].id,e[i].id)}),r.map(o=>e[o])}function Vo(e){return e.authorId??e.createdBy??null}function _n(e,t){return t==="createdAt"?e.createdAt:t==="updatedAt"?e.updatedAt:t==="id"?e.id:t==="createdBy"?e.createdBy:t==="authorId"?Vo(e):e.data[t]}function Xp(e,t){const[n,r]=e.split("-").map(Number),o=n*12+(r-1)+t;return`${Math.floor(o/12)}-${String((o%12+12)%12+1).padStart(2,"0")}`}function QS(e){const[t,n]=e.split("-").map(Number);return`${GS[n-1]} ${t}`}function eC(e){const[t,n]=e.split("-").map(Number),r=[];for(let o=1;o<=Io(t,n);o++)r.push({date:`${e}-${String(o).padStart(2,"0")}`,day:o,weekday:KS[Gi(t,n,o)],count:0,sum:0});return r}function qr(e){return Math.round(e*1e6)/1e6}const Bc=e=>e===void 0?null:e;function tC(e,t){const n=e.field===null?[]:t.map(r=>_n(r,e.field));switch(e.op){case"count":return e.field===null?t.length:n.filter(r=>tt(r)!=="").length;case"sum":return qr(n.reduce((r,o)=>r+(In(o)??0),0));case"avg":{const r=n.map(In).filter(o=>o!==null);return r.length?qr(r.reduce((o,i)=>o+i,0)/r.length):null}case"min":case"max":{let r;for(const o of n)tt(o)!==""&&(r===void 0||(e.op==="min"?ga(o,r)<0:ga(o,r)>0))&&(r=o);return r===void 0?null:In(r)??tt(r)}case"countDistinct":return new Set(n.map(tt).filter(r=>r!=="")).size;case"first":return t.length?Bc(n[0]):null;case"last":return t.length?Bc(n[n.length-1]):null}}function Fl(e,t){const n={count:t.length};e.sum!==null&&(n.sum=qr(t.reduce((r,o)=>r+(In(o.data[e.sum])??0),0)));for(const r of e.aggregate)n[r.name]=tC(r,t);return n}class nC{constructor(t){this.list=t,this.acc=t.map(()=>({sum:0,count:0,nums:0,min:null,max:null}))}list;acc;add(t){this.list.forEach((n,r)=>{const o=this.acc[r],i=In(_n(t,n.field));o.count+=1,i!==null&&(o.sum+=i,o.nums+=1,o.min=o.min===null||i<o.min?i:o.min,o.max=o.max===null||i>o.max?i:o.max)})}read(){const t={};return this.list.forEach((n,r)=>{const o=this.acc[r];t[n.field]=n.op==="sum"?qr(o.sum):n.op==="count"?o.count:n.op==="avg"?o.nums?qr(o.sum/o.nums):null:n.op==="min"?o.min:o.max}),t}}function rC(e,t){if(e.field==="author")return Vo(t)??"";const n=_n(t,e.field);return e.bucket!==null?Cm(tt(n),e.bucket)??"":tt(n)}function oC(e,t,n,r){if(e.field==="author"){const i=Vo(t);r.author=i&&n?.[i]||"",r.authorId=i;return}const o=_n(t,e.field);r[e.field]=e.bucket!==null?Cm(tt(o),e.bucket):Bc(o)}const Zp=16,iC=["id","createdAt","updatedAt","createdBy","authorId"];function sC(e,t){const n=t&&bt(e)&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;if(!bt(n)||!bt(n.computed))return;const r={};for(const[o,i]of Object.entries(n.computed))typeof i=="string"&&(r[o]=i);return Object.keys(r).length?r:void 0}function aC(e,t){const n=t&&bt(e)&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;if(!bt(n)||!bt(n.refs))return;const r={};for(const[o,i]of Object.entries(n.refs))i==="issue"||i==="member"?r[o]=i:bt(i)&&typeof i.kind=="string"&&i.kind&&(r[o]={kind:i.kind});return Object.keys(r).length?r:void 0}function oy(e,t){const n=Vo(e);return{...e.data,id:e.id,createdAt:e.createdAt,updatedAt:e.updatedAt,createdBy:e.createdBy,authorId:n,author:n&&t?.[n]||""}}function lC(e,t,n,r){const o=typeof t=="string"?t:typeof t=="number"?String(t):"";if(!o)return null;if(e==="issue")return r.issues&&Object.prototype.hasOwnProperty.call(r.issues,o)?r.issues[o]:null;if(e==="member")return r.names&&Object.prototype.hasOwnProperty.call(r.names,o)?{id:o,name:r.names[o]}:null;const i=n().get(o);return i&&i.kind===e.kind?oy(i,r.names):null}function cC(e,t,n,r){const o=n?Object.keys(n).sort(mr):[];if(!o.length)return e;const i=o.map(a=>{const l=Wo(n[a]);return{name:a,ast:"ast"in l?l.ast:null,reads:"ast"in l?Dm(l.ast):[]}}),s={now:(r?Ha(r):null)??0};return e.map(a=>{if(a.kind!==t)return a;const l={...a.data,id:a.id,createdAt:a.createdAt,updatedAt:a.updatedAt,createdBy:a.createdBy,authorId:Vo(a)},c={...a.data};for(const u of i){for(const p of u.reads)Object.prototype.hasOwnProperty.call(l,p)||(l[p]=null);const d=u.ast?Eu(u.ast,l,s):null;c[u.name]=d&&"value"in d?d.value:null}return{...a,data:c}})}function uC(e,t,n){if(!t.from)return null;const r=n.now??new Date().toISOString(),o=e;e=cC(e,t.from,n.computed,r);const i=t.expand.flatMap(_=>n.refs&&Object.prototype.hasOwnProperty.call(n.refs,_)?[{name:_,target:n.refs[_]}]:[]);let s=null;const a=()=>s??=new Map(o.map(_=>[_.id,_])),l=t.month,c=n.today&&/^\d{4}-\d{2}-\d{2}$/.test(n.today)?n.today:r.slice(0,10),u=l?l.key??c.slice(0,7):null,d=ur(c)??0,p=t.month??t.week??t.timeline;let h=null;if(l&&l.until!==null&&u!==null){const[_,M]=u.split("-").map(Number);h=[ur(`${u}-01`),ur(`${u}-${String(Io(_,M)).padStart(2,"0")}`)]}else if(t.week){const _=zc((t.week.key?ur(t.week.key):null)??d,"week");h=[_,_+6]}else if(t.timeline){const _=t.timeline,M=zc((_.start?ur(_.start):null)??d,_.scale);h=[M,Nc(M,_.scale,_.columns)-1]}const f=_=>p?DS(tt(_.data[p.field]),p.until!==null?tt(_.data[p.until]):null):null,y=t.where.map(Kp),g=t.or.map(_=>_.map(Kp)),v=t.before?Di(t.before.date):null,m=[],b=Yp(e.filter(_=>{if(_.kind!==t.from)return!1;const M=Vo(_);if(t.mine&&(n.me===null||M!==n.me)||t.user!==null&&M!==t.user||!y.every(O=>Gp(O,_n(_,O.filter.field)))||g.length&&!g.some(O=>O.every(E=>Gp(E,_n(_,E.filter.field)))))return!1;if(t.before){const O=tt(_n(_,t.before.field));if(O!==""&&fi(Di(O),v,O,t.before.date)<0)return m.push(_),!1}if(h){const O=f(_);if(!O||O.end<h[0]||O.start>h[1])return!1}else if(l&&u!==null&&!tt(_.data[l.field]).startsWith(u))return!1;return!0}),t.sort),x=Yp(m,t.sort),$=()=>{const _=new nC(t.running);for(const M of x)_.add(M);return _},S=t.running.length&&!t.group.length?$():null,A=_=>{const M=oy(_,n.names);for(const O of i)M[O.name]=lC(O.target,_.data[O.name],a,n);return n.transitions&&(M[zs]=$S(n.transitions,_.data,{id:n.me,role:n.role??null},_)),M},C={rows:b.slice(0,t.limit).map(_=>{const M=A(_);return S&&(S.add(_),M.running=S.read()),M}),count:b.length};if(t.sum!==null&&(C.sum=qr(b.reduce((_,M)=>_+(In(M.data[t.sum])??0),0))),l&&u!==null){const _=eC(u),M=new Map(_.map(E=>[E.date,E])),O=new Map;for(const E of b){const R=tt(E.data[l.field]).slice(0,10),z=M.get(R);if(!z)continue;z.count+=1,t.sum!==null&&(z.sum=qr(z.sum+(In(E.data[t.sum])??0)));const Z=O.get(R);Z?Z.push(E):O.set(R,[E])}if(t.running.length){const E=$();for(const R of _){for(const z of O.get(R.date)??[])E.add(z);R.running=E.read()}}C.month={key:u,label:QS(u),prev:Xp(u,-1),next:Xp(u,1),today:c,days:_,labels:_.map(E=>String(E.day)),counts:_.map(E=>E.count),sums:_.map(E=>E.sum)}}if(p){const _=b.flatMap((E,R)=>{const z=f(E);return z?[{row:E,order:R,...z}]:[]}),M=RS(_.map(E=>p.tone!==null?tt(_n(E.row,p.tone)):"")),O=_.map((E,R)=>({id:E.row.id,start:E.start,end:E.end,tone:M[R],value:A(E.row),order:E.order,rowKey:t.timeline?.row?tt(_n(E.row,t.timeline.row)):null}));if(l&&C.month){const[E,R]=C.month.key.split("-").map(Number);Object.assign(C.month,zS(E,R,Io(E,R),O,{lanes:l.lanes,today:d,day:l.day}))}else t.week?C.week=NS(h[0],O,{lanes:t.week.lanes,today:d}):t.timeline&&(C.timeline=jS(h[0],O,{scale:t.timeline.scale,columns:t.timeline.columns,today:d}))}if(t.group.length){const _=new Map,M=t.group.length===1;for(const z of b){const Z=t.group.map(L=>rC(L,z)),N=M?Z[0]:Z.some(L=>L.includes("\0"))?JSON.stringify(Z):Z.join("\0"),I=_.get(N);if(I)I.rows.push(z);else{const L={};for(const V of t.group)oC(V,z,n.names,L);_.set(N,{parts:Z,rows:[z],out:L})}}const O=[..._.values()];for(const z of O)Object.assign(z.out,Fl(t,z.rows));const E=new Set([...t.group.flatMap(z=>z.field==="author"?["author","authorId"]:[z.field]),"count",...t.sum!==null?["sum"]:[],...t.aggregate.map(z=>z.name)]),R=t.sort.filter(z=>E.has(z.field));if(O.sort((z,Z)=>{for(const N of R){const I=ga(z.out[N.field],Z.out[N.field]);if(I!==0)return N.order==="asc"?I:-I}for(const N of t.group){const I=ga(z.out[N.field],Z.out[N.field]);if(I!==0)return I}for(let N=0;N<z.parts.length;N++){const I=mr(z.parts[N],Z.parts[N]);if(I!==0)return I}return 0}),t.running.length){const z=$();for(const Z of O){for(const N of Z.rows)z.add(N);Z.out.running=z.read()}}C.groups=O.map(z=>z.out)}return t.aggregate.length&&(C.totals=Fl(t,b)),t.before&&(C.before=Fl(t,x)),C}const dC=/^[a-z][a-z0-9_-]{0,31}$/,pC=["mcp","script"],fC=/^[A-Za-z_][A-Za-z0-9_]*$/,Jp=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Qp=e=>Array.isArray(e)&&e.every(t=>typeof t=="string");function hC(e){try{const t=new URL(e);return(t.protocol==="https:"||t.protocol==="http:")&&!!t.host}catch{return!1}}function mC(e){if(!Jp(e))return[{path:"/tools",message:"tools is an object of tools"}];const t=[];for(const n of Object.keys(e).sort()){const r=e[n],o=`/tools/${n}`;if(dC.test(n)||t.push({path:o,message:"a tool id is lowercase letters, digits, - and _"}),!Jp(r)){t.push({path:o,message:"a tool is {kind, title, url | command}"});continue}(typeof r.kind!="string"||!pC.includes(r.kind))&&t.push({path:`${o}/kind`,message:"kind is mcp or script"}),(typeof r.title!="string"||!r.title.trim())&&t.push({path:`${o}/title`,message:"title is a required string"}),r.description!==void 0&&typeof r.description!="string"&&t.push({path:`${o}/description`,message:"description is a string"});const i=r.url!==void 0,s=r.command!==void 0;r.kind==="mcp"&&i===s&&t.push({path:o,message:"an mcp tool has a url or a command"}),r.kind==="script"&&i&&t.push({path:`${o}/url`,message:"a script runs a command, not a url"}),r.kind==="script"&&!s&&t.push({path:`${o}/command`,message:"command is a non-empty string"}),i&&(typeof r.url!="string"||!hC(r.url))&&t.push({path:`${o}/url`,message:"url is an absolute http(s) url"}),s&&(typeof r.command!="string"||!r.command.trim())&&t.push({path:`${o}/command`,message:"command is a non-empty string"}),r.args!==void 0&&(!Qp(r.args)||i)&&t.push({path:`${o}/args`,message:"args is a list of strings beside a command"}),r.env!==void 0&&(!Qp(r.env)||r.env.some(a=>!fC.test(a))||i)&&t.push({path:`${o}/env`,message:"env is a list of variable names beside a command"})}return t}const dn=St.package.exposes.limits,gC=St.package.exposes.runKinds,ef=St.package.exposes.recordOps,yC=St.package.exposes.readRecordOps,bC=St.package.exposes.readOpWords,vC=St.package.exposes.destructiveWords,po=St.package.exposes.agent,$C=new RegExp(po.slugPattern),Nn=e=>!!e&&typeof e=="object"&&!Array.isArray(e),xC=new RegExp(dn.namePattern),wC=new RegExp(St.package.exposes.actionPattern),kC=/\$\{input\.([A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*)\}/g;function SC(e){const t=[],n=r=>{if(typeof r=="string")for(const o of r.matchAll(kC))t.push(o[1]);else Array.isArray(r)?r.forEach(n):Nn(r)&&Object.values(r).forEach(n)};return n(e),t}const iy=e=>e.toLowerCase().split(/[^a-z]+/).filter(Boolean);function CC(e){const t=iy(e.split(".").at(-1)??"").at(-1);return t!==void 0&&bC.includes(t)?"read":"write"}function tf(e){return iy(e).some(t=>vC.includes(t))}function AC(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"&&t!==""):[]}function _C(e){if(!Array.isArray(e)||e.some(n=>typeof n!="string"||n===""))return[{path:"/upstreams",message:"upstreams is a list of MCP server names"}];const t=[];return e.forEach((n,r)=>{e.indexOf(n)!==r&&t.push({path:`/upstreams/${r}`,message:`duplicate upstream ${n}`})}),t}function OC(e,t,n){if(!Array.isArray(e))return[{index:null,code:"run",path:"/exposes",message:"exposes is a list of tools"}];const r=[];e.length>dn.maxTools&&r.push({index:null,code:"tooMany",path:"/exposes",message:`exposes lists at most ${dn.maxTools} tools`});const o=Nn(t)?Object.keys(t):[],i=AC(n),s=new Set;return e.forEach((a,l)=>{const c=`/exposes/${l}`,u=(g,v,m)=>{r.push({index:l,code:g,path:`${c}${v}`,message:m})};if(!Nn(a))return u("run","","a tool is {name, title, description, input, access, run}");const d=a.name;typeof d!="string"||!xC.test(d)||d.length>dn.nameMax||d.includes(dn.separator)?u("name","/name",`name is lowercase letters, digits and _ (at most ${dn.nameMax}, no ${dn.separator})`):s.has(d)?u("duplicate","/name",`duplicate tool ${d}`):s.add(d),(typeof a.title!="string"||!a.title.trim()||a.title.length>dn.titleMax)&&u("title","/title",`title is a non-blank string of at most ${dn.titleMax} characters`),(typeof a.description!="string"||!a.description.trim()||a.description.length>dn.descriptionMax)&&u("description","/description",`description is a non-blank string of at most ${dn.descriptionMax} characters`);const p=a.input;(!Nn(p)||p.type!=="object"||p.properties!==void 0&&!Nn(p.properties))&&u("input","/input","input is a JSON Schema of type object"),a.access!=="read"&&a.access!=="write"&&u("access","/access","access is read or write");const h=Nn(p)&&Nn(p.properties)?p.properties:{},f=a.run;if(!Nn(f)||gC.filter(g=>g in f).length!==1)return u("run","/run","run holds exactly one of records, action, upstream, agent");for(const g of SC(f))Object.prototype.hasOwnProperty.call(h,g.split(".")[0])||u("template","/run",`\${input.${g}} names no input property`);let y;if("records"in f){const g=f.records,v=Nn(g)?g.op:void 0;if(typeof v!="string"||!ef.includes(v))return v==="delete"?u("destructive","/run/records/op","a records delete is destructive: never exposed"):u("run","/run/records/op",`op is ${ef.join(", ")}`);(typeof g.kind!="string"||!o.includes(g.kind))&&u("kind","/run/records/kind","kind names no declared record kind"),y=yC.includes(v)?"read":"write"}else if("action"in f){const g=f.action;if(typeof g!="string"||!wC.test(g))return u("action","/run/action","action is a function name like namespace.function");if(tf(g))return u("destructive","/run/action","a destructive action is never exposed");y=CC(g)}else if("agent"in f)(typeof f.agent!="string"||!$C.test(f.agent)||f.agent.length>po.slugMax)&&u("agent","/run/agent","agent is an agent slug (lowercase words joined by -)"),(typeof f.prompt!="string"||f.prompt.trim()===""||f.prompt.length>po.promptMax)&&u("prompt","/run/prompt",`prompt is non-blank text of at most ${po.promptMax} characters`),f.device!==void 0&&!po.devices.includes(f.device)&&u("run","/run/device",`device is ${po.devices.join(", ")}`),y="write";else return(typeof f.upstream!="string"||!i.includes(f.upstream))&&u("upstream","/run/upstream","upstream names none of the package's upstreams"),typeof f.tool!="string"||f.tool===""?u("run","/run/tool","tool is a non-empty string"):tf(f.tool)?u("destructive","/run/tool","a destructive tool is never exposed"):void 0;a.access==="read"&&y==="write"&&u("accessTooLow","/access","the run writes: access is write")}),r}function TC(e,t,n){return OC(e,t,n).map(({path:r,message:o})=>({path:r,message:o}))}const je=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),hi=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),Nr=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function Ur(e){if(!je(e))return"dyn";const t=Array.isArray(e.type)?e.type.filter(r=>r!=="null"):[e.type],n=t.length===1?t[0]:void 0;return n==="number"||n==="integer"?"number":n==="boolean"?"bool":n==="string"?e.format==="date"?"date":e.format==="date-time"?"timestamp":"string":n==="array"?[Ur(e.items)]:n==="object"?je(e.properties)?Qa(e.properties,e.required):"map":"dyn"}function Qa(e,t){const n=Array.isArray(t)?t:[],r={};for(const[o,i]of Object.entries(e))r[o]=n.includes(o)?Ur(i):Ze(Ur(i));return r}function sy(e){const t=je(e)&&je(e.schema)?e.schema:{},n=je(t.properties)?t.properties:{},r={...Qa(n,t.required),id:"string",createdAt:"timestamp",updatedAt:"timestamp",createdBy:"string",authorId:"string",author:"string"},o=je(e)&&je(e.computed)?e.computed:{},i=ay(e);for(const s of Object.keys(o).sort()){if(Nr(r,s))continue;const a=o[s],l=typeof a=="string"?qa(a,i):null;r[s]=l&&"type"in l?l.type:Ze("dyn")}return r}function ay(e){const t=je(e)&&je(e.schema)?e.schema:{},n=je(t.properties)?t.properties:{},r={...Qa(n,t.required)};for(const o of iC)r[o]=o==="createdAt"||o==="updatedAt"?"timestamp":"string";return r}function MC(e,t){if(!je(e)||e.computed===void 0)return[];const n=e.computed;if(!je(n))return[{path:`${t}/computed`,message:"computed is {name: expression}"}];const r=[],o=Object.keys(n).sort();o.length>Zp&&r.push({path:`${t}/computed`,message:`at most ${Zp} computed fields per kind`});const i=je(e.schema)?e.schema:{},s=je(i.properties)?i.properties:{},a=ay(e);for(const l of o){const c=`${t}/computed/${hi(l)}`,u=n[l];if(Nr(s,l))r.push({path:c,message:`${l} shadows a field of the schema`});else if(HS.includes(l))r.push({path:c,message:`${l} is a reserved record key`});else if(typeof u!="string")r.push({path:c,message:"a computed field is an expression (a string)"});else{const d=Wo(u),p="ast"in d?Dm(d.ast).filter(h=>Nr(n,h)&&!Nr(s,h)):[];if(p.length)r.push({path:c,message:`a computed field reads no computed field: ${p.join(", ")}`});else{const h=qa(u,a);"error"in h&&r.push({path:c,message:h.error})}}}return r}const ly={date:"date",day:"number",weekday:"string",initial:"string",inMonth:"bool",weekend:"bool",today:"bool",selected:"bool",total:"number",dots:[{tone:"string"}]},cy=e=>({id:"string",col:"number",span:"number",lane:"number",contL:"bool",contR:"bool",tone:Ze("string"),more:"number",row:Ze(e)}),EC=e=>({key:"string",label:"string",prev:"string",next:"string",today:"date",days:[{date:"date",day:"number",weekday:"string",count:"number",sum:"number",running:Ze("map")}],labels:["string"],counts:["number"],sums:["number"],weeks:[{key:"date",days:[ly],segments:[cy(e)]}],day:"date",agenda:{date:"date",label:"string",count:"number",items:[{id:"string",tone:"string",start:"date",end:"date",days:"number",row:e}]}}),IC=e=>({key:"date",label:"string",prev:"date",next:"date",today:"date",days:[ly],segments:[cy(e)]}),PC=e=>({scale:"string",key:"date",label:"string",prev:"date",next:"date",today:"date",columns:[{key:"date",label:"string",end:"date",today:"bool"}],bands:[{label:"string",col:"number",span:"number"}],rows:[{key:"string",index:"number",lanes:"number",count:"number",items:[{id:"string",rowIndex:"number",col:"number",span:"number",lane:"number",contL:"bool",contR:"bool",tone:"string",row:e}]}],now:Ze({col:"number",percent:"number"})});function DC(e,t){const n=(o,i)=>o?i:Ze(i),r=sy(e);return{rows:[t?.running.length&&!t.group.length?{...r,running:"map"}:r],count:"number",sum:n(t?t.sum!==null:void 0,"number"),groups:n(t?t.group.length>0:void 0,["map"]),totals:n(t?t.aggregate.length>0:void 0,"map"),before:n(t?t.before!==null:void 0,"map"),month:n(t?t.month!==null:void 0,EC(r)),week:n(t?t.week!==null:void 0,IC(r)),timeline:n(t?t.timeline!==null:void 0,PC(r))}}function Ri(e){if(Array.isArray(e)){const t=e.map(Ri);return t.length===0?["dyn"]:[t.every(n=>JSON.stringify(n)===JSON.stringify(t[0]))?t[0]:"dyn"]}if(je(e)){const t={};for(const[n,r]of Object.entries(e))t[n]=Ri(r);return t}return We(e)}function uy(e,t,n){let r=e,o=!1;for(const i of t)if(Ot(r)&&(o=!0,r=r["?"]),Array.isArray(r)){if(!/^\d+$/.test(i))return{type:"dyn"};r=r[0],o=!0}else if(r==="map")r="dyn",o=!0;else if(typeof r=="object"){if(!Nr(r,i))return n?{unknown:i}:{type:"dyn"};r=r[i]}else return{type:"dyn"};return{type:o?Ze(r):r}}const Wc=e=>e.replace(/~1/g,"/").replace(/~0/g,"~");function RC(e,t,n,r){if(!e.startsWith("/"))return{type:"dyn"};const o=Array.isArray(t.bindings)?t.bindings:[];for(const s of o){if(!je(s)||typeof s.path!="string"||typeof s.source!="string"||e!==s.path&&!e.startsWith(`${s.path}/`))continue;const a=Qt(s.source),l=a?.scheme===Hr?a.name:void 0;if(!l||!je(n)||!Nr(n,l))return{type:"dyn"};const c=e.slice(s.path.length).split("/").filter((h,f)=>f>0||h!==""),u=FC(n[l]),d=Qt(Xu(s.source,je(r)?r:void 0)),p=d?ry(d):null;return{...uy(DC(n[l],p),c.map(Wc),u),strict:u}}let i=t.data;for(const s of e==="/"?[]:e.slice(1).split("/").map(Wc))if(Array.isArray(i)&&/^\d+$/.test(s))i=i[Number(s)];else if(je(i)&&Nr(i,s))i=i[s];else return{type:"dyn"};return{type:i===void 0?"dyn":Ri(i)}}function FC(e){return(je(e)&&je(e.schema)?e.schema:{}).additionalProperties!==!0}function dy(e,t,n,r,o){return e.startsWith("/")?RC(e,n,r,o):t?{...uy(t.type,e.split("/").filter(i=>i!=="").map(Wc),t.strict),strict:t.strict}:{type:"dyn"}}function zC(e,t,n){const r=new Map;for(const s of Array.isArray(e.components)?e.components:[])je(s)&&typeof s.id=="string"&&!r.has(s.id)&&r.set(s.id,s);const o=new Map,i=(s,a)=>{const l=r.get(s);if(!(!l||o.has(s))){if(o.set(s,a),Array.isArray(l.children))for(const c of l.children)typeof c=="string"&&i(c,a);if(je(l.children)&&typeof l.children.componentId=="string"&&typeof l.children.path=="string"){const c=dy(l.children.path,a,e,t,n),u="type"in c?Pt(c.type):"dyn";i(l.children.componentId,{type:Array.isArray(u)?u[0]:"dyn",strict:Array.isArray(u)&&c.strict===!0})}if(je(l.slots))for(const c of Object.values(l.slots))typeof c=="string"&&i(c,a)}};return i("root",null),o}function Hc(e,t,n,r,o,i,s){if(Ba(e)){const a=dy(e.path,n,r,o,i);return"unknown"in a?(s.push({path:`${t}/path`,message:`unknown field ${a.unknown} in ${e.path}`}),Ze("dyn")):a.type==="dyn"?Ze(a.type):a.type}if(jo(e))return Ze("dyn");if(Array.isArray(e)){const a=e.map((l,c)=>Hc(l,`${t}/${c}`,n,r,o,i,s));return a.length===0?["dyn"]:[a.every(l=>JSON.stringify(l)===JSON.stringify(a[0]))?a[0]:"dyn"]}if(je(e)){const a={};for(const[l,c]of Object.entries(e))a[l]=Hc(c,`${t}/${hi(l)}`,n,r,o,i,s);return a}return We(e)}function NC(e){const t=[];if(!je(e.templates))return t;for(const[n,r]of Object.entries(e.templates)){if(!je(r)||!Array.isArray(r.components))continue;let o=null;const i=(a,l)=>{if(Array.isArray(a))return a.forEach((c,u)=>i(c,`${l}/${u}`));if(je(a)){if(a.call==="expr"&&je(a.args)){const c=a.args,u=`${l}/args`;if(Object.prototype.hasOwnProperty.call(c,"default")||t.push({path:`${u}/default`,message:"an expression binding needs a default, shown when it fails"}),typeof c.expr!="string")t.push({path:`${u}/expr`,message:"expr is a string"});else if(c.vars!==void 0&&!je(c.vars))t.push({path:`${u}/vars`,message:"vars is an object"});else{const d={},p=[];for(const[f,y]of Object.entries(c.vars??{}))d[f]=Hc(y,`${u}/vars/${hi(f)}`,o,r,e.records,e.queries,p);t.push(...p);const h=p.length?null:qa(c.expr,d);h&&"error"in h&&t.push({path:`${u}/expr`,message:h.error})}}for(const[c,u]of Object.entries(a))i(u,`${l}/${hi(c)}`)}},s=zC(r,e.records,e.queries);r.components.forEach((a,l)=>{o=je(a)&&typeof a.id=="string"?s.get(a.id)??null:null,i(a,`/templates/${hi(n)}/components/${l}`)})}return t}const nf=5,rf=32,of=200,So="app.navigate",rt=e=>!!e&&typeof e=="object"&&!Array.isArray(e),LC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),jC=new Set(sm),BC=["template","title","icon","params","nav","exposed"],WC=["description","params"],HC=["required","description"],qC=/^[A-Za-z0-9_]+$/,pr=e=>e.replace(/~/g,"~0").replace(/\//g,"~1");function UC(e){if(e.screens===void 0)return[];const t=e.screens;if(!Array.isArray(t)||!t.length)return[{path:"/screens",message:"screens is a non-empty list of {template, title, icon?, params?, nav?, exposed?}"}];const n=[],r=t.filter(s=>!rt(s)||s.nav!==!1).length;r>nf&&n.push({path:"/screens",message:`at most ${nf} screens in the navigation, got ${r}`}),r||n.push({path:"/screens",message:"at least one screen is in the navigation (not nav: false)"});const o=rt(e.templates)?e.templates:{},i=new Set;return t.forEach((s,a)=>{const l=`/screens/${a}`;if(!rt(s))return void n.push({path:l,message:"a screen is {template, title, icon?, params?, nav?, exposed?}"});for(const c of Object.keys(s).sort())BC.includes(c)||n.push({path:`${l}/${pr(c)}`,message:`unknown screen key ${c}`});if(typeof s.template!="string"||!s.template?n.push({path:`${l}/template`,message:"template is a required string"}):LC(o,s.template)?i.has(s.template)?n.push({path:`${l}/template`,message:`duplicate screen ${s.template}`}):i.add(s.template):n.push({path:`${l}/template`,message:`template ${s.template} names no package template`}),typeof s.title!="string"||!s.title.trim()?n.push({path:`${l}/title`,message:"title is a required string"}):[...s.title].length>rf&&n.push({path:`${l}/title`,message:`title is at most ${rf} characters`}),s.icon!==void 0&&(typeof s.icon!="string"||!jC.has(s.icon))&&n.push({path:`${l}/icon`,message:`icon ${typeof s.icon=="string"?s.icon:JSON.stringify(s.icon)} is not an Exponential UI icon`}),s.params!==void 0)if(!rt(s.params))n.push({path:`${l}/params`,message:"params is an object of strings"});else for(const c of Object.keys(s.params).sort())typeof s.params[c]!="string"&&n.push({path:`${l}/params/${pr(c)}`,message:`params.${c} is a string`});s.nav!==void 0&&s.nav!==!1&&n.push({path:`${l}/nav`,message:"nav is false or absent"}),s.exposed!==void 0&&n.push(...VC(s.exposed,`${l}/exposed`))}),n.push(...GC(e,i)),n}function VC(e,t){if(!rt(e))return[{path:t,message:"exposed is {description, params?}"}];const n=[];for(const r of Object.keys(e).sort())WC.includes(r)||n.push({path:`${t}/${pr(r)}`,message:`unknown exposed key ${r}`});if(typeof e.description!="string"||!e.description.trim()?n.push({path:`${t}/description`,message:"description is a required string"}):[...e.description].length>of&&n.push({path:`${t}/description`,message:`description is at most ${of} characters`}),e.params===void 0)return n;if(!rt(e.params))return[...n,{path:`${t}/params`,message:"params is an object of {required?, description?}"}];for(const r of Object.keys(e.params).sort()){const o=e.params[r],i=`${t}/params/${pr(r)}`;if(qC.test(r)||n.push({path:i,message:`param ${r} is letters, digits and _`}),!rt(o)){n.push({path:i,message:"a param is {required?, description?}"});continue}for(const s of Object.keys(o).sort())HC.includes(s)||n.push({path:`${i}/${pr(s)}`,message:`unknown param key ${s}`});o.required!==void 0&&typeof o.required!="boolean"&&n.push({path:`${i}/required`,message:"required is a boolean"}),o.description!==void 0&&typeof o.description!="string"&&n.push({path:`${i}/description`,message:"description is a string"})}return n}function KC(e){if(typeof e!="string")return null;const t=/^\s*(?:'([^'\\]*)'|"([^"\\]*)")\s*$/.exec(e);return t?t[1]??t[2]??"":null}function GC(e,t){const n=[],r=(o,i)=>{o!==null&&!t.has(o)&&n.push({path:i,message:`navigate: ${o} is not a screen`})};if(rt(e.templates))for(const o of Object.keys(e.templates).sort()){const i=e.templates[o];!rt(i)||!Array.isArray(i.components)||i.components.forEach((s,a)=>{if(!(!rt(s)||!rt(s.on)))for(const l of Object.keys(s.on).sort()){const c=s.on[l],u=rt(c)&&rt(c.functionCall)?c.functionCall:null;if(!u||u.call!==So)continue;const d=`/templates/${pr(o)}/components/${a}/on/${pr(l)}/functionCall/args`,p=u.args;rt(p)?typeof p.screen=="string"&&r(p.screen,`${d}/screen`):n.push({path:d,message:"navigate takes {screen, params?}"})}})}if(rt(e.actions))for(const o of Object.keys(e.actions).sort()){const i=e.actions[o];(rt(i)&&Array.isArray(i.steps)?i.steps:[]).forEach((a,l)=>{if(!rt(a)||a.call!==So)return;const c=`/actions/${pr(o)}/steps/${l}/args`;rt(a.args)?r(KC(a.args.screen),`${c}/screen`):n.push({path:c,message:"navigate takes {screen, params?}"})})}return n}function YC(e){return Array.isArray(e.screens)?e.screens.filter(t=>rt(t)&&typeof t.template=="string"):[]}function XC(e,t){if(!rt(t))return{error:"navigate takes {screen, params?}"};if(typeof t.screen!="string"||!t.screen)return{error:"navigate: screen is a required string"};if(!YC(e).some(r=>r.template===t.screen))return{error:`navigate: ${t.screen} is not a screen`};const n={};if(t.params!==void 0&&t.params!==null){if(!rt(t.params))return{error:"navigate: params is an object of strings"};for(const r of Object.keys(t.params).sort()){const o=t.params[r];if(typeof o!="string")return{error:`navigate: params.${r} is a string`};n[r]=o}}return{screen:t.screen,params:n}}function ZC(e,t){return!rt(t)||!e.includes("${params.")?e:e.replace(/\$\{params\.([A-Za-z0-9_]+)\}/g,(n,r)=>{const o=t[r];return typeof o=="string"?encodeURIComponent(o):""})}const Fi={actions:32,steps:64,maxSteps:1e5},Zu=["require","records.upsert","records.delete","set","call"],JC=/^[a-z][A-Za-z0-9_]{0,31}$/,sf="actions.",zl="records.batch",we=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),nn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),fn=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),py=/^(\/([^/~]|~[01])*)*$/;function el(e){return e.startsWith(sf)?e.slice(sf.length):null}function fy(e){if(!we(e))return null;const t=Object.keys(e).filter(n=>Zu.includes(n));return t.length===1?t[0]:null}function QC(e){const t=we(e.params)?e.params:{};return{params:Qa(we(t.properties)?t.properties:{},t.required),data:Ze("dyn"),me:Ze("string")}}function Co(e,t){if(Ot(t))return Ot(e)&&Co(e["?"],t["?"]);if(Ot(e))return Co(e["?"],t);if(e==="dyn"||t==="dyn"||t==="null")return!0;const n=r=>r==="string"||r==="date"||r==="timestamp";return n(e)?n(t):Be(e)===Be(t)}function eA(e){const t=[],n=e.actions;if(n!==void 0)if(!we(n))t.push({path:"/actions",message:"actions is an object of named actions"});else{const r=Object.keys(n).sort();r.length>Fi.actions&&t.push({path:"/actions",message:`at most ${Fi.actions} actions`});for(const o of r)t.push(...tA(e,o,n[o],`/actions/${fn(o)}`))}return t}function tA(e,t,n,r){const o=[];if(JC.test(t)||o.push({path:r,message:"an action name is a letter, then letters, digits and underscores"}),!we(n))return[...o,{path:r,message:"an action is {params?, steps}"}];if(n.params!==void 0&&o.push(...Lg(n.params,`${r}/params`)),!Array.isArray(n.steps)||n.steps.length===0)return[...o,{path:`${r}/steps`,message:"steps is a non-empty array"}];n.steps.length>Fi.steps&&o.push({path:`${r}/steps`,message:`at most ${Fi.steps} steps`});const i=QC(n),s=we(e.records)?e.records:{},a=Array.isArray(e.functions)?e.functions.filter(l=>typeof l=="string"):null;return n.steps.forEach((l,c)=>o.push(...nA(l,`${r}/steps/${c}`,i,s,a))),o}function oo(e,t,n,r){if(typeof e!="string")return Ri(e);const o=qa(e,n);return"error"in o?(r.push({path:t,message:o.error}),null):o.type}function nA(e,t,n,r,o){const i=[],s=fy(e);if(s===null||!we(e))return[{path:t,message:`a step is one of ${Zu.join(", ")}`}];const a=e[s],l=`${t}/${fn(s)}`;switch(s){case"require":{if(typeof a!="string")i.push({path:l,message:"require is an expression"});else{const c=oo(a,l,n,i);c!==null&&c!=="bool"&&c!=="dyn"&&i.push({path:l,message:`require needs a bool, got ${Be(c)}`})}return(typeof e.message!="string"||!e.message)&&i.push({path:`${t}/message`,message:"message is the text shown when the requirement fails"}),i}case"records.upsert":{if(!we(a))return[{path:l,message:"records.upsert is {kind, data, id?}"}];const c=typeof a.kind=="string"?a.kind:"",u=nn(r,c)&&we(r[c])?r[c]:null;if(u||i.push({path:`${l}/kind`,message:`records:${c} names no declared kind`}),a.id!==void 0){const h=oo(a.id,`${l}/id`,n,i);h!==null&&!Co("string",h)&&i.push({path:`${l}/id`,message:`id is a string, got ${Be(h)}`})}if(!we(a.data))return[...i,{path:`${l}/data`,message:"data is an object of field expressions"}];const d=u&&we(u.schema)?u.schema:null,p=d&&we(d.properties)?d.properties:{};for(const h of Object.keys(a.data).sort()){const f=`${l}/data/${fn(h)}`,y=oo(a.data[h],f,n,i);if(!d)continue;if(!nn(p,h)){d.additionalProperties!==!0&&i.push({path:f,message:`${h} is not in the schema of ${c}`});continue}const v=Array.isArray(d.required)&&d.required.includes(h)?Ur(p[h]):Ze(Ur(p[h]));y!==null&&!Co(v,y)&&i.push({path:f,message:`${h} is ${Be(v)}, got ${Be(y)}`})}if(d&&a.id===void 0&&Array.isArray(d.required))for(const h of d.required)typeof h=="string"&&!nn(a.data,h)&&i.push({path:`${l}/data`,message:`${h} is required by ${c}`});return i}case"records.delete":{if(!we(a)||a.id===void 0)return[{path:l,message:"records.delete is {id}"}];const c=oo(a.id,`${l}/id`,n,i);return c!==null&&!Co("string",c)&&i.push({path:`${l}/id`,message:`id is a string, got ${Be(c)}`}),i}case"set":return(!we(a)||typeof a.path!="string"||!py.test(a.path))&&i.push({path:`${l}/path`,message:"path is a JSON pointer"}),we(a)&&oo(a.value??null,`${l}/value`,n,i),i;case"call":{if(typeof a!="string"||!a)return[{path:l,message:"call names a host function"}];const c=ki(a);if(c==="write"?i.push({path:l,message:`${ta(a,c)}: use a records.upsert, records.delete or set step`}):c==="pure"?i.push({path:l,message:`${a} is pure: compute it in an expression`}):el(a)!==null?i.push({path:l,message:"an action never runs another action"}):a!==So&&o!==null&&!o.some(u=>u===a||u.endsWith("*")&&a.startsWith(u.slice(0,-1)))&&i.push({path:l,message:`${a} is not in the package's functions`}),e.args!==void 0)if(!we(e.args))i.push({path:`${t}/args`,message:"args is an object of expressions"});else for(const u of Object.keys(e.args).sort())oo(e.args[u],`${t}/args/${fn(u)}`,n,i);return i}}return i}function rA(e){const t=[];if(!we(e.templates))return t;const n=we(e.actions)?e.actions:{},r=(o,i)=>{if(Array.isArray(o))return o.forEach((s,a)=>r(s,`${i}/${a}`));if(we(o)){if(typeof o.call=="string"){const s=ki(o.call);s!=="pure"&&t.push({path:`${i}/call`,message:`${ta(o.call,s)}: a binding is pure, name an action in on.press`})}for(const[s,a]of Object.entries(o))r(a,`${i}/${fn(s)}`)}};for(const[o,i]of Object.entries(e.templates))!we(i)||!Array.isArray(i.components)||i.components.forEach((s,a)=>{if(!we(s))return;const l=`/templates/${fn(o)}/components/${a}`;for(const[c,u]of Object.entries(s)){if(c!=="on"){r(u,`${l}/${fn(c)}`);continue}if(we(u))for(const[d,p]of Object.entries(u)){const h=`${l}/on/${fn(d)}`;if(we(p))for(const[f,y]of Object.entries(p)){if(f!=="functionCall"||!we(y)){r(y,`${h}/${fn(f)}`);continue}const g=typeof y.call=="string"?y.call:"",v=el(g);v!==null&&!nn(n,v)&&t.push({path:`${h}/functionCall/call`,message:`action ${v} names no package action`}),v!==null&&nn(n,v)&&we(n[v])&&t.push(...oA(v,n[v],y.args,`${h}/functionCall/args`)),g==="bind"&&t.push(...iA(e,y.args,`${h}/functionCall/args`));for(const[m,b]of Object.entries(y))m!=="call"&&r(b,`${h}/functionCall/${fn(m)}`)}}}});return t}function oA(e,t,n,r){if(n!==void 0&&!we(n))return[{path:r,message:`args is an object of action ${e}'s params`}];const o=[],i=we(t.params)?t.params:{},s=we(i.properties)?i.properties:{},a=Array.isArray(i.required)?i.required.filter(c=>typeof c=="string"):[],l=we(n)?n:{};for(const c of Object.keys(l).sort()){const u=`${r}/${fn(c)}`;if(!nn(s,c)){i.additionalProperties!==!0&&o.push({path:u,message:`${c} is not a param of action ${e}`});continue}const d=l[c];if(typeof d!="string"&&typeof d!="number"&&typeof d!="boolean")continue;const p=a.includes(c)?Ur(s[c]):Ze(Ur(s[c])),h=Ri(d);Co(p,h)||o.push({path:u,message:`${c} is ${Be(p)}, got ${Be(h)}`})}for(const c of a)nn(l,c)||o.push({path:r,message:`${c} is required by action ${e}`});return o}function iA(e,t,n){if(!we(t)||typeof t.source!="string")return[];const r=t.source,o=`${n}/source`,i=Qt(r);if(!i)return[{path:o,message:"source is a scheme:name URI"}];const s=[];if(Array.isArray(e.sources)&&e.sources.every(a=>typeof a=="string")&&!tl(e.sources,r)&&s.push({path:o,message:`source ${r} is not in the package's sources`}),i.scheme===Hr){(!we(e.records)||!nn(e.records,i.name))&&s.push({path:o,message:`records:${i.name} names no declared kind`});const a=i.params.query;a!==void 0&&(!we(e.queries)||!nn(e.queries,a))&&s.push({path:o,message:`query ${a} names no package query`})}return s}class hy extends Error{}const At=e=>{throw new hy(e)},ya=e=>e.map(t=>`${t.path||"/"} ${t.message}`).join("; ");function my(e,t,n,r={}){const o=we(e.actions)?e.actions:{},i=nn(o,t)&&we(o[t])?o[t]:null;if(!i||!Array.isArray(i.steps))return{error:`no action ${t}`};const s=n??{};if(!we(s))return{error:"params is an object"};if(we(i.params)){const d=Pi(i.params,s);if(d.length)return{error:`params: ${ya(d)}`}}const a={params:s,data:r.data??null,me:r.me??null},l=we(e.records)?e.records:{};let c=r.maxSteps??Fi.maxSteps;const u={writes:[],sets:[],calls:[]};try{i.steps.forEach((d,p)=>{const h=`step ${p}`,f=m=>{c-=m,c<0&&At(`${h}: action step limit exceeded`)};f(1);const y=m=>{if(typeof m!="string")return m;const b=Wo(m);if("error"in b)return At(`${h}: ${b.error}`);const x=Math.min(Po.maxSteps,c),{result:$,steps:S}=yx(b.ast,a,{now:r.now,offset:r.offset,maxSteps:x});return"error"in $&&($.error==="step limit exceeded"&&x===c&&At(`${h}: action step limit exceeded`),At(`${h}: ${$.error}`)),f(S),$.value},g=fy(d);if(g===null||!we(d))return At(`${h}: a step is one of ${Zu.join(", ")}`);const v=d[g];switch(g){case"require":{const m=y(v);typeof m!="boolean"&&At(`${h}: require needs a bool, got ${We(m)}`),m||At(typeof d.message=="string"&&d.message?d.message:`${h}: requirement failed`);return}case"records.upsert":{if(!we(v)||!we(v.data))return At(`${h}: records.upsert is {kind, data, id?}`);const m=typeof v.kind=="string"?v.kind:"",b=nn(l,m)&&we(l[m])?l[m]:null;if(!b||!we(b.schema))return At(`${h}: records: no kind ${m}`);let x;if(v.id!==void 0){const C=y(v.id);(typeof C!="string"||!C)&&At(`${h}: id is a string, got ${We(C)}`),x=C}const $={};for(const C of Object.keys(v.data).sort())$[C]=y(v.data[C]);const S=b.schema,A=Pi(x===void 0?S:{...S,required:[]},$);A.length&&At(`${h}: records: ${ya(A)}`),u.writes.push(x===void 0?{op:"upsert",kind:m,data:$}:{op:"upsert",kind:m,data:$,id:x});return}case"records.delete":{if(!we(v))return At(`${h}: records.delete is {id}`);const m=y(v.id);(typeof m!="string"||!m)&&At(`${h}: id is a string, got ${We(m)}`),u.writes.push({op:"delete",id:m});return}case"set":{if(!we(v)||typeof v.path!="string"||!py.test(v.path))return At(`${h}: path is a JSON pointer`);u.sets.push({path:v.path,value:y(v.value??null)});return}case"call":{if(typeof v!="string"||ki(v)!=="host"||el(v)!==null)return At(`${h}: call names a host function`);const m={};if(we(d.args))for(const b of Object.keys(d.args).sort())m[b]=y(d.args[b]);u.calls.push({name:v,args:m});return}}})}catch(d){if(d instanceof hy)return{error:d.message};throw d}return{plan:u}}function sA(e,t,n){let r=[...e];const o=[];let i=0;for(const[s,a]of t.entries()){const l=`write ${s}`,c={id:n.me??null,role:n.role??null,access:n.access},u=(v,m,b)=>n.role===void 0?null:Dc(Pc(n.records?.[v]),m,c,b),d=v=>r.find(m=>m.id===v&&(n.role===void 0||Dc(Pc(n.records?.[m.kind]),"read",c,m)===null));if(a.op==="delete"){const v=d(a.id);if(!v)return{error:`${l}: record ${a.id} not found`};const m=u(v.kind,"delete",v);if(m)return{error:`${l}: ${m}`};r=r.filter(b=>b.id!==a.id),o.push(a.id);continue}const p=n.records&&nn(n.records,a.kind)&&we(n.records[a.kind])?n.records[a.kind]:null;if(!p||!we(p.schema))return{error:`${l}: records: no kind ${a.kind}`};const h=p.schema;if(a.id!==void 0){const v=d(a.id);if(!v)return{error:`${l}: record ${a.id} not found`};if(v.kind!==a.kind)return{error:`${l}: record ${a.id} is not of kind ${a.kind}`};const m=u(a.kind,"update",v);if(m)return{error:`${l}: ${m}`};const b={...v.data,...a.data},x=Pi(h,b);if(x.length)return{error:`${l}: records: ${ya(x)}`};r=r.map($=>$.id===a.id?{...$,data:b,updatedAt:n.now}:$),o.push(a.id);continue}const f=u(a.kind,"create");if(f)return{error:`${l}: ${f}`};const y=Pi(h,a.data);if(y.length)return{error:`${l}: records: ${ya(y)}`};const g=n.newId(i++);r.push({id:g,kind:a.kind,data:{...a.data},createdBy:n.me??null,authorId:n.me??null,createdAt:n.now,updatedAt:n.now}),o.push(g)}return{rows:r,ids:o}}const ba={tests:50,gotMax:300},Nl={now:"2026-01-01T00:00:00.000Z",as:"member",role:"member"},aA=["member","owner"],af=["expr","query","action"],Ke=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ai=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),lA=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),gy=["id","author"];function qc(e,t){return Ke(e)?Ke(t)&&Object.keys(e).every(n=>qc(e[n],ai(t,n)?t[n]:null)):Array.isArray(e)?Array.isArray(t)&&t.length===e.length&&e.every((n,r)=>qc(n,t[r])):(e??null)===(t??null)}function yy(e){const t=e.tests;if(t===void 0)return[];if(!Array.isArray(t))return[{path:"/tests",message:"tests is a list of {name, expr | query | action, expect}"}];const n=[];t.length>ba.tests&&n.push({path:"/tests",message:`at most ${ba.tests} tests`});const r=Ke(e.records)?e.records:{},o=Ke(e.queries)?e.queries:{},i=Ke(e.actions)?e.actions:{};return t.forEach((s,a)=>{const l=`/tests/${a}`;if(!Ke(s))return void n.push({path:l,message:"a test is {name, expr | query | action, expect}"});(typeof s.name!="string"||!s.name.trim())&&n.push({path:`${l}/name`,message:"name is a non-empty string"});const c=af.filter(h=>s[h]!==void 0);if(c.length!==1&&n.push({path:l,message:`a test runs one of ${af.join(", ")}`}),ai(s,"expect")||n.push({path:`${l}/expect`,message:"expect is required"}),s.now!==void 0&&(typeof s.now!="string"||Ha(s.now)===null)&&n.push({path:`${l}/now`,message:"now is an ISO timestamp"}),s.as!==void 0&&(typeof s.as!="string"||!s.as)&&n.push({path:`${l}/as`,message:"as is a member id"}),s.role!==void 0&&!aA.includes(s.role)&&n.push({path:`${l}/role`,message:"role is member or owner"}),s.records!==void 0)if(!Ke(s.records))n.push({path:`${l}/records`,message:"records is {<kind>: [rows]}"});else for(const h of Object.keys(s.records).sort()){const f=`${l}/records/${lA(h)}`,y=ai(r,h)&&Ke(r[h])?r[h]:null;if(!y||!Ke(y.schema)){n.push({path:f,message:`records:${h} names no declared kind`});continue}const g=s.records[h];if(!Array.isArray(g)){n.push({path:f,message:"a kind's sample is a list of rows"});continue}g.forEach((v,m)=>{if(!Ke(v))return void n.push({path:`${f}/${m}`,message:"a row is an object"});for(const b of gy)v[b]!==void 0&&(typeof v[b]!="string"||!v[b])&&n.push({path:`${f}/${m}/${b}`,message:`${b} is a non-empty string`});for(const b of Pi(y.schema,by(v)))n.push({path:`${f}/${m}${b.path}`,message:b.message})})}if(c.length!==1)return;const u=c[0],d=s[u],p=`${l}/${u}`;if(u==="expr")!Ke(d)||typeof d.expr!="string"?n.push({path:`${p}/expr`,message:"expr is a string"}):d.vars!==void 0&&!Ke(d.vars)&&n.push({path:`${p}/vars`,message:"vars is an object"});else if(u==="query"){const h=Ke(d)&&typeof d.name=="string"?d.name:"";ai(o,h)||n.push({path:`${p}/name`,message:`query ${h} names no package query`}),Ke(d)&&d.params!==void 0&&!Ke(d.params)&&n.push({path:`${p}/params`,message:"params is an object"})}else{const h=Ke(d)&&typeof d.name=="string"?d.name:"";ai(i,h)||n.push({path:`${p}/name`,message:`action ${h} names no package action`})}}),n}function by(e){const t={};for(const[n,r]of Object.entries(e))gy.includes(n)||(t[n]=r);return t}function cA(e,t,n){const r=[];if(!Ke(e))return r;for(const o of Object.keys(e).sort()){const i=e[o];Array.isArray(i)&&i.forEach((s,a)=>{if(!Ke(s))return;const l=typeof s.author=="string"?s.author:t;r.push({id:typeof s.id=="string"?s.id:`${o}-${a+1}`,kind:o,data:by(s),createdBy:l,authorId:l,createdAt:n,updatedAt:n})})}return r}function uA(e,t,n,r,o){return!Ke(e)||Object.keys(e).length!==1||typeof e.source!="string"?e:vy(e.source,t,n,r,o)}function vy(e,t,n,r,o){const i=Xu(e,Ke(t.queries)?t.queries:void 0),s=Qt(i),a=s?.scheme===Hr?ry(s):null;return a?uC(n,a,{me:r,now:o,computed:a.app===null?sC(t.records,a.from):void 0,refs:a.app===null?aC(t.records,a.from):void 0,transitions:a.app===null&&a.from&&Ke(t.records)?gS(t.records[a.from]):null})??null:{error:`${e} is not a records source`}}function dA(e,t){const n=typeof t.now=="string"?t.now:Nl.now,r=Ha(n),o=typeof t.as=="string"?t.as:Nl.as,i=typeof t.role=="string"?t.role:Nl.role,s=Ke(e.records)?e.records:void 0,a=cA(t.records,o,n),l=zp(a,s,{id:o,role:i});if(Ke(t.expr)){const h={};if(Ke(t.expr.vars))for(const[y,g]of Object.entries(t.expr.vars))h[y]=uA(g,e,l,o,n);const f=Eu(t.expr.expr,h,{now:r});return"error"in f?{error:f.error}:f.value}if(Ke(t.query)){const h=t.query.name,f=e.queries[h],y=Ke(f)&&typeof f.from=="string"?f.from:"",g={};if(Ke(t.query.params))for(const[v,m]of Object.entries(t.query.params))g[v]=typeof m=="string"?m:Wr(m);return vy(Ku(`${Hr}:${y}`,{query:h,...g}),e,l,o,n)}const c=t.action,u=my(e,c.name,c.params,{data:c.data,me:o,now:r});if("error"in u)return{error:u.error};const d=sA(a,u.plan.writes,{records:s,me:o,role:i,now:n,newId:h=>`new-${h+1}`});if("error"in d)return{error:d.error};const p={};for(const h of zp(d.rows,s,{id:o,role:i}))(p[h.kind]??=[]).push({...h.data,id:h.id,author:h.authorId??h.createdBy});return{records:p,sets:u.plan.sets,calls:u.plan.calls}}function pA(e){return!Array.isArray(e.tests)||yy(e).length?[]:e.tests.map(t=>{const n=dA(e,t);return{name:t.name,pass:qc(t.expect,n),got:n}})}function fA(e,t,n){const r=Array.from(Wr(n??null)),o=r.length>ba.gotMax?`${r.slice(0,ba.gotMax).join("")}…`:r.join("");return`${e}: expected ${Wr(t??null)}, got ${o}`}function hA(e){const t=Array.isArray(e.tests)?e.tests:[];return pA(e).flatMap((n,r)=>n.pass?[]:[{path:`/tests/${r}`,message:fA(n.name,t[r].expect,n.got)}])}const lf={date:104,time:64,"date-time":152,number:64,integer:64,boolean:56},mA=88,gA=80,yA=200,bA="/recordForm",vA="/recordTable",Ju=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function Qu(e){const t=e.replace(/_/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim().toLowerCase();return t?t[0].toUpperCase()+t.slice(1):e}function ed(e){const t=Object.keys(e.schema.properties),n=(e.schema.required??[]).filter((r,o,i)=>t.includes(r)&&i.indexOf(r)===o);return[...n,...t.filter(r=>!n.includes(r)).sort()]}const td=e=>e.format==="attachment"||e.type==="array"&&e.items?.format==="attachment";function cf(e,t){const n=e.schema.required??[],r=e.refs??{};return ed(e).flatMap(o=>{const i=e.schema.properties[o];if(td(i))return[];const s={path:`${t}/${o}`},a={name:o,label:Qu(o),widget:"text",required:n.includes(o),wide:!1,value:s};i.description&&(a.placeholder=i.description);const l=r[o];l==="member"?Object.assign(a,{widget:"select",source:"exp:members",searchable:!0}):l==="issue"?Object.assign(a,{widget:"select",source:"exp:issues",searchable:!0}):i.type==="boolean"?a.widget="switch":i.type==="number"||i.type==="integer"?(a.widget="number",i.minimum!==void 0&&(a.min=i.minimum),i.maximum!==void 0&&(a.max=i.maximum),i.type==="integer"&&Object.assign(a,{step:1,precision:0})):i.type==="array"?(i.items?.enum?Object.assign(a,{widget:"select",multiple:!0,options:i.items.enum.map(u=>({label:u,value:u}))}):a.widget="chips",i.maxLength!==void 0&&(a.max=i.maxLength),a.wide=!0):i.enum?Object.assign(a,{widget:"select",options:i.enum.map(u=>({label:u,value:u}))}):i.format==="date"?a.widget="date":i.format==="time"?a.widget="time":i.format==="date-time"?a.placeholder??="YYYY-MM-DDTHH:MM":(i.maxLength===void 0||i.maxLength>yA)&&Object.assign(a,{widget:"textarea",wide:!0});const c=[];return a.required&&a.widget!=="switch"&&c.push({condition:{call:"required",args:{value:s}},message:"$string.required"}),i.type==="string"&&i.maxLength!==void 0&&!i.enum&&a.widget!=="select"&&c.push({condition:{call:"length",args:{value:s,max:i.maxLength}},message:"$string.invalidValue"}),(i.type==="number"||i.type==="integer")&&(i.minimum!==void 0||i.maximum!==void 0)&&c.push({condition:{call:"numeric",args:{value:s,...i.minimum!==void 0?{min:i.minimum}:{},...i.maximum!==void 0?{max:i.maximum}:{}}},message:"$string.invalidValue"}),c.length&&(a.checks=c),[a]})}function $A(e,t,n){const o=(t??ed(e)).filter(i=>e.schema.properties[i]&&!td(e.schema.properties[i])).map(i=>{const s=e.schema.properties[i],a={key:i,label:Qu(i),sortable:!0};s.type==="number"||s.type==="integer"?Object.assign(a,{type:"number",align:"end"}):s.type==="boolean"?a.type="boolean":s.format==="date"&&(a.type="date");const l=s.type==="string"?s.format?lf[s.format]:void 0:lf[s.type];return l!==void 0?a.width=l:a.truncate=!0,a});return o.push({key:"updatedAt",label:"Updated",type:"relativeTime",width:mA,sortable:!0}),n&&o.push({key:"menu",label:"",type:"slot",slot:"menu",width:gA}),o}const io=(e,t)=>({functionCall:{call:"set",args:{path:e,value:t}}}),ir=(e,t,n)=>{const r=e.on=Ju(e.on)?{...e.on}:{};r[t]===void 0&&(r[t]=n)};function uf(e,t,n){const r={};for(const i of t)r[i.name]=i.value;const o={kind:e};return n!==void 0&&(o.id=n),o.data=r,{functionCall:{call:"records.upsert",args:o}}}function $y(e,t=[],n,r={}){const o=[],i=[],s=[...t];for(const a of e){if(!Ju(a)||a.component!=="RecordForm"&&a.component!=="RecordTable"){o.push(a);continue}const l={...a},c=String(l.id),u=typeof l.kind=="string"?l.kind:"",d=n&&Object.prototype.hasOwnProperty.call(n,u)?n[u]:void 0;if(!d){l.missing=!0,o.push(l);continue}if(l.component==="RecordForm"){const x=typeof l.path=="string"?l.path:`${bA}/${c}`,$=cf(d,x);l.path=x,l.fields=$,r.readOnly&&(l.readOnly=!0),ir(l,"submit",uf(u,$,l.recordId)),o.push(l);continue}const p=`${vA}/${c}`,h=l.editable!==!1&&!r.readOnly,f=Array.isArray(l.columns)?l.columns.filter(x=>typeof x=="string"):void 0,y=`${p}/editor/draft`,g=cf(d,y);l.title=d.title??Qu(u),l.cols=$A(d,f,h),l.rows={path:`${p}/rows/rows`},l.count={call:"fill",args:{template:"$string.recordCount",params:{count:{call:"coalesce",args:{values:[{path:`${p}/rows/count`},0]}}}}},l.loading={call:"not",args:{value:{path:`${p}/rows`}}},r.readOnly&&(l.add=!1),l.editable=h,l.children={componentId:`${c}__row`,path:`${p}/rows/rows`,key:"id"},h?(l.fields=g,l.path=y,l.editorOpen={path:`${p}/editor/open`},l.editorId={path:`${y}/id`},l.deleteOpen={path:`${p}/delete/open`},ir(l,"add",io(`${p}/editor`,{open:!0,draft:{}})),ir(l,"edit",io(`${p}/editor`,{open:!0,draft:{path:""}})),ir(l,"delete",io(`${p}/delete`,{open:!0,id:{path:"id"}})),ir(l,"submit",uf(u,g,{path:`${y}/id`})),ir(l,"cancel",io(`${p}/editor/open`,!1)),ir(l,"confirm",{functionCall:{call:"records.delete",args:{id:{path:`${p}/delete/id`}}}}),ir(l,"cancelDelete",io(`${p}/delete/open`,!1))):l.add=!1,o.push(l);const v=(f??ed(d)).filter(x=>d.schema.properties[x]&&!td(d.schema.properties[x])),m={id:`${c}__row`,component:"Row",title:{call:"coalesce",args:{values:[{call:"text",args:{value:{path:v[0]??"id"}}},"—"]}}};v[1]&&(m.subtitle={call:"coalesce",args:{values:[{call:"text",args:{value:{path:v[1]}}},""]}}),m.meta={call:"formatRelativeTime",args:{value:{path:"updatedAt"}}},h&&(m.on={press:io(`${p}/editor`,{open:!0,draft:{path:""}})}),i.push(m);const b=typeof l.query=="string"&&l.query.trim()?l.query.trim().replace(/^\?/,""):"sort=updatedAt&order=desc";s.push({path:`${p}/rows`,source:`records:${u}?${b}`})}return{components:[...o,...i],bindings:s}}function xy(e){return e.some(t=>Ju(t)&&(t.component==="RecordForm"||t.component==="RecordTable"))}const hn=e=>!!e&&typeof e=="object"&&!Array.isArray(e),wy=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),xA=[jr,bu,La];function wA(e,t){const n=[],r=e.children;if(r!=null){const o=Array.isArray(r)&&r.every(s=>typeof s=="string"),i=hn(r)&&typeof r.componentId=="string"&&typeof r.path=="string"&&(r.key===void 0||r.key===null||typeof r.key=="string");!o&&!i&&n.push({path:`${t}/children`,message:"children is a list of ids or {componentId, path, key?}"})}return e.slots!==void 0&&e.slots!==null&&(!hn(e.slots)||Object.values(e.slots).some(o=>typeof o!="string"))&&n.push({path:`${t}/slots`,message:"slots is an object of component ids"}),e.on!==void 0&&e.on!==null&&!hn(e.on)&&n.push({path:`${t}/on`,message:"on is an object of actions"}),e.style!==void 0&&e.style!==null&&!hn(e.style)&&n.push({path:`${t}/style`,message:"style is an object"}),n}function kA(e,t,n){const r=[];return e.forEach((o,i)=>{const s=`${n}/${i}`;if(Array.isArray(o.children)?o.children.forEach((a,l)=>a===t&&r.push(`${s}/children/${l}`)):hn(o.children)&&o.children.componentId===t&&r.push(`${s}/children/componentId`),hn(o.slots))for(const[a,l]of Object.entries(o.slots))l===t&&r.push(`${s}/slots/${wy(a)}`)}),r}function SA(e,t,n=[]){const r=[],o=typeof e.catalogId=="string"?e.catalogId:"";if(!t.includes(o)||!hn(e.templates))return r;const i=c=>xA.includes(c)||n.some(u=>u.id===c),s=Array.isArray(e.extensions)?e.extensions.map(c=>hn(c)&&typeof c.id=="string"?c.id:""):[],a=!i(o)||s.some(c=>c&&!i(c)),l=i(o)?o:jr;for(const[c,u]of Object.entries(e.templates)){if(!hn(u)||!Array.isArray(u.components))continue;const d=`/templates/${wy(c)}/components`,p=u.components,h=new Set;let f=p.length>0;for(const S of p)!hn(S)||typeof S.id!="string"||typeof S.component!="string"||h.has(S.id)?f=!1:h.add(S.id);if(!f||!h.has("root"))continue;const y=p,g=y.flatMap((S,A)=>wA(S,`${d}/${A}`));if(g.length){r.push(...g);continue}const v=new Map(y.map((S,A)=>[S.id,A])),m=hn(e.records)?e.records:void 0,b=xy(y)?$y(y,[],m).components:y;for(const S of b){const A=typeof S.id=="string"&&S.id.endsWith("__row")?v.get(S.id.slice(0,-5)):void 0;A!==void 0&&!v.has(S.id)&&v.set(S.id,A)}const x=new Set,$=(S,A)=>{const C=`${S}
23
+ `);if(this.data=[],this.event="",!j2.includes(n))return;const o=Ng(r);t.messages.push(...o.messages),o.issues.length&&t.issues.push({at:this.count,message:`event ${this.count} is not JSON`})}}const Ec=/^[a-z][a-z0-9_]{0,31}$/,iS=["id","createdAt","updatedAt","createdBy","authorId","author"],Dp=["string","number","integer","boolean","array"],Rp=["string","number","integer","boolean"],xs=["date","date-time","time","attachment"],sS=/^\/api\/attachments\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/,Zt=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Rl=e=>Array.isArray(e)&&e.every(t=>typeof t=="string");function Lg(e,t){const n=[];if(!Zt(e)||e.type!=="object"||!Zt(e.properties))return[{path:t,message:'a record schema is {type: "object", properties}'}];for(const r of Object.keys(e.properties).sort()){const o=e.properties[r],i=`${t}/properties/${r}`;if(iS.includes(r)&&n.push({path:i,message:`${r} is a reserved record key`}),!Zt(o)||typeof o.type!="string"||!Dp.includes(o.type)){n.push({path:i,message:`a field is {type: ${Dp.join("|")}}`});continue}if(o.enum!==void 0&&(!Rl(o.enum)||!o.enum.length||o.type!=="string")&&n.push({path:`${i}/enum`,message:"enum is a non-empty list of strings on a string field"}),o.type==="array"){const s=o.items;!Zt(s)||typeof s.type!="string"||!Rp.includes(s.type)?n.push({path:`${i}/items`,message:`items is {type: ${Rp.join("|")}}`}):(s.enum!==void 0&&(!Rl(s.enum)||!s.enum.length||s.type!=="string")&&n.push({path:`${i}/items/enum`,message:"enum is a non-empty list of strings on a string item"}),s.format!==void 0&&(typeof s.format!="string"||!xs.includes(s.format)||s.type!=="string")&&n.push({path:`${i}/items/format`,message:`format is ${xs.join("|")} on a string item`}))}else o.items!==void 0&&n.push({path:`${i}/items`,message:"items belongs to an array field"});o.format!==void 0&&(typeof o.format!="string"||!xs.includes(o.format)||o.type!=="string")&&n.push({path:`${i}/format`,message:`format is ${xs.join("|")} on a string field`});for(const s of["maxLength","minimum","maximum"])o[s]!==void 0&&typeof o[s]!="number"&&n.push({path:`${i}/${s}`,message:`${s} is a number`})}return e.required!==void 0&&(Rl(e.required)?e.required.forEach((r,o)=>{Object.prototype.hasOwnProperty.call(e.properties,r)||n.push({path:`${t}/required/${o}`,message:`${r} is not a declared field`})}):n.push({path:`${t}/required`,message:"required is a list of field names"})),e.additionalProperties!==void 0&&typeof e.additionalProperties!="boolean"&&n.push({path:`${t}/additionalProperties`,message:"additionalProperties is a boolean"}),n}const aS=/^\d{4}-\d{2}-\d{2}$/,lS=/^\d{2}:\d{2}(:\d{2})?$/,cS=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})$/;function Fp(e,t,n,r){const o=[];switch(e){case"string":return typeof t!="string"?[{path:n,message:"a string"}]:(r.enum&&!r.enum.includes(t)&&o.push({path:n,message:`one of ${r.enum.join("|")}`}),r.maxLength!==void 0&&[...t].length>r.maxLength&&o.push({path:n,message:`at most ${r.maxLength} characters`}),r.format==="date"&&!aS.test(t)&&o.push({path:n,message:"a date (YYYY-MM-DD)"}),r.format==="date-time"&&!cS.test(t)&&o.push({path:n,message:"a date-time (ISO 8601)"}),r.format==="time"&&!lS.test(t)&&o.push({path:n,message:"a time (HH:MM)"}),r.format==="attachment"&&!sS.test(t)&&o.push({path:n,message:"an attachment (/api/attachments/<id>)"}),o);case"number":case"integer":return typeof t!="number"||!Number.isFinite(t)?[{path:n,message:"a number"}]:e==="integer"&&!Number.isInteger(t)?[{path:n,message:"an integer"}]:(r.minimum!==void 0&&t<r.minimum&&o.push({path:n,message:`at least ${r.minimum}`}),r.maximum!==void 0&&t>r.maximum&&o.push({path:n,message:`at most ${r.maximum}`}),o);case"boolean":return typeof t=="boolean"?[]:[{path:n,message:"a boolean"}];default:return[]}}function Pi(e,t){if(!Zt(t))return[{path:"",message:"a record is an object"}];const n=[],r=new Set(e.required??[]);for(const o of Object.keys(e.properties).sort()){const i=e.properties[o],s=t[o];if(s==null){r.has(o)&&n.push({path:`/${o}`,message:"required"});continue}if(i.type==="array"){if(!Array.isArray(s)){n.push({path:`/${o}`,message:"a list"});continue}i.maxLength!==void 0&&s.length>i.maxLength&&n.push({path:`/${o}`,message:`at most ${i.maxLength} items`});const a=i.items??{type:"string"};s.forEach((l,c)=>n.push(...Fp(a.type,l,`/${o}/${c}`,{enum:a.enum,format:a.format})));continue}n.push(...Fp(i.type,s,`/${o}`,i))}if(e.additionalProperties!==!0)for(const o of Object.keys(t).sort())Object.prototype.hasOwnProperty.call(e.properties,o)||n.push({path:`/${o}`,message:"not in the schema"});return n}function uS(e,t,n){if(!Zt(e)||e.refs===void 0)return[];const r=e.refs;if(!Zt(r))return[{path:`${t}/refs`,message:'refs is {field: {kind} | "issue" | "member"}'}];const o=Zt(e.schema)&&Zt(e.schema.properties)?e.schema.properties:{},i=[];for(const s of Object.keys(r).sort()){const a=`${t}/refs/${s}`,l=r[s],c=Object.prototype.hasOwnProperty.call(o,s)?o[s]:void 0;if(Zt(c)?c.type!=="string"&&i.push({path:a,message:"a ref is a string field"}):i.push({path:a,message:`${s} is not a declared field`}),!(l==="issue"||l==="member")){if(!Zt(l)||Object.keys(l).length!==1||typeof l.kind!="string"||!l.kind){i.push({path:a,message:'a ref is {kind}, "issue" or "member"'});continue}(!Zt(n)||!Object.prototype.hasOwnProperty.call(n,l.kind))&&i.push({path:`${a}/kind`,message:`records:${l.kind} names no declared kind`})}}return i}const jg=["read","create","update","delete"],Bg=["member","author","owners"],dS={read:"member",create:"member",update:"author",delete:"author"},ws={none:"You have no access to this app",readOnly:"You have read-only access to this app",author:{read:"Only the record's author or a team owner can read it",update:"Only the record's author or a team owner can change it",delete:"Only the record's author or a team owner can change it"},owners:{read:"Only team owners can read these records",create:"Only team owners can add these records",update:"Only team owners can change these records",delete:"Only team owners can change these records"}},Ic=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Wg=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function pS(e,t){if(!Ic(e))return[{path:t,message:"policy is {read?, create?, update?, delete?}"}];const n=[];for(const r of Object.keys(e).sort()){const o=e[r];jg.includes(r)?r==="create"&&o==="author"?n.push({path:`${t}/create`,message:"create is member or owners: a new record has no author yet"}):(typeof o!="string"||!Bg.includes(o))&&n.push({path:`${t}/${r}`,message:`${r} is member, author or owners`}):n.push({path:`${t}/${r}`,message:`unknown policy op ${r}: read, create, update or delete`})}return n}function Pc(e){const t={...dS},n=Ic(e)&&Ic(e.policy)?e.policy:null;if(!n)return t;for(const r of jg){const o=Wg(n,r)?n[r]:void 0;typeof o=="string"&&Bg.includes(o)&&!(r==="create"&&o==="author")&&(t[r]=o)}return t}const Hg=e=>e?.authorId??e?.createdBy??null;function Dc(e,t,n,r){const o=n.access??"write";if(n.id===null||n.role===null||o==="none")return ws.none;if(o==="read"&&t!=="read")return ws.readOnly;if(n.role==="owner")return null;const i=e[t];if(i==="member")return null;if(i==="owners"||t==="create")return ws.owners[t];const s=Hg(r);return s!==null&&s===n.id?null:ws.author[t]}const fS=(e,t,n,r)=>Dc(e,t,n,r)===null;function zp(e,t,n){const r=new Map,o=i=>{let s=r.get(i);return s||r.set(i,s=Pc(t&&Wg(t,i)?t[i]:void 0)),s};return e.filter(i=>fS(o(i.kind),"read",n,i))}const zs="transitions",hS=["member","author","owners"],mS=["field","initial","from","who"],ma="->",Dt=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Er=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Rc=e=>Array.isArray(e)&&e.every(t=>typeof t=="string");function gS(e){const t=Dt(e)?e.transitions:void 0;if(!Dt(t)||typeof t.field!="string"||!t.field||!Dt(t.from))return null;const n={};for(const o of Object.keys(t.from))Rc(t.from[o])&&(n[o]=t.from[o]);const r={};if(Dt(t.who))for(const o of Object.keys(t.who))typeof t.who[o]=="string"&&(r[o]=t.who[o]);return{field:t.field,...Rc(t.initial)?{initial:t.initial}:{},from:n,who:r}}function yS(e){if(e.initial)return[...e.initial];const t=Object.keys(e.from).sort(),n=new Set(Object.values(e.from).flat()),r=t.filter(o=>!n.has(o));return r.length?r:t}const qg=(e,t)=>{const n=e?.[t];return typeof n=="string"&&n!==""?n:null};function bS(e,t,n){const r=e.who??{};return Er(r,`${t}${ma}${n}`)?r[`${t}${ma}${n}`]:Er(r,n)?r[n]:"member"}function vS(e,t,n,r,o,i){if(e==="member"||r.role==="owner")return null;if(e==="owners")return`Only team owners can move ${t} to ${n}`;if(e==="author"){const s=Hg(i);return s!==null&&s===r.id?null:`Only the record's author or a team owner can move ${t} to ${n}`}if(e.startsWith("role:")){const s=e.slice(5),a=qg(o,s);return a!==null&&a===r.id?null:`Only the record's ${s} or a team owner can move ${t} to ${n}`}return`Nobody can move ${t} to ${n}`}function $S(e,t,n,r){if(!e)return[];const o=qg(t,e.field);if(o===null)return yS(e);const i=Er(e.from,o)?e.from[o]:[];return n?i.filter(s=>vS(bS(e,o,s),e.field,s,n,t,r)===null):[...i]}function xS(e,t,n){if(!Dt(e)||e.transitions===void 0)return[];const r=e.transitions,o=`${t}/transitions`;if(!Dt(r))return[{path:o,message:"transitions is {field, from, initial?, who?}"}];const i=[];for(const p of Object.keys(r).sort())mS.includes(p)||i.push({path:`${o}/${p}`,message:`unknown key ${p}`});const s=Dt(e.schema)&&Dt(e.schema.properties)?e.schema.properties:{},a=typeof r.field=="string"?r.field:null,l=a!==null&&Er(s,a)?s[a]:void 0;let c=null;a===null||!a?i.push({path:`${o}/field`,message:"field is the name of an enum field"}):Dt(l)?l.type!=="string"||!Rc(l.enum)?i.push({path:`${o}/field`,message:`${a} is not an enum field`}):c=l.enum:i.push({path:`${o}/field`,message:`${a} is not a declared field`});const u=(p,h)=>{typeof p!="string"?i.push({path:h,message:"a state is a string"}):c&&!c.includes(p)&&i.push({path:h,message:`${p} is not a state of ${a}`})};if(!Dt(r.from))i.push({path:`${o}/from`,message:"from is {state: [next state…]}"});else for(const p of Object.keys(r.from).sort()){u(p,`${o}/from/${p}`);const h=r.from[p];Array.isArray(h)?h.forEach((f,y)=>u(f,`${o}/from/${p}/${y}`)):i.push({path:`${o}/from/${p}`,message:"the next states are a list"})}if(r.initial!==void 0&&(!Array.isArray(r.initial)||!r.initial.length?i.push({path:`${o}/initial`,message:"initial is a non-empty list of states"}):r.initial.forEach((p,h)=>u(p,`${o}/initial/${h}`))),r.who!==void 0)if(!Dt(r.who))i.push({path:`${o}/who`,message:'who is {"a->b" | state: level}'});else{const p=Dt(e.refs)?e.refs:{};for(const h of Object.keys(r.who).sort()){const f=`${o}/who/${h}`,y=h.indexOf(ma);if(y>=0){const v=h.slice(0,y),m=h.slice(y+ma.length);Dt(r.from)&&Array.isArray(r.from[v])&&r.from[v].includes(m)||i.push({path:f,message:`${v} → ${m} is not a declared transition`})}else u(h,f);const g=r.who[h];if(typeof g=="string"&&g.startsWith("role:")){const v=g.slice(5);Er(p,v)&&p[v]==="member"||i.push({path:f,message:`${g}: ${v} is not a member ref of ${n}`})}else(typeof g!="string"||!hS.includes(g))&&i.push({path:f,message:"a level is member, author, owners or role:<field>"})}}const d=Dt(e.computed)?e.computed:{};return(Er(s,zs)||Er(d,zs))&&i.push({path:o,message:`a kind with transitions declares no field ${zs} (its rows carry the next states there)`}),i}const Np=64,Lp=32,Ug=["rename","default","drop","map","renameKind"],ar=e=>!!e&&typeof e=="object"&&!Array.isArray(e),jp=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),wS=/^(0|[1-9]\d*|x|\*)(?:\.(0|[1-9]\d*|x|\*))?(?:\.(0|[1-9]\d*|x|\*))?$/,kS=/^(>=|<=|>|<|=|\^|~)?(.+)$/,SS=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?$/,CS=e=>{const t=SS.exec(e);return t?[Number(t[1]),Number(t[2]??0),Number(t[3]??0)]:null},AS=(e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2];function _S(e,t){const n=kS.exec(e);if(!n)return null;const r=n[1]??"",o=n[2];if(r===""||r==="="){const a=wS.exec(o);return a?[a[1],a[2],a[3]].every((c,u)=>c===void 0||c==="x"||c==="*"||Number(c)===t[u]):null}const i=CS(o);if(!i)return null;const s=AS(t,i);return r===">="?s>=0:r===">"?s>0:r==="<="?s<=0:r==="<"?s<0:r==="~"?t[0]===i[0]&&t[1]===i[1]&&s>=0:i[0]>0?t[0]===i[0]&&s>=0:i[1]>0?t[0]===0&&t[1]===i[1]&&s>=0:s===0}function OS(e){if(typeof e!="string"||!e.trim())return null;const t=e.split("||").map(n=>n.trim().split(/\s+/).filter(Boolean));if(t.some(n=>!n.length))return null;for(const n of t)for(const r of n)if(_S(r,[0,0,0])===null)return null;return t}const TS=e=>OS(e)!==null,MS=e=>{if(!ar(e))return null;const t=Object.keys(e);return t.length===1&&Ug.includes(t[0])?t[0]:null};function ES(e){if(!ar(e)||e.migrations===void 0)return[];const t=e.migrations;if(!Array.isArray(t))return[{path:"/migrations",message:"migrations is a list of {from, kind, ops}"}];const n=[];t.length>Np&&n.push({path:"/migrations",message:`at most ${Np} migrations`});const r=ar(e.records)?e.records:{},o=i=>typeof i=="string"&&i.length>0;return t.forEach((i,s)=>{const a=`/migrations/${s}`;if(!ar(i))return void n.push({path:a,message:"a migration is {from, kind, ops}"});for(const c of Object.keys(i).sort())["from","kind","ops"].includes(c)||n.push({path:`${a}/${c}`,message:`unknown key ${c}`});(typeof i.from!="string"||!TS(i.from))&&n.push({path:`${a}/from`,message:"from is a version or a range (1.2.3, 1.x, ^1.2.0, >=1.0.0 <2.0.0)"});let l=typeof i.kind=="string"&&Ec.test(i.kind)?i.kind:null;if(l===null&&n.push({path:`${a}/kind`,message:"kind is a kind name"}),!Array.isArray(i.ops))return void n.push({path:`${a}/ops`,message:"ops is a list"});i.ops.length>Lp&&n.push({path:`${a}/ops`,message:`at most ${Lp} ops`}),i.ops.forEach((c,u)=>{const d=`${a}/ops/${u}`,p=MS(c);if(!p)return void n.push({path:d,message:`an op is one of ${Ug.join(", ")}`});const h=c[p],f=y=>n.push({path:`${d}/${p}`,message:`${p} is ${y}`});if(p==="rename"&&!(ar(h)&&o(h.from)&&o(h.to)&&Object.keys(h).length===2))f("{from, to}");else if(p==="default"&&!(ar(h)&&o(h.field)&&jp(h,"value")&&Object.keys(h).length===2))f("{field, value}");else if(p==="drop"&&!(ar(h)&&o(h.field)&&Object.keys(h).length===1))f("{field}");else if(p==="map")if(!(ar(h)&&o(h.field)&&typeof h.expr=="string"&&Object.keys(h).length===2))f("{field, expr}");else{const y=Wo(h.expr);"error"in y&&n.push({path:`${d}/map/expr`,message:y.error})}else p==="renameKind"&&(typeof h!="string"||!Ec.test(h)?f("a kind name"):l=h)}),l!==null&&!jp(r,l)&&n.push({path:`${a}/kind`,message:`the migration ends in ${l}, which the package does not declare`})}),n}const Vg=3,Kg=8,Gg=12,Yg=52,Fc=["week","month","quarter"],IS=["chart1","chart2","chart3","chart4","chart5","chart6","chart7","chart8"],PS=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Bp=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zr=["January","February","March","April","May","June","July","August","September","October","November","December"];function ur(e){const t=Yi(e);return t?bn(t.y,t.m,t.d):null}function DS(e,t){const n=ur(e);if(n===null)return null;const r=t===null?null:ur(t);return{start:n,end:r!==null&&r>=n?r:n}}const Tt=e=>Xi(vt(e)),Xg=e=>((e+3)%7+7)%7,Gu=e=>e-Xg(e);function RS(e){const t=[...new Set(e.filter(r=>r!==""&&!/^[1-8]$/.test(r)))].sort((r,o)=>r<o?-1:r>o?1:0),n=new Map(t.map((r,o)=>[r,o]));return e.map(r=>/^[1-8]$/.test(r)?`chart${r}`:r===""?"chart1":IS[n.get(r)%8])}function Zg(e,t,n){return e.filter(r=>r.end>=t&&r.start<=n).sort((r,o)=>Math.max(r.start,t)-Math.max(o.start,t)||Math.min(o.end,n)-Math.max(o.start,t)-(Math.min(r.end,n)-Math.max(r.start,t))||r.order-o.order)}function Jg(e,t,n,r){for(let o=0;o<r;o++){const i=e[o]??=[];let s=!0;for(let a=t;a<=n;a++)i[a]&&(s=!1);if(s){for(let a=t;a<=n;a++)i[a]=!0;return o}}return null}function Qg(e,t,n){const r=e+6,o=Zg(t,e,r),i=[],s=[0,0,0,0,0,0,0],a=[];for(const c of o){const u=Math.max(c.start,e)-e,d=Math.min(c.end,r)-e,p=Jg(i,u,d,n.lanes);if(p===null){for(let h=u;h<=d;h++)s[h]+=1;continue}a.push({id:c.id,col:u+1,span:d-u+1,lane:p,contL:c.start<e,contR:c.end>r,tone:c.tone,more:0,row:c.value})}s.forEach((c,u)=>{c>0&&a.push({id:`more:${Tt(e+u)}`,col:u+1,span:1,lane:n.lanes,contL:!1,contR:!1,tone:null,more:c,row:null})});const l=[];for(let c=0;c<7;c++){const u=e+c,d=vt(u),p=o.filter(h=>h.start<=u&&h.end>=u);l.push({date:Xi(d),day:d.d,weekday:Bp[c],initial:Bp[c].slice(0,1),inMonth:n.month===null||d.m===n.month,weekend:c>=5,today:u===n.today,selected:u===n.selected,total:p.length,dots:p.slice(0,3).map(h=>({tone:h.tone}))})}return{key:Tt(e),days:l,segments:a}}function ey(e,t){const n=vt(e),r=vt(t),o=`${r.d} ${zr[r.m-1]} ${r.y}`;return n.y!==r.y?`${n.d} ${zr[n.m-1]} ${n.y} – ${o}`:n.m!==r.m?`${n.d} ${zr[n.m-1]} – ${o}`:`${n.d} – ${o}`}function FS(e){const t=vt(e);return`${PS[Xg(e)]}, ${t.d} ${zr[t.m-1]}`}function zS(e,t,n,r,o){const i=bn(e,t,1),s=bn(e,t,n),a=o.day===null?null:ur(o.day),l=a!==null&&a>=i&&a<=s?a:o.today>=i&&o.today<=s?o.today:i,c=[];for(let d=Gu(i);d<=s;d+=7)c.push(Qg(d,r,{lanes:o.lanes,today:o.today,selected:l,month:t}));const u=Zg(r,l,l).map(d=>({id:d.id,tone:d.tone,start:Tt(d.start),end:Tt(d.end),days:d.end-d.start+1,row:d.value}));return{weeks:c,day:Tt(l),agenda:{date:Tt(l),label:FS(l),count:u.length,items:u}}}function NS(e,t,n){const r=Gu(e),o=Qg(r,t,{lanes:n.lanes,today:n.today,selected:null,month:null});return{key:o.key,label:ey(r,r+6),prev:Tt(r-7),next:Tt(r+7),today:Tt(n.today),days:o.days,segments:o.segments}}function zc(e,t){if(t==="week")return Gu(e);const n=vt(e);return bn(n.y,t==="month"?n.m:Math.floor((n.m-1)/3)*3+1,1)}function Nc(e,t,n){if(t==="week")return e+7*n;const r=vt(e),o=r.y*12+(r.m-1)+n*(t==="month"?1:3);return bn(Math.floor(o/12),(o%12+12)%12+1,1)}function LS(e,t){const n=zr[e.m-1].slice(0,3);return t==="week"?`${e.d} ${n}`:t==="month"?n:`Q${Math.floor((e.m-1)/3)+1}`}function jS(e,t,n){const r=zc(e,n.scale),o=[];for(let h=0;h<=n.columns;h++)o.push(Nc(r,n.scale,h));const i=o[n.columns]-1,s=h=>{let f=0;for(;f+1<n.columns&&o[f+1]<=h;)f++;return f},a=vt(r).y,l=o.slice(0,n.columns).map((h,f)=>({key:Tt(h),label:LS(vt(h),n.scale),end:Tt(o[f+1]-1),today:n.today>=h&&n.today<o[f+1]})),c=[];o.slice(0,n.columns).forEach((h,f)=>{const y=vt(h),g=n.scale==="week"?y.y===a?zr[y.m-1]:`${zr[y.m-1]} ${y.y}`:String(y.y),v=c[c.length-1];v&&v.label===g?v.span+=1:c.push({label:g,col:f+1,span:1})});const u=[],d=new Map;for(const h of[...t].sort((f,y)=>f.order-y.order)){if(h.end<r||h.start>i)continue;const f=h.rowKey??h.id,y=d.get(f);y?y.push(h):d.set(f,[h])}for(const[h,f]of d){const y=u.length,g=[],v=[],m=f.map(b=>({s:b,first:s(Math.max(b.start,r)),last:s(Math.min(b.end,i))})).sort((b,x)=>b.first-x.first||x.last-x.first-(b.last-b.first)||b.s.order-x.s.order);for(const{s:b,first:x,last:$}of m){const S=Jg(g,x,$,Number.MAX_SAFE_INTEGER);v.push({id:b.id,rowIndex:y,col:x+1,span:$-x+1,lane:S,contL:b.start<r,contR:b.end>i,tone:b.tone,row:b.value})}u.push({key:h,index:y,lanes:Math.max(1,g.length),count:v.length,items:v})}let p=null;if(n.today>=r&&n.today<=i){const h=s(n.today),f=(n.today-o[h])/(o[h+1]-o[h]);p={col:h+1,percent:Math.round((h+f)/n.columns*1e4)/100}}return{scale:n.scale,key:Tt(r),label:ey(r,i),prev:Tt(Nc(r,n.scale,-n.columns)),next:Tt(o[n.columns]),today:Tt(n.today),columns:l,bands:c,rows:u,now:p}}const BS=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function Wr(e){if(e===null||typeof e=="boolean"||typeof e=="string")return JSON.stringify(e);if(typeof e=="number"){if(!Number.isFinite(e))throw new Error(`canonicalJson: ${e} has no JSON form`);return JSON.stringify(e)}if(Array.isArray(e))return`[${e.map(t=>t===void 0?"null":Wr(t)).join(",")}]`;if(BS(e))return`{${Object.keys(e).filter(n=>e[n]!==void 0).sort().map(n=>`${JSON.stringify(n)}:${Wr(e[n])}`).join(",")}}`;throw new Error(`canonicalJson: a ${typeof e} has no JSON form`)}Uint8Array.from([48,46,2,1,0,48,5,6,3,43,101,112,4,34,4,32]);const Hr="records",Hn={sortDefault:"createdAt",orderDefault:"desc",limitDefault:100,limitMax:500},WS=["app","before","by","columns","day","expand","lanes","limit","mine","month","order","q","query","row","scale","sort","start","sum","tone","until","user","view"],HS=["id","createdAt","updatedAt","createdBy","authorId","author"],qS=["eq","gt","gte","lt","lte","in","between"],US={"=":"eq","==":"eq",">":"gt",">=":"gte","<":"lt","<=":"lte"},Wp=["sum","avg","min","max","count","countDistinct","first","last"],Hp=["sum","count","avg","min","max"],VS=["count","sum","running","rows"],KS=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],GS=["January","February","March","April","May","June","July","August","September","October","November","December"],ty=/^\d{4}-(0[1-9]|1[0-2])$/,YS=["gt","gte","lt","lte","in","between"],XS=["in","between"],Rt=e=>e?.trim()||null,ko=e=>typeof e=="string"&&e.length===10&&Yi(e)?e:null,Lc=(e,t)=>{const n=typeof e=="number"?e:typeof e=="string"&&e.trim()?Number(e):NaN;return Number.isInteger(n)&&n>=1&&n<=t?n:null},bt=e=>!!e&&typeof e=="object"&&!Array.isArray(e),mr=(e,t)=>e<t?-1:e>t?1:0;function ny(e,t){const n=Rt(t);if(e.q!==void 0&&e.q.trim()){let d=null;try{d=JSON.parse(e.q)}catch{d=null}return Yu(bt(d)?d:{},n).query}const r=Number(e.limit),o=[];for(const d of Object.keys(e).sort()){if(WS.includes(d)||!d)continue;const p=d.lastIndexOf("."),h=p>=0?d.slice(p+1):"",f=e[d];p>0&&YS.includes(h)?o.push({field:d.slice(0,p),op:h,value:XS.includes(h)?f.split(","):f}):o.push({field:d,op:"eq",value:f})}o.sort((d,p)=>mr(d.field,p.field)||mr(d.op,p.op));const i=Rt(e.by),s=Rt(e.before),a=e.view==="week"||e.view==="timeline"?e.view:"month",l=Rt(e.until),c=Rt(e.tone),u=Lc(e.lanes,Kg)??Vg;return{from:n,app:Rt(e.app),mine:e.mine==="1"||e.mine==="true",user:Rt(e.user),where:o,or:[],sort:[{field:Rt(e.sort)??Hn.sortDefault,order:e.order==="asc"?"asc":e.order==="desc"?"desc":Hn.orderDefault}],limit:Number.isInteger(r)&&r>0?Math.min(r,Hn.limitMax):Hn.limitDefault,sum:Rt(e.sum),month:i&&a==="month"?{field:i,key:e.month&&ty.test(e.month)?e.month:null,until:l,day:ko(e.day),lanes:u,tone:c}:null,week:i&&a==="week"?{field:i,key:ko(e.day),until:l,lanes:u,tone:c}:null,timeline:i&&a==="timeline"?{field:i,until:l,row:Rt(e.row),scale:Fc.includes(e.scale)?e.scale:"week",start:ko(e.start),columns:Lc(e.columns,Yg)??Gg,tone:c}:null,group:[],aggregate:[],running:[],before:s?{field:i??Hn.sortDefault,date:s}:null,expand:[...new Set((e.expand??"").split(",").map(d=>d.trim()).filter(Boolean))]}}function ry(e){return e.scheme===Hr?ny(e.params,e.name):null}function qp(e){return e===null?"":typeof e=="string"?e:typeof e=="boolean"?e?"true":"false":typeof e=="number"&&Number.isFinite(e)?String(e):null}function Up(e,t,n){if(!Array.isArray(e)||e.length<3)return n.push({path:t,message:"a condition is [field, op, value]"}),null;const[r,o,...i]=e;if(typeof r!="string"||!r.trim())return n.push({path:`${t}/0`,message:"a condition's field is a non-empty string"}),null;const s=typeof o=="string"?US[o]??(qS.includes(o)?o:null):null;if(!s)return n.push({path:`${t}/1`,message:`unknown operator ${String(o)}`}),null;const a=r.trim();if(s==="in"){const c=i.length===1&&Array.isArray(i[0])?i[0].map(qp):null;return!c||c.some(u=>u===null)?(n.push({path:`${t}/2`,message:"in takes one list of values"}),null):{field:a,op:s,value:c}}const l=i.map(qp);return l.some(c=>c===null)||l.length!==(s==="between"?2:1)?(n.push({path:`${t}/2`,message:s==="between"?"between takes a low and a high value":`${s} takes one value`}),null):{field:a,op:s,value:s==="between"?l:l[0]}}const ZS=["from","app","mine","user","where","sort","limit","sum","month","week","timeline","group","aggregate","running","before","expand"],Vp={month:["field","key","until","day","lanes","tone"],week:["field","key","until","lanes","tone"],timeline:["field","until","row","scale","start","columns","tone"]};function JS(e,t,n){if(!bt(t)||typeof t.field!="string"||!t.field.trim())return n.push({path:`/${e}`,message:`${e} is {${Vp[e].map(o=>o==="field"?o:`${o}?`).join(", ")}}`}),null;const r={field:t.field.trim()};for(const o of Object.keys(t).sort()){if(o==="field")continue;const i=t[o],s=`/${e}/${o}`;if(!Vp[e].includes(o))n.push({path:s,message:`unknown key ${o}`});else{if(i==null)continue;if(o==="lanes"||o==="columns"){const a=o==="lanes"?Kg:Yg,l=Lc(i,a);l===null?n.push({path:s,message:`${o} is an integer 1–${a}`}):r[o]=l}else o==="scale"?Fc.includes(i)?r[o]=i:n.push({path:s,message:`scale is ${Fc.join("|")}`}):typeof i!="string"?n.push({path:s,message:`${o} is a string`}):r[o]=i.trim()||null}}return r}function Yu(e,t){const n=[],r=ny({},null);if(r.sort=[{field:Hn.sortDefault,order:Hn.orderDefault}],!bt(e))return n.push({path:"",message:"a query is an object"}),r.from=Rt(t),{query:r,issues:n};for(const i of Object.keys(e).sort())!ZS.includes(i)&&!i.startsWith("$")&&n.push({path:`/${i}`,message:`unknown key ${i}`});const o=i=>{const s=e[i];return s==null?null:typeof s!="string"?(n.push({path:`/${i}`,message:`${i} is a string`}),null):Rt(s)};if(r.from=Rt(t)??o("from"),r.app=o("app"),r.user=o("user"),r.sum=o("sum"),e.mine!==void 0&&(typeof e.mine!="boolean"?n.push({path:"/mine",message:"mine is a boolean"}):r.mine=e.mine),e.where!==void 0&&(Array.isArray(e.where)?e.where.forEach((i,s)=>{const a=`/where/${s}`;if(bt(i)){if(Object.keys(i).length!==1||!Array.isArray(i.or))return void n.push({path:a,message:"an alternative is {or: [[condition…]…]}"});if(r.or.length)return void n.push({path:a,message:"one or per query"});i.or.forEach((c,u)=>{if(!Array.isArray(c))return void n.push({path:`${a}/or/${u}`,message:"an alternative is a list of conditions"});const d=[];c.forEach((p,h)=>{const f=Up(p,`${a}/or/${u}/${h}`,n);f&&d.push(f)}),r.or.push(d)});return}const l=Up(i,a,n);l&&r.where.push(l)}):n.push({path:"/where",message:"where is a list of conditions"})),e.sort!==void 0){const i=typeof e.sort=="string"?[e.sort]:Array.isArray(e.sort)?e.sort:null;if(!i)n.push({path:"/sort",message:"sort is a field or a list of [field, order]"});else{const s=[];i.forEach((a,l)=>{const[c,u]=typeof a=="string"?[a,"asc"]:Array.isArray(a)?[a[0],a.length>1?a[1]:"asc"]:[null,null];if(typeof c!="string"||!c.trim()||u!=="asc"&&u!=="desc")return void n.push({path:typeof e.sort=="string"?"/sort":`/sort/${l}`,message:"a sort key is field or [field, asc|desc]"});s.push({field:c.trim(),order:u})}),s.length&&(r.sort=s)}}if(e.limit!==void 0){const i=typeof e.limit=="number"?e.limit:typeof e.limit=="string"&&e.limit.trim()?Number(e.limit):NaN;!Number.isInteger(i)||i<1?n.push({path:"/limit",message:"limit is a positive integer"}):r.limit=Math.min(i,Hn.limitMax)}for(const i of["month","week","timeline"]){if(e[i]===void 0||e[i]===null)continue;if(r.month||r.week||r.timeline){n.push({path:`/${i}`,message:"one calendar view per query"});continue}const s=JS(i,e[i],n);if(!s)continue;const a=c=>typeof s[c]=="string"?s[c]:null,l=typeof s.lanes=="number"?s.lanes:Vg;i==="month"?r.month={field:s.field,key:a("key")&&ty.test(a("key"))?a("key"):null,until:a("until"),day:ko(a("day")),lanes:l,tone:a("tone")}:i==="week"?r.week={field:s.field,key:ko(a("key")),until:a("until"),lanes:l,tone:a("tone")}:r.timeline={field:s.field,until:a("until"),row:a("row"),scale:a("scale")??"week",start:ko(a("start")),columns:typeof s.columns=="number"?s.columns:Gg,tone:a("tone")}}if(e.group!==void 0&&(Array.isArray(e.group)?e.group.forEach((i,s)=>{const a=`/group/${s}`;let l=null;if(typeof i=="string"&&i.trim()?l={field:i.trim(),bucket:null}:bt(i)&&typeof i.bucket=="string"&&i.bucket.trim()&&Kd.includes(i.by)&&Object.keys(i).length===2&&(l={field:i.bucket.trim(),bucket:i.by}),!l)return void n.push({path:a,message:`a group key is a field or {bucket: field, by: ${Kd.join("|")}}`});if(r.group.some(c=>c.field===l.field||l.field==="author"&&c.field==="authorId"||l.field==="authorId"&&c.field==="author"))return void n.push({path:a,message:`duplicate group ${l.field}`});r.group.push(l)}):n.push({path:"/group",message:"group is a list of keys"})),e.aggregate!==void 0)if(!bt(e.aggregate))n.push({path:"/aggregate",message:"aggregate is {name: [op, field?]}"});else for(const i of Object.keys(e.aggregate).sort()){const s=e.aggregate[i],a=`/aggregate/${i}`;if(!i.trim()||VS.includes(i)||r.group.some(u=>u.field===i||u.field==="author"&&i==="authorId")){n.push({path:a,message:`the name ${i} is taken`});continue}const l=Array.isArray(s)&&Wp.includes(s[0])?s[0]:null,c=Array.isArray(s)&&s.length>1&&typeof s[1]=="string"&&s[1].trim()?s[1].trim():null;if(!l||!Array.isArray(s)||s.length>2||s.length>1&&!c||l!=="count"&&!c){n.push({path:a,message:`an aggregate is [${Wp.join("|")}, field] (count: the field is optional)`});continue}r.aggregate.push({name:i,op:l,field:c})}if(e.running!==void 0)if(!bt(e.running))n.push({path:"/running",message:"running is {field: op}"});else for(const i of Object.keys(e.running).sort()){const s=e.running[i];if(!i.trim()||!Hp.includes(s)){n.push({path:`/running/${i}`,message:`a running value is {field: ${Hp.join("|")}}`});continue}r.running.push({field:i,op:s})}if(e.before!==void 0&&e.before!==null){const i=e.before,s=r.group.find(a=>a.bucket!==null)?.field??r.month?.field??r.week?.field??r.timeline?.field??Hn.sortDefault;typeof i=="string"?r.before=Rt(i)?{field:s,date:i.trim()}:null:bt(i)&&typeof i.field=="string"&&i.field.trim()&&typeof i.date=="string"?r.before=i.date.trim()?{field:i.field.trim(),date:i.date.trim()}:null:n.push({path:"/before",message:"before is a date or {field, date}"})}return e.expand!==void 0&&(Array.isArray(e.expand)?e.expand.forEach((i,s)=>{if(typeof i!="string"||!i.trim())return void n.push({path:`/expand/${s}`,message:"an expanded field is a non-empty string"});if(r.expand.includes(i.trim()))return void n.push({path:`/expand/${s}`,message:`duplicate expand ${i.trim()}`});r.expand.push(i.trim())}):n.push({path:"/expand",message:"expand is a list of ref fields"})),{query:r,issues:n}}function jc(e,t){return typeof e=="string"?e.replace(/\$\{([^}]*)\}/g,(n,r)=>t[r.trim()]??""):Array.isArray(e)?e.map(n=>jc(n,t)):bt(e)?Object.fromEntries(Object.keys(e).map(n=>[n,jc(e[n],t)])):e}function Xu(e,t){const n=Qt(e),r=n?.params.query;if(!n||r===void 0||!bt(t)||!Object.prototype.hasOwnProperty.call(t,r))return e;const{query:o,...i}=n.params,s=t[r],a=jc(s,i),l=e.trim(),c=l.includes("?")?l.slice(0,l.indexOf("?")):l;return Ku(c,{q:Wr(a)})}const In=e=>{if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e=="string"&&e.trim()!==""){const t=Number(e);return Number.isFinite(t)?t:null}return null},tt=e=>e==null?"":typeof e=="string"?e:typeof e=="object"?Wr(e):String(e);function ga(e,t){const n=In(e),r=In(t);return n!==null&&r!==null?n<r?-1:n>r?1:0:mr(tt(e),tt(t))}const Di=e=>{const t=In(e);return{n:t,t:t===null?tt(e):""}};function fi(e,t,n,r){return e.n!==null&&t.n!==null?e.n<t.n?-1:e.n>t.n?1:0:mr(e.n===null?e.t:tt(n),t.n===null?t.t:tt(r))}function Kp(e){const t=Array.isArray(e.value)?e.value:[e.value],n=e.op==="between"?t.length===2?t:[]:t.length===1?t:[tt(e.value)];return{filter:e,list:t,eq:tt(e.value),bounds:n.map(r=>({key:Di(r),v:r}))}}function Gp(e,t){const n=e.filter.op;if(n==="eq")return tt(t)===e.eq;if(n==="in")return e.list.includes(tt(t));const r=Di(t);if(n==="between")return e.bounds.length===2&&fi(r,e.bounds[0].key,t,e.bounds[0].v)>=0&&fi(r,e.bounds[1].key,t,e.bounds[1].v)<=0;const o=e.bounds[0],i=fi(r,o.key,t,o.v);return n==="gt"?i>0:n==="gte"?i>=0:n==="lt"?i<0:i<=0}function Yp(e,t){const n=t.map(o=>{const i=e.map(l=>_n(l,o.field)),s=i.map(Di),a=o.order==="asc"?1:-1;if(s.every(l=>l.n!==null)){const l=Float64Array.from(s,c=>c.n);return(c,u)=>a*(l[c]<l[u]?-1:l[c]>l[u]?1:0)}if(s.every(l=>l.n===null)){const l=[...new Set(s.map(d=>d.t))].sort(mr),c=new Map(l.map((d,p)=>[d,p])),u=Uint32Array.from(s,d=>c.get(d.t));return(d,p)=>a*(u[d]-u[p])}return(l,c)=>a*fi(s[l],s[c],i[l],i[c])}),r=e.map((o,i)=>i);return r.sort((o,i)=>{for(const s of n){const a=s(o,i);if(a!==0)return a}return mr(e[o].id,e[i].id)}),r.map(o=>e[o])}function Vo(e){return e.authorId??e.createdBy??null}function _n(e,t){return t==="createdAt"?e.createdAt:t==="updatedAt"?e.updatedAt:t==="id"?e.id:t==="createdBy"?e.createdBy:t==="authorId"?Vo(e):e.data[t]}function Xp(e,t){const[n,r]=e.split("-").map(Number),o=n*12+(r-1)+t;return`${Math.floor(o/12)}-${String((o%12+12)%12+1).padStart(2,"0")}`}function QS(e){const[t,n]=e.split("-").map(Number);return`${GS[n-1]} ${t}`}function eC(e){const[t,n]=e.split("-").map(Number),r=[];for(let o=1;o<=Io(t,n);o++)r.push({date:`${e}-${String(o).padStart(2,"0")}`,day:o,weekday:KS[Gi(t,n,o)],count:0,sum:0});return r}function qr(e){return Math.round(e*1e6)/1e6}const Bc=e=>e===void 0?null:e;function tC(e,t){const n=e.field===null?[]:t.map(r=>_n(r,e.field));switch(e.op){case"count":return e.field===null?t.length:n.filter(r=>tt(r)!=="").length;case"sum":return qr(n.reduce((r,o)=>r+(In(o)??0),0));case"avg":{const r=n.map(In).filter(o=>o!==null);return r.length?qr(r.reduce((o,i)=>o+i,0)/r.length):null}case"min":case"max":{let r;for(const o of n)tt(o)!==""&&(r===void 0||(e.op==="min"?ga(o,r)<0:ga(o,r)>0))&&(r=o);return r===void 0?null:In(r)??tt(r)}case"countDistinct":return new Set(n.map(tt).filter(r=>r!=="")).size;case"first":return t.length?Bc(n[0]):null;case"last":return t.length?Bc(n[n.length-1]):null}}function Fl(e,t){const n={count:t.length};e.sum!==null&&(n.sum=qr(t.reduce((r,o)=>r+(In(o.data[e.sum])??0),0)));for(const r of e.aggregate)n[r.name]=tC(r,t);return n}class nC{constructor(t){this.list=t,this.acc=t.map(()=>({sum:0,count:0,nums:0,min:null,max:null}))}list;acc;add(t){this.list.forEach((n,r)=>{const o=this.acc[r],i=In(_n(t,n.field));o.count+=1,i!==null&&(o.sum+=i,o.nums+=1,o.min=o.min===null||i<o.min?i:o.min,o.max=o.max===null||i>o.max?i:o.max)})}read(){const t={};return this.list.forEach((n,r)=>{const o=this.acc[r];t[n.field]=n.op==="sum"?qr(o.sum):n.op==="count"?o.count:n.op==="avg"?o.nums?qr(o.sum/o.nums):null:n.op==="min"?o.min:o.max}),t}}function rC(e,t){if(e.field==="author")return Vo(t)??"";const n=_n(t,e.field);return e.bucket!==null?Cm(tt(n),e.bucket)??"":tt(n)}function oC(e,t,n,r){if(e.field==="author"){const i=Vo(t);r.author=i&&n?.[i]||"",r.authorId=i;return}const o=_n(t,e.field);r[e.field]=e.bucket!==null?Cm(tt(o),e.bucket):Bc(o)}const Zp=16,iC=["id","createdAt","updatedAt","createdBy","authorId"];function sC(e,t){const n=t&&bt(e)&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;if(!bt(n)||!bt(n.computed))return;const r={};for(const[o,i]of Object.entries(n.computed))typeof i=="string"&&(r[o]=i);return Object.keys(r).length?r:void 0}function aC(e,t){const n=t&&bt(e)&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;if(!bt(n)||!bt(n.refs))return;const r={};for(const[o,i]of Object.entries(n.refs))i==="issue"||i==="member"?r[o]=i:bt(i)&&typeof i.kind=="string"&&i.kind&&(r[o]={kind:i.kind});return Object.keys(r).length?r:void 0}function oy(e,t){const n=Vo(e);return{...e.data,id:e.id,createdAt:e.createdAt,updatedAt:e.updatedAt,createdBy:e.createdBy,authorId:n,author:n&&t?.[n]||""}}function lC(e,t,n,r){const o=typeof t=="string"?t:typeof t=="number"?String(t):"";if(!o)return null;if(e==="issue")return r.issues&&Object.prototype.hasOwnProperty.call(r.issues,o)?r.issues[o]:null;if(e==="member")return r.names&&Object.prototype.hasOwnProperty.call(r.names,o)?{id:o,name:r.names[o]}:null;const i=n().get(o);return i&&i.kind===e.kind?oy(i,r.names):null}function cC(e,t,n,r){const o=n?Object.keys(n).sort(mr):[];if(!o.length)return e;const i=o.map(a=>{const l=Wo(n[a]);return{name:a,ast:"ast"in l?l.ast:null,reads:"ast"in l?Dm(l.ast):[]}}),s={now:(r?Ha(r):null)??0};return e.map(a=>{if(a.kind!==t)return a;const l={...a.data,id:a.id,createdAt:a.createdAt,updatedAt:a.updatedAt,createdBy:a.createdBy,authorId:Vo(a)},c={...a.data};for(const u of i){for(const p of u.reads)Object.prototype.hasOwnProperty.call(l,p)||(l[p]=null);const d=u.ast?Eu(u.ast,l,s):null;c[u.name]=d&&"value"in d?d.value:null}return{...a,data:c}})}function uC(e,t,n){if(!t.from)return null;const r=n.now??new Date().toISOString(),o=e;e=cC(e,t.from,n.computed,r);const i=t.expand.flatMap(_=>n.refs&&Object.prototype.hasOwnProperty.call(n.refs,_)?[{name:_,target:n.refs[_]}]:[]);let s=null;const a=()=>s??=new Map(o.map(_=>[_.id,_])),l=t.month,c=n.today&&/^\d{4}-\d{2}-\d{2}$/.test(n.today)?n.today:r.slice(0,10),u=l?l.key??c.slice(0,7):null,d=ur(c)??0,p=t.month??t.week??t.timeline;let h=null;if(l&&l.until!==null&&u!==null){const[_,M]=u.split("-").map(Number);h=[ur(`${u}-01`),ur(`${u}-${String(Io(_,M)).padStart(2,"0")}`)]}else if(t.week){const _=zc((t.week.key?ur(t.week.key):null)??d,"week");h=[_,_+6]}else if(t.timeline){const _=t.timeline,M=zc((_.start?ur(_.start):null)??d,_.scale);h=[M,Nc(M,_.scale,_.columns)-1]}const f=_=>p?DS(tt(_.data[p.field]),p.until!==null?tt(_.data[p.until]):null):null,y=t.where.map(Kp),g=t.or.map(_=>_.map(Kp)),v=t.before?Di(t.before.date):null,m=[],b=Yp(e.filter(_=>{if(_.kind!==t.from)return!1;const M=Vo(_);if(t.mine&&(n.me===null||M!==n.me)||t.user!==null&&M!==t.user||!y.every(O=>Gp(O,_n(_,O.filter.field)))||g.length&&!g.some(O=>O.every(E=>Gp(E,_n(_,E.filter.field)))))return!1;if(t.before){const O=tt(_n(_,t.before.field));if(O!==""&&fi(Di(O),v,O,t.before.date)<0)return m.push(_),!1}if(h){const O=f(_);if(!O||O.end<h[0]||O.start>h[1])return!1}else if(l&&u!==null&&!tt(_.data[l.field]).startsWith(u))return!1;return!0}),t.sort),x=Yp(m,t.sort),$=()=>{const _=new nC(t.running);for(const M of x)_.add(M);return _},S=t.running.length&&!t.group.length?$():null,A=_=>{const M=oy(_,n.names);for(const O of i)M[O.name]=lC(O.target,_.data[O.name],a,n);return n.transitions&&(M[zs]=$S(n.transitions,_.data,{id:n.me,role:n.role??null},_)),M},C={rows:b.slice(0,t.limit).map(_=>{const M=A(_);return S&&(S.add(_),M.running=S.read()),M}),count:b.length};if(t.sum!==null&&(C.sum=qr(b.reduce((_,M)=>_+(In(M.data[t.sum])??0),0))),l&&u!==null){const _=eC(u),M=new Map(_.map(E=>[E.date,E])),O=new Map;for(const E of b){const R=tt(E.data[l.field]).slice(0,10),z=M.get(R);if(!z)continue;z.count+=1,t.sum!==null&&(z.sum=qr(z.sum+(In(E.data[t.sum])??0)));const Z=O.get(R);Z?Z.push(E):O.set(R,[E])}if(t.running.length){const E=$();for(const R of _){for(const z of O.get(R.date)??[])E.add(z);R.running=E.read()}}C.month={key:u,label:QS(u),prev:Xp(u,-1),next:Xp(u,1),today:c,days:_,labels:_.map(E=>String(E.day)),counts:_.map(E=>E.count),sums:_.map(E=>E.sum)}}if(p){const _=b.flatMap((E,R)=>{const z=f(E);return z?[{row:E,order:R,...z}]:[]}),M=RS(_.map(E=>p.tone!==null?tt(_n(E.row,p.tone)):"")),O=_.map((E,R)=>({id:E.row.id,start:E.start,end:E.end,tone:M[R],value:A(E.row),order:E.order,rowKey:t.timeline?.row?tt(_n(E.row,t.timeline.row)):null}));if(l&&C.month){const[E,R]=C.month.key.split("-").map(Number);Object.assign(C.month,zS(E,R,Io(E,R),O,{lanes:l.lanes,today:d,day:l.day}))}else t.week?C.week=NS(h[0],O,{lanes:t.week.lanes,today:d}):t.timeline&&(C.timeline=jS(h[0],O,{scale:t.timeline.scale,columns:t.timeline.columns,today:d}))}if(t.group.length){const _=new Map,M=t.group.length===1;for(const z of b){const Z=t.group.map(L=>rC(L,z)),N=M?Z[0]:Z.some(L=>L.includes("\0"))?JSON.stringify(Z):Z.join("\0"),I=_.get(N);if(I)I.rows.push(z);else{const L={};for(const V of t.group)oC(V,z,n.names,L);_.set(N,{parts:Z,rows:[z],out:L})}}const O=[..._.values()];for(const z of O)Object.assign(z.out,Fl(t,z.rows));const E=new Set([...t.group.flatMap(z=>z.field==="author"?["author","authorId"]:[z.field]),"count",...t.sum!==null?["sum"]:[],...t.aggregate.map(z=>z.name)]),R=t.sort.filter(z=>E.has(z.field));if(O.sort((z,Z)=>{for(const N of R){const I=ga(z.out[N.field],Z.out[N.field]);if(I!==0)return N.order==="asc"?I:-I}for(const N of t.group){const I=ga(z.out[N.field],Z.out[N.field]);if(I!==0)return I}for(let N=0;N<z.parts.length;N++){const I=mr(z.parts[N],Z.parts[N]);if(I!==0)return I}return 0}),t.running.length){const z=$();for(const Z of O){for(const N of Z.rows)z.add(N);Z.out.running=z.read()}}C.groups=O.map(z=>z.out)}return t.aggregate.length&&(C.totals=Fl(t,b)),t.before&&(C.before=Fl(t,x)),C}const dC=/^[a-z][a-z0-9_-]{0,31}$/,pC=["mcp","script"],fC=/^[A-Za-z_][A-Za-z0-9_]*$/,Jp=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Qp=e=>Array.isArray(e)&&e.every(t=>typeof t=="string");function hC(e){try{const t=new URL(e);return(t.protocol==="https:"||t.protocol==="http:")&&!!t.host}catch{return!1}}function mC(e){if(!Jp(e))return[{path:"/tools",message:"tools is an object of tools"}];const t=[];for(const n of Object.keys(e).sort()){const r=e[n],o=`/tools/${n}`;if(dC.test(n)||t.push({path:o,message:"a tool id is lowercase letters, digits, - and _"}),!Jp(r)){t.push({path:o,message:"a tool is {kind, title, url | command}"});continue}(typeof r.kind!="string"||!pC.includes(r.kind))&&t.push({path:`${o}/kind`,message:"kind is mcp or script"}),(typeof r.title!="string"||!r.title.trim())&&t.push({path:`${o}/title`,message:"title is a required string"}),r.description!==void 0&&typeof r.description!="string"&&t.push({path:`${o}/description`,message:"description is a string"});const i=r.url!==void 0,s=r.command!==void 0;r.kind==="mcp"&&i===s&&t.push({path:o,message:"an mcp tool has a url or a command"}),r.kind==="script"&&i&&t.push({path:`${o}/url`,message:"a script runs a command, not a url"}),r.kind==="script"&&!s&&t.push({path:`${o}/command`,message:"command is a non-empty string"}),i&&(typeof r.url!="string"||!hC(r.url))&&t.push({path:`${o}/url`,message:"url is an absolute http(s) url"}),s&&(typeof r.command!="string"||!r.command.trim())&&t.push({path:`${o}/command`,message:"command is a non-empty string"}),r.args!==void 0&&(!Qp(r.args)||i)&&t.push({path:`${o}/args`,message:"args is a list of strings beside a command"}),r.env!==void 0&&(!Qp(r.env)||r.env.some(a=>!fC.test(a))||i)&&t.push({path:`${o}/env`,message:"env is a list of variable names beside a command"})}return t}const dn=St.package.exposes.limits,gC=St.package.exposes.runKinds,ef=St.package.exposes.recordOps,yC=St.package.exposes.readRecordOps,bC=St.package.exposes.readOpWords,vC=St.package.exposes.destructiveWords,po=St.package.exposes.agent,$C=new RegExp(po.slugPattern),Nn=e=>!!e&&typeof e=="object"&&!Array.isArray(e),xC=new RegExp(dn.namePattern),wC=new RegExp(St.package.exposes.actionPattern),kC=/\$\{input\.([A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*)\}/g;function SC(e){const t=[],n=r=>{if(typeof r=="string")for(const o of r.matchAll(kC))t.push(o[1]);else Array.isArray(r)?r.forEach(n):Nn(r)&&Object.values(r).forEach(n)};return n(e),t}const iy=e=>e.toLowerCase().split(/[^a-z]+/).filter(Boolean);function CC(e){const t=iy(e.split(".").at(-1)??"").at(-1);return t!==void 0&&bC.includes(t)?"read":"write"}function tf(e){return iy(e).some(t=>vC.includes(t))}function AC(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"&&t!==""):[]}function _C(e){if(!Array.isArray(e)||e.some(n=>typeof n!="string"||n===""))return[{path:"/upstreams",message:"upstreams is a list of MCP server names"}];const t=[];return e.forEach((n,r)=>{e.indexOf(n)!==r&&t.push({path:`/upstreams/${r}`,message:`duplicate upstream ${n}`})}),t}function OC(e,t,n){if(!Array.isArray(e))return[{index:null,code:"run",path:"/exposes",message:"exposes is a list of tools"}];const r=[];e.length>dn.maxTools&&r.push({index:null,code:"tooMany",path:"/exposes",message:`exposes lists at most ${dn.maxTools} tools`});const o=Nn(t)?Object.keys(t):[],i=AC(n),s=new Set;return e.forEach((a,l)=>{const c=`/exposes/${l}`,u=(g,v,m)=>{r.push({index:l,code:g,path:`${c}${v}`,message:m})};if(!Nn(a))return u("run","","a tool is {name, title, description, input, access, run}");const d=a.name;typeof d!="string"||!xC.test(d)||d.length>dn.nameMax||d.includes(dn.separator)?u("name","/name",`name is lowercase letters, digits and _ (at most ${dn.nameMax}, no ${dn.separator})`):s.has(d)?u("duplicate","/name",`duplicate tool ${d}`):s.add(d),(typeof a.title!="string"||!a.title.trim()||a.title.length>dn.titleMax)&&u("title","/title",`title is a non-blank string of at most ${dn.titleMax} characters`),(typeof a.description!="string"||!a.description.trim()||a.description.length>dn.descriptionMax)&&u("description","/description",`description is a non-blank string of at most ${dn.descriptionMax} characters`);const p=a.input;(!Nn(p)||p.type!=="object"||p.properties!==void 0&&!Nn(p.properties))&&u("input","/input","input is a JSON Schema of type object"),a.access!=="read"&&a.access!=="write"&&u("access","/access","access is read or write");const h=Nn(p)&&Nn(p.properties)?p.properties:{},f=a.run;if(!Nn(f)||gC.filter(g=>g in f).length!==1)return u("run","/run","run holds exactly one of records, action, upstream, agent");for(const g of SC(f))Object.prototype.hasOwnProperty.call(h,g.split(".")[0])||u("template","/run",`\${input.${g}} names no input property`);let y;if("records"in f){const g=f.records,v=Nn(g)?g.op:void 0;if(typeof v!="string"||!ef.includes(v))return v==="delete"?u("destructive","/run/records/op","a records delete is destructive: never exposed"):u("run","/run/records/op",`op is ${ef.join(", ")}`);(typeof g.kind!="string"||!o.includes(g.kind))&&u("kind","/run/records/kind","kind names no declared record kind"),y=yC.includes(v)?"read":"write"}else if("action"in f){const g=f.action;if(typeof g!="string"||!wC.test(g))return u("action","/run/action","action is a function name like namespace.function");if(tf(g))return u("destructive","/run/action","a destructive action is never exposed");y=CC(g)}else if("agent"in f)(typeof f.agent!="string"||!$C.test(f.agent)||f.agent.length>po.slugMax)&&u("agent","/run/agent","agent is an agent slug (lowercase words joined by -)"),(typeof f.prompt!="string"||f.prompt.trim()===""||f.prompt.length>po.promptMax)&&u("prompt","/run/prompt",`prompt is non-blank text of at most ${po.promptMax} characters`),f.device!==void 0&&!po.devices.includes(f.device)&&u("run","/run/device",`device is ${po.devices.join(", ")}`),y="write";else return(typeof f.upstream!="string"||!i.includes(f.upstream))&&u("upstream","/run/upstream","upstream names none of the package's upstreams"),typeof f.tool!="string"||f.tool===""?u("run","/run/tool","tool is a non-empty string"):tf(f.tool)?u("destructive","/run/tool","a destructive tool is never exposed"):void 0;a.access==="read"&&y==="write"&&u("accessTooLow","/access","the run writes: access is write")}),r}function TC(e,t,n){return OC(e,t,n).map(({path:r,message:o})=>({path:r,message:o}))}const je=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),hi=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),Nr=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function Ur(e){if(!je(e))return"dyn";const t=Array.isArray(e.type)?e.type.filter(r=>r!=="null"):[e.type],n=t.length===1?t[0]:void 0;return n==="number"||n==="integer"?"number":n==="boolean"?"bool":n==="string"?e.format==="date"?"date":e.format==="date-time"?"timestamp":"string":n==="array"?[Ur(e.items)]:n==="object"?je(e.properties)?Qa(e.properties,e.required):"map":"dyn"}function Qa(e,t){const n=Array.isArray(t)?t:[],r={};for(const[o,i]of Object.entries(e))r[o]=n.includes(o)?Ur(i):Ze(Ur(i));return r}function sy(e){const t=je(e)&&je(e.schema)?e.schema:{},n=je(t.properties)?t.properties:{},r={...Qa(n,t.required),id:"string",createdAt:"timestamp",updatedAt:"timestamp",createdBy:"string",authorId:"string",author:"string"},o=je(e)&&je(e.computed)?e.computed:{},i=ay(e);for(const s of Object.keys(o).sort()){if(Nr(r,s))continue;const a=o[s],l=typeof a=="string"?qa(a,i):null;r[s]=l&&"type"in l?l.type:Ze("dyn")}return r}function ay(e){const t=je(e)&&je(e.schema)?e.schema:{},n=je(t.properties)?t.properties:{},r={...Qa(n,t.required)};for(const o of iC)r[o]=o==="createdAt"||o==="updatedAt"?"timestamp":"string";return r}function MC(e,t){if(!je(e)||e.computed===void 0)return[];const n=e.computed;if(!je(n))return[{path:`${t}/computed`,message:"computed is {name: expression}"}];const r=[],o=Object.keys(n).sort();o.length>Zp&&r.push({path:`${t}/computed`,message:`at most ${Zp} computed fields per kind`});const i=je(e.schema)?e.schema:{},s=je(i.properties)?i.properties:{},a=ay(e);for(const l of o){const c=`${t}/computed/${hi(l)}`,u=n[l];if(Nr(s,l))r.push({path:c,message:`${l} shadows a field of the schema`});else if(HS.includes(l))r.push({path:c,message:`${l} is a reserved record key`});else if(typeof u!="string")r.push({path:c,message:"a computed field is an expression (a string)"});else{const d=Wo(u),p="ast"in d?Dm(d.ast).filter(h=>Nr(n,h)&&!Nr(s,h)):[];if(p.length)r.push({path:c,message:`a computed field reads no computed field: ${p.join(", ")}`});else{const h=qa(u,a);"error"in h&&r.push({path:c,message:h.error})}}}return r}const ly={date:"date",day:"number",weekday:"string",initial:"string",inMonth:"bool",weekend:"bool",today:"bool",selected:"bool",total:"number",dots:[{tone:"string"}]},cy=e=>({id:"string",col:"number",span:"number",lane:"number",contL:"bool",contR:"bool",tone:Ze("string"),more:"number",row:Ze(e)}),EC=e=>({key:"string",label:"string",prev:"string",next:"string",today:"date",days:[{date:"date",day:"number",weekday:"string",count:"number",sum:"number",running:Ze("map")}],labels:["string"],counts:["number"],sums:["number"],weeks:[{key:"date",days:[ly],segments:[cy(e)]}],day:"date",agenda:{date:"date",label:"string",count:"number",items:[{id:"string",tone:"string",start:"date",end:"date",days:"number",row:e}]}}),IC=e=>({key:"date",label:"string",prev:"date",next:"date",today:"date",days:[ly],segments:[cy(e)]}),PC=e=>({scale:"string",key:"date",label:"string",prev:"date",next:"date",today:"date",columns:[{key:"date",label:"string",end:"date",today:"bool"}],bands:[{label:"string",col:"number",span:"number"}],rows:[{key:"string",index:"number",lanes:"number",count:"number",items:[{id:"string",rowIndex:"number",col:"number",span:"number",lane:"number",contL:"bool",contR:"bool",tone:"string",row:e}]}],now:Ze({col:"number",percent:"number"})});function DC(e,t){const n=(o,i)=>o?i:Ze(i),r=sy(e);return{rows:[t?.running.length&&!t.group.length?{...r,running:"map"}:r],count:"number",sum:n(t?t.sum!==null:void 0,"number"),groups:n(t?t.group.length>0:void 0,["map"]),totals:n(t?t.aggregate.length>0:void 0,"map"),before:n(t?t.before!==null:void 0,"map"),month:n(t?t.month!==null:void 0,EC(r)),week:n(t?t.week!==null:void 0,IC(r)),timeline:n(t?t.timeline!==null:void 0,PC(r))}}function Ri(e){if(Array.isArray(e)){const t=e.map(Ri);return t.length===0?["dyn"]:[t.every(n=>JSON.stringify(n)===JSON.stringify(t[0]))?t[0]:"dyn"]}if(je(e)){const t={};for(const[n,r]of Object.entries(e))t[n]=Ri(r);return t}return We(e)}function uy(e,t,n){let r=e,o=!1;for(const i of t)if(Ot(r)&&(o=!0,r=r["?"]),Array.isArray(r)){if(!/^\d+$/.test(i))return{type:"dyn"};r=r[0],o=!0}else if(r==="map")r="dyn",o=!0;else if(typeof r=="object"){if(!Nr(r,i))return n?{unknown:i}:{type:"dyn"};r=r[i]}else return{type:"dyn"};return{type:o?Ze(r):r}}const Wc=e=>e.replace(/~1/g,"/").replace(/~0/g,"~");function RC(e,t,n,r){if(!e.startsWith("/"))return{type:"dyn"};const o=Array.isArray(t.bindings)?t.bindings:[];for(const s of o){if(!je(s)||typeof s.path!="string"||typeof s.source!="string"||e!==s.path&&!e.startsWith(`${s.path}/`))continue;const a=Qt(s.source),l=a?.scheme===Hr?a.name:void 0;if(!l||!je(n)||!Nr(n,l))return{type:"dyn"};const c=e.slice(s.path.length).split("/").filter((h,f)=>f>0||h!==""),u=FC(n[l]),d=Qt(Xu(s.source,je(r)?r:void 0)),p=d?ry(d):null;return{...uy(DC(n[l],p),c.map(Wc),u),strict:u}}let i=t.data;for(const s of e==="/"?[]:e.slice(1).split("/").map(Wc))if(Array.isArray(i)&&/^\d+$/.test(s))i=i[Number(s)];else if(je(i)&&Nr(i,s))i=i[s];else return{type:"dyn"};return{type:i===void 0?"dyn":Ri(i)}}function FC(e){return(je(e)&&je(e.schema)?e.schema:{}).additionalProperties!==!0}function dy(e,t,n,r,o){return e.startsWith("/")?RC(e,n,r,o):t?{...uy(t.type,e.split("/").filter(i=>i!=="").map(Wc),t.strict),strict:t.strict}:{type:"dyn"}}function zC(e,t,n){const r=new Map;for(const s of Array.isArray(e.components)?e.components:[])je(s)&&typeof s.id=="string"&&!r.has(s.id)&&r.set(s.id,s);const o=new Map,i=(s,a)=>{const l=r.get(s);if(!(!l||o.has(s))){if(o.set(s,a),Array.isArray(l.children))for(const c of l.children)typeof c=="string"&&i(c,a);if(je(l.children)&&typeof l.children.componentId=="string"&&typeof l.children.path=="string"){const c=dy(l.children.path,a,e,t,n),u="type"in c?Pt(c.type):"dyn";i(l.children.componentId,{type:Array.isArray(u)?u[0]:"dyn",strict:Array.isArray(u)&&c.strict===!0})}if(je(l.slots))for(const c of Object.values(l.slots))typeof c=="string"&&i(c,a)}};return i("root",null),o}function Hc(e,t,n,r,o,i,s){if(Ba(e)){const a=dy(e.path,n,r,o,i);return"unknown"in a?(s.push({path:`${t}/path`,message:`unknown field ${a.unknown} in ${e.path}`}),Ze("dyn")):a.type==="dyn"?Ze(a.type):a.type}if(jo(e))return Ze("dyn");if(Array.isArray(e)){const a=e.map((l,c)=>Hc(l,`${t}/${c}`,n,r,o,i,s));return a.length===0?["dyn"]:[a.every(l=>JSON.stringify(l)===JSON.stringify(a[0]))?a[0]:"dyn"]}if(je(e)){const a={};for(const[l,c]of Object.entries(e))a[l]=Hc(c,`${t}/${hi(l)}`,n,r,o,i,s);return a}return We(e)}function NC(e){const t=[];if(!je(e.templates))return t;for(const[n,r]of Object.entries(e.templates)){if(!je(r)||!Array.isArray(r.components))continue;let o=null;const i=(a,l)=>{if(Array.isArray(a))return a.forEach((c,u)=>i(c,`${l}/${u}`));if(je(a)){if(a.call==="expr"&&je(a.args)){const c=a.args,u=`${l}/args`;if(Object.prototype.hasOwnProperty.call(c,"default")||t.push({path:`${u}/default`,message:"an expression binding needs a default, shown when it fails"}),typeof c.expr!="string")t.push({path:`${u}/expr`,message:"expr is a string"});else if(c.vars!==void 0&&!je(c.vars))t.push({path:`${u}/vars`,message:"vars is an object"});else{const d={},p=[];for(const[f,y]of Object.entries(c.vars??{}))d[f]=Hc(y,`${u}/vars/${hi(f)}`,o,r,e.records,e.queries,p);t.push(...p);const h=p.length?null:qa(c.expr,d);h&&"error"in h&&t.push({path:`${u}/expr`,message:h.error})}}for(const[c,u]of Object.entries(a))i(u,`${l}/${hi(c)}`)}},s=zC(r,e.records,e.queries);r.components.forEach((a,l)=>{o=je(a)&&typeof a.id=="string"?s.get(a.id)??null:null,i(a,`/templates/${hi(n)}/components/${l}`)})}return t}const nf=5,rf=32,of=200,So="app.navigate",rt=e=>!!e&&typeof e=="object"&&!Array.isArray(e),LC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),jC=new Set(sm),BC=["template","title","icon","params","nav","exposed"],WC=["description","params"],HC=["required","description"],qC=/^[A-Za-z0-9_]+$/,pr=e=>e.replace(/~/g,"~0").replace(/\//g,"~1");function UC(e){if(e.screens===void 0)return[];const t=e.screens;if(!Array.isArray(t)||!t.length)return[{path:"/screens",message:"screens is a non-empty list of {template, title, icon?, params?, nav?, exposed?}"}];const n=[],r=t.filter(s=>!rt(s)||s.nav!==!1).length;r>nf&&n.push({path:"/screens",message:`at most ${nf} screens in the navigation, got ${r}`}),r||n.push({path:"/screens",message:"at least one screen is in the navigation (not nav: false)"});const o=rt(e.templates)?e.templates:{},i=new Set;return t.forEach((s,a)=>{const l=`/screens/${a}`;if(!rt(s))return void n.push({path:l,message:"a screen is {template, title, icon?, params?, nav?, exposed?}"});for(const c of Object.keys(s).sort())BC.includes(c)||n.push({path:`${l}/${pr(c)}`,message:`unknown screen key ${c}`});if(typeof s.template!="string"||!s.template?n.push({path:`${l}/template`,message:"template is a required string"}):LC(o,s.template)?i.has(s.template)?n.push({path:`${l}/template`,message:`duplicate screen ${s.template}`}):i.add(s.template):n.push({path:`${l}/template`,message:`template ${s.template} names no package template`}),typeof s.title!="string"||!s.title.trim()?n.push({path:`${l}/title`,message:"title is a required string"}):[...s.title].length>rf&&n.push({path:`${l}/title`,message:`title is at most ${rf} characters`}),s.icon!==void 0&&(typeof s.icon!="string"||!jC.has(s.icon))&&n.push({path:`${l}/icon`,message:`icon ${typeof s.icon=="string"?s.icon:JSON.stringify(s.icon)} is not an Exponential UI icon`}),s.params!==void 0)if(!rt(s.params))n.push({path:`${l}/params`,message:"params is an object of strings"});else for(const c of Object.keys(s.params).sort())typeof s.params[c]!="string"&&n.push({path:`${l}/params/${pr(c)}`,message:`params.${c} is a string`});s.nav!==void 0&&s.nav!==!1&&n.push({path:`${l}/nav`,message:"nav is false or absent"}),s.exposed!==void 0&&n.push(...VC(s.exposed,`${l}/exposed`))}),n.push(...GC(e,i)),n}function VC(e,t){if(!rt(e))return[{path:t,message:"exposed is {description, params?}"}];const n=[];for(const r of Object.keys(e).sort())WC.includes(r)||n.push({path:`${t}/${pr(r)}`,message:`unknown exposed key ${r}`});if(typeof e.description!="string"||!e.description.trim()?n.push({path:`${t}/description`,message:"description is a required string"}):[...e.description].length>of&&n.push({path:`${t}/description`,message:`description is at most ${of} characters`}),e.params===void 0)return n;if(!rt(e.params))return[...n,{path:`${t}/params`,message:"params is an object of {required?, description?}"}];for(const r of Object.keys(e.params).sort()){const o=e.params[r],i=`${t}/params/${pr(r)}`;if(qC.test(r)||n.push({path:i,message:`param ${r} is letters, digits and _`}),!rt(o)){n.push({path:i,message:"a param is {required?, description?}"});continue}for(const s of Object.keys(o).sort())HC.includes(s)||n.push({path:`${i}/${pr(s)}`,message:`unknown param key ${s}`});o.required!==void 0&&typeof o.required!="boolean"&&n.push({path:`${i}/required`,message:"required is a boolean"}),o.description!==void 0&&typeof o.description!="string"&&n.push({path:`${i}/description`,message:"description is a string"})}return n}function KC(e){if(typeof e!="string")return null;const t=/^\s*(?:'([^'\\]*)'|"([^"\\]*)")\s*$/.exec(e);return t?t[1]??t[2]??"":null}function GC(e,t){const n=[],r=(o,i)=>{o!==null&&!t.has(o)&&n.push({path:i,message:`navigate: ${o} is not a screen`})};if(rt(e.templates))for(const o of Object.keys(e.templates).sort()){const i=e.templates[o];!rt(i)||!Array.isArray(i.components)||i.components.forEach((s,a)=>{if(!(!rt(s)||!rt(s.on)))for(const l of Object.keys(s.on).sort()){const c=s.on[l],u=rt(c)&&rt(c.functionCall)?c.functionCall:null;if(!u||u.call!==So)continue;const d=`/templates/${pr(o)}/components/${a}/on/${pr(l)}/functionCall/args`,p=u.args;rt(p)?typeof p.screen=="string"&&r(p.screen,`${d}/screen`):n.push({path:d,message:"navigate takes {screen, params?}"})}})}if(rt(e.actions))for(const o of Object.keys(e.actions).sort()){const i=e.actions[o];(rt(i)&&Array.isArray(i.steps)?i.steps:[]).forEach((a,l)=>{if(!rt(a)||a.call!==So)return;const c=`/actions/${pr(o)}/steps/${l}/args`;rt(a.args)?r(KC(a.args.screen),`${c}/screen`):n.push({path:c,message:"navigate takes {screen, params?}"})})}return n}function YC(e){return Array.isArray(e.screens)?e.screens.filter(t=>rt(t)&&typeof t.template=="string"):[]}function XC(e,t){if(!rt(t))return{error:"navigate takes {screen, params?}"};if(typeof t.screen!="string"||!t.screen)return{error:"navigate: screen is a required string"};if(!YC(e).some(r=>r.template===t.screen))return{error:`navigate: ${t.screen} is not a screen`};const n={};if(t.params!==void 0&&t.params!==null){if(!rt(t.params))return{error:"navigate: params is an object of strings"};for(const r of Object.keys(t.params).sort()){const o=t.params[r];if(typeof o!="string")return{error:`navigate: params.${r} is a string`};n[r]=o}}return{screen:t.screen,params:n}}function ZC(e,t){return!rt(t)||!e.includes("${params.")?e:e.replace(/\$\{params\.([A-Za-z0-9_]+)\}/g,(n,r)=>{const o=t[r];return typeof o=="string"?encodeURIComponent(o):""})}const Fi={actions:32,steps:64,maxSteps:1e5},Zu=["require","records.upsert","records.delete","set","call"],JC=/^[a-z][A-Za-z0-9_]{0,31}$/,sf="actions.",zl="records.batch",we=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),nn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),fn=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),py=/^(\/([^/~]|~[01])*)*$/;function el(e){return e.startsWith(sf)?e.slice(sf.length):null}function fy(e){if(!we(e))return null;const t=Object.keys(e).filter(n=>Zu.includes(n));return t.length===1?t[0]:null}function QC(e){const t=we(e.params)?e.params:{};return{params:Qa(we(t.properties)?t.properties:{},t.required),data:Ze("dyn"),me:Ze("string")}}function Co(e,t){if(Ot(t))return Ot(e)&&Co(e["?"],t["?"]);if(Ot(e))return Co(e["?"],t);if(e==="dyn"||t==="dyn"||t==="null")return!0;const n=r=>r==="string"||r==="date"||r==="timestamp";return n(e)?n(t):Be(e)===Be(t)}function eA(e){const t=[],n=e.actions;if(n!==void 0)if(!we(n))t.push({path:"/actions",message:"actions is an object of named actions"});else{const r=Object.keys(n).sort();r.length>Fi.actions&&t.push({path:"/actions",message:`at most ${Fi.actions} actions`});for(const o of r)t.push(...tA(e,o,n[o],`/actions/${fn(o)}`))}return t}function tA(e,t,n,r){const o=[];if(JC.test(t)||o.push({path:r,message:"an action name is a letter, then letters, digits and underscores"}),!we(n))return[...o,{path:r,message:"an action is {params?, steps}"}];if(n.params!==void 0&&o.push(...Lg(n.params,`${r}/params`)),!Array.isArray(n.steps)||n.steps.length===0)return[...o,{path:`${r}/steps`,message:"steps is a non-empty array"}];n.steps.length>Fi.steps&&o.push({path:`${r}/steps`,message:`at most ${Fi.steps} steps`});const i=QC(n),s=we(e.records)?e.records:{},a=Array.isArray(e.functions)?e.functions.filter(l=>typeof l=="string"):null;return n.steps.forEach((l,c)=>o.push(...nA(l,`${r}/steps/${c}`,i,s,a))),o}function oo(e,t,n,r){if(typeof e!="string")return Ri(e);const o=qa(e,n);return"error"in o?(r.push({path:t,message:o.error}),null):o.type}function nA(e,t,n,r,o){const i=[],s=fy(e);if(s===null||!we(e))return[{path:t,message:`a step is one of ${Zu.join(", ")}`}];const a=e[s],l=`${t}/${fn(s)}`;switch(s){case"require":{if(typeof a!="string")i.push({path:l,message:"require is an expression"});else{const c=oo(a,l,n,i);c!==null&&c!=="bool"&&c!=="dyn"&&i.push({path:l,message:`require needs a bool, got ${Be(c)}`})}return(typeof e.message!="string"||!e.message)&&i.push({path:`${t}/message`,message:"message is the text shown when the requirement fails"}),i}case"records.upsert":{if(!we(a))return[{path:l,message:"records.upsert is {kind, data, id?}"}];const c=typeof a.kind=="string"?a.kind:"",u=nn(r,c)&&we(r[c])?r[c]:null;if(u||i.push({path:`${l}/kind`,message:`records:${c} names no declared kind`}),a.id!==void 0){const h=oo(a.id,`${l}/id`,n,i);h!==null&&!Co("string",h)&&i.push({path:`${l}/id`,message:`id is a string, got ${Be(h)}`})}if(!we(a.data))return[...i,{path:`${l}/data`,message:"data is an object of field expressions"}];const d=u&&we(u.schema)?u.schema:null,p=d&&we(d.properties)?d.properties:{};for(const h of Object.keys(a.data).sort()){const f=`${l}/data/${fn(h)}`,y=oo(a.data[h],f,n,i);if(!d)continue;if(!nn(p,h)){d.additionalProperties!==!0&&i.push({path:f,message:`${h} is not in the schema of ${c}`});continue}const v=Array.isArray(d.required)&&d.required.includes(h)?Ur(p[h]):Ze(Ur(p[h]));y!==null&&!Co(v,y)&&i.push({path:f,message:`${h} is ${Be(v)}, got ${Be(y)}`})}if(d&&a.id===void 0&&Array.isArray(d.required))for(const h of d.required)typeof h=="string"&&!nn(a.data,h)&&i.push({path:`${l}/data`,message:`${h} is required by ${c}`});return i}case"records.delete":{if(!we(a)||a.id===void 0)return[{path:l,message:"records.delete is {id}"}];const c=oo(a.id,`${l}/id`,n,i);return c!==null&&!Co("string",c)&&i.push({path:`${l}/id`,message:`id is a string, got ${Be(c)}`}),i}case"set":return(!we(a)||typeof a.path!="string"||!py.test(a.path))&&i.push({path:`${l}/path`,message:"path is a JSON pointer"}),we(a)&&oo(a.value??null,`${l}/value`,n,i),i;case"call":{if(typeof a!="string"||!a)return[{path:l,message:"call names a host function"}];const c=ki(a);if(c==="write"?i.push({path:l,message:`${ta(a,c)}: use a records.upsert, records.delete or set step`}):c==="pure"?i.push({path:l,message:`${a} is pure: compute it in an expression`}):el(a)!==null?i.push({path:l,message:"an action never runs another action"}):a!==So&&o!==null&&!o.some(u=>u===a||u.endsWith("*")&&a.startsWith(u.slice(0,-1)))&&i.push({path:l,message:`${a} is not in the package's functions`}),e.args!==void 0)if(!we(e.args))i.push({path:`${t}/args`,message:"args is an object of expressions"});else for(const u of Object.keys(e.args).sort())oo(e.args[u],`${t}/args/${fn(u)}`,n,i);return i}}return i}function rA(e){const t=[];if(!we(e.templates))return t;const n=we(e.actions)?e.actions:{},r=(o,i)=>{if(Array.isArray(o))return o.forEach((s,a)=>r(s,`${i}/${a}`));if(we(o)){if(typeof o.call=="string"){const s=ki(o.call);s!=="pure"&&t.push({path:`${i}/call`,message:`${ta(o.call,s)}: a binding is pure, name an action in on.press`})}for(const[s,a]of Object.entries(o))r(a,`${i}/${fn(s)}`)}};for(const[o,i]of Object.entries(e.templates))!we(i)||!Array.isArray(i.components)||i.components.forEach((s,a)=>{if(!we(s))return;const l=`/templates/${fn(o)}/components/${a}`;for(const[c,u]of Object.entries(s)){if(c!=="on"){r(u,`${l}/${fn(c)}`);continue}if(we(u))for(const[d,p]of Object.entries(u)){const h=`${l}/on/${fn(d)}`;if(we(p))for(const[f,y]of Object.entries(p)){if(f!=="functionCall"||!we(y)){r(y,`${h}/${fn(f)}`);continue}const g=typeof y.call=="string"?y.call:"",v=el(g);v!==null&&!nn(n,v)&&t.push({path:`${h}/functionCall/call`,message:`action ${v} names no package action`}),v!==null&&nn(n,v)&&we(n[v])&&t.push(...oA(v,n[v],y.args,`${h}/functionCall/args`)),g==="bind"&&t.push(...iA(e,y.args,`${h}/functionCall/args`));for(const[m,b]of Object.entries(y))m!=="call"&&r(b,`${h}/functionCall/${fn(m)}`)}}}});return t}function oA(e,t,n,r){if(n!==void 0&&!we(n))return[{path:r,message:`args is an object of action ${e}'s params`}];const o=[],i=we(t.params)?t.params:{},s=we(i.properties)?i.properties:{},a=Array.isArray(i.required)?i.required.filter(c=>typeof c=="string"):[],l=we(n)?n:{};for(const c of Object.keys(l).sort()){const u=`${r}/${fn(c)}`;if(!nn(s,c)){i.additionalProperties!==!0&&o.push({path:u,message:`${c} is not a param of action ${e}`});continue}const d=l[c];if(typeof d!="string"&&typeof d!="number"&&typeof d!="boolean")continue;const p=a.includes(c)?Ur(s[c]):Ze(Ur(s[c])),h=Ri(d);Co(p,h)||o.push({path:u,message:`${c} is ${Be(p)}, got ${Be(h)}`})}for(const c of a)nn(l,c)||o.push({path:r,message:`${c} is required by action ${e}`});return o}function iA(e,t,n){if(!we(t)||typeof t.source!="string")return[];const r=t.source,o=`${n}/source`,i=Qt(r);if(!i)return[{path:o,message:"source is a scheme:name URI"}];const s=[];if(Array.isArray(e.sources)&&e.sources.every(a=>typeof a=="string")&&!tl(e.sources,r)&&s.push({path:o,message:`source ${r} is not in the package's sources`}),i.scheme===Hr){(!we(e.records)||!nn(e.records,i.name))&&s.push({path:o,message:`records:${i.name} names no declared kind`});const a=i.params.query;a!==void 0&&(!we(e.queries)||!nn(e.queries,a))&&s.push({path:o,message:`query ${a} names no package query`})}return s}class hy extends Error{}const At=e=>{throw new hy(e)},ya=e=>e.map(t=>`${t.path||"/"} ${t.message}`).join("; ");function my(e,t,n,r={}){const o=we(e.actions)?e.actions:{},i=nn(o,t)&&we(o[t])?o[t]:null;if(!i||!Array.isArray(i.steps))return{error:`no action ${t}`};const s=n??{};if(!we(s))return{error:"params is an object"};if(we(i.params)){const d=Pi(i.params,s);if(d.length)return{error:`params: ${ya(d)}`}}const a={params:s,data:r.data??null,me:r.me??null},l=we(e.records)?e.records:{};let c=r.maxSteps??Fi.maxSteps;const u={writes:[],sets:[],calls:[]};try{i.steps.forEach((d,p)=>{const h=`step ${p}`,f=m=>{c-=m,c<0&&At(`${h}: action step limit exceeded`)};f(1);const y=m=>{if(typeof m!="string")return m;const b=Wo(m);if("error"in b)return At(`${h}: ${b.error}`);const x=Math.min(Po.maxSteps,c),{result:$,steps:S}=yx(b.ast,a,{now:r.now,offset:r.offset,maxSteps:x});return"error"in $&&($.error==="step limit exceeded"&&x===c&&At(`${h}: action step limit exceeded`),At(`${h}: ${$.error}`)),f(S),$.value},g=fy(d);if(g===null||!we(d))return At(`${h}: a step is one of ${Zu.join(", ")}`);const v=d[g];switch(g){case"require":{const m=y(v);typeof m!="boolean"&&At(`${h}: require needs a bool, got ${We(m)}`),m||At(typeof d.message=="string"&&d.message?d.message:`${h}: requirement failed`);return}case"records.upsert":{if(!we(v)||!we(v.data))return At(`${h}: records.upsert is {kind, data, id?}`);const m=typeof v.kind=="string"?v.kind:"",b=nn(l,m)&&we(l[m])?l[m]:null;if(!b||!we(b.schema))return At(`${h}: records: no kind ${m}`);let x;if(v.id!==void 0){const C=y(v.id);(typeof C!="string"||!C)&&At(`${h}: id is a string, got ${We(C)}`),x=C}const $={};for(const C of Object.keys(v.data).sort())$[C]=y(v.data[C]);const S=b.schema,A=Pi(x===void 0?S:{...S,required:[]},$);A.length&&At(`${h}: records: ${ya(A)}`),u.writes.push(x===void 0?{op:"upsert",kind:m,data:$}:{op:"upsert",kind:m,data:$,id:x});return}case"records.delete":{if(!we(v))return At(`${h}: records.delete is {id}`);const m=y(v.id);(typeof m!="string"||!m)&&At(`${h}: id is a string, got ${We(m)}`),u.writes.push({op:"delete",id:m});return}case"set":{if(!we(v)||typeof v.path!="string"||!py.test(v.path))return At(`${h}: path is a JSON pointer`);u.sets.push({path:v.path,value:y(v.value??null)});return}case"call":{if(typeof v!="string"||ki(v)!=="host"||el(v)!==null)return At(`${h}: call names a host function`);const m={};if(we(d.args))for(const b of Object.keys(d.args).sort())m[b]=y(d.args[b]);u.calls.push({name:v,args:m});return}}})}catch(d){if(d instanceof hy)return{error:d.message};throw d}return{plan:u}}function sA(e,t,n){let r=[...e];const o=[];let i=0;for(const[s,a]of t.entries()){const l=`write ${s}`,c={id:n.me??null,role:n.role??null,access:n.access},u=(v,m,b)=>n.role===void 0?null:Dc(Pc(n.records?.[v]),m,c,b),d=v=>r.find(m=>m.id===v&&(n.role===void 0||Dc(Pc(n.records?.[m.kind]),"read",c,m)===null));if(a.op==="delete"){const v=d(a.id);if(!v)return{error:`${l}: record ${a.id} not found`};const m=u(v.kind,"delete",v);if(m)return{error:`${l}: ${m}`};r=r.filter(b=>b.id!==a.id),o.push(a.id);continue}const p=n.records&&nn(n.records,a.kind)&&we(n.records[a.kind])?n.records[a.kind]:null;if(!p||!we(p.schema))return{error:`${l}: records: no kind ${a.kind}`};const h=p.schema;if(a.id!==void 0){const v=d(a.id);if(!v)return{error:`${l}: record ${a.id} not found`};if(v.kind!==a.kind)return{error:`${l}: record ${a.id} is not of kind ${a.kind}`};const m=u(a.kind,"update",v);if(m)return{error:`${l}: ${m}`};const b={...v.data,...a.data},x=Pi(h,b);if(x.length)return{error:`${l}: records: ${ya(x)}`};r=r.map($=>$.id===a.id?{...$,data:b,updatedAt:n.now}:$),o.push(a.id);continue}const f=u(a.kind,"create");if(f)return{error:`${l}: ${f}`};const y=Pi(h,a.data);if(y.length)return{error:`${l}: records: ${ya(y)}`};const g=n.newId(i++);r.push({id:g,kind:a.kind,data:{...a.data},createdBy:n.me??null,authorId:n.me??null,createdAt:n.now,updatedAt:n.now}),o.push(g)}return{rows:r,ids:o}}const ba={tests:50,gotMax:300},Nl={now:"2026-01-01T00:00:00.000Z",as:"member",role:"member"},aA=["member","owner"],af=["expr","query","action"],Ke=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ai=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),lA=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),gy=["id","author"];function qc(e,t){return Ke(e)?Ke(t)&&Object.keys(e).every(n=>qc(e[n],ai(t,n)?t[n]:null)):Array.isArray(e)?Array.isArray(t)&&t.length===e.length&&e.every((n,r)=>qc(n,t[r])):(e??null)===(t??null)}function yy(e){const t=e.tests;if(t===void 0)return[];if(!Array.isArray(t))return[{path:"/tests",message:"tests is a list of {name, expr | query | action, expect}"}];const n=[];t.length>ba.tests&&n.push({path:"/tests",message:`at most ${ba.tests} tests`});const r=Ke(e.records)?e.records:{},o=Ke(e.queries)?e.queries:{},i=Ke(e.actions)?e.actions:{};return t.forEach((s,a)=>{const l=`/tests/${a}`;if(!Ke(s))return void n.push({path:l,message:"a test is {name, expr | query | action, expect}"});(typeof s.name!="string"||!s.name.trim())&&n.push({path:`${l}/name`,message:"name is a non-empty string"});const c=af.filter(h=>s[h]!==void 0);if(c.length!==1&&n.push({path:l,message:`a test runs one of ${af.join(", ")}`}),ai(s,"expect")||n.push({path:`${l}/expect`,message:"expect is required"}),s.now!==void 0&&(typeof s.now!="string"||Ha(s.now)===null)&&n.push({path:`${l}/now`,message:"now is an ISO timestamp"}),s.as!==void 0&&(typeof s.as!="string"||!s.as)&&n.push({path:`${l}/as`,message:"as is a member id"}),s.role!==void 0&&!aA.includes(s.role)&&n.push({path:`${l}/role`,message:"role is member or owner"}),s.records!==void 0)if(!Ke(s.records))n.push({path:`${l}/records`,message:"records is {<kind>: [rows]}"});else for(const h of Object.keys(s.records).sort()){const f=`${l}/records/${lA(h)}`,y=ai(r,h)&&Ke(r[h])?r[h]:null;if(!y||!Ke(y.schema)){n.push({path:f,message:`records:${h} names no declared kind`});continue}const g=s.records[h];if(!Array.isArray(g)){n.push({path:f,message:"a kind's sample is a list of rows"});continue}g.forEach((v,m)=>{if(!Ke(v))return void n.push({path:`${f}/${m}`,message:"a row is an object"});for(const b of gy)v[b]!==void 0&&(typeof v[b]!="string"||!v[b])&&n.push({path:`${f}/${m}/${b}`,message:`${b} is a non-empty string`});for(const b of Pi(y.schema,by(v)))n.push({path:`${f}/${m}${b.path}`,message:b.message})})}if(c.length!==1)return;const u=c[0],d=s[u],p=`${l}/${u}`;if(u==="expr")!Ke(d)||typeof d.expr!="string"?n.push({path:`${p}/expr`,message:"expr is a string"}):d.vars!==void 0&&!Ke(d.vars)&&n.push({path:`${p}/vars`,message:"vars is an object"});else if(u==="query"){const h=Ke(d)&&typeof d.name=="string"?d.name:"";ai(o,h)||n.push({path:`${p}/name`,message:`query ${h} names no package query`}),Ke(d)&&d.params!==void 0&&!Ke(d.params)&&n.push({path:`${p}/params`,message:"params is an object"})}else{const h=Ke(d)&&typeof d.name=="string"?d.name:"";ai(i,h)||n.push({path:`${p}/name`,message:`action ${h} names no package action`})}}),n}function by(e){const t={};for(const[n,r]of Object.entries(e))gy.includes(n)||(t[n]=r);return t}function cA(e,t,n){const r=[];if(!Ke(e))return r;for(const o of Object.keys(e).sort()){const i=e[o];Array.isArray(i)&&i.forEach((s,a)=>{if(!Ke(s))return;const l=typeof s.author=="string"?s.author:t;r.push({id:typeof s.id=="string"?s.id:`${o}-${a+1}`,kind:o,data:by(s),createdBy:l,authorId:l,createdAt:n,updatedAt:n})})}return r}function uA(e,t,n,r,o){return!Ke(e)||Object.keys(e).length!==1||typeof e.source!="string"?e:vy(e.source,t,n,r,o)}function vy(e,t,n,r,o){const i=Xu(e,Ke(t.queries)?t.queries:void 0),s=Qt(i),a=s?.scheme===Hr?ry(s):null;return a?uC(n,a,{me:r,now:o,computed:a.app===null?sC(t.records,a.from):void 0,refs:a.app===null?aC(t.records,a.from):void 0,transitions:a.app===null&&a.from&&Ke(t.records)?gS(t.records[a.from]):null})??null:{error:`${e} is not a records source`}}function dA(e,t){const n=typeof t.now=="string"?t.now:Nl.now,r=Ha(n),o=typeof t.as=="string"?t.as:Nl.as,i=typeof t.role=="string"?t.role:Nl.role,s=Ke(e.records)?e.records:void 0,a=cA(t.records,o,n),l=zp(a,s,{id:o,role:i});if(Ke(t.expr)){const h={};if(Ke(t.expr.vars))for(const[y,g]of Object.entries(t.expr.vars))h[y]=uA(g,e,l,o,n);const f=Eu(t.expr.expr,h,{now:r});return"error"in f?{error:f.error}:f.value}if(Ke(t.query)){const h=t.query.name,f=e.queries[h],y=Ke(f)&&typeof f.from=="string"?f.from:"",g={};if(Ke(t.query.params))for(const[v,m]of Object.entries(t.query.params))g[v]=typeof m=="string"?m:Wr(m);return vy(Ku(`${Hr}:${y}`,{query:h,...g}),e,l,o,n)}const c=t.action,u=my(e,c.name,c.params,{data:c.data,me:o,now:r});if("error"in u)return{error:u.error};const d=sA(a,u.plan.writes,{records:s,me:o,role:i,now:n,newId:h=>`new-${h+1}`});if("error"in d)return{error:d.error};const p={};for(const h of zp(d.rows,s,{id:o,role:i}))(p[h.kind]??=[]).push({...h.data,id:h.id,author:h.authorId??h.createdBy});return{records:p,sets:u.plan.sets,calls:u.plan.calls}}function pA(e){return!Array.isArray(e.tests)||yy(e).length?[]:e.tests.map(t=>{const n=dA(e,t);return{name:t.name,pass:qc(t.expect,n),got:n}})}function fA(e,t,n){const r=Array.from(Wr(n??null)),o=r.length>ba.gotMax?`${r.slice(0,ba.gotMax).join("")}…`:r.join("");return`${e}: expected ${Wr(t??null)}, got ${o}`}function hA(e){const t=Array.isArray(e.tests)?e.tests:[];return pA(e).flatMap((n,r)=>n.pass?[]:[{path:`/tests/${r}`,message:fA(n.name,t[r].expect,n.got)}])}const lf={date:104,time:64,"date-time":152,number:64,integer:64,boolean:56},mA=136,gA=80,yA=200,bA="/recordForm",vA="/recordTable",Ju=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function Qu(e){const t=e.replace(/_/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim().toLowerCase();return t?t[0].toUpperCase()+t.slice(1):e}function ed(e){const t=Object.keys(e.schema.properties),n=(e.schema.required??[]).filter((r,o,i)=>t.includes(r)&&i.indexOf(r)===o);return[...n,...t.filter(r=>!n.includes(r)).sort()]}const td=e=>e.format==="attachment"||e.type==="array"&&e.items?.format==="attachment";function cf(e,t){const n=e.schema.required??[],r=e.refs??{};return ed(e).flatMap(o=>{const i=e.schema.properties[o];if(td(i))return[];const s={path:`${t}/${o}`},a={name:o,label:Qu(o),widget:"text",required:n.includes(o),wide:!1,value:s};i.description&&(a.placeholder=i.description);const l=r[o];l==="member"?Object.assign(a,{widget:"select",source:"exp:members",searchable:!0}):l==="issue"?Object.assign(a,{widget:"select",source:"exp:issues",searchable:!0}):i.type==="boolean"?a.widget="switch":i.type==="number"||i.type==="integer"?(a.widget="number",i.minimum!==void 0&&(a.min=i.minimum),i.maximum!==void 0&&(a.max=i.maximum),i.type==="integer"&&Object.assign(a,{step:1,precision:0})):i.type==="array"?(i.items?.enum?Object.assign(a,{widget:"select",multiple:!0,options:i.items.enum.map(u=>({label:u,value:u}))}):a.widget="chips",i.maxLength!==void 0&&(a.max=i.maxLength),a.wide=!0):i.enum?Object.assign(a,{widget:"select",options:i.enum.map(u=>({label:u,value:u}))}):i.format==="date"?a.widget="date":i.format==="time"?a.widget="time":i.format==="date-time"?a.placeholder??="YYYY-MM-DDTHH:MM":(i.maxLength===void 0||i.maxLength>yA)&&Object.assign(a,{widget:"textarea",wide:!0});const c=[];return a.required&&a.widget!=="switch"&&c.push({condition:{call:"required",args:{value:s}},message:"$string.required"}),i.type==="string"&&i.maxLength!==void 0&&!i.enum&&a.widget!=="select"&&c.push({condition:{call:"length",args:{value:s,max:i.maxLength}},message:"$string.invalidValue"}),(i.type==="number"||i.type==="integer")&&(i.minimum!==void 0||i.maximum!==void 0)&&c.push({condition:{call:"numeric",args:{value:s,...i.minimum!==void 0?{min:i.minimum}:{},...i.maximum!==void 0?{max:i.maximum}:{}}},message:"$string.invalidValue"}),c.length&&(a.checks=c),[a]})}function $A(e,t,n){const o=(t??ed(e)).filter(i=>e.schema.properties[i]&&!td(e.schema.properties[i])).map(i=>{const s=e.schema.properties[i],a={key:i,label:Qu(i),sortable:!0};s.type==="number"||s.type==="integer"?Object.assign(a,{type:"number",align:"end"}):s.type==="boolean"?a.type="boolean":s.format==="date"&&(a.type="date");const l=s.type==="string"?s.format?lf[s.format]:void 0:lf[s.type];return l!==void 0?a.width=l:a.truncate=!0,a});return o.push({key:"updatedAt",label:"Updated",type:"relativeTime",width:mA,sortable:!0}),n&&o.push({key:"menu",label:"",type:"slot",slot:"menu",width:gA}),o}const io=(e,t)=>({functionCall:{call:"set",args:{path:e,value:t}}}),ir=(e,t,n)=>{const r=e.on=Ju(e.on)?{...e.on}:{};r[t]===void 0&&(r[t]=n)};function uf(e,t,n){const r={};for(const i of t)r[i.name]=i.value;const o={kind:e};return n!==void 0&&(o.id=n),o.data=r,{functionCall:{call:"records.upsert",args:o}}}function $y(e,t=[],n,r={}){const o=[],i=[],s=[...t];for(const a of e){if(!Ju(a)||a.component!=="RecordForm"&&a.component!=="RecordTable"){o.push(a);continue}const l={...a},c=String(l.id),u=typeof l.kind=="string"?l.kind:"",d=n&&Object.prototype.hasOwnProperty.call(n,u)?n[u]:void 0;if(!d){l.missing=!0,o.push(l);continue}if(l.component==="RecordForm"){const x=typeof l.path=="string"?l.path:`${bA}/${c}`,$=cf(d,x);l.path=x,l.fields=$,r.readOnly&&(l.readOnly=!0),ir(l,"submit",uf(u,$,l.recordId)),o.push(l);continue}const p=`${vA}/${c}`,h=l.editable!==!1&&!r.readOnly,f=Array.isArray(l.columns)?l.columns.filter(x=>typeof x=="string"):void 0,y=`${p}/editor/draft`,g=cf(d,y);l.title=d.title??Qu(u),l.cols=$A(d,f,h),l.rows={path:`${p}/rows/rows`},l.count={call:"fill",args:{template:"$string.recordCount",params:{count:{call:"coalesce",args:{values:[{path:`${p}/rows/count`},0]}}}}},l.loading={call:"not",args:{value:{path:`${p}/rows`}}},r.readOnly&&(l.add=!1),l.editable=h,l.children={componentId:`${c}__row`,path:`${p}/rows/rows`,key:"id"},h?(l.fields=g,l.path=y,l.editorOpen={path:`${p}/editor/open`},l.editorId={path:`${y}/id`},l.deleteOpen={path:`${p}/delete/open`},ir(l,"add",io(`${p}/editor`,{open:!0,draft:{}})),ir(l,"edit",io(`${p}/editor`,{open:!0,draft:{path:""}})),ir(l,"delete",io(`${p}/delete`,{open:!0,id:{path:"id"}})),ir(l,"submit",uf(u,g,{path:`${y}/id`})),ir(l,"cancel",io(`${p}/editor/open`,!1)),ir(l,"confirm",{functionCall:{call:"records.delete",args:{id:{path:`${p}/delete/id`}}}}),ir(l,"cancelDelete",io(`${p}/delete/open`,!1))):l.add=!1,o.push(l);const v=(f??ed(d)).filter(x=>d.schema.properties[x]&&!td(d.schema.properties[x])),m={id:`${c}__row`,component:"Row",title:{call:"coalesce",args:{values:[{call:"text",args:{value:{path:v[0]??"id"}}},"—"]}}};v[1]&&(m.subtitle={call:"coalesce",args:{values:[{call:"text",args:{value:{path:v[1]}}},""]}}),m.meta={call:"formatRelativeTime",args:{value:{path:"updatedAt"}}},h&&(m.on={press:io(`${p}/editor`,{open:!0,draft:{path:""}})}),i.push(m);const b=typeof l.query=="string"&&l.query.trim()?l.query.trim().replace(/^\?/,""):"sort=updatedAt&order=desc";s.push({path:`${p}/rows`,source:`records:${u}?${b}`})}return{components:[...o,...i],bindings:s}}function xy(e){return e.some(t=>Ju(t)&&(t.component==="RecordForm"||t.component==="RecordTable"))}const hn=e=>!!e&&typeof e=="object"&&!Array.isArray(e),wy=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),xA=[jr,bu,La];function wA(e,t){const n=[],r=e.children;if(r!=null){const o=Array.isArray(r)&&r.every(s=>typeof s=="string"),i=hn(r)&&typeof r.componentId=="string"&&typeof r.path=="string"&&(r.key===void 0||r.key===null||typeof r.key=="string");!o&&!i&&n.push({path:`${t}/children`,message:"children is a list of ids or {componentId, path, key?}"})}return e.slots!==void 0&&e.slots!==null&&(!hn(e.slots)||Object.values(e.slots).some(o=>typeof o!="string"))&&n.push({path:`${t}/slots`,message:"slots is an object of component ids"}),e.on!==void 0&&e.on!==null&&!hn(e.on)&&n.push({path:`${t}/on`,message:"on is an object of actions"}),e.style!==void 0&&e.style!==null&&!hn(e.style)&&n.push({path:`${t}/style`,message:"style is an object"}),n}function kA(e,t,n){const r=[];return e.forEach((o,i)=>{const s=`${n}/${i}`;if(Array.isArray(o.children)?o.children.forEach((a,l)=>a===t&&r.push(`${s}/children/${l}`)):hn(o.children)&&o.children.componentId===t&&r.push(`${s}/children/componentId`),hn(o.slots))for(const[a,l]of Object.entries(o.slots))l===t&&r.push(`${s}/slots/${wy(a)}`)}),r}function SA(e,t,n=[]){const r=[],o=typeof e.catalogId=="string"?e.catalogId:"";if(!t.includes(o)||!hn(e.templates))return r;const i=c=>xA.includes(c)||n.some(u=>u.id===c),s=Array.isArray(e.extensions)?e.extensions.map(c=>hn(c)&&typeof c.id=="string"?c.id:""):[],a=!i(o)||s.some(c=>c&&!i(c)),l=i(o)?o:jr;for(const[c,u]of Object.entries(e.templates)){if(!hn(u)||!Array.isArray(u.components))continue;const d=`/templates/${wy(c)}/components`,p=u.components,h=new Set;let f=p.length>0;for(const S of p)!hn(S)||typeof S.id!="string"||typeof S.component!="string"||h.has(S.id)?f=!1:h.add(S.id);if(!f||!h.has("root"))continue;const y=p,g=y.flatMap((S,A)=>wA(S,`${d}/${A}`));if(g.length){r.push(...g);continue}const v=new Map(y.map((S,A)=>[S.id,A])),m=hn(e.records)?e.records:void 0,b=xy(y)?$y(y,[],m).components:y;for(const S of b){const A=typeof S.id=="string"&&S.id.endsWith("__row")?v.get(S.id.slice(0,-5)):void 0;A!==void 0&&!v.has(S.id)&&v.set(S.id,A)}const x=new Set,$=(S,A)=>{const C=`${S}
24
24
  ${A}`;x.has(C)||(x.add(C),r.push({path:S,message:A}))};for(const S of qu(b,{catalogId:l,extensions:n}).issues){if(a&&S.message.startsWith("unknown component "))continue;const A=v.get(S.id);if(A!==void 0){$(`${d}/${A}`,S.message);continue}const C=kA(y,S.id,d);C.length===0&&$(d,`${S.id}: ${S.message}`);for(const _ of C)$(_,`${S.id}: ${S.message}`)}}return r}const df=5,CA=/^[a-z][a-z0-9_]{0,23}$/,AA=["submit","view"],pf=3650,_A=["name","mode","kind","fields","query","expires"],Ut=e=>!!e&&typeof e=="object"&&!Array.isArray(e),wr=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);function OA(e){if(e.share===void 0)return[];if(!Array.isArray(e.share))return[{path:"/share",message:"share is a list of {name, mode, kind, fields?, query?, expires?}"}];const t=[];e.share.length>df&&t.push({path:"/share",message:`at most ${df} public links, got ${e.share.length}`});const n=Ut(e.records)?e.records:{},r=Ut(e.queries)?e.queries:{},o=new Set;return e.share.forEach((i,s)=>{const a=`/share/${s}`;if(!Ut(i))return void t.push({path:a,message:"a public link is {name, mode, kind, fields?, query?, expires?}"});for(const f of Object.keys(i).sort())_A.includes(f)||t.push({path:`${a}/${f}`,message:`unknown public link key ${f}`});typeof i.name!="string"||!CA.test(i.name)?t.push({path:`${a}/name`,message:"a name is a lowercase letter, then lowercase letters, digits and underscores (24 at most)"}):o.has(i.name)?t.push({path:`${a}/name`,message:`duplicate public link ${i.name}`}):o.add(i.name),(typeof i.mode!="string"||!AA.includes(i.mode))&&t.push({path:`${a}/mode`,message:"mode is submit or view"});const l=typeof i.kind=="string"&&wr(n,i.kind)?n[i.kind]:void 0;Ut(l)||t.push({path:`${a}/kind`,message:`${String(i.kind)} names no declared kind`});const c=Ut(l)&&Ut(l.schema)?l.schema:{},u=Ut(c.properties)?c.properties:{},d=Array.isArray(c.required)?c.required:[],p=Ut(l)&&Ut(l.refs)?l.refs:{},h=f=>Ut(f)&&(f.format==="attachment"||Ut(f.items)&&f.items.format==="attachment");if(i.fields!==void 0){if(!Array.isArray(i.fields)||!i.fields.length||i.fields.some(f=>typeof f!="string"))t.push({path:`${a}/fields`,message:"fields is a non-empty list of field names"});else if(i.fields.forEach((f,y)=>{Ut(l)&&!wr(u,f)&&t.push({path:`${a}/fields/${y}`,message:`${f} is not a field of ${String(i.kind)}`});const g=wr(u,f)?u[f]:void 0;h(g)&&t.push({path:`${a}/fields/${y}`,message:`a public link cannot carry the file field ${f}`}),wr(p,f)&&t.push({path:`${a}/fields/${y}`,message:`a public link cannot carry the ref field ${f}`})}),i.mode==="submit")for(const f of d)i.fields.includes(f)||t.push({path:`${a}/fields`,message:`a submit link needs the required field ${String(f)}`})}if(i.mode==="submit"&&d.some(f=>typeof f=="string"&&wr(u,f)&&h(u[f]))&&t.push({path:`${a}/kind`,message:"a submit link cannot fill a required file field"}),i.mode==="submit"&&i.fields===void 0)for(const f of d)typeof f=="string"&&wr(p,f)&&t.push({path:`${a}/kind`,message:`a submit link cannot fill the required ref field ${f}`});if(i.query!==void 0)if(i.mode!=="view")t.push({path:`${a}/query`,message:"only a view link has a query"});else if(typeof i.query!="string"||!wr(r,i.query))t.push({path:`${a}/query`,message:`${String(i.query)} names no package query`});else{const f=r[i.query],y=Ut(f)&&typeof f.from=="string"?f.from.trim():"";y&&y!==i.kind&&t.push({path:`${a}/query`,message:`query ${i.query} reads records:${y}, the link's kind is ${String(i.kind)}`})}i.expires!==void 0&&(typeof i.expires!="number"||!Number.isInteger(i.expires)||i.expires<1||i.expires>pf)&&t.push({path:`${a}/expires`,message:`expires is a whole number of days, 1 to ${pf}`})}),t}const ei=4;function nd(e=[]){const t=[];for(const n of[jr,bu,La,...e])t.includes(n)||t.push(n);return t}function TA(e=[]){return{"v0.9":{supportedCatalogIds:nd(e)}}}const MA=/^[a-z][A-Za-z0-9_]{0,31}$/;function ff(e){return e.map(t=>({id:t.id,...t.version?{version:t.version}:{},components:[...Object.keys(t.components),...Object.keys(t.macros??{})],def:t}))}const Uc=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;function EA(e,t){const n=Uc.exec(e),r=Uc.exec(t);if(!n||!r)return!1;const[o,i,s]=[Number(n[1]),Number(n[2]),Number(n[3])],[a,l,c]=[Number(r[1]),Number(r[2]),Number(r[3])];return o===a&&(i>l||i===l&&s>=c)}const Ie=e=>!!e&&typeof e=="object"&&!Array.isArray(e),IA=/^(\/([^/~]|~[01])*)*$/;function PA(e,t=nd(),n){const r=[];if(!Ie(e))return[{path:"",message:"a package is an object"}];e.formatVersion===void 0?r.push({path:"/formatVersion",message:`formatVersion is required (${ei})`}):typeof e.formatVersion!="number"||!Number.isInteger(e.formatVersion)||e.formatVersion<1?r.push({path:"/formatVersion",message:"formatVersion is a positive integer"}):e.formatVersion>ei?r.push({path:"/formatVersion",message:`format version ${e.formatVersion} is newer than this host (${ei})`}):e.formatVersion<ei&&r.push({path:"/formatVersion",message:`format version ${e.formatVersion} is no longer read: write ${ei}`});for(const o of["id","name","version","catalogId"])(typeof e[o]!="string"||!e[o])&&r.push({path:`/${o}`,message:`${o} is a required string`});if(typeof e.catalogId=="string"&&e.catalogId&&!t.includes(e.catalogId)&&r.push({path:"/catalogId",message:`unsupported catalog ${e.catalogId}`}),!Ie(e.templates)||!Object.keys(e.templates).length)r.push({path:"/templates",message:"templates is a non-empty object"});else for(const[o,i]of Object.entries(e.templates)){const s=`/templates/${o}`;if(!Ie(i)){r.push({path:s,message:"a template is an object"});continue}const a=i.components;if(!Array.isArray(a)||!a.length)r.push({path:`${s}/components`,message:"components is a non-empty array"});else{const l=new Set;a.forEach((c,u)=>{!Ie(c)||typeof c.id!="string"||typeof c.component!="string"?r.push({path:`${s}/components/${u}`,message:"a component needs an id and a component"}):l.has(c.id)?r.push({path:`${s}/components/${u}/id`,message:`duplicate id ${c.id}`}):l.add(c.id)}),l.has("root")||r.push({path:`${s}/components`,message:"no component has the id root"})}i.bindings!==void 0&&(Array.isArray(i.bindings)?i.bindings.forEach((l,c)=>{const u=`${s}/bindings/${c}`;(!Ie(l)||typeof l.path!="string"||!IA.test(l.path))&&r.push({path:`${u}/path`,message:"path is a JSON pointer"}),(!Ie(l)||typeof l.source!="string"||!Qt(l.source))&&r.push({path:`${u}/source`,message:"source is a scheme:name URI"})}):r.push({path:`${s}/bindings`,message:"bindings is an array"}))}if(e.functions!==void 0&&(!Array.isArray(e.functions)||e.functions.some(o=>typeof o!="string"||!o))&&r.push({path:"/functions",message:"functions is a list of names or prefix* patterns"}),e.records!==void 0)if(!Ie(e.records))r.push({path:"/records",message:"records is an object of kinds"});else for(const o of Object.keys(e.records).sort()){const i=e.records[o],s=`/records/${o}`;Ec.test(o)||r.push({path:s,message:"a kind is lowercase letters, digits and underscores"}),Ie(i)?(r.push(...Lg(i.schema,`${s}/schema`)),i.policy!==void 0&&r.push(...pS(i.policy,`${s}/policy`)),r.push(...MC(i,s)),r.push(...uS(i,s,e.records)),r.push(...xS(i,s,o))):r.push({path:s,message:"a kind is {schema, title?, policy?}"})}if(e.sources!==void 0&&(!Array.isArray(e.sources)||e.sources.some(o=>typeof o!="string"||!o)))r.push({path:"/sources",message:"sources is a list of scheme:name sources or prefix* patterns"});else if(Array.isArray(e.sources)&&Ie(e.templates))for(const[o,i]of Object.entries(e.templates))!Ie(i)||!Array.isArray(i.bindings)||i.bindings.forEach((s,a)=>{Ie(s)&&typeof s.source=="string"&&Qt(s.source)&&!tl(e.sources,s.source)&&r.push({path:`/templates/${o}/bindings/${a}/source`,message:`source ${s.source} is not in the package's sources`})});if(r.push(...ES(e)),Ie(e.templates))for(const[o,i]of Object.entries(e.templates))!Ie(i)||!Array.isArray(i.bindings)||i.bindings.forEach((s,a)=>{const l=Ie(s)&&typeof s.source=="string"?Qt(s.source):null;l?.scheme===Hr&&(!Ie(e.records)||!Object.prototype.hasOwnProperty.call(e.records,l.name))&&r.push({path:`/templates/${o}/bindings/${a}/source`,message:`records:${l.name} names no declared kind`})});if(e.queries!==void 0)if(!Ie(e.queries))r.push({path:"/queries",message:"queries is an object of named queries"});else for(const o of Object.keys(e.queries).sort()){const i=`/queries/${o}`;MA.test(o)||r.push({path:i,message:"a query name is a letter, then letters, digits and underscores"});const s=e.queries[o];for(const l of Yu(s).issues)r.push({path:`${i}${l.path}`,message:l.message});const a=Ie(s)&&typeof s.from=="string"?s.from.trim():"";a&&!a.includes("${")&&(!Ie(e.records)||!Object.prototype.hasOwnProperty.call(e.records,a))?r.push({path:`${i}/from`,message:`records:${a} names no declared kind`}):a&&!a.includes("${")&&Ie(s)&&r.push(...DA(s,a,e.records[a],i)),a&&Ie(s)&&Array.isArray(s.expand)&&Ie(e.records)&&Ie(e.records[a])&&s.expand.forEach((l,c)=>{const u=e.records[a].refs??{};typeof l=="string"&&l.trim()&&!(Ie(u)&&Object.prototype.hasOwnProperty.call(u,l.trim()))&&r.push({path:`${i}/expand/${c}`,message:`${l.trim()} is not a ref of ${a}`})})}if(Array.isArray(e.exposes)&&e.exposes.forEach((o,i)=>{const s=Ie(o)&&Ie(o.run)&&Ie(o.run.records)?o.run.records:null;if(!s||typeof s.query!="string")return;const a=`/exposes/${i}/run/records/query`,l=Ie(e.queries)&&Object.prototype.hasOwnProperty.call(e.queries,s.query)?e.queries[s.query]:void 0;if(l===void 0)return void r.push({path:a,message:`query ${s.query} names no package query`});const c=Ie(l)&&typeof l.from=="string"?l.from.trim():"";c&&!c.includes("${")&&typeof s.kind=="string"&&c!==s.kind&&r.push({path:a,message:`query ${s.query} reads records:${c}, the tool's kind is ${s.kind}`})}),Ie(e.templates))for(const[o,i]of Object.entries(e.templates))!Ie(i)||!Array.isArray(i.bindings)||i.bindings.forEach((s,a)=>{const l=Ie(s)&&typeof s.source=="string"?Qt(s.source):null,c=l?.params.query;!l||c===void 0||l.scheme!==Hr||(!Ie(e.queries)||!Object.prototype.hasOwnProperty.call(e.queries,c))&&r.push({path:`/templates/${o}/bindings/${a}/source`,message:`query ${c} names no package query`})});return r.push(...NA(e)),r.push(...SA(e,t,(n??[]).flatMap(o=>o.def?[o.def]:[]))),r.push(...NC(e)),r.push(...rA(e)),r.push(...eA(e)),r.push(...UC(e)),r.push(...OA(e)),e.tools!==void 0&&r.push(...mC(e.tools)),e.upstreams!==void 0&&r.push(..._C(e.upstreams)),e.exposes!==void 0&&r.push(...TC(e.exposes,e.records,e.upstreams)),e.extensions!==void 0&&r.push(...RA(e.extensions,t,n)),r.push(...yy(e)),r.length===0&&r.push(...hA(e)),r}function DA(e,t,n,r){const{query:o}=Yu(e,t),i=sy(n),s=p=>Object.prototype.hasOwnProperty.call(i,p),a=new Set(["count",...o.aggregate.map(p=>p.name),...o.group.map(p=>p.field)]),l=[],c=new Set,u=(p,h,f)=>{s(h)||f||c.has(`${p}\0${h}`)||(c.add(`${p}\0${h}`),l.push({path:`${r}/${p}`,message:`${h} is no field of records:${t}`}))},d=(p,h,f)=>{const y=s(f)?Pt(i[f]):"dyn";y!=="number"&&y!=="dyn"&&l.push({path:`${r}/${p}`,message:`${h} reads a number: ${f} is ${typeof y=="string"?y:Array.isArray(y)?"list":"map"}`})};for(const p of o.where)u("where",p.field);for(const p of o.or)for(const h of p)u("or",h.field);o.group.forEach((p,h)=>u(Array.isArray(e.group)?`group/${h}`:"group",p.field));for(const p of o.aggregate)p.field!==null&&(u(`aggregate/${p.name}`,p.field),(p.op==="sum"||p.op==="avg")&&s(p.field)&&d(`aggregate/${p.name}`,p.op,p.field));o.sum!==null&&(u("sum",o.sum),s(o.sum)&&d("sum","sum",o.sum)),o.month&&u("month",o.month.field),o.before&&u("before",o.before.field),o.sort.forEach((p,h)=>u(Array.isArray(e.sort)?`sort/${h}`:"sort",p.field,a.has(p.field)));for(const p of o.running)u(`running/${p.field}`,p.field,a.has(p.field));return l}function RA(e,t,n){if(!Array.isArray(e))return[{path:"/extensions",message:"extensions is a list of {id, version, components?}"}];const r=[],o=new Set;return e.forEach((i,s)=>{const a=`/extensions/${s}`;if(!Ie(i))return void r.push({path:a,message:"an extension is {id, version, components?}"});const l=typeof i.id=="string"&&i.id?i.id:null;l||r.push({path:`${a}/id`,message:"id is a required string"});const c=typeof i.version=="string"&&Uc.test(i.version)?i.version:null;c||r.push({path:`${a}/version`,message:"version is MAJOR.MINOR.PATCH"});const u=i.components===void 0?[]:Array.isArray(i.components)&&i.components.every(p=>typeof p=="string"&&p)?i.components:null;if(u||r.push({path:`${a}/components`,message:"components is a list of component names"}),!l)return;if(o.has(l))return void r.push({path:`${a}/id`,message:`duplicate extension ${l}`});o.add(l);const d=n?.find(p=>p.id===l);if(!t.includes(l)||n&&!d)return void r.push({path:`${a}/id`,message:`extension ${l} is not available on this host`});d&&(c&&d.version!==void 0&&!EA(d.version,c)&&r.push({path:`${a}/version`,message:`extension ${l} ${d.version} does not satisfy ^${c}`}),d.components&&(u??[]).forEach((p,h)=>{d.components.includes(p)||r.push({path:`${a}/components/${h}`,message:`extension ${l} has no component ${p}`})}))}),r}function tl(e,t){if(e===void 0)return!0;const n=Qt(t);if(!n)return!1;const r=`${n.scheme}:${n.name}`;return e.some(o=>ha(o,r)||ha(o,t))}function FA(e,t,n,r,o={}){const i=e.templates[t];if(!i)return null;const s=xy(i.components)?{...i,...$y(i.components,i.bindings??[],e.records,o)}:i,a=vu,l=[{version:a,createSurface:{surfaceId:n,catalogId:e.catalogId}},{version:a,updateComponents:{surfaceId:n,components:s.components}}],c=zA(s.data,r);c!==void 0&&l.push({version:a,updateDataModel:{surfaceId:n,path:"/",value:c}});const u=Ie(c)?c.params:void 0;for(const d of s.bindings??[])l.push({version:a,bindDataModel:{surfaceId:n,path:d.path,source:ZC(d.source,u)}});return l}function zA(e,t){return t===void 0?e:Ie(e)&&Ie(t)?{...e,...t}:t}function NA(e){const t=[];if(!Ie(e.templates))return t;const n=Array.isArray(e.functions)?e.functions.filter(o=>typeof o=="string"):[],r=o=>n.some(i=>ha(i,o));for(const[o,i]of Object.entries(e.templates))!Ie(i)||!Array.isArray(i.components)||i.components.forEach((s,a)=>{if(!Ie(s)||s.component!=="RecordForm"&&s.component!=="RecordTable")return;const l=`/templates/${o}/components/${a}`,c=s.component==="RecordForm"?s.readOnly!==!0:s.editable!==!1;c&&!r("records.upsert")&&t.push({path:l,message:`${s.component} writes with records.upsert: list it in functions`}),s.component==="RecordTable"&&c&&!r("records.delete")&&t.push({path:l,message:"RecordTable deletes with records.delete: list it in functions"}),s.component==="RecordTable"&&typeof s.kind=="string"&&Array.isArray(e.sources)&&!tl(e.sources,`records:${s.kind}`)&&t.push({path:l,message:`RecordTable reads records:${s.kind}: list it in sources`})});return t}const Ns=e=>!!e&&typeof e=="object"&&!Array.isArray(e);class LA{extensionIds;surfaces=new Map;packages=new Map;extensions;constructor(t={}){this.extensionIds=[...t.extensionIds??[]],this.extensions=t.extensions?[...t.extensions]:void 0}get supportedCatalogIds(){return nd(this.extensionIds)}registerExtension(t,n){this.extensionIds.includes(t)||this.extensionIds.push(t),this.extensions&&!this.extensions.some(r=>r.id===t)&&this.extensions.push(n??{id:t})}installPackage(t){const n=PA(t,this.supportedCatalogIds,this.extensions);return n.length||this.packages.set(t.id,t),n}package(t){return this.packages.get(t)}surface(t){return this.surfaces.get(t)}surfaceIds(){return[...this.surfaces.keys()]}route(t){if(jA(t))return[this.invalid(Ns(t)?Ll(t):"",$n.messageBytes)];if(!Ns(t))return[this.invalid("","a message is a JSON object")];if(t.version!==void 0&&t.version!==vu)return[this.invalid(Ll(t),`unsupported version ${String(t.version)}`)];const n=Object.keys(t).filter(s=>s!=="version");if(n.length!==1||!Tp.includes(n[0]))return[this.invalid(Ll(t),`expected exactly one of ${Tp.join(", ")}`)];const r=n[0],o=t[r];if(!Ns(o)||typeof o.surfaceId!="string"||!o.surfaceId)return[this.invalid("",`${r}.surfaceId is required`)];const i=o.surfaceId;switch(r){case"createSurface":{if(typeof o.catalogId!="string")return[this.invalid(i,"createSurface.catalogId is required")];if(!this.supportedCatalogIds.includes(o.catalogId))return[{op:"send",message:Ft("UNSUPPORTED_CATALOG",i,`catalog ${o.catalogId} is not supported`)}];this.surfaces.set(i,{surfaceId:i,catalogId:o.catalogId});const s={op:"create",surfaceId:i,catalogId:o.catalogId};return o.theme!==void 0&&(s.theme=o.theme),o.sendDataModel===!0&&(s.sendDataModel=!0),[s]}case"updateComponents":return Array.isArray(o.components)?this.surfaces.has(i)?[{op:"components",surfaceId:i,components:o.components}]:[this.missing(i)]:[this.invalid(i,"updateComponents.components is required")];case"updateDataModel":{if(!this.surfaces.has(i))return[this.missing(i)];if(o.path!==void 0&&typeof o.path!="string")return[this.invalid(i,"updateDataModel.path is a string")];const s=jl(o.path);return["value"in o?{op:"data",surfaceId:i,path:s,value:o.value}:{op:"data",surfaceId:i,path:s}]}case"deleteSurface":return this.surfaces.has(i)?(this.surfaces.delete(i),[{op:"delete",surfaceId:i}]):[this.missing(i)];case"bindDataModel":{const s=this.surfaces.get(i);if(!s)return[this.missing(i)];if(typeof o.path!="string"||typeof o.source!="string"||!Qt(o.source))return[this.invalid(i,"bindDataModel needs a path and a scheme:name source")];const a=s.packageId?this.packages.get(s.packageId):void 0;return a&&!tl(a.sources,o.source)?[{op:"send",message:Ft("SOURCE_DENIED",i,`source ${o.source} is not in package ${a.id}'s sources`,jl(o.path)||"/")}]:[{op:"bind",surfaceId:i,path:jl(o.path),source:a?Xu(o.source,a.queries):o.source}]}case"applyTemplate":{if(typeof o.templateId!="string")return[this.invalid(i,"applyTemplate.templateId is required")];const s=this.findPackage(o.templateId,typeof o.packageId=="string"?o.packageId:void 0);if(!s)return[{op:"send",message:Ft("TEMPLATE_NOT_FOUND",i,`no installed package has the template ${o.templateId}`)}];const a=[];for(const l of FA(s,o.templateId,i,o.data)??[]){a.push(...this.route(l));const c=this.surfaces.get(i);c&&(c.packageId=s.id)}return a}}return[this.invalid(i,"unknown message")]}findPackage(t,n){if(n!==void 0){const r=this.packages.get(n);return r&&r.templates[t]?r:void 0}for(const r of this.packages.values())if(r.templates[t])return r}invalid(t,n){return{op:"send",message:Ft("INVALID_MESSAGE",t,n)}}missing(t){return{op:"send",message:Ft("SURFACE_NOT_FOUND",t,`no surface ${t}; send createSurface first`)}}}function jA(e){let t;try{t=JSON.stringify(e)}catch{return!1}return t===void 0||t.length*3<=Rr?!1:t.length>Rr||new TextEncoder().encode(t).length>Rr}function Ll(e){for(const t of Object.values(e))if(Ns(t)&&typeof t.surfaceId=="string")return t.surfaceId;return""}function jl(e){return e===void 0||e==="/"?"":e}class BA extends Error{constructor(t,n){super(`exponential-ui: package ${t} is unusable: ${n.map(r=>`${r.path||"/"} ${r.message}`).join("; ")}`),this.packageId=t,this.issues=n,this.name="PackageError"}packageId;issues}const hf=100;function WA(e){if(typeof e=="string")return Ii.includes(e)?{theme:wo(e),issues:[]}:{theme:null,issues:[`unknown built-in theme "${e}"; known: ${Ii.join("|")}`]};const{theme:t,issues:n}=Vu(e,{themes:Ei});return{theme:t,issues:n.map(r=>r.path?`${r.path}: ${r.message}`:r.message)}}class HA{constructor(t,n,r){this.extensions=r,this.surfaceId=t,this.catalogId=n}extensions;surfaceId;catalogId;packageId;sendDataModel=!1;list=[];shared=!1;positions=new Map;data={};theme;reduced=null;listeners=new Set;version=0;get components(){return this.shared=!0,this.list}component(t){const n=this.positions.get(t);return n===void 0?void 0:this.list[n]}get root(){return this.reduce().root}get issues(){return this.reduce().issues}get templates(){return this.reduce().templates}reduce(){return this.reduced||(this.reduced=this.list.length?qu(this.list,{catalogId:this.catalogId,extensions:this.extensions()}):{root:null,issues:[]}),this.reduced}setComponents(t){this.shared&&(this.list=this.list.slice(),this.shared=!1);for(const n of t){const r=this.positions.get(n.id);r===void 0?(this.positions.set(n.id,this.list.length),this.list.push(n)):this.list[r]=n}this.reduced=null,this.notify()}invalidate(){this.reduced=null,this.notify()}setData(t,n){const r=Iu(this.data,t,n);if(r.error)return r.error;this.data=r.data,this.notify()}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.version+=1;for(const t of[...this.listeners])t()}}class qA{constructor(t={}){this.options=t,this.extensions=[...t.extensions??[]],this.router=new LA({extensionIds:this.extensions.map(n=>n.id),extensions:ff(this.extensions)}),this.functions={...t.functions??{}},this.sources={...t.sources??{}};for(const n of t.packages??[]){const r=this.installPackage(n);if(r.length)throw new BA(typeof n?.id=="string"&&n.id?n.id:"?",r)}}options;router;stores=new Map;subscriptions=new Map;paintErrors=new Map;listeners=new Set;functions;sources;extensions;status="closed";statusDetail;unsupportedCatalog;issues=[];get hasTransport(){return this.options.transport!==void 0}get supportedCatalogIds(){return this.router.supportedCatalogIds}clientCapabilities(){return TA(this.extensions.map(t=>t.id))}get extensionDefs(){return this.extensions}registerExtension(t){if(!this.extensions.some(n=>n.id===t.id)){this.extensions.push(t),this.router.registerExtension(t.id,ff([t])[0]);for(const n of this.stores.values())n.invalidate()}}registerFunction(t,n){this.functions[t]=n}registerSource(t,n){this.sources[t.toLowerCase()]=n}installPackage(t){const n=this.router.installPackage(t),r=typeof t?.id=="string"?t.id:void 0;for(const o of n)this.report({code:"PACKAGE_INVALID",message:o.message,path:o.path,...r?{packageId:r}:{}});return n}report(t){const n=[...this.issues,t];this.issues=n.length>hf?n.slice(n.length-hf):n,this.options.onIssue?.(t),this.notify()}surface(t){return this.stores.get(t)}surfaceIds(){return[...this.stores.keys()]}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){for(const t of[...this.listeners])t()}connect(){const t=this.options.transport;t&&t.start(n=>this.receive(n),(n,r)=>{this.status=n,this.statusDetail=r,this.notify()})}close(){this.options.transport?.close();for(const t of this.surfaceIds())this.perform({op:"delete",surfaceId:t})}receive(t){const n=this.router.route(t);for(const r of n)this.perform(r);return n}send(t){if(this.options.transport?.send(t),this.options.onSend?.(t),"error"in t){const n=t.error;this.report({code:n.code,message:n.message,...n.surfaceId?{surfaceId:n.surfaceId}:{},...n.path!==void 0?{path:n.path}:{}})}}perform(t){switch(this.options.onOp?.(t),t.op){case"create":{this.unbind(t.surfaceId),this.forgetPaintErrors(t.surfaceId);const n=new HA(t.surfaceId,t.catalogId,()=>this.extensions);if(n.sendDataModel=t.sendDataModel===!0,n.packageId=this.router.surface(t.surfaceId)?.packageId,t.theme!==void 0&&t.theme!==null){const{theme:r,issues:o}=WA(t.theme);r?n.theme=r:this.send(Ft("VALIDATION_FAILED",t.surfaceId,`createSurface.theme is unusable: ${o.join("; ")}`,"/createSurface/theme"))}this.stores.set(t.surfaceId,n),this.notify();return}case"components":{const n=this.paintErrors.get(t.surfaceId);if(n)for(const r of t.components)n.delete(r.id);this.stores.get(t.surfaceId)?.setComponents(t.components);return}case"data":{const n=this.stores.get(t.surfaceId)?.setData(t.path,t.value);n&&this.send(Ft("VALIDATION_FAILED",t.surfaceId,n,t.path||"/"));return}case"bind":{const n=this.stores.get(t.surfaceId),r=Qt(t.source),o=r?this.sources[r.scheme]:void 0;if(!n||!r)return;if(!o){this.send(Ft("VALIDATION_FAILED",t.surfaceId,`no resolver for the source scheme ${r.scheme}`,t.path||"/"));return}const i=this.subscriptions.get(t.surfaceId)??[];for(const l of i)l.path===t.path&&l.cancel();const s=i.filter(l=>l.path!==t.path),a=o(r,l=>this.stores.get(t.surfaceId)?.setData(t.path,l));this.subscriptions.set(t.surfaceId,a?[...s,{path:t.path,cancel:a}]:s);return}case"delete":this.unbind(t.surfaceId),this.forgetPaintErrors(t.surfaceId),this.stores.delete(t.surfaceId),this.notify();return;case"send":{const n="error"in t.message?t.message.error:void 0;n?.code==="UNSUPPORTED_CATALOG"&&(this.unsupportedCatalog=n.message.replace(/^catalog (\S+).*$/,"$1"),this.notify()),this.send(t.message);return}}}unbind(t){for(const n of this.subscriptions.get(t)??[])n.cancel();this.subscriptions.delete(t)}action(t){const n=B2({name:t.name,surfaceId:t.surfaceId,sourceComponentId:t.componentId,timestamp:t.timestamp??new Date().toISOString(),context:t.context??{},payload:t.payload});return this.send(n),n}decide(t,n){const r=Object.prototype.hasOwnProperty.call(this.functions,n);let o=Mp(this.options.policy?.functions,n,r);const i=this.stores.get(t)?.packageId,s=i?this.router.package(i):void 0;return s&&(o=H2(o,Mp(q2(s.functions),n,r))),o}async callFunction(t){if(t.name==="openUrl"){const o=typeof t.args.url=="string"?t.args.url:"";return{decision:this.openUrl(o)?"allow":"deny"}}if(t.name==="bind")return{decision:this.bind(t.surfaceId,t.args)?"allow":"deny"};if(t.name===So)return this.navigate(t);const n=el(t.name);if(n!==null)return this.runPackageAction(t,n);const r=await this.gate(t);return r.decision!=="allow"?r:this.run(t)}async gate(t){if(t.name===So)return{decision:"allow"};let n=this.decide(t.surfaceId,t.name);if(n==="not_found")return this.send(Ft("FUNCTION_NOT_FOUND",t.surfaceId,`no function ${t.name}`)),{decision:n};let r;if(n==="ask"){let o=!1;try{o=await this.options.policy?.onFunctionCall?.(t)===!0}catch(i){r=i instanceof Error?i.message:String(i)}o||(n="deny")}return n==="deny"?(this.send(Ft("FUNCTION_DENIED",t.surfaceId,r===void 0?`${t.name} was not allowed`:`${t.name} was not allowed: the consent hook failed: ${r}`)),r===void 0?{decision:n}:{decision:n,error:r}):{decision:"allow"}}async run(t){if(t.name===So)return this.navigate(t);const n=Object.prototype.hasOwnProperty.call(this.functions,t.name)?this.functions[t.name]:void 0;if(!n)return{decision:"allow"};try{return{decision:"allow",result:await n(t.args,t)}}catch(r){return{decision:"allow",error:r instanceof Error?r.message:String(r)}}}async runPackageAction(t,n){const r=this.stores.get(t.surfaceId),o=r?.packageId?this.router.package(r.packageId):void 0,i=u=>(this.send(Ft("ACTION_FAILED",t.surfaceId,u)),this.options.onActionFailed?.({surfaceId:t.surfaceId,action:n,message:u}),{decision:"allow",error:u});if(!r||!o)return i(`no action ${n}`);const s=my(o,n,t.args,{data:r.data,me:this.options.me??null,now:this.options.now?.(),offset:this.options.zone});if("error"in s)return i(s.error);const a=s.plan,l=a.calls.map(u=>({surfaceId:t.surfaceId,componentId:t.componentId,name:u.name,args:u.args}));for(const u of l){const d=await this.gate(u);if(d.decision!=="allow")return i(d.error??`${u.name} was not allowed`)}let c={ids:[]};if(a.writes.length){const u=Object.prototype.hasOwnProperty.call(this.functions,zl)?this.functions[zl]:void 0;if(!u)return i("this host keeps no records");try{c=await u({writes:a.writes},{...t,name:zl,args:{writes:a.writes}})}catch(d){return i(d instanceof Error?d.message:String(d))}}for(const u of a.sets){const d=r.setData(u.path,u.value);d&&this.send(Ft("VALIDATION_FAILED",t.surfaceId,d,u.path||"/"))}for(const u of l){const d=await this.run(u);if(d.error!==void 0)return{decision:"allow",result:c,error:d.error}}return{decision:"allow",result:c}}navigate(t){const n=this.stores.get(t.surfaceId),r=n?.packageId?this.router.package(n.packageId):void 0,o=r?XC(r,t.args):{error:"navigate: the surface has no package"},i=a=>(this.send(Ft("FUNCTION_DENIED",t.surfaceId,a)),{decision:"deny",error:a});return"error"in o?i(o.error):this.options.navigate?this.options.navigate({surfaceId:t.surfaceId,packageId:r.id,screen:o.screen,params:o.params})===!1?i(`navigate: ${o.screen} was not opened`):{decision:"allow"}:i("navigate: this host has no screens")}bind(t,n){const r=typeof n.path=="string"?n.path:"",o=typeof n.source=="string"?n.source:"";if(!o||!this.stores.has(t))return!1;const i=n.params&&typeof n.params=="object"&&!Array.isArray(n.params)?n.params:void 0;return this.receive({version:vu,bindDataModel:{surfaceId:t,path:r,source:Ku(o,i)}}).some(a=>a.op==="bind")}urlPolicy(){return{baseUrl:this.options.policy?.media?.baseUrl,...this.options.policy?.urls}}openUrl(t){const n=ns(this.urlPolicy(),t);return!n.allowed||!n.url?!1:((this.options.policy?.openUrl??(o=>globalThis.window?.open(o,"_blank","noopener")))(n.url),!0)}textLinks(t){return this.options.policy?.textLinks?.(t)??null}paintError(t){const n=this.stores.get(t.surfaceId);let r=t.componentId;for(;n&&!n.component(r)&&r.includes(".");)r=r.slice(0,r.lastIndexOf("."));const o=n?.component(r);let i=this.paintErrors.get(t.surfaceId);i||this.paintErrors.set(t.surfaceId,i=new Map);let s=i.get(r);(!s||s.component!==o)&&i.set(r,s={component:o,ids:new Set}),!s.ids.has(t.componentId)&&(s.ids.add(t.componentId),this.send(Ft(L2,t.surfaceId,t.message,`/components/${t.componentId}`)))}forgetPaintErrors(t){this.paintErrors.delete(t)}mediaOptions(){return this.options.policy?.media}mediaRequest(t){return Ig(t,this.options.policy?.media)}}class ky{constructor(t){this.options=t}options;controller;generation=0;start(t,n){this.controller?.abort();const r=++this.generation;this.run(r,t,n)}async run(t,n,r){const o=this.options.fetch??fetch,i=()=>t===this.generation;for(;i();){const s=new AbortController;this.controller=s,r("connecting");let a=this.options.reconnectMs??2e3;try{const l=await o(this.options.url,{headers:{accept:this.accept(),...this.options.headers},signal:s.signal});if(!i())return;if(!l.ok||!l.body)throw new Error(`HTTP ${l.status}`);r("open");const c=l.body.getReader(),u=new TextDecoder,d=this.decoder();for(;;){const{done:h,value:f}=await c.read();if(!i())return;if(h)break;d.push(u.decode(f,{stream:!0})).messages.forEach(n)}if(d.end().messages.forEach(n),r("closed"),!(this.options.resumable===!0||d.retryMs!==void 0)){i()&&(this.generation+=1);return}d.retryMs!==void 0&&this.options.reconnectMs===void 0&&(a=d.retryMs)}catch(l){if(!i())return;r("error",l instanceof Error?l.message:String(l))}if(!a||!i())return;await new Promise(l=>setTimeout(l,a))}}async send(t){await(this.options.fetch??fetch)(this.options.postUrl??this.options.url,{method:"POST",headers:{"content-type":"application/json",...this.options.headers},body:JSON.stringify(t)})}close(){this.generation+=1,this.controller?.abort()}}class UA extends ky{decoder(){return new zg}accept(){return"application/jsonl, application/x-ndjson"}}class VA extends ky{decoder(){return new oS}accept(){return"text/event-stream"}}class KA{constructor(t){this.options=t}options;socket;generation=0;start(t,n){const r=++this.generation,o=()=>r===this.generation,i=this.options.WebSocket??WebSocket;n("connecting");const s=new i(this.options.url,this.options.protocols);this.socket=s,s.onopen=()=>o()&&n("open"),s.onmessage=a=>{o()&&typeof a.data=="string"&&Ng(a.data).messages.forEach(t)},s.onerror=()=>o()&&n("error","websocket error"),s.onclose=()=>{if(!o())return;n("closed");const a=this.options.reconnectMs??2e3;a&&setTimeout(()=>o()&&this.start(t,n),a)}}send(t){this.socket?.readyState===1&&this.socket.send(JSON.stringify(t))}close(){this.generation+=1,this.socket?.close()}}const GA="@layer xui-base, xui-recipe, xui-node, xui-part, xui-author;",YA=new Set(["flexGrow","flexShrink","opacity","fontWeight","aspectRatio","zIndex"]),Sy=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function XA(e){const t=tr(e);if(!t)return null;const{group:n,name:r}=t;return n==="type.family"?`--xui-font-${r}`:`--xui-${n.replace(/\./g,"-")}-${r}`}function Vr(e){const t=XA(e);return t?`var(${t})`:null}function ZA(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}const JA=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);function Cy(e,t){const n=t[e]?.fallback,r=JA.has(e)?e:ZA(e);return n?`${r}, ${n}`:r}function Ls(e,t,n={}){if(t==null||typeof t=="boolean")return null;if(typeof t=="string"&&t.startsWith("var(--xd-"))return t;if(typeof t=="string"&&t.startsWith("$")){const r=Vr(t);if(r)return r}return e==="boxShadow"?Array.isArray(t)?Ag(t):String(t):e==="fontFamily"?Cy(String(t),n):e==="gridTemplateAreas"&&Array.isArray(t)?t.map(r=>`"${r}"`).join(" "):e==="backgroundGradient"?QA(t):e==="transitionEasing"?Array.isArray(t)?_g(t):String(t):e==="transition"?typeof t=="number"?`${t}ms`:String(t):typeof t=="object"?null:typeof t=="number"?YA.has(e)?String(t):`${t}px`:(e==="overflow"||e==="overflowX"||e==="overflowY")&&t==="hidden"?"clip":String(t)}function QA(e){if(typeof e!="object"||e===null)return null;const t=e;if(!Array.isArray(t.stops)||t.stops.length<2)return null;const n=t.stops.map(r=>`${typeof r.color=="string"&&r.color.startsWith("$")?Vr(r.color)??r.color:String(r.color)} ${Math.round(Number(r.offset??0)*1e4)/100}%`);return`linear-gradient(${Number(t.angle??180)}deg, ${n.join(", ")})`}const e_={paddingHorizontal:["padding-left","padding-right"],paddingVertical:["padding-top","padding-bottom"],marginHorizontal:["margin-left","margin-right"],marginVertical:["margin-top","margin-bottom"],backgroundGradient:["background-image"],transition:["transition-property:all","transition-duration"],transitionEasing:["transition-timing-function"]},t_=["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"];function js(e,t={},n){const r=[],o="animation"in e?e.animation:n?.animation,i=typeof o=="string"&&c1(o)&&("animation"in e||"opacity"in e);for(const[s,a]of Object.entries(e)){if(s==="native"||s.startsWith("@")||s.startsWith(":")||typeof a=="object"&&a!==null&&!Array.isArray(a)&&s!=="backgroundGradient")continue;if(s==="backdropBlur"){const c=Ls(s,a,t);c&&r.push(["-webkit-backdrop-filter",`blur(${c})`],["backdrop-filter",`blur(${c})`]);continue}if(s==="animation"){r.push(...n_(a,e.animationDuration));continue}if(s==="animationDuration"){const c=typeof a=="string"?Vr(a):null;c&&!("animation"in e)&&r.push(["animation-duration",`calc(${c} * var(--xui-anim-factor, 1))`]);continue}const l=Ls(s,a,t);if(l!==null)for(const c of e_[s]??[Sy(s)]){const u=c.indexOf(":");u>0?r.push([c.slice(0,u),c.slice(u+1)]):r.push([c,l])}}if(i){const s=r.findIndex(([u])=>u==="opacity"),a="opacity"in e?e:n&&"opacity"in n?n:null,l=s>=0?r[s][1]:a?Ls("opacity",a.opacity,t):null,c=l===null?"var(--xui-a-opacity, 1)":`calc(${l} * var(--xui-a-opacity, 1))`;s>=0?r[s]=["opacity",c]:r.push(["opacity",c])}return!("borderStyle"in e)&&t_.some(s=>s in e)&&r.push(["border-style","solid"]),r}function n_(e,t){const n=typeof e=="string"?es[e]:void 0;if(!n)return[["animation-name","none"]];const r=typeof t=="string"&&tr(t)?.group==="motion"?t:n.duration,o=n.easing==="linear"?"linear":Vr(n.easing)??"linear";return[["--xui-anim-factor",String(n.factor)],["animation-name",`xui-${e}`],["animation-duration",`calc(${Vr(r)??"0ms"} * ${n.factor})`],["animation-timing-function",o],["animation-iteration-count",n.iterations==="infinite"?"infinite":String(n.iterations)],["animation-fill-mode","both"]]}function Bs(e,t){if(t.animation!=="shimmer")return"";const n=es.shimmer?.band,r=(n&&Vr(n.color))??"var(--xui-color-background)",o=(n?.stops??[{offset:0,alpha:0},{offset:.5,alpha:.5},{offset:1,alpha:0}]).map(s=>`color-mix(in srgb, ${r} ${Math.round(s.alpha*100)}%, transparent) calc(var(--xui-band, 1) * 100% + ${Math.round(s.offset*100)}%)`);return`${e.split(",").map(s=>`${s}::after`).join(",")}{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background-image:linear-gradient(90deg, ${o.join(", ")})}`}const _r=(e,t)=>t.length===0?"":`${e}{${t.map(([n,r])=>`${n}:${r}`).join(";")}}`,r_={hover:[":hover",'[data-xs~="hover"]'],pressed:[":active",'[data-xs~="pressed"]'],focus:[":focus-visible:not([data-xui-quiet-focus])",'[data-xs~="focus"]'],disabled:[":disabled","[data-disabled]",'[aria-disabled="true"]','[data-xs~="disabled"]'],checked:['[data-state="checked"]','[data-xs~="checked"]'],open:['[data-state="open"]','[data-xs~="open"]'],selected:['[data-state="active"]','[data-state="on"]',"[data-highlighted]",'[data-xs~="selected"]'],invalid:['[aria-invalid="true"]','[data-xs~="invalid"]'],dragover:["[data-dragover]",'[data-xs~="dragover"]']};function o_(e){let t=[""];for(const n of e){const r=r_[n]??[`[data-xs~="${n}"]`];t=t.flatMap(o=>r.map(i=>o+i))}return t}const zi=(e,t)=>`data-${e?"m":"r"}-${Sy(t)}`;function i_(e,t){if(!e)return[""];let n=[""];for(const[r,o]of Object.entries(e)){if(r==="state")continue;const i=Array.isArray(o)?o:[o];n=n.flatMap(s=>i.map(a=>`${s}[${zi(t,r)}="${String(a)}"]`))}return n}function s_(e,t,n=!1){const r=t.when?.state===void 0?[]:Array.isArray(t.when.state)?t.when.state.map(String):[String(t.when.state)],o=i_(t.when,n),i=o_(r);return o.flatMap(s=>i.map(a=>`${e}${s}${a}`))}function a_(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function l_(e){return`xui-t-${e.id.replace(/[^a-z0-9-]/gi,"-")}-${a_(JSON.stringify(e))}`}const c_=[["--background","background"],["--foreground","foreground"],["--card","card"],["--card-foreground","cardForeground"],["--popover","popover"],["--popover-foreground","popoverForeground"],["--primary","primary"],["--primary-foreground","primaryForeground"],["--secondary","secondary"],["--secondary-foreground","secondaryForeground"],["--muted","muted"],["--muted-foreground","mutedForeground"],["--accent","accent"],["--accent-foreground","accentForeground"],["--destructive","destructive"],["--destructive-foreground","destructiveForeground"],["--success","success"],["--success-foreground","successForeground"],["--warning","warning"],["--warning-foreground","warningForeground"],["--info","info"],["--info-foreground","infoForeground"],["--border","border"],["--input","input"],["--ring","ring"],["--chart-1","chart1"],["--chart-2","chart2"],["--chart-3","chart3"],["--chart-4","chart4"],["--chart-5","chart5"],["--chart-6","chart6"],["--chart-7","chart7"],["--chart-8","chart8"],["--sidebar","background"],["--sidebar-foreground","foreground"],["--sidebar-primary","primary"],["--sidebar-primary-foreground","primaryForeground"],["--sidebar-accent","accent"],["--sidebar-accent-foreground","accentForeground"],["--sidebar-border","border"],["--sidebar-ring","ring"],["--glass-fill-section","muted"],["--glass-fill-row","muted"],["--glass-fill-card","card"],["--glass-fill-panel","popover"],["--glass-fill-active","accent"],["--glass-stroke-row","border"],["--glass-stroke-section","border"],["--glass-stroke-card","border"],["--glass-stroke-strong","input"],["--glass-stroke-active","ring"],["--glass-background-top","background"],["--glass-background-bottom","background"]];function u_(e){const t=[],n=e.tokens;for(const r of["spacing","radius","control","opacity","border","motion"])for(const[o,i]of Object.entries(n[r]??{})){const s=r==="opacity"?"":r==="motion"?"ms":"px";t.push([`--xui-${r}-${o}`,`${i}${s}`])}for(const[r,o]of Object.entries(e.tokens.blur??{}))t.push([`--xui-blur-${r}`,`${o}px`]);for(const[r,o]of Object.entries(e.tokens.scale??{}))t.push([`--xui-scale-${r}`,String(o)]);for(const[r,o]of Object.entries(e.tokens.ease??{}))t.push([`--xui-ease-${r}`,_g(o)]);for(const[r,o]of Object.entries(e.tokens.breakpoint??{}))t.push([`--xui-breakpoint-${r}`,`${o}px`]);for(const[r,o]of Object.entries(e.tokens.type.size))t.push([`--xui-type-size-${r}`,`${o}px`]);for(const[r,o]of Object.entries(e.tokens.type.lineHeight))t.push([`--xui-type-lineHeight-${r}`,`${o}px`]);for(const[r,o]of Object.entries(e.tokens.type.weight))t.push([`--xui-type-weight-${r}`,String(o)]);for(const[r,o]of Object.entries(e.tokens.type.family))t.push([`--xui-font-${r}`,Cy(o,e.fonts)]);return t.push(["--radius","var(--xui-radius-lg)"],["--font-sans","var(--xui-font-sans)"],["--font-mono","var(--xui-font-mono)"]),t.push(["--xui-duration-fast","var(--xui-motion-fast)"],["--xui-duration-standard","var(--xui-motion-standard)"]),t.map(([r,o])=>`${r}:${o}`).join(";")}function mf(e,t){const n=[];for(const[r,o]of Object.entries(e.modes[t].color))n.push([`--xui-color-${r}`,o]);for(const[r,o]of Object.entries(e.modes[t].shadow))n.push([`--xui-shadow-${r}`,Ag(o)]);for(const[r,o]of c_)n.push([r,`var(--xui-color-${o})`]);return n.push(["color-scheme",t]),n.map(([r,o])=>`${r}:${o}`).join(";")}const d_=new Set(Object.entries(Lt.components).filter(([,e])=>e.kind==="macro").map(([e])=>e));function Ay(e,t=new Set){return d_.has(e)||t.has(e)}const Kr=(e,t)=>`xui-${e}-${t}`;function gf(e,t={}){const n=l_(e),r=`.xui-surface.${n}`,o=[GA];o.push(`${r}{${u_(e)}}`),o.push(`${r}[data-xui-mode="light"]{${mf(e,"light")}}`),o.push(`${r}[data-xui-mode="dark"]{${mf(e,"dark")}}`);const i=[],s=[];for(const[a,l]of Object.entries(e.recipes)){const c=Ay(a,t.extensionMacros),u=c?s:i;for(const[d,p]of Object.entries(l)){const h=`.${n}.${Kr(a,d)}`;for(const f of p){const y=js(f.style,e.fonts);if(y.length===0)continue;const g=s_(h,f,c).join(",");u.push(_r(g,y)+Bs(g,f.style))}}}return o.push(`@layer xui-recipe{${i.join("")}}`),o.push(`@layer xui-part{${s.join("")}}`),{scope:n,css:o.join(`
25
25
  `),theme:e}}const yf=new WeakMap;function p_(e,t){if(t?.extensionMacros&&t.extensionMacros.size>0)return gf(e,t);let n=yf.get(e);return n||(n=gf(e),yf.set(e,n)),n}function rs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.path=="string"&&Object.keys(e).length===1}function rd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.call=="string"}function Ko(e,t=""){return e.startsWith("/")?e:t?e===""?t:`${t}/${e}`:`/${e}`}const os=Ua;function Gr(e,t,n){return Iu(e,t,n).data}const va="/$xuiRows";function f_(e){return e===void 0||e===va||e.startsWith(`${va}/`)?void 0:e}const ti=e=>typeof e=="number"?e:Number(e);function h_(e,t){return e.replace(/\$\{([^}]+)\}/g,(n,r)=>Eo(os(t.data,Ko(r.trim(),t.scope))))}function _y(e,t=4096){const n=new Map,r=(i,s)=>{const a=n.get(i);if(a!==void 0)return a;const l=s();return n.size>=t&&n.clear(),n.set(i,l),l},o=i=>i instanceof Date?`t${i.getTime()}`:typeof i=="string"?`s${i}`:`${typeof i}${String(i)}`;return{locale:e.locale,number:(i,s)=>r(`n|${i}|${s?.decimals}|${s?.grouping}`,()=>e.number(i,s)),currency:(i,s,a)=>r(`c|${s}|${i}|${a?.decimals}|${a?.grouping}`,()=>e.currency(i,s,a)),percent:(i,s)=>r(`p|${i}|${s?.decimals}`,()=>e.percent(i,s)),date:(i,s)=>r(`d|${s?.format}|${s?.style}|${s?.time}|${o(i)}`,()=>e.date(i,s)),relativeTime:(i,s)=>e.relativeTime(i,s),plural:i=>r(`l|${i}`,()=>e.plural(i)),...e.offsetMinutes?{offsetMinutes:i=>e.offsetMinutes(i)}:{}}}const bf=new Map;function Oy(e){if(e.formatter)return e.formatter;const t=e.locale??og;let n=bf.get(t);return n||bf.set(t,n=_y(ym(t,"UTC"))),n}const vf=new WeakMap;function m_(e){return(t,n)=>{const r=Oy(n);let o=vf.get(r);return(!o||o.now!==n.now)&&vf.set(r,o={now:n.now,table:vm(r,n.now)}),o.table[e](t)}}const g_=Object.fromEntries(bm.map(e=>[e,m_(e)])),y_=Object.fromEntries(Object.entries(U$).map(([e,t])=>[e,n=>t(n)])),b_=Object.fromEntries(Au.map(e=>[e,(t,n)=>{const r=Oy(n);return Em(e,t,{...n.now?{now:n.now()}:{},...r.offsetMinutes?{offset:o=>r.offsetMinutes(o)}:{}})?.value}])),Ty={required:({value:e})=>On(e)&&!(Array.isArray(e)&&e.length===0),regex:({value:e,pattern:t})=>{try{return new RegExp(String(t)).test(String(e??""))}catch{return!1}},length:({value:e,min:t,max:n})=>{const r=String(e??"").length;return(t===void 0||r>=ti(t))&&(n===void 0||r<=ti(n))},numeric:({value:e,min:t,max:n})=>{const r=ti(e);return Number.isFinite(r)&&(t===void 0||r>=ti(t))&&(n===void 0||r<=ti(n))},email:({value:e})=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(e??"")),formatString:({value:e},t)=>h_(String(e??""),t),openUrl:({url:e},t)=>{typeof e=="string"&&t.openUrl?.(e)},and:({values:e})=>Array.isArray(e)?e.every(On):!1,or:({values:e})=>Array.isArray(e)?e.some(On):!1,not:({value:e})=>!On(e),...y_,...g_,...b_};function vn(e,t){if(rs(e))return os(t.data,Ko(e.path,t.scope));if(rd(e)){const n=t.functions?.[e.call]??Ty[e.call];if(!n)return;const r={};for(const[o,i]of Object.entries(e.args??{}))r[o]=vn(i,t);return n(r,t)}if(typeof e=="string")return t.strings&&e.startsWith("$string.")?$$(e,t.strings):e;if(Array.isArray(e))return e.map(n=>vn(n,t));if(typeof e=="object"&&e!==null){const n={};for(const[r,o]of Object.entries(e))n[r]=vn(o,t);return n}return e}function v_(e){return Ki(e)}const $_=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Vc(e,t,n,r){if(rs(e)||rd(e))return vn(e,n);if(Pu(t))return e;if(t?.type==="array"&&t.items&&Array.isArray(e))return e.map(i=>Vc(i,t.items,n,r));const o=t?.type==="object"&&t.shape?r[t.shape]:void 0;if(o&&$_(e)){const i={};for(const[s,a]of Object.entries(e))i[s]=Vc(a,o.properties[s],n,r);return i}return vn(e,n)}function x_(e,t,n,r){const o=v_(r),i=o.components[e],s={};for(const[a,l]of Object.entries(t)){const c=Vc(l,i?.props[a],n,o.defs);c!==void 0&&(s[a]=c)}return s}function Ni(e,t,n=""){const r=e[t];return rs(r)?Ko(r.path,n):void 0}function w_(e,t){return e===void 0?!0:On(vn(e,t))}function Kc(e){return rs(e)||rd(e)?!0:Array.isArray(e)?e.some(Kc):typeof e=="object"&&e!==null?Object.values(e).some(Kc):!1}function k_(e,t){if(!e||typeof e!="object")return null;const n={};for(const[r,o]of Object.entries(vn(e,t)))o!==void 0&&(n[r]=o);return Object.keys(n).length?n:null}function S_(e){const t={};if(!e)return t;const n=e.role;n==="hidden"?t["aria-hidden"]="true":typeof n=="string"&&n!=="text"&&n!==""&&(t.role=n),e.label!==void 0&&e.label!==null&&e.label!==""&&(t["aria-label"]=String(e.label)),e.description!==void 0&&e.description!==null&&e.description!==""&&(t["aria-description"]=String(e.description)),(typeof e.level=="number"||typeof e.level=="string"&&e.level!=="")&&(t["aria-level"]=String(e.level));for(const[r,o]of[["expanded","aria-expanded"],["selected","aria-selected"],["pressed","aria-pressed"],["checked","aria-checked"]]){const i=e[r];(typeof i=="boolean"||i==="mixed")&&(t[o]=String(i))}e.current!==void 0&&e.current!==null&&e.current!==!1&&e.current!==""&&(t["aria-current"]=e.current===!0?"true":String(e.current));for(const[r,o]of[["valueNow","aria-valuenow"],["valueMin","aria-valuemin"],["valueMax","aria-valuemax"]]){const i=e[r];typeof i=="number"&&Number.isFinite(i)&&(t[o]=String(i))}return e.hidden===!0&&(t["aria-hidden"]="true"),e.autoFocus===!0&&(t["data-xui-autofocus"]=""),t}const nl=e=>`xui-n-${od(e)}`,Gc=e=>`xui-s-${od(e)}`;function od(e){return e.replace(/[^a-zA-Z0-9_-]/g,t=>`_${t.charCodeAt(0).toString(16)}_`)}function*$a(e){yield e;for(const t of Object.values(e.slots??{}))yield*$a(t);for(const t of e.children)yield*$a(t)}function My(e){const t=[];if(!e)return t;const n=(r,o)=>{for(const[i,s]of Object.entries(o))i.startsWith("@")||i.startsWith(":")||Kc(s)&&t.push({name:`--xd-${t.length}`,block:r,key:i,value:s})};n("",e);for(const[r,o]of Object.entries(e))(r.startsWith("@")||r.startsWith(":"))&&typeof o=="object"&&o!==null&&n(r,o);return t}function xa(e){return od(e.replace(/^@media \(|\)$/g,"").replace(/: /,"-"))}function Ey(e,t){const n=ku(e);if(!n)return null;if(n.feature==="orientation"||n.feature==="form-factor"||n.feature==="hover"||n.feature==="prefers-reduced-motion")return e;const r=Xc(n.value,t);return r===null?null:`@media (${n.feature}: ${r}px)`}const Yc=e=>e==="ltr"||e==="rtl";function C_(e,t,n){if(!e)return;let r=Yc(e.direction)?e.direction:void 0;for(const[o,i]of Object.entries(e)){if(!o.startsWith("@")||typeof i!="object"||i===null)continue;const s=i.direction;if(!Yc(s))continue;const a=Ey(o,t);a&&n(a)&&(r=s)}return r}function Xc(e,t){const n=tr(e);if(n){if(n.group!=="breakpoint")return null;const o=t?.tokens.breakpoint?.[n.name];return typeof o=="number"?o:null}const r=parseFloat(e);return Number.isFinite(r)?r:null}const Iy="\0";function Py(e){const t=[],n=[];for(const r of e){const o=r.indexOf(Iy);o<0?t.push(r):(t.push(r.slice(0,o)),n.push(r.slice(o+1)))}return`@layer xui-node{${t.join("")}}${n.length?`@layer xui-author{${n.join("")}}`:""}`}const $f=new WeakMap;function A_(e,t,n,r,o){const i=$f.get(e);if(i&&i.scope===n&&i.theme===r&&i.fonts===o)return i.chunk;const s=new Set,a=My(t),l=(f,y)=>{const g=a.filter(m=>m.block===f&&m.key in y);if(g.length===0)return y;const v={...y};for(const m of g)v[m.key]=`var(${m.name})`;return v},c=nl(e.id),u=l("",t);let d=xf(t,u,l,n,c,r,o,s);const p=e.recipe?.authored;if(p?.length){const f={};for(const g of p)g in t&&(f[g]=t[g]);const y=xf(f,u,l,n,c,r,o,s);y&&(d+=Iy+y)}const h={css:d,queries:[...s]};return $f.set(e,{scope:n,theme:r,fonts:o,chunk:h}),h}function xf(e,t,n,r,o,i,s,a){const l=`${r} .${o}`,c=[],u=js(n("",e),s,t);u.length&&c.push(_r(l,u)+Bs(l,e));for(const[p,h]of Object.entries(e)){if(!p.startsWith("@")||typeof h!="object"||h===null)continue;const f=js(n(p,h),s,t);if(f.length===0)continue;const y=ku(p);if(!y)continue;if(Yc(h.direction)){const v=Ey(p,i);v&&a.add(v)}const g=v=>Bs(v,h);switch(y.feature){case"min-width":case"max-width":{const m=Xc(y.value,i);if(m===null)break;const b=y.feature==="min-width"?">=":"<";c.push(`@container xui (width ${b} ${m}px){${_r(l,f)}${g(l)}}`);break}case"min-height":case"max-height":{const m=Xc(y.value,i);if(m===null)break;const b=`@media (${y.feature}: ${m}px)`;a.add(b);const x=`${r}:where([data-xq~="${xa(b)}"]) .${o}`;c.push(_r(x,f)+g(x));break}case"orientation":case"form-factor":a.add(p);const v=`${r}:where([data-xq~="${xa(p)}"]) .${o}`;c.push(_r(v,f)+g(v));break;case"hover":case"prefers-reduced-motion":c.push(`@media (${y.feature}: ${y.value}){${_r(l,f)}${g(l)}}`);break}}const d=[[":hover",`${l}:hover,${l}[data-xs~="hover"]`],[":focus-visible",`${l}:focus-visible,${l}[data-xs~="focus-visible"]`],[":pressed",`${l}:active,${l}[data-xs~="pressed"]`]];for(const[p,h]of d){const f=e[p];if(typeof f!="object"||f===null)continue;const y=js(n(p,f),s,t);y.length&&c.push(_r(h,y)+Bs(h,f))}return c.join("")}function __(e,t,n,r=n?.fonts??{}){const o=`.${Gc(t)}`,i=new Map,s=new Set,a=new Set;for(const l of e)for(const c of $a(l)){const u=c.style;if(!u||a.has(c.id))continue;a.add(c.id);const d=A_(c,u,o,n,r);d.css&&i.set(c.id,d.css);for(const p of d.queries)s.add(p)}return{css:Py(i.values()),queries:[...s],chunks:i}}const Bl=e=>({chunks:e,css:Py(e.values())});function O_(e,t){const n=[],r=new Set;for(const i of e){let s=!1;for(const[l,c]of i.chunks)r.add(l),t.get(l)!==c&&(s=!0);if(!s){n.push(i);continue}const a=new Map;for(const l of i.chunks.keys()){const c=t.get(l);c!==void 0&&a.set(l,c)}a.size&&n.push(Bl(a))}const o=new Map;for(const[i,s]of t)r.has(i)||o.set(i,s);for(o.size&&n.push(Bl(o));n.length>1&&n[n.length-1].chunks.size>=n[n.length-2].chunks.size;){const i=n.pop(),s=n.pop();n.push(Bl(new Map([...s.chunks,...i.chunks])))}return n}const Qe=on.qrScanner;function T_(e,t,n,r){const o=K1(e,t),i=Mi(n),s=Mi(r),a=i!==null&&s!==null&&mp(i)<mp(s),l=a?r:n,c=a?n:r;if(!o)return{matrix:null,modules:0,path:"",plate:l,module:c};const u=R1.quietZone;let d="";return o.rows.forEach((p,h)=>{let f=0;for(;f<p.length;){if(p[f]!=="1"){f+=1;continue}let y=f;for(;y<p.length&&p[y]==="1";)y+=1;d+=`M${f+u} ${h+u}h${y-f}v1h${f-y}z`,f=y}}),{matrix:o,modules:o.size+2*u,path:d,plate:l,module:c}}function M_(e){let t=null;return n=>{typeof n!="string"||n===""||n===t||(t=n,e(n))}}const E_=["tl","tr","bl","br"];function I_(e,t){const n=Qe.cornerLength,r=Qe.cornerStroke/2,o=Math.max(0,Math.min(n-r,(Number.isFinite(t)?t:0)-r)),i=c=>e==="tr"||e==="br"?n-c:c,s=c=>e==="bl"||e==="br"?n-c:c,a=e==="tl"||e==="br"?1:0,l=c=>Math.round(c*100)/100;return`M${l(i(r))} ${l(s(n))}V${l(s(r+o))}A${l(o)} ${l(o)} 0 0 ${a} ${l(i(r+o))} ${l(s(r))}H${l(i(n))}`}function P_(e){const t=Mi(e);return t?`rgba(${t.r}, ${t.g}, ${t.b}, ${Math.round(t.a*Qe.feedAlpha*1e3)/1e3})`:`color-mix(in srgb, ${e} ${Qe.feedAlpha*100}%, transparent)`}function D_(e){const t=Array.isArray(e)?e.filter(n=>typeof n=="string"&&n!==""):[];return t.length?t:["qr"]}function Zc(e){const t=typeof e=="number"?e:typeof e=="string"&&e.trim()!==""?Number(e):NaN;if(!Number.isFinite(t)||t<=0)return null;const n=Math.floor(t);return n<=0?null:n>99?"99+":String(n)}const R_=24;function wf(e,t,n,r=R_){return t>=e.left-r&&t<=e.right+r&&n>=e.top-r&&n<=e.bottom+r}class F_{constructor(t,n,r){this.fire=t,this.pressed=n,this.disabled=r}fire;pressed;disabled;by=null;pointerId=null;get active(){return this.by!==null}start(t,n=null){return this.by!==null||this.disabled()?!1:(this.by=t,this.pointerId=n,this.pressed(!0),this.fire("holdStart"),!0)}finish(t){return this.by===null?!1:(this.by=null,this.pointerId=null,this.pressed(!1),this.fire(t),!0)}pointerDown(t=null){return this.start("pointer",t)}pointerMove(t,n,r,o=null){this.by!=="pointer"||!this.samePointer(o)||wf(t,n,r)||this.finish("holdCancel")}pointerUp(t,n,r,o=null){this.by!=="pointer"||!this.samePointer(o)||this.finish(wf(t,n,r)?"holdEnd":"holdCancel")}pointerCancel(t=null){this.by==="pointer"&&this.samePointer(t)&&this.finish("holdCancel")}keyDown(t,n=!1){return t==="Escape"?this.finish("holdCancel"):t!==" "&&t!=="Enter"?!1:n||this.by!==null?this.by!==null:this.start(t)}keyUp(t){return this.by===null||this.by!==t?t===" "||t==="Enter":this.finish("holdEnd")}blur(){this.finish("holdCancel")}reset(){this.by!==null&&(this.by=null,this.pointerId=null,this.pressed(!1))}samePointer(t){return this.pointerId===null||t===null||t===this.pointerId}}const kr=_1,z_=`@keyframes xui-shimmer{from{background-position:100% 0}to{background-position:0 0}}
26
26
  [data-xui-shimmer]{--_spread:${kr.spreadPx}px;--_base:currentColor;--_highlight:oklch(from currentColor l c h / calc(alpha * ${kr.lightAlphaFactor}));background-image:linear-gradient(calc(90deg + ${kr.angleDeg}deg),var(--_base) calc(50% - var(--_spread)),color-mix(in oklab,var(--_highlight),var(--_base) 50%) calc(50% - var(--_spread) * .5),var(--_highlight) 50%,color-mix(in oklab,var(--_highlight),var(--_base) 50%) calc(50% + var(--_spread) * .5),var(--_base) calc(50% + var(--_spread)));background-repeat:no-repeat;background-size:calc(200% + var(--_spread) * 2) 100%;background-position:0 0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:xui-shimmer ${kr.durationMs}ms linear infinite}