@json-to-office/jto 6.2.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/client/assets/{HomePage-BzVqc59H.js → HomePage-DgyrBIGY.js} +4 -4
  3. package/dist/client/assets/{HomePage-BzVqc59H.js.map → HomePage-DgyrBIGY.js.map} +1 -1
  4. package/dist/client/assets/{JsonEditorPage-B_w18Hi0.js → JsonEditorPage-BGctWRXE.js} +3 -3
  5. package/dist/client/assets/{JsonEditorPage-B_w18Hi0.js.map → JsonEditorPage-BGctWRXE.js.map} +1 -1
  6. package/dist/client/assets/{MonacoPluginProvider-C3zEZQld.js → MonacoPluginProvider-DbBCCotq.js} +5 -5
  7. package/dist/client/assets/{MonacoPluginProvider-C3zEZQld.js.map → MonacoPluginProvider-DbBCCotq.js.map} +1 -1
  8. package/dist/client/assets/{_virtual_jto-plugin-type-libs-jTPhWeEU.js → _virtual_jto-plugin-type-libs-BpQu9aDr.js} +164 -72
  9. package/dist/client/assets/{_virtual_jto-plugin-type-libs-jTPhWeEU.js.map → _virtual_jto-plugin-type-libs-BpQu9aDr.js.map} +1 -1
  10. package/dist/client/assets/_virtual_jto-sandbox-runtime-CySzPJ5n.js +2 -0
  11. package/dist/client/assets/_virtual_jto-sandbox-runtime-CySzPJ5n.js.map +1 -0
  12. package/dist/client/assets/{editor-a7VYkAGF.js → editor-DnPnx_0M.js} +2 -2
  13. package/dist/client/assets/{editor-a7VYkAGF.js.map → editor-DnPnx_0M.js.map} +1 -1
  14. package/dist/client/assets/{editor-monaco-json-ChtoHxGw.js → editor-monaco-json-B_U6hHbA.js} +2 -2
  15. package/dist/client/assets/{editor-monaco-json-ChtoHxGw.js.map → editor-monaco-json-B_U6hHbA.js.map} +1 -1
  16. package/dist/client/assets/index-2S58SOrb.js +27 -0
  17. package/dist/client/assets/index-2S58SOrb.js.map +1 -0
  18. package/dist/client/assets/{index-B0KTyZs_.js → index-CWzQeme_.js} +2 -2
  19. package/dist/client/assets/{index-B0KTyZs_.js.map → index-CWzQeme_.js.map} +1 -1
  20. package/dist/client/assets/{preview-BDH_k10v.js → preview-Bdmil0FT.js} +2 -2
  21. package/dist/client/assets/{preview-BDH_k10v.js.map → preview-Bdmil0FT.js.map} +1 -1
  22. package/dist/client/assets/{useQualityAnalysis-zt2e1ggx.js → useQualityAnalysis-B0tasjoU.js} +2 -2
  23. package/dist/client/assets/{useQualityAnalysis-zt2e1ggx.js.map → useQualityAnalysis-B0tasjoU.js.map} +1 -1
  24. package/dist/client/index.html +1 -1
  25. package/package.json +4 -4
  26. package/dist/client/assets/_virtual_jto-sandbox-runtime-HQzTkKV2.js +0 -2
  27. package/dist/client/assets/_virtual_jto-sandbox-runtime-HQzTkKV2.js.map +0 -1
  28. package/dist/client/assets/index-CFDTrjX3.js +0 -27
  29. package/dist/client/assets/index-CFDTrjX3.js.map +0 -1
@@ -0,0 +1,27 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-DgyrBIGY.js","assets/react-vendor-BmQ2Ko_D.js","assets/MonacoPluginProvider-DbBCCotq.js","assets/state-vendor-Cq67_JbF.js","assets/monaco-editor-DJsdM0WK.js","assets/radix-ui-BzbaiLpZ.js","assets/ui-vendor-BsAtAN16.js","assets/index-CWzQeme_.js","assets/query-vendor--rhYD8mC.js","assets/JsonEditorPage-BGctWRXE.js","assets/NotFoundPage-rSUaByPC.js"])))=>i.map(i=>d[i]);
2
+ var Wc=Object.defineProperty;var Hc=(e,n,i)=>n in e?Wc(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var rt=(e,n,i)=>Hc(e,typeof n!="symbol"?n+"":n,i);import{r as he,j as R,O as qc,u as Kc,B as Gc,d as Vc}from"./react-vendor-BmQ2Ko_D.js";import{Q as Jc,a as Xc}from"./query-vendor--rhYD8mC.js";import{P as Yc,C as Ja,A as Zc,a as Qc,R as ed,T as td}from"./radix-ui-BzbaiLpZ.js";import{c as nd}from"./ui-vendor-BsAtAN16.js";import{loader as id}from"./monaco-editor-DJsdM0WK.js";import{c as Xa}from"./state-vendor-Cq67_JbF.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function i(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=i(o);fetch(o.href,a)}})();const rd="modulepreload",od=function(e){return"/"+e},da={},ao=function(n,i,r){let o=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),c=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(i.map(l=>{if(l=od(l),l in da)return;da[l]=!0;const d=l.endsWith(".css"),g=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${g}`))return;const u=document.createElement("link");if(u.rel=d?"stylesheet":rd,d||(u.as="script"),u.crossOrigin="",u.href=l,c&&u.setAttribute("nonce",c),document.head.appendChild(u),d)return new Promise((y,p)=>{u.addEventListener("load",y),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=s,window.dispatchEvent(c),!c.defaultPrevented)throw s}return o.then(s=>{for(const c of s||[])c.status==="rejected"&&a(c.reason);return n().catch(a)})},ad={theme:"system",setTheme:()=>null,resolvedTheme:"light"},Ya=he.createContext(ad);function sd({children:e,defaultTheme:n="system",storageKey:i="vite-ui-theme",...r}){const[o,a]=he.useState(()=>localStorage.getItem(i)||n),s=o==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":o;he.useEffect(()=>{const l=window.document.documentElement;if(l.classList.remove("light","dark"),o==="system"){const d=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";l.classList.add(d);return}l.classList.add(o)},[o]);const c={theme:o,resolvedTheme:s,setTheme:l=>{localStorage.setItem(i,l),a(l)}};return R.jsx(Ya.Provider,{...r,value:c,children:e})}const D0=()=>{const e=he.useContext(Ya);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},so="-",ld=e=>{const n=dd(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const c=s.split(so);return c[0]===""&&c.length!==1&&c.shift(),Za(c,n)||cd(s)},getConflictingClassGroupIds:(s,c)=>{const l=i[s]||[];return c&&r[s]?[...l,...r[s]]:l}}},Za=(e,n)=>{var s;if(e.length===0)return n.classGroupId;const i=e[0],r=n.nextPart.get(i),o=r?Za(e.slice(1),r):void 0;if(o)return o;if(n.validators.length===0)return;const a=e.join(so);return(s=n.validators.find(({validator:c})=>c(a)))==null?void 0:s.classGroupId},pa=/^\[(.+)\]$/,cd=e=>{if(pa.test(e)){const n=pa.exec(e)[1],i=n==null?void 0:n.substring(0,n.indexOf(":"));if(i)return"arbitrary.."+i}},dd=e=>{const{theme:n,classGroups:i}=e,r={nextPart:new Map,validators:[]};for(const o in i)Ur(i[o],r,o,n);return r},Ur=(e,n,i,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?n:ua(n,o);a.classGroupId=i;return}if(typeof o=="function"){if(pd(o)){Ur(o(r),n,i,r);return}n.validators.push({validator:o,classGroupId:i});return}Object.entries(o).forEach(([a,s])=>{Ur(s,ua(n,a),i,r)})})},ua=(e,n)=>{let i=e;return n.split(so).forEach(r=>{i.nextPart.has(r)||i.nextPart.set(r,{nextPart:new Map,validators:[]}),i=i.nextPart.get(r)}),i},pd=e=>e.isThemeGetter,ud=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,i=new Map,r=new Map;const o=(a,s)=>{i.set(a,s),n++,n>e&&(n=0,r=i,i=new Map)};return{get(a){let s=i.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){i.has(a)?i.set(a,s):o(a,s)}}},Mr="!",Br=":",md=Br.length,fd=e=>{const{prefix:n,experimentalParseClassName:i}=e;let r=o=>{const a=[];let s=0,c=0,l=0,d;for(let h=0;h<o.length;h++){let b=o[h];if(s===0&&c===0){if(b===Br){a.push(o.slice(l,h)),l=h+md;continue}if(b==="/"){d=h;continue}}b==="["?s++:b==="]"?s--:b==="("?c++:b===")"&&c--}const g=a.length===0?o:o.substring(l),u=gd(g),y=u!==g,p=d&&d>l?d-l:void 0;return{modifiers:a,hasImportantModifier:y,baseClassName:u,maybePostfixModifierPosition:p}};if(n){const o=n+Br,a=r;r=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(i){const o=r;r=a=>i({className:a,parseClassName:o})}return r},gd=e=>e.endsWith(Mr)?e.substring(0,e.length-1):e.startsWith(Mr)?e.substring(1):e,hd=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let a=[];return r.forEach(s=>{s[0]==="["||n[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},bd=e=>({cache:ud(e.cacheSize),parseClassName:fd(e),sortModifiers:hd(e),...ld(e)}),yd=/\s+/,Od=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=n,s=[],c=e.trim().split(yd);let l="";for(let d=c.length-1;d>=0;d-=1){const g=c[d],{isExternal:u,modifiers:y,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:b}=i(g);if(u){l=g+(l.length>0?" "+l:l);continue}let L=!!b,A=r(L?h.substring(0,b):h);if(!A){if(!L){l=g+(l.length>0?" "+l:l);continue}if(A=r(h),!A){l=g+(l.length>0?" "+l:l);continue}L=!1}const N=a(y).join(":"),S=p?N+Mr:N,U=S+A;if(s.includes(U))continue;s.push(U);const j=o(A,L);for(let k=0;k<j.length;++k){const T=j[k];s.push(S+T)}l=g+(l.length>0?" "+l:l)}return l};function xd(){let e=0,n,i,r="";for(;e<arguments.length;)(n=arguments[e++])&&(i=Qa(n))&&(r&&(r+=" "),r+=i);return r}const Qa=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=Qa(e[r]))&&(i&&(i+=" "),i+=n);return i};function Sd(e,...n){let i,r,o,a=s;function s(l){const d=n.reduce((g,u)=>u(g),e());return i=bd(d),r=i.cache.get,o=i.cache.set,a=c,c(l)}function c(l){const d=r(l);if(d)return d;const g=Od(l,i);return o(l,g),g}return function(){return a(xd.apply(null,arguments))}}const de=e=>{const n=i=>i[e]||[];return n.isThemeGetter=!0,n},es=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ts=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wd=/^\d+\/\d+$/,Ld=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Pd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$d=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zt=e=>wd.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),Nt=e=>!!e&&Number.isInteger(Number(e)),ma=e=>e.endsWith("%")&&C(e.slice(0,-1)),mt=e=>Ld.test(e),Id=()=>!0,kd=e=>vd.test(e)&&!Pd.test(e),lo=()=>!1,Ad=e=>$d.test(e),Td=e=>Nd.test(e),Fd=e=>!P(e)&&!$(e),jd=e=>un(e,rs,lo),P=e=>es.test(e),It=e=>un(e,os,kd),br=e=>un(e,Hd,C),Rd=e=>un(e,ns,lo),Ud=e=>un(e,is,Td),Md=e=>un(e,lo,Ad),$=e=>ts.test(e),oi=e=>mn(e,os),Bd=e=>mn(e,qd),Ed=e=>mn(e,ns),Cd=e=>mn(e,rs),Dd=e=>mn(e,is),zd=e=>mn(e,Kd,!0),un=(e,n,i)=>{const r=es.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},mn=(e,n,i=!1)=>{const r=ts.exec(e);return r?r[1]?n(r[1]):i:!1},ns=e=>e==="position",_d=new Set(["image","url"]),is=e=>_d.has(e),Wd=new Set(["length","size","percentage"]),rs=e=>Wd.has(e),os=e=>e==="length",Hd=e=>e==="number",qd=e=>e==="family-name",Kd=e=>e==="shadow",Gd=()=>{const e=de("color"),n=de("font"),i=de("text"),r=de("font-weight"),o=de("tracking"),a=de("leading"),s=de("breakpoint"),c=de("container"),l=de("spacing"),d=de("radius"),g=de("shadow"),u=de("inset-shadow"),y=de("drop-shadow"),p=de("blur"),h=de("perspective"),b=de("aspect"),L=de("ease"),A=de("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],k=()=>[Zt,"px","full","auto",$,P,l],T=()=>[Nt,"none","subgrid",$,P],W=()=>["auto",{span:["full",Nt,$,P]},$,P],I=()=>[Nt,"auto",$,P],M=()=>["auto","min","max","fr",$,P],J=()=>[$,P,l],ee=()=>["start","end","center","between","around","evenly","stretch","baseline"],X=()=>["start","end","center","stretch"],O=()=>[$,P,l],F=()=>["px",...O()],Y=()=>["px","auto",...O()],ce=()=>[Zt,"auto","px","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",$,P,l],_=()=>[e,$,P],Xt=()=>[ma,It],ge=()=>["","none","full",d,$,P],Z=()=>["",C,oi,It],H=()=>["solid","dashed","dotted","double"],Ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Yt=()=>["","none",p,$,P],ca=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$,P],ni=()=>["none",C,$,P],ii=()=>["none",C,$,P],hr=()=>[C,$,P],ri=()=>[Zt,"full","px",$,P,l];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mt],breakpoint:[mt],color:[Id],container:[mt],"drop-shadow":[mt],ease:["in","out","in-out"],font:[Fd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[mt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[mt],shadow:[mt],spacing:[C],text:[mt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Zt,P,$,b]}],container:["container"],columns:[{columns:[C,P,$,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...S(),P,$]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Nt,"auto",$,P]}],basis:[{basis:[Zt,"full","auto",$,P,c,l]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,Zt,"auto","initial","none",P]}],grow:[{grow:["",C,$,P]}],shrink:[{shrink:["",C,$,P]}],order:[{order:[Nt,"first","last","none",$,P]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:J()}],"gap-x":[{"gap-x":J()}],"gap-y":[{"gap-y":J()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...X(),"baseline"]}],"align-self":[{self:["auto",...X(),"baseline"]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:F()}],px:[{px:F()}],py:[{py:F()}],ps:[{ps:F()}],pe:[{pe:F()}],pt:[{pt:F()}],pr:[{pr:F()}],pb:[{pb:F()}],pl:[{pl:F()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:ce()}],w:[{w:[c,"screen",...ce()]}],"min-w":[{"min-w":[c,"screen","none",...ce()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[s]},...ce()]}],h:[{h:["screen",...ce()]}],"min-h":[{"min-h":["screen","none",...ce()]}],"max-h":[{"max-h":["screen",...ce()]}],"font-size":[{text:["base",i,oi,It]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,$,br]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ma,P]}],"font-family":[{font:[Bd,P,n]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,$,P]}],"line-clamp":[{"line-clamp":[C,"none",$,br]}],leading:[{leading:[$,P,a,l]}],"list-image":[{"list-image":["none",$,P]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$,P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",$,It]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[C,"auto",$,P]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:["px",...O()]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$,P]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$,P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...S(),Ed,Rd]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Cd,jd]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nt,$,P],radial:["",$,P],conic:[Nt,$,P]},Dd,Ud]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:Xt()}],"gradient-via-pos":[{via:Xt()}],"gradient-to-pos":[{to:Xt()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:ge()}],"rounded-s":[{"rounded-s":ge()}],"rounded-e":[{"rounded-e":ge()}],"rounded-t":[{"rounded-t":ge()}],"rounded-r":[{"rounded-r":ge()}],"rounded-b":[{"rounded-b":ge()}],"rounded-l":[{"rounded-l":ge()}],"rounded-ss":[{"rounded-ss":ge()}],"rounded-se":[{"rounded-se":ge()}],"rounded-ee":[{"rounded-ee":ge()}],"rounded-es":[{"rounded-es":ge()}],"rounded-tl":[{"rounded-tl":ge()}],"rounded-tr":[{"rounded-tr":ge()}],"rounded-br":[{"rounded-br":ge()}],"rounded-bl":[{"rounded-bl":ge()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...H(),"hidden","none"]}],"divide-style":[{divide:[...H(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...H(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,$,P]}],"outline-w":[{outline:["",C,oi,It]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",g,zd,Md]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",$,P,u]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[C,It]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":_()}],opacity:[{opacity:[C,$,P]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ze()}],filter:[{filter:["","none",$,P]}],blur:[{blur:Yt()}],brightness:[{brightness:[C,$,P]}],contrast:[{contrast:[C,$,P]}],"drop-shadow":[{"drop-shadow":["","none",y,$,P]}],grayscale:[{grayscale:["",C,$,P]}],"hue-rotate":[{"hue-rotate":[C,$,P]}],invert:[{invert:["",C,$,P]}],saturate:[{saturate:[C,$,P]}],sepia:[{sepia:["",C,$,P]}],"backdrop-filter":[{"backdrop-filter":["","none",$,P]}],"backdrop-blur":[{"backdrop-blur":Yt()}],"backdrop-brightness":[{"backdrop-brightness":[C,$,P]}],"backdrop-contrast":[{"backdrop-contrast":[C,$,P]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,$,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,$,P]}],"backdrop-invert":[{"backdrop-invert":["",C,$,P]}],"backdrop-opacity":[{"backdrop-opacity":[C,$,P]}],"backdrop-saturate":[{"backdrop-saturate":[C,$,P]}],"backdrop-sepia":[{"backdrop-sepia":["",C,$,P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",$,P]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",$,P]}],ease:[{ease:["linear","initial",L,$,P]}],delay:[{delay:[C,$,P]}],animate:[{animate:["none",A,$,P]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,$,P]}],"perspective-origin":[{"perspective-origin":ca()}],rotate:[{rotate:ni()}],"rotate-x":[{"rotate-x":ni()}],"rotate-y":[{"rotate-y":ni()}],"rotate-z":[{"rotate-z":ni()}],scale:[{scale:ii()}],"scale-x":[{"scale-x":ii()}],"scale-y":[{"scale-y":ii()}],"scale-z":[{"scale-z":ii()}],"scale-3d":["scale-3d"],skew:[{skew:hr()}],"skew-x":[{"skew-x":hr()}],"skew-y":[{"skew-y":hr()}],transform:[{transform:[$,P,"","none","gpu","cpu"]}],"transform-origin":[{origin:ca()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ri()}],"translate-x":[{"translate-x":ri()}],"translate-y":[{"translate-y":ri()}],"translate-z":[{"translate-z":ri()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$,P]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$,P]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[C,oi,It,br]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},Vd=Sd(Gd);function ht(...e){return Vd(nd(e))}const Jd=Qc,z0=ed,_0=td,Xd=he.forwardRef(({className:e,sideOffset:n=4,children:i,...r},o)=>R.jsx(Yc,{children:R.jsxs(Ja,{ref:o,"data-slot":"tooltip-content",sideOffset:n,className:ht("bg-popover text-popover-foreground border shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit text-balance rounded-md px-3 py-1.5 text-xs",e),...r,children:[i,R.jsx(Zc,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-popover fill-popover"})]})}));Xd.displayName=Ja.displayName;const as=he.forwardRef(({className:e,variant:n="default",title:i,description:r,action:o,open:a,onOpenChange:s,...c},l)=>R.jsx("div",{ref:l,className:ht("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-lg border p-6 pr-8 shadow-lg transition-all",n==="default"&&"border bg-background text-foreground",n==="destructive"&&"destructive group border-destructive bg-destructive text-destructive-foreground",e),...c}));as.displayName="Toast";const Yd=he.forwardRef(({className:e,...n},i)=>R.jsx("button",{ref:i,className:ht("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...n}));Yd.displayName="ToastAction";const ss=he.forwardRef(({className:e,...n},i)=>R.jsx("button",{ref:i,type:"button",className:ht("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-destructive-foreground/70 group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive-foreground/40",e),"toast-close":"",...n,children:R.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[R.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}));ss.displayName="ToastClose";const ls=he.forwardRef(({className:e,...n},i)=>R.jsx("div",{ref:i,className:ht("text-sm font-semibold",e),...n}));ls.displayName="ToastTitle";const cs=he.forwardRef(({className:e,...n},i)=>R.jsx("div",{ref:i,className:ht("text-sm opacity-90",e),...n}));cs.displayName="ToastDescription";const ds=he.forwardRef(({className:e,...n},i)=>R.jsx("ol",{ref:i,className:ht("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...n}));ds.displayName="ToastViewport";const Zd=1,ps=5e3;let yr=0;function Qd(){return yr=(yr+1)%Number.MAX_SAFE_INTEGER,yr.toString()}const Or=new Map,fa=e=>{if(Or.has(e))return;const n=setTimeout(()=>{Or.delete(e),kn({type:"REMOVE_TOAST",toastId:e})},ps);Or.set(e,n)},ep=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,Zd)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(i=>i.id===n.toast.id?{...i,...n.toast}:i)};case"DISMISS_TOAST":{const{toastId:i}=n;return i?fa(i):e.toasts.forEach(r=>{fa(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===i||i===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return n.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==n.toastId)}}},gi=[];let hi={toasts:[]};function kn(e){hi=ep(hi,e),gi.forEach(n=>{n(hi)})}function tp({...e}){const n=Qd(),i=o=>kn({type:"UPDATE_TOAST",toast:{...o,id:n}}),r=()=>kn({type:"DISMISS_TOAST",toastId:n});return kn({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:o=>{o||r()}}}),setTimeout(()=>{r()},ps),{id:n,dismiss:r,update:i}}function np(){const[e,n]=he.useState(hi);return he.useEffect(()=>(gi.push(n),()=>{const i=gi.indexOf(n);i>-1&&gi.splice(i,1)}),[e]),{...e,toast:tp,dismiss:i=>kn({type:"DISMISS_TOAST",toastId:i})}}function ip(){const{toasts:e,dismiss:n}=np();return R.jsx(ds,{children:e.map(function({id:i,title:r,description:o,action:a,open:s,...c}){return s===!1?null:R.jsxs(as,{...c,children:[R.jsxs("div",{className:"grid gap-1",children:[r&&R.jsx(ls,{children:r}),o&&R.jsx(cs,{children:o})]}),a,R.jsx(ss,{onClick:l=>{l.preventDefault(),l.stopPropagation(),n(i)}})]},i)})})}function rp(){return R.jsx(sd,{defaultTheme:"system",storageKey:"vite-ui-theme",children:R.jsxs(Jd,{delayDuration:300,children:[R.jsx("div",{className:"min-h-screen bg-background font-sans antialiased",children:R.jsx(qc,{})}),R.jsx(ip,{})]})})}function op({className:e,size:n="md",variant:i="primary",...r}){const o={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},a={primary:"border-primary",secondary:"border-secondary",muted:"border-muted-foreground"};return R.jsx("div",{className:ht("animate-spin rounded-full border-2 border-solid",o[n],a[i],e),style:{borderRightColor:"transparent"},...r})}const ap=he.lazy(()=>ao(()=>import("./HomePage-DgyrBIGY.js").then(e=>e.H),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.HomePage}))),sp=he.lazy(()=>ao(()=>import("./JsonEditorPage-BGctWRXE.js"),__vite__mapDeps([9,1,2,3,4,8,5,6])).then(e=>({default:e.JsonEditorPage}))),lp=he.lazy(()=>ao(()=>import("./NotFoundPage-rSUaByPC.js"),__vite__mapDeps([10,1])).then(e=>({default:e.NotFoundPage}))),xr=({children:e})=>R.jsx(he.Suspense,{fallback:R.jsx("div",{className:"flex items-center justify-center h-screen",children:R.jsx(op,{className:"w-8 h-8"})}),children:e}),cp=[{path:"/",element:R.jsx(rp,{}),children:[{index:!0,element:R.jsx(xr,{children:R.jsx(ap,{})})},{path:"json-editor",element:R.jsx(xr,{children:R.jsx(sp,{})})}]},{path:"*",element:R.jsx(xr,{children:R.jsx(lp,{})})}];function dp(){return Kc(cp)}const pp=new Jc({defaultOptions:{queries:{staleTime:1e3*60*5,retry:1}}});function up(){return R.jsx(Xc,{client:pp,children:R.jsx(Gc,{children:R.jsx(dp,{})})})}function mp(e){return oe(e)&&!Ie(e)&&!_n(e)&&Symbol.asyncIterator in e}function Ie(e){return Array.isArray(e)}function us(e){return typeof e=="bigint"}function zn(e){return typeof e=="boolean"}function co(e){return e instanceof globalThis.Date}function fp(e){return typeof e=="function"}function gp(e){return oe(e)&&!Ie(e)&&!_n(e)&&Symbol.iterator in e}function hp(e){return e===null}function tt(e){return typeof e=="number"}function oe(e){return typeof e=="object"&&e!==null}function ms(e){return e instanceof globalThis.RegExp}function ne(e){return typeof e=="string"}function bp(e){return typeof e=="symbol"}function _n(e){return e instanceof globalThis.Uint8Array}function ie(e){return e===void 0}function yp(e){return e.map(n=>xi(n))}function Op(e){return new Date(e.getTime())}function xp(e){return new Uint8Array(e)}function Sp(e){return new RegExp(e.source,e.flags)}function wp(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=xi(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=xi(e[i]);return n}function xi(e){return Ie(e)?yp(e):co(e)?Op(e):_n(e)?xp(e):ms(e)?Sp(e):oe(e)?wp(e):e}function Ae(e){return xi(e)}function po(e,n){return Ae(n===void 0?e:{...n,...e})}function fs(e){return nt(e)&&globalThis.Symbol.asyncIterator in e}function gs(e){return nt(e)&&globalThis.Symbol.iterator in e}function hs(e){return e instanceof globalThis.Promise}function Wn(e){return e instanceof Date&&globalThis.Number.isFinite(e.getTime())}function Lp(e){return e instanceof globalThis.Map}function vp(e){return e instanceof globalThis.Set}function Pp(e){return globalThis.ArrayBuffer.isView(e)}function uo(e){return e instanceof globalThis.Uint8Array}function $p(e,n){return n in e}function nt(e){return e!==null&&typeof e=="object"}function it(e){return globalThis.Array.isArray(e)&&!globalThis.ArrayBuffer.isView(e)}function bt(e){return e===void 0}function Ai(e){return e===null}function Ti(e){return typeof e=="boolean"}function at(e){return typeof e=="number"}function bs(e){return globalThis.Number.isInteger(e)}function Fi(e){return typeof e=="bigint"}function et(e){return typeof e=="string"}function mo(e){return typeof e=="function"}function ji(e){return typeof e=="symbol"}function Np(e){return Fi(e)||Ti(e)||Ai(e)||at(e)||et(e)||ji(e)||bt(e)}var Te;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function n(s,c){return e.ExactOptionalPropertyTypes?c in s:s[c]!==void 0}e.IsExactOptionalProperty=n;function i(s){const c=nt(s);return e.AllowArrayObject?c:c&&!it(s)}e.IsObjectLike=i;function r(s){return i(s)&&!(s instanceof Date)&&!(s instanceof Uint8Array)}e.IsRecordLike=r;function o(s){return e.AllowNaN?at(s):Number.isFinite(s)}e.IsNumberLike=o;function a(s){const c=bt(s);return e.AllowNullVoid?c||s===null:c}e.IsVoidLike=a})(Te||(Te={}));function Ip(e){return globalThis.Object.freeze(e).map(n=>Si(n))}function kp(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=Si(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=Si(e[i]);return globalThis.Object.freeze(n)}function Si(e){return Ie(e)?Ip(e):co(e)?e:_n(e)?e:ms(e)?e:oe(e)?kp(e):e}function x(e,n){const i=n!==void 0?{...n,...e}:e;switch(Te.InstanceMode){case"freeze":return Si(i);case"clone":return Ae(i);default:return i}}class Xe extends Error{constructor(n){super(n)}}const Ee=Symbol.for("TypeBox.Transform"),Hn=Symbol.for("TypeBox.Readonly"),dt=Symbol.for("TypeBox.Optional"),Ri=Symbol.for("TypeBox.Hint"),v=Symbol.for("TypeBox.Kind");function fo(e){return oe(e)&&e[Hn]==="Readonly"}function yt(e){return oe(e)&&e[dt]==="Optional"}function ys(e){return D(e,"Any")}function Os(e){return D(e,"Argument")}function fn(e){return D(e,"Array")}function Ui(e){return D(e,"AsyncIterator")}function Mi(e){return D(e,"BigInt")}function qn(e){return D(e,"Boolean")}function gn(e){return D(e,"Computed")}function hn(e){return D(e,"Constructor")}function Ap(e){return D(e,"Date")}function bn(e){return D(e,"Function")}function yn(e){return D(e,"Integer")}function ze(e){return D(e,"Intersect")}function Bi(e){return D(e,"Iterator")}function D(e,n){return oe(e)&&v in e&&e[v]===n}function xs(e){return zn(e)||tt(e)||ne(e)}function Et(e){return D(e,"Literal")}function Ct(e){return D(e,"MappedKey")}function Ue(e){return D(e,"MappedResult")}function Kn(e){return D(e,"Never")}function Tp(e){return D(e,"Not")}function go(e){return D(e,"Null")}function On(e){return D(e,"Number")}function Ye(e){return D(e,"Object")}function Ei(e){return D(e,"Promise")}function Ci(e){return D(e,"Record")}function $e(e){return D(e,"Ref")}function Ss(e){return D(e,"RegExp")}function Gn(e){return D(e,"String")}function ho(e){return D(e,"Symbol")}function Dt(e){return D(e,"TemplateLiteral")}function Fp(e){return D(e,"This")}function Di(e){return oe(e)&&Ee in e}function zt(e){return D(e,"Tuple")}function bo(e){return D(e,"Undefined")}function fe(e){return D(e,"Union")}function jp(e){return D(e,"Uint8Array")}function Rp(e){return D(e,"Unknown")}function Up(e){return D(e,"Unsafe")}function Mp(e){return D(e,"Void")}function ws(e){return oe(e)&&v in e&&ne(e[v])}function lt(e){return ys(e)||Os(e)||fn(e)||qn(e)||Mi(e)||Ui(e)||gn(e)||hn(e)||Ap(e)||bn(e)||yn(e)||ze(e)||Bi(e)||Et(e)||Ct(e)||Ue(e)||Kn(e)||Tp(e)||go(e)||On(e)||Ye(e)||Ei(e)||Ci(e)||$e(e)||Ss(e)||Gn(e)||ho(e)||Dt(e)||Fp(e)||zt(e)||bo(e)||fe(e)||jp(e)||Rp(e)||Up(e)||Mp(e)||ws(e)}const Bp=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function Ls(e){try{return new RegExp(e),!0}catch{return!1}}function yo(e){if(!ne(e))return!1;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(i>=7&&i<=13||i===27||i===127)return!1}return!0}function vs(e){return Oo(e)||ye(e)}function vn(e){return ie(e)||us(e)}function V(e){return ie(e)||tt(e)}function Oo(e){return ie(e)||zn(e)}function G(e){return ie(e)||ne(e)}function Ep(e){return ie(e)||ne(e)&&yo(e)&&Ls(e)}function Cp(e){return ie(e)||ne(e)&&yo(e)}function Ps(e){return ie(e)||ye(e)}function wi(e){return oe(e)&&e[dt]==="Optional"}function Ke(e){return z(e,"Any")&&G(e.$id)}function Dp(e){return z(e,"Argument")&&tt(e.index)}function _t(e){return z(e,"Array")&&e.type==="array"&&G(e.$id)&&ye(e.items)&&V(e.minItems)&&V(e.maxItems)&&Oo(e.uniqueItems)&&Ps(e.contains)&&V(e.minContains)&&V(e.maxContains)}function xo(e){return z(e,"AsyncIterator")&&e.type==="AsyncIterator"&&G(e.$id)&&ye(e.items)}function zi(e){return z(e,"BigInt")&&e.type==="bigint"&&G(e.$id)&&vn(e.exclusiveMaximum)&&vn(e.exclusiveMinimum)&&vn(e.maximum)&&vn(e.minimum)&&vn(e.multipleOf)}function Wt(e){return z(e,"Boolean")&&e.type==="boolean"&&G(e.$id)}function zp(e){return z(e,"Computed")&&ne(e.target)&&Ie(e.parameters)&&e.parameters.every(n=>ye(n))}function _i(e){return z(e,"Constructor")&&e.type==="Constructor"&&G(e.$id)&&Ie(e.parameters)&&e.parameters.every(n=>ye(n))&&ye(e.returns)}function Wi(e){return z(e,"Date")&&e.type==="Date"&&G(e.$id)&&V(e.exclusiveMaximumTimestamp)&&V(e.exclusiveMinimumTimestamp)&&V(e.maximumTimestamp)&&V(e.minimumTimestamp)&&V(e.multipleOfTimestamp)}function Hi(e){return z(e,"Function")&&e.type==="Function"&&G(e.$id)&&Ie(e.parameters)&&e.parameters.every(n=>ye(n))&&ye(e.returns)}function pt(e){return z(e,"Integer")&&e.type==="integer"&&G(e.$id)&&V(e.exclusiveMaximum)&&V(e.exclusiveMinimum)&&V(e.maximum)&&V(e.minimum)&&V(e.multipleOf)}function $s(e){return oe(e)&&Object.entries(e).every(([n,i])=>yo(n)&&ye(i))}function Ht(e){return z(e,"Intersect")&&!(ne(e.type)&&e.type!=="object")&&Ie(e.allOf)&&e.allOf.every(n=>ye(n)&&!Gp(n))&&G(e.type)&&(Oo(e.unevaluatedProperties)||Ps(e.unevaluatedProperties))&&G(e.$id)}function So(e){return z(e,"Iterator")&&e.type==="Iterator"&&G(e.$id)&&ye(e.items)}function z(e,n){return oe(e)&&v in e&&e[v]===n}function Ns(e){return Ot(e)&&ne(e.const)}function Is(e){return Ot(e)&&tt(e.const)}function ks(e){return Ot(e)&&zn(e.const)}function Ot(e){return z(e,"Literal")&&G(e.$id)&&_p(e.const)}function _p(e){return zn(e)||tt(e)||ne(e)}function Wp(e){return z(e,"MappedKey")&&Ie(e.keys)&&e.keys.every(n=>tt(n)||ne(n))}function Hp(e){return z(e,"MappedResult")&&$s(e.properties)}function xt(e){return z(e,"Never")&&oe(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function an(e){return z(e,"Not")&&ye(e.not)}function wo(e){return z(e,"Null")&&e.type==="null"&&G(e.$id)}function Pe(e){return z(e,"Number")&&e.type==="number"&&G(e.$id)&&V(e.exclusiveMaximum)&&V(e.exclusiveMinimum)&&V(e.maximum)&&V(e.minimum)&&V(e.multipleOf)}function Q(e){return z(e,"Object")&&e.type==="object"&&G(e.$id)&&$s(e.properties)&&vs(e.additionalProperties)&&V(e.minProperties)&&V(e.maxProperties)}function Lo(e){return z(e,"Promise")&&e.type==="Promise"&&G(e.$id)&&ye(e.item)}function be(e){return z(e,"Record")&&e.type==="object"&&G(e.$id)&&vs(e.additionalProperties)&&oe(e.patternProperties)&&(n=>{const i=Object.getOwnPropertyNames(n.patternProperties);return i.length===1&&Ls(i[0])&&oe(n.patternProperties)&&ye(n.patternProperties[i[0]])})(e)}function qp(e){return z(e,"Ref")&&G(e.$id)&&ne(e.$ref)}function Fn(e){return z(e,"RegExp")&&G(e.$id)&&ne(e.source)&&ne(e.flags)&&V(e.maxLength)&&V(e.minLength)}function Ge(e){return z(e,"String")&&e.type==="string"&&G(e.$id)&&V(e.minLength)&&V(e.maxLength)&&Ep(e.pattern)&&Cp(e.format)}function jn(e){return z(e,"Symbol")&&e.type==="symbol"&&G(e.$id)}function Rn(e){return z(e,"TemplateLiteral")&&e.type==="string"&&ne(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function Kp(e){return z(e,"This")&&G(e.$id)&&ne(e.$ref)}function Gp(e){return oe(e)&&Ee in e}function qi(e){return z(e,"Tuple")&&e.type==="array"&&G(e.$id)&&tt(e.minItems)&&tt(e.maxItems)&&e.minItems===e.maxItems&&(ie(e.items)&&ie(e.additionalItems)&&e.minItems===0||Ie(e.items)&&e.items.every(n=>ye(n)))}function Ut(e){return z(e,"Undefined")&&e.type==="undefined"&&G(e.$id)}function ct(e){return z(e,"Union")&&G(e.$id)&&oe(e)&&Ie(e.anyOf)&&e.anyOf.every(n=>ye(n))}function Vn(e){return z(e,"Uint8Array")&&e.type==="Uint8Array"&&G(e.$id)&&V(e.minByteLength)&&V(e.maxByteLength)}function Ve(e){return z(e,"Unknown")&&G(e.$id)}function Vp(e){return z(e,"Unsafe")}function Ki(e){return z(e,"Void")&&e.type==="void"&&G(e.$id)}function Jp(e){return oe(e)&&v in e&&ne(e[v])&&!Bp.includes(e[v])}function ye(e){return oe(e)&&(Ke(e)||Dp(e)||_t(e)||Wt(e)||zi(e)||xo(e)||zp(e)||_i(e)||Wi(e)||Hi(e)||pt(e)||Ht(e)||So(e)||Ot(e)||Wp(e)||Hp(e)||xt(e)||an(e)||wo(e)||Pe(e)||Q(e)||Lo(e)||be(e)||qp(e)||Fn(e)||Ge(e)||jn(e)||Rn(e)||Kp(e)||qi(e)||Ut(e)||ct(e)||Vn(e)||Ve(e)||Vp(e)||Ki(e)||Jp(e))}const Xp="(true|false)",bi="(0|[1-9][0-9]*)",As="(.*)",Yp="(?!.*)",sn=`^${bi}$`,ln=`^${As}$`,Zp=`^${Yp}$`,vo=new Map;function Ts(e){return vo.has(e)}function Fs(e,n){vo.set(e,n)}function js(e){return vo.get(e)}const Rs=new Map;function Po(e){return Rs.has(e)}function Us(e){return Rs.get(e)}function Qp(e,n){return e.includes(n)}function eu(e){return[...new Set(e)]}function tu(e,n){return e.filter(i=>n.includes(i))}function nu(e,n){return e.reduce((i,r)=>tu(i,r),n)}function iu(e){return e.length===1?e[0]:e.length>1?nu(e.slice(1),e[0]):[]}function ru(e){const n=[];for(const i of e)n.push(...i);return n}function Un(e){return x({[v]:"Any"},e)}function $o(e,n){return x({[v]:"Array",type:"array",items:e},n)}function ou(e){return x({[v]:"Argument",index:e})}function No(e,n){return x({[v]:"AsyncIterator",type:"AsyncIterator",items:e},n)}function le(e,n,i){return x({[v]:"Computed",target:e,parameters:n},i)}function au(e,n){const{[n]:i,...r}=e;return r}function Fe(e,n){return n.reduce((i,r)=>au(i,r),e)}function te(e){return x({[v]:"Never",not:{}},e)}function Oe(e){return x({[v]:"MappedResult",properties:e})}function Io(e,n,i){return x({[v]:"Constructor",type:"Constructor",parameters:e,returns:n},i)}function Jn(e,n,i){return x({[v]:"Function",type:"Function",parameters:e,returns:n},i)}function Er(e,n){return x({[v]:"Union",anyOf:e},n)}function su(e){return e.some(n=>yt(n))}function ga(e){return e.map(n=>yt(n)?lu(n):n)}function lu(e){return Fe(e,[dt])}function cu(e,n){return su(e)?Lt(Er(ga(e),n)):Er(ga(e),n)}function xn(e,n){return e.length===1?x(e[0],n):e.length===0?te(n):cu(e,n)}function xe(e,n){return e.length===0?te(n):e.length===1?x(e[0],n):Er(e,n)}class ha extends Xe{}function du(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function ko(e,n,i){return e[n]===i&&e.charCodeAt(n-1)!==92}function st(e,n){return ko(e,n,"(")}function Mn(e,n){return ko(e,n,")")}function Ms(e,n){return ko(e,n,"|")}function pu(e){if(!(st(e,0)&&Mn(e,e.length-1)))return!1;let n=0;for(let i=0;i<e.length;i++)if(st(e,i)&&(n+=1),Mn(e,i)&&(n-=1),n===0&&i!==e.length-1)return!1;return!0}function uu(e){return e.slice(1,e.length-1)}function mu(e){let n=0;for(let i=0;i<e.length;i++)if(st(e,i)&&(n+=1),Mn(e,i)&&(n-=1),Ms(e,i)&&n===0)return!0;return!1}function fu(e){for(let n=0;n<e.length;n++)if(st(e,n))return!0;return!1}function gu(e){let[n,i]=[0,0];const r=[];for(let a=0;a<e.length;a++)if(st(e,a)&&(n+=1),Mn(e,a)&&(n-=1),Ms(e,a)&&n===0){const s=e.slice(i,a);s.length>0&&r.push(cn(s)),i=a+1}const o=e.slice(i);return o.length>0&&r.push(cn(o)),r.length===0?{type:"const",const:""}:r.length===1?r[0]:{type:"or",expr:r}}function hu(e){function n(o,a){if(!st(o,a))throw new ha("TemplateLiteralParser: Index must point to open parens");let s=0;for(let c=a;c<o.length;c++)if(st(o,c)&&(s+=1),Mn(o,c)&&(s-=1),s===0)return[a,c];throw new ha("TemplateLiteralParser: Unclosed group parens in expression")}function i(o,a){for(let s=a;s<o.length;s++)if(st(o,s))return[a,s];return[a,o.length]}const r=[];for(let o=0;o<e.length;o++)if(st(e,o)){const[a,s]=n(e,o),c=e.slice(a,s+1);r.push(cn(c)),o=s}else{const[a,s]=i(e,o),c=e.slice(a,s);c.length>0&&r.push(cn(c)),o=s-1}return r.length===0?{type:"const",const:""}:r.length===1?r[0]:{type:"and",expr:r}}function cn(e){return pu(e)?cn(uu(e)):mu(e)?gu(e):fu(e)?hu(e):{type:"const",const:du(e)}}function Ao(e){return cn(e.slice(1,e.length-1))}class bu extends Xe{}function yu(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}function Ou(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}function xu(e){return e.type==="const"&&e.const===".*"}function Bn(e){return yu(e)||xu(e)?!1:Ou(e)?!0:e.type==="and"?e.expr.every(n=>Bn(n)):e.type==="or"?e.expr.every(n=>Bn(n)):e.type==="const"?!0:(()=>{throw new bu("Unknown expression type")})()}function Su(e){const n=Ao(e.pattern);return Bn(n)}class wu extends Xe{}function*Bs(e){if(e.length===1)return yield*e[0];for(const n of e[0])for(const i of Bs(e.slice(1)))yield`${n}${i}`}function*Lu(e){return yield*Bs(e.expr.map(n=>[...Gi(n)]))}function*vu(e){for(const n of e.expr)yield*Gi(n)}function*Pu(e){return yield e.const}function*Gi(e){return e.type==="and"?yield*Lu(e):e.type==="or"?yield*vu(e):e.type==="const"?yield*Pu(e):(()=>{throw new wu("Unknown expression")})()}function Es(e){const n=Ao(e.pattern);return Bn(n)?[...Gi(n)]:[]}function re(e,n){return x({[v]:"Literal",const:e,type:typeof e},n)}function Cs(e){return x({[v]:"Boolean",type:"boolean"},e)}function To(e){return x({[v]:"BigInt",type:"bigint"},e)}function qt(e){return x({[v]:"Number",type:"number"},e)}function Mt(e){return x({[v]:"String",type:"string"},e)}function*$u(e){const n=e.trim().replace(/"|'/g,"");return n==="boolean"?yield Cs():n==="number"?yield qt():n==="bigint"?yield To():n==="string"?yield Mt():yield(()=>{const i=n.split("|").map(r=>re(r.trim()));return i.length===0?te():i.length===1?i[0]:xn(i)})()}function*Nu(e){if(e[1]!=="{"){const n=re("$"),i=Cr(e.slice(1));return yield*[n,...i]}for(let n=2;n<e.length;n++)if(e[n]==="}"){const i=$u(e.slice(2,n)),r=Cr(e.slice(n+1));return yield*[...i,...r]}yield re(e)}function*Cr(e){for(let n=0;n<e.length;n++)if(e[n]==="$"){const i=re(e.slice(0,n)),r=Nu(e.slice(n));return yield*[i,...r]}yield re(e)}function Iu(e){return[...Cr(e)]}class ku extends Xe{}function Au(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ds(e,n){return Dt(e)?e.pattern.slice(1,e.pattern.length-1):fe(e)?`(${e.anyOf.map(i=>Ds(i,n)).join("|")})`:On(e)?`${n}${bi}`:yn(e)?`${n}${bi}`:Mi(e)?`${n}${bi}`:Gn(e)?`${n}${As}`:Et(e)?`${n}${Au(e.const.toString())}`:qn(e)?`${n}${Xp}`:(()=>{throw new ku(`Unexpected Kind '${e[v]}'`)})()}function ba(e){return`^${e.map(n=>Ds(n,"")).join("")}$`}function Li(e){const i=Es(e).map(r=>re(r));return xn(i)}function zs(e,n){const i=ne(e)?ba(Iu(e)):ba(e);return x({[v]:"TemplateLiteral",type:"string",pattern:i},n)}function Tu(e){return Es(e).map(i=>i.toString())}function Fu(e){const n=[];for(const i of e)n.push(...St(i));return n}function ju(e){return[e.toString()]}function St(e){return[...new Set(Dt(e)?Tu(e):fe(e)?Fu(e.anyOf):Et(e)?ju(e.const):On(e)?["[number]"]:yn(e)?["[number]"]:[])]}function Ru(e,n,i){const r={};for(const o of Object.getOwnPropertyNames(n))r[o]=Vi(e,St(n[o]),i);return r}function Uu(e,n,i){return Ru(e,n.properties,i)}function Mu(e,n,i){const r=Uu(e,n,i);return Oe(r)}function _s(e,n){return e.map(i=>Ws(i,n))}function Bu(e){return e.filter(n=>!Kn(n))}function Eu(e,n){return Gs(Bu(_s(e,n)))}function Cu(e){return e.some(n=>Kn(n))?[]:e}function Du(e,n){return xn(Cu(_s(e,n)))}function zu(e,n){return n in e?e[n]:n==="[number]"?xn(e):te()}function _u(e,n){return n==="[number]"?e:te()}function Wu(e,n){return n in e?e[n]:te()}function Ws(e,n){return ze(e)?Eu(e.allOf,n):fe(e)?Du(e.anyOf,n):zt(e)?zu(e.items??[],n):fn(e)?_u(e.items,n):Ye(e)?Wu(e.properties,n):te()}function Hs(e,n){return n.map(i=>Ws(e,i))}function ya(e,n){return xn(Hs(e,n))}function Vi(e,n,i){if($e(e)||$e(n)){const r="Index types using Ref parameters require both Type and Key to be of TSchema";if(!lt(e)||!lt(n))throw new Xe(r);return le("Index",[e,n])}return Ue(n)?Mu(e,n,i):Ct(n)?Gu(e,n,i):x(lt(n)?ya(e,St(n)):ya(e,n),i)}function Hu(e,n,i){return{[n]:Vi(e,[n],Ae(i))}}function qu(e,n,i){return n.reduce((r,o)=>({...r,...Hu(e,o,i)}),{})}function Ku(e,n,i){return qu(e,n.keys,i)}function Gu(e,n,i){const r=Ku(e,n,i);return Oe(r)}function Fo(e,n){return x({[v]:"Iterator",type:"Iterator",items:e},n)}function Vu(e){const n=[];for(let i in e)yt(e[i])||n.push(i);return n}function Ju(e,n){const i=Vu(e),r=i.length>0?{[v]:"Object",type:"object",properties:e,required:i}:{[v]:"Object",type:"object",properties:e};return x(r,n)}var me=Ju;function qs(e,n){return x({[v]:"Promise",type:"Promise",item:e},n)}function Xu(e){return x(Fe(e,[Hn]))}function Yu(e){return x({...e,[Hn]:"Readonly"})}function Zu(e,n){return n===!1?Xu(e):Yu(e)}function wt(e,n){const i=n??!0;return Ue(e)?tm(e,i):Zu(e,i)}function Qu(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=wt(e[r],n);return i}function em(e,n){return Qu(e.properties,n)}function tm(e,n){const i=em(e,n);return Oe(i)}function Sn(e,n){return x(e.length>0?{[v]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[v]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},n)}function Ks(e,n){return e in n?Me(e,n[e]):Oe(n)}function nm(e){return{[e]:re(e)}}function im(e){const n={};for(const i of e)n[i]=re(i);return n}function rm(e,n){return Qp(n,e)?nm(e):im(n)}function om(e,n){const i=rm(e,n);return Ks(e,i)}function Pn(e,n){return n.map(i=>Me(e,i))}function am(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(n))i[r]=Me(e,n[r]);return i}function Me(e,n){const i={...n};return yt(n)?Lt(Me(e,Fe(n,[dt]))):fo(n)?wt(Me(e,Fe(n,[Hn]))):Ue(n)?Ks(e,n.properties):Ct(n)?om(e,n.keys):hn(n)?Io(Pn(e,n.parameters),Me(e,n.returns),i):bn(n)?Jn(Pn(e,n.parameters),Me(e,n.returns),i):Ui(n)?No(Me(e,n.items),i):Bi(n)?Fo(Me(e,n.items),i):ze(n)?vt(Pn(e,n.allOf),i):fe(n)?xe(Pn(e,n.anyOf),i):zt(n)?Sn(Pn(e,n.items??[]),i):Ye(n)?me(am(e,n.properties),i):fn(n)?$o(Me(e,n.items),i):Ei(n)?qs(Me(e,n.item),i):n}function sm(e,n){const i={};for(const r of e)i[r]=Me(r,n);return i}function lm(e,n,i){const r=lt(e)?St(e):e,o=n({[v]:"MappedKey",keys:r}),a=sm(r,o);return me(a,i)}function cm(e){return x(Fe(e,[dt]))}function dm(e){return x({...e,[dt]:"Optional"})}function pm(e,n){return n===!1?cm(e):dm(e)}function Lt(e,n){const i=n??!0;return Ue(e)?fm(e,i):pm(e,i)}function um(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Lt(e[r],n);return i}function mm(e,n){return um(e.properties,n)}function fm(e,n){const i=mm(e,n);return Oe(i)}function Dr(e,n={}){const i=e.every(o=>Ye(o)),r=lt(n.unevaluatedProperties)?{unevaluatedProperties:n.unevaluatedProperties}:{};return x(n.unevaluatedProperties===!1||lt(n.unevaluatedProperties)||i?{...r,[v]:"Intersect",type:"object",allOf:e}:{...r,[v]:"Intersect",allOf:e},n)}function gm(e){return e.every(n=>yt(n))}function hm(e){return Fe(e,[dt])}function Oa(e){return e.map(n=>yt(n)?hm(n):n)}function bm(e,n){return gm(e)?Lt(Dr(Oa(e),n)):Dr(Oa(e),n)}function Gs(e,n={}){if(e.length===1)return x(e[0],n);if(e.length===0)return te(n);if(e.some(i=>Di(i)))throw new Error("Cannot intersect transform types");return bm(e,n)}function vt(e,n){if(e.length===1)return x(e[0],n);if(e.length===0)return te(n);if(e.some(i=>Di(i)))throw new Error("Cannot intersect transform types");return Dr(e,n)}function Xn(...e){const[n,i]=typeof e[0]=="string"?[e[0],e[1]]:[e[0].$id,e[1]];if(typeof n!="string")throw new Xe("Ref: $ref must be a string");return x({[v]:"Ref",$ref:n},i)}function ym(e,n){return le("Awaited",[le(e,n)])}function Om(e){return le("Awaited",[Xn(e)])}function xm(e){return vt(Vs(e))}function Sm(e){return xe(Vs(e))}function wm(e){return Ji(e)}function Vs(e){return e.map(n=>Ji(n))}function Ji(e,n){return x(gn(e)?ym(e.target,e.parameters):ze(e)?xm(e.allOf):fe(e)?Sm(e.anyOf):Ei(e)?wm(e.item):$e(e)?Om(e.$ref):e,n)}function Js(e){const n=[];for(const i of e)n.push(Xi(i));return n}function Lm(e){const n=Js(e);return ru(n)}function vm(e){const n=Js(e);return iu(n)}function Pm(e){return e.map((n,i)=>i.toString())}function $m(e){return["[number]"]}function Nm(e){return globalThis.Object.getOwnPropertyNames(e)}function Im(e){return zr?globalThis.Object.getOwnPropertyNames(e).map(i=>i[0]==="^"&&i[i.length-1]==="$"?i.slice(1,i.length-1):i):[]}function Xi(e){return ze(e)?Lm(e.allOf):fe(e)?vm(e.anyOf):zt(e)?Pm(e.items??[]):fn(e)?$m(e.items):Ye(e)?Nm(e.properties):Ci(e)?Im(e.patternProperties):[]}let zr=!1;function vi(e){zr=!0;const n=Xi(e);return zr=!1,`^(${n.map(r=>`(${r})`).join("|")})$`}function km(e,n){return le("KeyOf",[le(e,n)])}function Am(e){return le("KeyOf",[Xn(e)])}function Tm(e,n){const i=Xi(e),r=Fm(i),o=xn(r);return x(o,n)}function Fm(e){return e.map(n=>n==="[number]"?qt():re(n))}function jo(e,n){return gn(e)?km(e.target,e.parameters):$e(e)?Am(e.$ref):Ue(e)?Um(e,n):Tm(e,n)}function jm(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=jo(e[r],Ae(n));return i}function Rm(e,n){return jm(e.properties,n)}function Um(e,n){const i=Rm(e,n);return Oe(i)}function Mm(e){const n=[];for(const i of e)n.push(...Xi(i));return eu(n)}function Bm(e){return e.filter(n=>!Kn(n))}function Em(e,n){const i=[];for(const r of e)i.push(...Hs(r,[n]));return Bm(i)}function Cm(e,n){const i={};for(const r of n)i[r]=Gs(Em(e,r));return i}function Dm(e,n){const i=Mm(e),r=Cm(e,i);return me(r,n)}function Xs(e){return x({[v]:"Date",type:"Date"},e)}function Ys(e){return x({[v]:"Null",type:"null"},e)}function Zs(e){return x({[v]:"Symbol",type:"symbol"},e)}function Qs(e){return x({[v]:"Undefined",type:"undefined"},e)}function el(e){return x({[v]:"Uint8Array",type:"Uint8Array"},e)}function Yi(e){return x({[v]:"Unknown"},e)}function zm(e){return e.map(n=>Ro(n,!1))}function _m(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=wt(Ro(e[i],!1));return n}function ai(e,n){return n===!0?e:wt(e)}function Ro(e,n){return mp(e)||gp(e)?ai(Un(),n):Ie(e)?wt(Sn(zm(e))):_n(e)?el():co(e)?Xs():oe(e)?ai(me(_m(e)),n):fp(e)?ai(Jn([],Yi()),n):ie(e)?Qs():hp(e)?Ys():bp(e)?Zs():us(e)?To():tt(e)||zn(e)||ne(e)?re(e):me({})}function Wm(e,n){return x(Ro(e,!0),n)}function Hm(e,n){return hn(e)?Sn(e.parameters,n):te(n)}function qm(e,n){if(ie(e))throw new Error("Enum undefined or empty");const i=globalThis.Object.getOwnPropertyNames(e).filter(a=>isNaN(a)).map(a=>e[a]),o=[...new Set(i)].map(a=>re(a));return xe(o,{...n,[Ri]:"Enum"})}class Km extends Xe{}var f;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(f||(f={}));function De(e){return e===f.False?e:f.True}function wn(e){throw new Km(e)}function ae(e){return xt(e)||Ht(e)||ct(e)||Ve(e)||Ke(e)}function se(e,n){return xt(n)?il():Ht(n)?Zi(e,n):ct(n)?Mo(e,n):Ve(n)?sl():Ke(n)?Uo():wn("StructuralRight")}function Uo(e,n){return f.True}function Gm(e,n){return Ht(n)?Zi(e,n):ct(n)&&n.anyOf.some(i=>Ke(i)||Ve(i))?f.True:ct(n)?f.Union:Ve(n)||Ke(n)?f.True:f.Union}function Vm(e,n){return Ve(e)?f.False:Ke(e)?f.Union:xt(e)?f.True:f.False}function Jm(e,n){return Q(n)&&Qi(n)?f.True:ae(n)?se(e,n):_t(n)?De(K(e.items,n.items)):f.False}function Xm(e,n){return ae(n)?se(e,n):xo(n)?De(K(e.items,n.items)):f.False}function Ym(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):zi(n)?f.True:f.False}function tl(e,n){return ks(e)||Wt(e)?f.True:f.False}function Zm(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):Wt(n)?f.True:f.False}function Qm(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):_i(n)?e.parameters.length>n.parameters.length?f.False:e.parameters.every((i,r)=>De(K(n.parameters[r],i))===f.True)?De(K(e.returns,n.returns)):f.False:f.False}function ef(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):Wi(n)?f.True:f.False}function tf(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):Hi(n)?e.parameters.length>n.parameters.length?f.False:e.parameters.every((i,r)=>De(K(n.parameters[r],i))===f.True)?De(K(e.returns,n.returns)):f.False:f.False}function nl(e,n){return Ot(e)&&tt(e.const)||Pe(e)||pt(e)?f.True:f.False}function nf(e,n){return pt(n)||Pe(n)?f.True:ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):f.False}function Zi(e,n){return n.allOf.every(i=>K(e,i)===f.True)?f.True:f.False}function rf(e,n){return e.allOf.some(i=>K(i,n)===f.True)?f.True:f.False}function of(e,n){return ae(n)?se(e,n):So(n)?De(K(e.items,n.items)):f.False}function af(e,n){return Ot(n)&&n.const===e.const?f.True:ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):Ge(n)?al(e):Pe(n)?rl(e):pt(n)?nl(e):Wt(n)?tl(e):f.False}function il(e,n){return f.False}function sf(e,n){return f.True}function xa(e){let[n,i]=[e,0];for(;an(n);)n=n.not,i+=1;return i%2===0?n:Yi()}function lf(e,n){return an(e)?K(xa(e),n):an(n)?K(e,xa(n)):wn("Invalid fallthrough for Not")}function cf(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):wo(n)?f.True:f.False}function rl(e,n){return Is(e)||Pe(e)||pt(e)?f.True:f.False}function df(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):pt(n)||Pe(n)?f.True:f.False}function Ne(e,n){return Object.getOwnPropertyNames(e.properties).length===n}function Sa(e){return Qi(e)}function wa(e){return Ne(e,0)||Ne(e,1)&&"description"in e.properties&&ct(e.properties.description)&&e.properties.description.anyOf.length===2&&(Ge(e.properties.description.anyOf[0])&&Ut(e.properties.description.anyOf[1])||Ge(e.properties.description.anyOf[1])&&Ut(e.properties.description.anyOf[0]))}function Sr(e){return Ne(e,0)}function La(e){return Ne(e,0)}function pf(e){return Ne(e,0)}function uf(e){return Ne(e,0)}function mf(e){return Qi(e)}function ff(e){const n=qt();return Ne(e,0)||Ne(e,1)&&"length"in e.properties&&De(K(e.properties.length,n))===f.True}function gf(e){return Ne(e,0)}function Qi(e){const n=qt();return Ne(e,0)||Ne(e,1)&&"length"in e.properties&&De(K(e.properties.length,n))===f.True}function hf(e){const n=Jn([Un()],Un());return Ne(e,0)||Ne(e,1)&&"then"in e.properties&&De(K(e.properties.then,n))===f.True}function ol(e,n){return K(e,n)===f.False||wi(e)&&!wi(n)?f.False:f.True}function we(e,n){return Ve(e)?f.False:Ke(e)?f.Union:xt(e)||Ns(e)&&Sa(n)||Is(e)&&Sr(n)||ks(e)&&La(n)||jn(e)&&wa(n)||zi(e)&&pf(n)||Ge(e)&&Sa(n)||jn(e)&&wa(n)||Pe(e)&&Sr(n)||pt(e)&&Sr(n)||Wt(e)&&La(n)||Vn(e)&&mf(n)||Wi(e)&&uf(n)||_i(e)&&gf(n)||Hi(e)&&ff(n)?f.True:be(e)&&Ge(_r(e))?n[Ri]==="Record"?f.True:f.False:be(e)&&Pe(_r(e))?Ne(n,0)?f.True:f.False:f.False}function bf(e,n){return ae(n)?se(e,n):be(n)?_e(e,n):Q(n)?(()=>{for(const i of Object.getOwnPropertyNames(n.properties)){if(!(i in e.properties)&&!wi(n.properties[i]))return f.False;if(wi(n.properties[i]))return f.True;if(ol(e.properties[i],n.properties[i])===f.False)return f.False}return f.True})():f.False}function yf(e,n){return ae(n)?se(e,n):Q(n)&&hf(n)?f.True:Lo(n)?De(K(e.item,n.item)):f.False}function _r(e){return sn in e.patternProperties?qt():ln in e.patternProperties?Mt():wn("Unknown record key pattern")}function Wr(e){return sn in e.patternProperties?e.patternProperties[sn]:ln in e.patternProperties?e.patternProperties[ln]:wn("Unable to get record value schema")}function _e(e,n){const[i,r]=[_r(n),Wr(n)];return Ns(e)&&Pe(i)&&De(K(e,r))===f.True?f.True:Vn(e)&&Pe(i)||Ge(e)&&Pe(i)||_t(e)&&Pe(i)?K(e,r):Q(e)?(()=>{for(const o of Object.getOwnPropertyNames(e.properties))if(ol(r,e.properties[o])===f.False)return f.False;return f.True})():f.False}function Of(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):be(n)?K(Wr(e),Wr(n)):f.False}function xf(e,n){const i=Fn(e)?Mt():e,r=Fn(n)?Mt():n;return K(i,r)}function al(e,n){return Ot(e)&&ne(e.const)||Ge(e)?f.True:f.False}function Sf(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):Ge(n)?f.True:f.False}function wf(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):jn(n)?f.True:f.False}function Lf(e,n){return Rn(e)?K(Li(e),n):Rn(n)?K(e,Li(n)):wn("Invalid fallthrough for TemplateLiteral")}function vf(e,n){return _t(n)&&e.items!==void 0&&e.items.every(i=>K(i,n.items)===f.True)}function Pf(e,n){return xt(e)?f.True:Ve(e)?f.False:Ke(e)?f.Union:f.False}function $f(e,n){return ae(n)?se(e,n):Q(n)&&Qi(n)||_t(n)&&vf(e,n)?f.True:qi(n)?ie(e.items)&&!ie(n.items)||!ie(e.items)&&ie(n.items)?f.False:ie(e.items)&&!ie(n.items)||e.items.every((i,r)=>K(i,n.items[r])===f.True)?f.True:f.False:f.False}function Nf(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):Vn(n)?f.True:f.False}function If(e,n){return ae(n)?se(e,n):Q(n)?we(e,n):be(n)?_e(e,n):Ki(n)?Tf(e):Ut(n)?f.True:f.False}function Mo(e,n){return n.anyOf.some(i=>K(e,i)===f.True)?f.True:f.False}function kf(e,n){return e.anyOf.every(i=>K(i,n)===f.True)?f.True:f.False}function sl(e,n){return f.True}function Af(e,n){return xt(n)?il():Ht(n)?Zi(e,n):ct(n)?Mo(e,n):Ke(n)?Uo():Ge(n)?al(e):Pe(n)?rl(e):pt(n)?nl(e):Wt(n)?tl(e):_t(n)?Vm(e):qi(n)?Pf(e):Q(n)?we(e,n):Ve(n)?f.True:f.False}function Tf(e,n){return Ut(e)||Ut(e)?f.True:f.False}function Ff(e,n){return Ht(n)?Zi(e,n):ct(n)?Mo(e,n):Ve(n)?sl():Ke(n)?Uo():Q(n)?we(e,n):Ki(n)?f.True:f.False}function K(e,n){return Rn(e)||Rn(n)?Lf(e,n):Fn(e)||Fn(n)?xf(e,n):an(e)||an(n)?lf(e,n):Ke(e)?Gm(e,n):_t(e)?Jm(e,n):zi(e)?Ym(e,n):Wt(e)?Zm(e,n):xo(e)?Xm(e,n):_i(e)?Qm(e,n):Wi(e)?ef(e,n):Hi(e)?tf(e,n):pt(e)?nf(e,n):Ht(e)?rf(e,n):So(e)?of(e,n):Ot(e)?af(e,n):xt(e)?sf():wo(e)?cf(e,n):Pe(e)?df(e,n):Q(e)?bf(e,n):be(e)?Of(e,n):Ge(e)?Sf(e,n):jn(e)?wf(e,n):qi(e)?$f(e,n):Lo(e)?yf(e,n):Vn(e)?Nf(e,n):Ut(e)?If(e,n):ct(e)?kf(e,n):Ve(e)?Af(e,n):Ki(e)?Ff(e,n):wn(`Unknown left type operand '${e[v]}'`)}function Yn(e,n){return K(e,n)}function jf(e,n,i,r,o){const a={};for(const s of globalThis.Object.getOwnPropertyNames(e))a[s]=Bo(e[s],n,i,r,Ae(o));return a}function Rf(e,n,i,r,o){return jf(e.properties,n,i,r,o)}function Uf(e,n,i,r,o){const a=Rf(e,n,i,r,o);return Oe(a)}function Mf(e,n,i,r){const o=Yn(e,n);return o===f.Union?xe([i,r]):o===f.True?i:r}function Bo(e,n,i,r,o){return Ue(e)?Uf(e,n,i,r,o):Ct(e)?x(Df(e,n,i,r,o)):x(Mf(e,n,i,r),o)}function Bf(e,n,i,r,o){return{[e]:Bo(re(e),n,i,r,Ae(o))}}function Ef(e,n,i,r,o){return e.reduce((a,s)=>({...a,...Bf(s,n,i,r,o)}),{})}function Cf(e,n,i,r,o){return Ef(e.keys,n,i,r,o)}function Df(e,n,i,r,o){const a=Cf(e,n,i,r,o);return Oe(a)}function zf(e){return e.allOf.every(n=>Zn(n))}function _f(e){return e.anyOf.some(n=>Zn(n))}function Wf(e){return!Zn(e.not)}function Zn(e){return e[v]==="Intersect"?zf(e):e[v]==="Union"?_f(e):e[v]==="Not"?Wf(e):e[v]==="Undefined"}function Hf(e,n){return Eo(Li(e),n)}function qf(e,n){const i=e.filter(r=>Yn(r,n)===f.False);return i.length===1?i[0]:xe(i)}function Eo(e,n,i={}){return Dt(e)?x(Hf(e,n),i):Ue(e)?x(Vf(e,n),i):x(fe(e)?qf(e.anyOf,n):Yn(e,n)!==f.False?te():e,i)}function Kf(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Eo(e[r],n);return i}function Gf(e,n){return Kf(e.properties,n)}function Vf(e,n){const i=Gf(e,n);return Oe(i)}function Jf(e,n){return Co(Li(e),n)}function Xf(e,n){const i=e.filter(r=>Yn(r,n)!==f.False);return i.length===1?i[0]:xe(i)}function Co(e,n,i){return Dt(e)?x(Jf(e,n),i):Ue(e)?x(Qf(e,n),i):x(fe(e)?Xf(e.anyOf,n):Yn(e,n)!==f.False?e:te(),i)}function Yf(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Co(e[r],n);return i}function Zf(e,n){return Yf(e.properties,n)}function Qf(e,n){const i=Zf(e,n);return Oe(i)}function eg(e,n){return hn(e)?x(e.returns,n):te(n)}function ll(e){return wt(Lt(e))}function Kt(e,n,i){return x({[v]:"Record",type:"object",patternProperties:{[e]:n}},i)}function Do(e,n,i){const r={};for(const o of e)r[o]=n;return me(r,{...i,[Ri]:"Record"})}function tg(e,n,i){return Su(e)?Do(St(e),n,i):Kt(e.pattern,n,i)}function ng(e,n,i){return Do(St(xe(e)),n,i)}function ig(e,n,i){return Do([e.toString()],n,i)}function rg(e,n,i){return Kt(e.source,n,i)}function og(e,n,i){const r=ie(e.pattern)?ln:e.pattern;return Kt(r,n,i)}function ag(e,n,i){return Kt(ln,n,i)}function sg(e,n,i){return Kt(Zp,n,i)}function lg(e,n,i){return me({true:n,false:n},i)}function cg(e,n,i){return Kt(sn,n,i)}function dg(e,n,i){return Kt(sn,n,i)}function cl(e,n,i={}){return fe(e)?ng(e.anyOf,n,i):Dt(e)?tg(e,n,i):Et(e)?ig(e.const,n,i):qn(e)?lg(e,n,i):yn(e)?cg(e,n,i):On(e)?dg(e,n,i):Ss(e)?rg(e,n,i):Gn(e)?og(e,n,i):ys(e)?ag(e,n,i):Kn(e)?sg(e,n,i):te(i)}function zo(e){return globalThis.Object.getOwnPropertyNames(e.patternProperties)[0]}function pg(e){const n=zo(e);return n===ln?Mt():n===sn?qt():Mt({pattern:n})}function dl(e){return e.patternProperties[zo(e)]}function ug(e,n){return n.parameters=Qn(e,n.parameters),n.returns=Je(e,n.returns),n}function mg(e,n){return n.parameters=Qn(e,n.parameters),n.returns=Je(e,n.returns),n}function fg(e,n){return n.allOf=Qn(e,n.allOf),n}function gg(e,n){return n.anyOf=Qn(e,n.anyOf),n}function hg(e,n){return ie(n.items)||(n.items=Qn(e,n.items)),n}function bg(e,n){return n.items=Je(e,n.items),n}function yg(e,n){return n.items=Je(e,n.items),n}function Og(e,n){return n.items=Je(e,n.items),n}function xg(e,n){return n.item=Je(e,n.item),n}function Sg(e,n){const i=Pg(e,n.properties);return{...n,...me(i)}}function wg(e,n){const i=Je(e,pg(n)),r=Je(e,dl(n)),o=cl(i,r);return{...n,...o}}function Lg(e,n){return n.index in e?e[n.index]:Yi()}function vg(e,n){const i=fo(n),r=yt(n),o=Je(e,n);return i&&r?ll(o):i&&!r?wt(o):!i&&r?Lt(o):o}function Pg(e,n){return globalThis.Object.getOwnPropertyNames(n).reduce((i,r)=>({...i,[r]:vg(e,n[r])}),{})}function Qn(e,n){return n.map(i=>Je(e,i))}function Je(e,n){return hn(n)?ug(e,n):bn(n)?mg(e,n):ze(n)?fg(e,n):fe(n)?gg(e,n):zt(n)?hg(e,n):fn(n)?bg(e,n):Ui(n)?yg(e,n):Bi(n)?Og(e,n):Ei(n)?xg(e,n):Ye(n)?Sg(e,n):Ci(n)?wg(e,n):Os(n)?Lg(e,n):n}function $g(e,n){return Je(n,po(e))}function Ng(e){return x({[v]:"Integer",type:"integer"},e)}function Ig(e,n,i){return{[e]:Ln(re(e),n,Ae(i))}}function kg(e,n,i){return e.reduce((o,a)=>({...o,...Ig(a,n,i)}),{})}function Ag(e,n,i){return kg(e.keys,n,i)}function Tg(e,n,i){const r=Ag(e,n,i);return Oe(r)}function Fg(e){const[n,i]=[e.slice(0,1),e.slice(1)];return[n.toLowerCase(),i].join("")}function jg(e){const[n,i]=[e.slice(0,1),e.slice(1)];return[n.toUpperCase(),i].join("")}function Rg(e){return e.toUpperCase()}function Ug(e){return e.toLowerCase()}function Mg(e,n,i){const r=Ao(e.pattern);if(!Bn(r))return{...e,pattern:pl(e.pattern,n)};const s=[...Gi(r)].map(d=>re(d)),c=ul(s,n),l=xe(c);return zs([l],i)}function pl(e,n){return typeof e=="string"?n==="Uncapitalize"?Fg(e):n==="Capitalize"?jg(e):n==="Uppercase"?Rg(e):n==="Lowercase"?Ug(e):e:e.toString()}function ul(e,n){return e.map(i=>Ln(i,n))}function Ln(e,n,i={}){return Ct(e)?Tg(e,n,i):Dt(e)?Mg(e,n,i):fe(e)?xe(ul(e.anyOf,n),i):Et(e)?re(pl(e.const,n),i):x(e,i)}function Bg(e,n={}){return Ln(e,"Capitalize",n)}function Eg(e,n={}){return Ln(e,"Lowercase",n)}function Cg(e,n={}){return Ln(e,"Uncapitalize",n)}function Dg(e,n={}){return Ln(e,"Uppercase",n)}function zg(e,n,i){const r={};for(const o of globalThis.Object.getOwnPropertyNames(e))r[o]=er(e[o],n,Ae(i));return r}function _g(e,n,i){return zg(e.properties,n,i)}function Wg(e,n,i){const r=_g(e,n,i);return Oe(r)}function Hg(e,n){return e.map(i=>_o(i,n))}function qg(e,n){return e.map(i=>_o(i,n))}function Kg(e,n){const{[n]:i,...r}=e;return r}function Gg(e,n){return n.reduce((i,r)=>Kg(i,r),e)}function Vg(e,n){const i=Fe(e,[Ee,"$id","required","properties"]),r=Gg(e.properties,n);return me(r,i)}function Jg(e){const n=e.reduce((i,r)=>xs(r)?[...i,re(r)]:i,[]);return xe(n)}function _o(e,n){return ze(e)?vt(Hg(e.allOf,n)):fe(e)?xe(qg(e.anyOf,n)):Ye(e)?Vg(e,n):me({})}function er(e,n,i){const r=Ie(n)?Jg(n):n,o=lt(n)?St(n):n,a=$e(e),s=$e(n);return Ue(e)?Wg(e,o,i):Ct(n)?Qg(e,n,i):a&&s?le("Omit",[e,r],i):!a&&s?le("Omit",[e,r],i):a&&!s?le("Omit",[e,r],i):x({..._o(e,o),...i})}function Xg(e,n,i){return{[n]:er(e,[n],Ae(i))}}function Yg(e,n,i){return n.reduce((r,o)=>({...r,...Xg(e,o,i)}),{})}function Zg(e,n,i){return Yg(e,n.keys,i)}function Qg(e,n,i){const r=Zg(e,n,i);return Oe(r)}function eh(e,n,i){const r={};for(const o of globalThis.Object.getOwnPropertyNames(e))r[o]=tr(e[o],n,Ae(i));return r}function th(e,n,i){return eh(e.properties,n,i)}function nh(e,n,i){const r=th(e,n,i);return Oe(r)}function ih(e,n){return e.map(i=>Wo(i,n))}function rh(e,n){return e.map(i=>Wo(i,n))}function oh(e,n){const i={};for(const r of n)r in e&&(i[r]=e[r]);return i}function ah(e,n){const i=Fe(e,[Ee,"$id","required","properties"]),r=oh(e.properties,n);return me(r,i)}function sh(e){const n=e.reduce((i,r)=>xs(r)?[...i,re(r)]:i,[]);return xe(n)}function Wo(e,n){return ze(e)?vt(ih(e.allOf,n)):fe(e)?xe(rh(e.anyOf,n)):Ye(e)?ah(e,n):me({})}function tr(e,n,i){const r=Ie(n)?sh(n):n,o=lt(n)?St(n):n,a=$e(e),s=$e(n);return Ue(e)?nh(e,o,i):Ct(n)?ph(e,n,i):a&&s?le("Pick",[e,r],i):!a&&s?le("Pick",[e,r],i):a&&!s?le("Pick",[e,r],i):x({...Wo(e,o),...i})}function lh(e,n,i){return{[n]:tr(e,[n],Ae(i))}}function ch(e,n,i){return n.reduce((r,o)=>({...r,...lh(e,o,i)}),{})}function dh(e,n,i){return ch(e,n.keys,i)}function ph(e,n,i){const r=dh(e,n,i);return Oe(r)}function uh(e,n){return le("Partial",[le(e,n)])}function mh(e){return le("Partial",[Xn(e)])}function fh(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=Lt(e[i]);return n}function gh(e){const n=Fe(e,[Ee,"$id","required","properties"]),i=fh(e.properties);return me(i,n)}function va(e){return e.map(n=>ml(n))}function ml(e){return gn(e)?uh(e.target,e.parameters):$e(e)?mh(e.$ref):ze(e)?vt(va(e.allOf)):fe(e)?xe(va(e.anyOf)):Ye(e)?gh(e):Mi(e)||qn(e)||yn(e)||Et(e)||go(e)||On(e)||Gn(e)||ho(e)||bo(e)?e:me({})}function Ho(e,n){return Ue(e)?yh(e,n):x({...ml(e),...n})}function hh(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Ho(e[r],Ae(n));return i}function bh(e,n){return hh(e.properties,n)}function yh(e,n){const i=bh(e,n);return Oe(i)}function Oh(e,n){return le("Required",[le(e,n)])}function xh(e){return le("Required",[Xn(e)])}function Sh(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=Fe(e[i],[dt]);return n}function wh(e){const n=Fe(e,[Ee,"$id","required","properties"]),i=Sh(e.properties);return me(i,n)}function Pa(e){return e.map(n=>fl(n))}function fl(e){return gn(e)?Oh(e.target,e.parameters):$e(e)?xh(e.$ref):ze(e)?vt(Pa(e.allOf)):fe(e)?xe(Pa(e.anyOf)):Ye(e)?wh(e):Mi(e)||qn(e)||yn(e)||Et(e)||go(e)||On(e)||Gn(e)||ho(e)||bo(e)?e:me({})}function qo(e,n){return Ue(e)?Ph(e,n):x({...fl(e),...n})}function Lh(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=qo(e[r],n);return i}function vh(e,n){return Lh(e.properties,n)}function Ph(e,n){const i=vh(e,n);return Oe(i)}function $h(e,n){return n.map(i=>$e(i)?Ko(e,i.$ref):je(e,i))}function Ko(e,n){return n in e?$e(e[n])?Ko(e,e[n].$ref):je(e,e[n]):te()}function Nh(e){return Ji(e[0])}function Ih(e){return Vi(e[0],e[1])}function kh(e){return jo(e[0])}function Ah(e){return Ho(e[0])}function Th(e){return er(e[0],e[1])}function Fh(e){return tr(e[0],e[1])}function jh(e){return qo(e[0])}function Rh(e,n,i){const r=$h(e,i);return n==="Awaited"?Nh(r):n==="Index"?Ih(r):n==="KeyOf"?kh(r):n==="Partial"?Ah(r):n==="Omit"?Th(r):n==="Pick"?Fh(r):n==="Required"?jh(r):te()}function Uh(e,n){return $o(je(e,n))}function Mh(e,n){return No(je(e,n))}function Bh(e,n,i){return Io(ei(e,n),je(e,i))}function Eh(e,n,i){return Jn(ei(e,n),je(e,i))}function Ch(e,n){return vt(ei(e,n))}function Dh(e,n){return Fo(je(e,n))}function zh(e,n){return me(globalThis.Object.keys(n).reduce((i,r)=>({...i,[r]:je(e,n[r])}),{}))}function _h(e,n){const[i,r]=[je(e,dl(n)),zo(n)],o=po(n);return o.patternProperties[r]=i,o}function Wh(e,n){return $e(n)?{...Ko(e,n.$ref),[Ee]:n[Ee]}:n}function Hh(e,n){return Sn(ei(e,n))}function qh(e,n){return xe(ei(e,n))}function ei(e,n){return n.map(i=>je(e,i))}function je(e,n){return yt(n)?x(je(e,Fe(n,[dt])),n):fo(n)?x(je(e,Fe(n,[Hn])),n):Di(n)?x(Wh(e,n),n):fn(n)?x(Uh(e,n.items),n):Ui(n)?x(Mh(e,n.items),n):gn(n)?x(Rh(e,n.target,n.parameters)):hn(n)?x(Bh(e,n.parameters,n.returns),n):bn(n)?x(Eh(e,n.parameters,n.returns),n):ze(n)?x(Ch(e,n.allOf),n):Bi(n)?x(Dh(e,n.items),n):Ye(n)?x(zh(e,n.properties),n):Ci(n)?x(_h(e,n)):zt(n)?x(Hh(e,n.items||[]),n):fe(n)?x(qh(e,n.anyOf),n):n}function Kh(e,n){return n in e?je(e,e[n]):te()}function Gh(e){return globalThis.Object.getOwnPropertyNames(e).reduce((n,i)=>({...n,[i]:Kh(e,i)}),{})}class Vh{constructor(n){const i=Gh(n),r=this.WithIdentifiers(i);this.$defs=r}Import(n,i){const r={...this.$defs,[n]:x(this.$defs[n],i)};return x({[v]:"Import",$defs:r,$ref:n})}WithIdentifiers(n){return globalThis.Object.getOwnPropertyNames(n).reduce((i,r)=>({...i,[r]:{...n[r],$id:r}}),{})}}function Jh(e){return new Vh(e)}function Xh(e,n){return x({[v]:"Not",not:e},n)}function Yh(e,n){return bn(e)?Sn(e.parameters,n):te()}let Zh=0;function Qh(e,n={}){ie(n.$id)&&(n.$id=`T${Zh++}`);const i=po(e({[v]:"This",$ref:`${n.$id}`}));return i.$id=n.$id,x({[Ri]:"Recursive",...i},n)}function eb(e,n){const i=ne(e)?new globalThis.RegExp(e):e;return x({[v]:"RegExp",type:"RegExp",source:i.source,flags:i.flags},n)}function tb(e){return ze(e)?e.allOf:fe(e)?e.anyOf:zt(e)?e.items??[]:[]}function nb(e){return tb(e)}function ib(e,n){return bn(e)?x(e.returns,n):te(n)}class rb{constructor(n){this.schema=n}Decode(n){return new ob(this.schema,n)}}class ob{constructor(n,i){this.schema=n,this.decode=i}EncodeTransform(n,i){const a={Encode:s=>i[Ee].Encode(n(s)),Decode:s=>this.decode(i[Ee].Decode(s))};return{...i,[Ee]:a}}EncodeSchema(n,i){const r={Decode:this.decode,Encode:n};return{...i,[Ee]:r}}Encode(n){return Di(this.schema)?this.EncodeTransform(n,this.schema):this.EncodeSchema(n,this.schema)}}function ab(e){return new rb(e)}function sb(e={}){return x({[v]:e[v]??"Unsafe"},e)}function lb(e){return x({[v]:"Void",type:"void"},e)}const cb=Object.freeze(Object.defineProperty({__proto__:null,Any:Un,Argument:ou,Array:$o,AsyncIterator:No,Awaited:Ji,BigInt:To,Boolean:Cs,Capitalize:Bg,Composite:Dm,Const:Wm,Constructor:Io,ConstructorParameters:Hm,Date:Xs,Enum:qm,Exclude:Eo,Extends:Bo,Extract:Co,Function:Jn,Index:Vi,InstanceType:eg,Instantiate:$g,Integer:Ng,Intersect:vt,Iterator:Fo,KeyOf:jo,Literal:re,Lowercase:Eg,Mapped:lm,Module:Jh,Never:te,Not:Xh,Null:Ys,Number:qt,Object:me,Omit:er,Optional:Lt,Parameters:Yh,Partial:Ho,Pick:tr,Promise:qs,Readonly:wt,ReadonlyOptional:ll,Record:cl,Recursive:Qh,Ref:Xn,RegExp:eb,Required:qo,Rest:nb,ReturnType:ib,String:Mt,Symbol:Zs,TemplateLiteral:zs,Transform:ab,Tuple:Sn,Uint8Array:el,Uncapitalize:Cg,Undefined:Qs,Union:xe,Unknown:Yi,Unsafe:sb,Uppercase:Dg,Void:lb},Symbol.toStringTag,{value:"Module"})),t=cb;var db=["Arial","Calibri","Cambria","Consolas","Courier New","Georgia","Segoe UI","Tahoma","Times New Roman","Trebuchet MS","Verdana","Helvetica","Helvetica Neue","Menlo","Monaco"];function W0(e){const n=e.toLowerCase();return db.some(i=>i.toLowerCase()===n)}var Tt=t.String({description:"Font family name. Prefer a SAFE_FONTS entry (Arial, Calibri, Cambria, Consolas, Courier New, Georgia, Segoe UI, Tahoma, Times New Roman, Trebuchet MS, Verdana, Helvetica, Helvetica Neue, Menlo, Monaco) for zero-setup rendering. For any other font, register it in props.fontRegistry[] and reference it here by family. Unregistered non-safe names render with a host fallback.",examples:["Arial","Calibri","Georgia","Inter","Roboto"]}),ti=t.Number({minimum:100,maximum:900,description:"OpenType weight (100 thin ... 900 black). Default 400."}),nr=t.Boolean({description:"Whether this source is italic. Default false."}),pb=t.Object({kind:t.Literal("safe"),family:t.String({description:"A SAFE_FONTS name — installed with Office."})},{additionalProperties:!1,description:"Office-installed font — no embedding"}),ub=t.Object({kind:t.Literal("google"),family:t.String({description:'Exact Google Fonts family name (e.g. "Inter").'}),weights:t.Optional(t.Array(ti,{description:"Weights to fetch. Default [400, 700]."})),italics:t.Optional(t.Boolean({description:"Include italic variants. Default false."}))},{additionalProperties:!1,description:"Google Fonts — auto-fetched and embedded"}),mb=t.Object({kind:t.Literal("file"),path:t.String({description:"Path to a .ttf/.otf file. Relative paths are resolved against the JSON document file."}),weight:t.Optional(ti),italic:t.Optional(nr)},{additionalProperties:!1,description:"Local font file to embed"}),fb=t.Object({kind:t.Literal("url"),url:t.String({description:"HTTPS URL of a TTF or OTF file."}),weight:t.Optional(ti),italic:t.Optional(nr)},{additionalProperties:!1,description:"Direct TTF/OTF URL (non-Google CDN)"}),gb=t.Object({kind:t.Literal("variable"),url:t.String({description:"HTTPS URL of a variable TTF (`fvar` axis table required)."}),weight:ti,italic:t.Optional(nr),axes:t.Optional(t.Record(t.String(),t.Number(),{description:"Additional axis pin values (e.g. `{ ital: 1, opsz: 14 }`) merged on top of the derived `wght` pin. Uncommon — the `weight` field is usually enough."}))},{additionalProperties:!1,description:"Variable-font instancer. The fetcher pins `wght` to `weight` (plus any `axes` overrides) and emits a clean static TTF, bypassing upstream distributions that collapse multiple static weights onto the same glyph geometry."}),hb=t.Object({kind:t.Literal("data"),data:t.String({description:"Base64-encoded TTF/OTF or data: URL (data:font/ttf;base64,...). Makes the JSON self-contained at the cost of size."}),weight:t.Optional(ti),italic:t.Optional(nr)},{additionalProperties:!1,description:"Inline base64 font — portable"}),bb=t.Union([pb,ub,mb,hb,fb,gb],{description:'A single font variant source. Use kind:"safe" for installed fonts, kind:"google" for Google Fonts, kind:"file" for local files, kind:"data" for base64, kind:"url" for direct HTTPS TTF/OTF URLs, kind:"variable" to instance a variable TTF at a specific weight.'}),yb=t.Union([t.Literal("sans"),t.Literal("serif"),t.Literal("mono"),t.Literal("display"),t.Literal("handwriting")],{description:"Broad category used for fallback selection"}),Ob=t.Object({id:t.String({description:'Registry key. By convention, match the display family name ("Inter", "Roboto Slab").'}),family:t.String({description:"Display family used in font.family / fontFace / theme.fonts.*. Usually identical to id."}),category:t.Optional(yb),sources:t.Array(bb,{minItems:1,description:"One or more weight/style variants. List at least a regular (weight 400, italic false)."})},{additionalProperties:!1,description:"A font registered for this document. Referenced by family from font.family, fontFace, and theme.fonts.*."}),ir=t.Array(Ob,{description:"Document-scoped font registry. Every non-safe font used in this document must be registered here."}),gl=["eyebrow","display","stat","quote","label","footer","tableHeader","tableCell","chartLabel","tracker","source"],xb=t.Union(gl.map(e=>t.Literal(e))),Go=t.Union([t.Literal("none"),t.Literal("upper"),t.Literal("smallCaps")]),Be=t.String({pattern:"^(#?[0-9A-Fa-f]{6}|[a-zA-Z][a-zA-Z0-9]*)$",description:"Six-digit hex or a theme color/palette token. References must resolve without cycles."}),Sb=t.Object({rule:t.Optional(Be),textMuted:t.Optional(Be),onPrimary:t.Optional(Be),surfaceInverse:t.Optional(Be),positive:t.Optional(Be),negative:t.Optional(Be),chart:t.Optional(t.Array(Be,{minItems:1,maxItems:12}))},{additionalProperties:!1}),We=t.Object({face:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),weight:t.Optional(t.Integer({minimum:100,maximum:900})),size:t.Optional(t.Number({minimum:5,maximum:200,description:"Explicit size in points; takes precedence over the canvas scale."})),lineHeight:t.Optional(t.Number({minimum:.5,maximum:3})),tracking:t.Optional(t.Number({description:"Tracking in hundredths of an em."})),case:t.Optional(Go),color:t.Optional(Be),spaceBefore:t.Optional(t.Number({minimum:0})),spaceAfter:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1}),wb=t.Object({eyebrow:t.Optional(We),display:t.Optional(We),stat:t.Optional(We),quote:t.Optional(We),label:t.Optional(We),footer:t.Optional(We),tableHeader:t.Optional(We),tableCell:t.Optional(We),chartLabel:t.Optional(We),tracker:t.Optional(We),source:t.Optional(We)},{additionalProperties:!1}),si=t.Object({base:t.Number({minimum:5,maximum:200}),ratio:t.Optional(t.Number({minimum:1,maximum:2})),baselinePt:t.Optional(t.Number({exclusiveMinimum:0,maximum:24}))},{additionalProperties:!1}),Lb=t.Object({roles:t.Optional(wb),scale:t.Optional(t.Object({a4:t.Optional(si),letter:t.Optional(si),wide169:t.Optional(si),standard43:t.Optional(si)},{additionalProperties:!1}))},{additionalProperties:!1}),li=t.Object({safeAreaIn:t.Optional(t.Number({minimum:0})),gutterIn:t.Optional(t.Number({minimum:0})),columns:t.Optional(t.Integer({minimum:1,maximum:100})),rows:t.Optional(t.Integer({minimum:1,maximum:100}))},{additionalProperties:!1}),vb=t.Object({basePt:t.Optional(t.Number({exclusiveMinimum:0})),blockGap:t.Optional(t.Object({tight:t.Optional(t.Number({minimum:0})),normal:t.Optional(t.Number({minimum:0})),loose:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1})),canvas:t.Optional(t.Object({a4:t.Optional(li),letter:t.Optional(li),wide169:t.Optional(li),standard43:t.Optional(li)},{additionalProperties:!1}))},{additionalProperties:!1}),ft=t.Object({type:t.Optional(xb),color:t.Optional(Be),fill:t.Optional(Be),rule:t.Optional(t.Object({weightPt:t.Optional(t.Number({minimum:0})),color:t.Optional(Be)},{additionalProperties:!1})),padPt:t.Optional(t.Number({minimum:0})),alignment:t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")]))},{additionalProperties:!1}),Pb=t.Object({runningHead:t.Optional(ft),tracker:t.Optional(ft),actionTitle:t.Optional(ft),keyTakeaways:t.Optional(ft),sourceLine:t.Optional(ft),confidentialFooter:t.Optional(ft),logoSlot:t.Optional(ft),cover:t.Optional(ft)},{additionalProperties:!1,description:"Visual recipes; consumers land in #361. No automatic content or presence requirements."}),$b=t.Object({kind:t.Union([t.Literal("none"),t.Literal("rule"),t.Literal("corner"),t.Literal("band")]),color:t.Optional(Be),weightPt:t.Optional(t.Number({minimum:0})),placement:t.Optional(t.Union([t.Literal("top"),t.Literal("bottom"),t.Literal("left"),t.Literal("right"),t.Literal("topLeft"),t.Literal("topRight"),t.Literal("bottomLeft"),t.Literal("bottomRight")]))},{additionalProperties:!1,description:"At most one motif. Rendering consumers land in #361."}),rr={palette:t.Optional(Sb),typography:t.Optional(Lb),spacing:t.Optional(vb),chrome:t.Optional(Pb),motif:t.Optional($b)};t.Object(rr,{additionalProperties:!1});var Nb=t.String({pattern:"^#?[0-9A-Fa-f]{6}$",description:"Hex color (e.g. #FF0000)"}),Ib=["primary","secondary","accent","background","text","text2","background2","accent4","accent5","accent6"],kb=["accent1","accent2","accent3","tx1","tx2","bg1","bg2"],Vo=t.Union([Nb,...Ib.map(e=>t.Literal(e)),...kb.map(e=>t.Literal(e))],{description:"Hex color or semantic theme color name"}),hl=["title","subtitle","heading1","heading2","heading3","body","caption",...gl],bl=t.Union(hl.map(e=>t.Literal(e)),{description:"Predefined style name"}),or=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")],{description:"Horizontal alignment options"}),ar=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical alignment options"}),Jo=t.Object({type:t.Optional(t.Union([t.Literal("outer"),t.Literal("inner")],{description:"Shadow type"})),color:t.Optional(Vo),blur:t.Optional(t.Number({description:"Shadow blur radius in points"})),offset:t.Optional(t.Number({description:"Shadow offset in points"})),angle:t.Optional(t.Number({description:"Shadow angle in degrees"})),opacity:t.Optional(t.Number({minimum:0,maximum:1,description:"Shadow opacity (0-1)"}))},{description:"Shadow configuration",additionalProperties:!1}),Gt=t.Object({column:t.Number({minimum:0,description:"Starting column (0-indexed)"}),row:t.Number({minimum:0,description:"Starting row (0-indexed)"}),columnSpan:t.Optional(t.Number({minimum:1,description:"Number of columns to span (default: 1)"})),rowSpan:t.Optional(t.Number({minimum:1,description:"Number of rows to span (default: 1)"}))},{additionalProperties:!1,description:"Grid-based positioning"}),Ab=t.Object({text:t.String({description:"Run text content"}),color:t.Optional(t.String({description:"Run color (hex without # or semantic theme name)"})),bold:t.Optional(t.Boolean({description:"Bold run"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-run weight (100–900). Overrides `bold` when set — renderer picks the closest embedded variant via CSS font-matching."})),italic:t.Optional(t.Boolean({description:"Italic run"})),underline:t.Optional(t.Union([t.Boolean({description:"Simple underline toggle"}),t.Object({style:t.Optional(t.Union([t.Literal("sng"),t.Literal("dbl"),t.Literal("dash"),t.Literal("dotted")])),color:t.Optional(t.String({description:"Underline color (hex)"}))},{additionalProperties:!1})])),strike:t.Optional(t.Boolean({description:"Strikethrough run"})),fontSize:t.Optional(t.Number({minimum:1,description:"Run font size in points"})),fontFace:t.Optional(t.String({description:"Run font family"})),superscript:t.Optional(t.Boolean({description:"Render run as superscript"})),subscript:t.Optional(t.Boolean({description:"Render run as subscript"})),charSpacing:t.Optional(t.Number({description:"Character spacing in points"})),breakLine:t.Optional(t.Boolean({description:"Insert line break after this run"}))},{description:"A styled text run. Run options override component-level defaults.",additionalProperties:!1}),yl=t.Object({text:t.Optional(t.String({description:"Text content to display. Mutually exclusive with `runs` — set exactly one of the two."})),runs:t.Optional(t.Array(Ab,{minItems:1,description:"Rich text runs with per-run styling, rendered as one text block. Mutually exclusive with `text` — set exactly one of the two. Component-level props (align, valign, fill, lineSpacing, position…) still apply to the whole block."})),x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"X as percentage"})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Y as percentage"})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Width as percentage"})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Height as percentage"})])),fit:t.Optional(t.Object({maxLines:t.Optional(t.Integer({minimum:1,description:"Lines the text may occupy, estimated with the width model at the effective font size."})),shrink:t.Optional(t.Array(t.Number({minimum:1}),{minItems:1,description:"Readable font sizes to try in order when the text exceeds maxLines or the box height. The first that fits is used."}))},{additionalProperties:!1,description:"Bounded fit: estimate the lines at the effective size, step down only through the declared readable sizes, and fail generation with text_fit_overflow when nothing fits. Without maxLines the box height bounds the text; without shrink the text must fit as sized."})),fontSize:t.Optional(t.Number({minimum:1,description:"Font size in points"})),fontFace:t.Optional(Tt),color:t.Optional(t.String({description:'Text color (hex without #, e.g., "FF0000")'})),bold:t.Optional(t.Boolean({description:"Bold text"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-run weight (100–900). Renderer picks the closest embedded variant via CSS font-matching and references it through a synthetic family alias. Overrides `bold` when set."})),italic:t.Optional(t.Boolean({description:"Italic text"})),underline:t.Optional(t.Union([t.Boolean({description:"Simple underline toggle"}),t.Object({style:t.Optional(t.Union([t.Literal("sng"),t.Literal("dbl"),t.Literal("dash"),t.Literal("dotted")])),color:t.Optional(t.String({description:"Underline color (hex)"}))},{additionalProperties:!1})])),strike:t.Optional(t.Boolean({description:"Strikethrough text"})),language:t.Optional(t.String({pattern:"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",description:'Language tag (BCP-47, e.g. "en-US", "fr-FR") for spell-checking this text. Overrides the presentation default.',examples:["en-US","fr-FR","de-DE","it-IT","es-ES"]})),align:t.Optional(or),valign:t.Optional(ar),breakLine:t.Optional(t.Boolean({description:"Add line break after text"})),bullet:t.Optional(t.Union([t.Boolean({description:"Enable default bullet"}),t.Object({type:t.Optional(t.Union([t.Literal("bullet"),t.Literal("number")])),style:t.Optional(t.String({description:"Bullet character or style"})),startAt:t.Optional(t.Number({description:"Starting number for numbered lists"}))},{additionalProperties:!1})])),margin:t.Optional(t.Union([t.Number({description:"Margin in points (all sides)"}),t.Array(t.Number(),{description:"Margins as [top, right, bottom, left] in points",minItems:4,maxItems:4})])),rotate:t.Optional(t.Number({description:"Rotation angle in degrees"})),shadow:t.Optional(Jo),fill:t.Optional(t.Object({color:t.String({description:"Fill color (hex without #)"}),transparency:t.Optional(t.Number({minimum:0,maximum:100,description:"Fill transparency (0-100)"}))},{additionalProperties:!1})),hyperlink:t.Optional(t.Object({url:t.Optional(t.String({description:"Hyperlink URL"})),slide:t.Optional(t.Number({description:"Slide number to link to"})),tooltip:t.Optional(t.String({description:"Hyperlink tooltip"}))},{additionalProperties:!1})),lineSpacing:t.Optional(t.Number({description:"Line spacing in points"})),lineSpacingMultiple:t.Optional(t.Number({minimum:.1,maximum:10,description:"Line spacing as a multiple of the font size (e.g. 0.9 = 90%). Takes precedence over lineSpacing."})),charSpacing:t.Optional(t.Number({description:"Character spacing in points (positive = wider, negative = tighter)"})),paraSpaceBefore:t.Optional(t.Number({description:"Space before paragraph in points"})),paraSpaceAfter:t.Optional(t.Number({description:"Space after paragraph in points"})),grid:t.Optional(Gt),style:t.Optional(bl)},{description:"Text component props",additionalProperties:!1}),Ol=t.Object({path:t.Optional(t.String({description:"Image file path or URL (mutually exclusive with base64 and svg)"})),base64:t.Optional(t.String({description:"Base64-encoded image data in data URI format (mutually exclusive with path and svg)"})),svg:t.Optional(t.String({description:'Raw inline SVG markup, e.g. "<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 24 24\\">...</svg>" (mutually exclusive with path and base64). Wrapped into an image/svg+xml data URI and embedded as a vector (PowerPoint 2016+); intrinsic size taken from the SVG viewBox/width/height when w/h omitted.'})),x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"X as percentage"})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Y as percentage"})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Width as percentage"})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Height as percentage"})])),sizing:t.Optional(t.Object({type:t.Union([t.Literal("contain"),t.Literal("cover"),t.Literal("crop")],{description:"Image sizing strategy"}),w:t.Optional(t.Number({description:"Target width in inches"})),h:t.Optional(t.Number({description:"Target height in inches"}))},{description:"Image sizing options",additionalProperties:!1})),rotate:t.Optional(t.Number({description:"Rotation angle in degrees"})),rounding:t.Optional(t.Boolean({description:"Apply rounded corners to image"})),shadow:t.Optional(Jo),hyperlink:t.Optional(t.Object({url:t.Optional(t.String({description:"Hyperlink URL"})),slide:t.Optional(t.Number({description:"Slide number to link to"})),tooltip:t.Optional(t.String({description:"Hyperlink tooltip"}))},{additionalProperties:!1})),alt:t.Optional(t.String({description:"Alternative text for accessibility"})),grid:t.Optional(Gt)},{description:"PPTX image component props",additionalProperties:!1}),xl=t.Union([t.Literal("rect"),t.Literal("roundRect"),t.Literal("ellipse"),t.Literal("triangle"),t.Literal("diamond"),t.Literal("pentagon"),t.Literal("hexagon"),t.Literal("star5"),t.Literal("star6"),t.Literal("line"),t.Literal("arc"),t.Literal("pie"),t.Literal("blockArc"),t.Literal("chord"),t.Literal("arrow"),t.Literal("chevron"),t.Literal("cloud"),t.Literal("heart"),t.Literal("lightning")],{description:"Shape type"}),Tb=t.Object({text:t.String(),fontSize:t.Optional(t.Number({minimum:1})),fontFace:t.Optional(t.String()),color:t.Optional(t.String({description:"Segment color (hex without # or semantic name)"})),bold:t.Optional(t.Boolean()),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900})),italic:t.Optional(t.Boolean()),breakLine:t.Optional(t.Boolean({description:"Insert line break after this segment"})),spaceBefore:t.Optional(t.Number({minimum:0,description:"Space before paragraph in points"})),spaceAfter:t.Optional(t.Number({minimum:0,description:"Space after paragraph in points"})),charSpacing:t.Optional(t.Number({description:"Character spacing in points"}))},{additionalProperties:!1}),Fb=["pct5","pct10","pct20","pct25","pct30","pct40","pct50","pct60","pct70","pct75","pct80","pct90","horz","vert","ltHorz","ltVert","dkHorz","dkVert","narHorz","narVert","dashHorz","dashVert","cross","dnDiag","upDiag","ltDnDiag","ltUpDiag","dkDnDiag","dkUpDiag","wdDnDiag","wdUpDiag","dashDnDiag","dashUpDiag","diagCross","smCheck","lgCheck","smGrid","lgGrid","dotGrid","smConfetti","lgConfetti","horzBrick","diagBrick","solidDmnd","openDmnd","dotDmnd","plaid","sphere","weave","divot","shingle","wave","trellis","zigZag"],jb=t.Object({color:t.String({description:"Stop color (hex without # or semantic theme name)"}),pos:t.Number({minimum:0,maximum:100,description:"Stop position along the gradient (0-100)"}),transparency:t.Optional(t.Number({minimum:0,maximum:100,description:"Stop transparency (0-100)"}))},{additionalProperties:!1,description:"Gradient color stop"}),Sl=t.Object({type:t.Union([t.Literal("linear"),t.Literal("radial")],{description:"Gradient type"}),angle:t.Optional(t.Number({minimum:0,maximum:360,description:"Gradient angle in degrees for linear gradients (0 = left→right, 90 = top→bottom). Default: 0."})),stops:t.Array(jb,{minItems:2,description:"Gradient color stops (at least 2)"}),focus:t.Optional(t.Union([t.Literal("center"),t.Literal("topLeft"),t.Literal("topRight"),t.Literal("bottomLeft"),t.Literal("bottomRight")],{description:'Focus point for radial gradients (default: "center")'}))},{additionalProperties:!1,description:"Gradient fill configuration"}),Rb=t.Object({preset:t.Union(Fb.map(e=>t.Literal(e)),{description:"OOXML pattern preset name (a:pattFill prst value)"}),foreground:t.String({description:"Pattern foreground color (hex without # or semantic name)"}),background:t.String({description:"Pattern background color (hex without # or semantic name)"})},{additionalProperties:!1,description:"Pattern fill configuration"}),wl=t.Object({type:xl,x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"X as percentage"})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Y as percentage"})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Width as percentage"})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Height as percentage"})])),fill:t.Optional(t.Object({color:t.Optional(t.String({description:"Fill color (hex without #)"})),transparency:t.Optional(t.Number({minimum:0,maximum:100,description:"Fill transparency (0-100)"})),gradient:t.Optional(Sl),pattern:t.Optional(Rb)},{additionalProperties:!1})),line:t.Optional(t.Object({color:t.Optional(t.String({description:"Line color (hex without #)"})),width:t.Optional(t.Number({minimum:0,description:"Line width in points"})),dashType:t.Optional(t.Union([t.Literal("solid"),t.Literal("dash"),t.Literal("dot"),t.Literal("dashDot")]))},{additionalProperties:!1})),text:t.Optional(t.Union([t.String({description:"Plain text"}),t.Array(Tb,{description:"Rich text segments with per-segment formatting"})],{description:"Text content inside the shape"})),fontSize:t.Optional(t.Number({minimum:1,description:"Font size for shape text"})),fontFace:t.Optional(t.String({description:"Font family for shape text"})),fontColor:t.Optional(t.String({description:"Font color for shape text (hex without #)"})),charSpacing:t.Optional(t.Number({description:"Character spacing in points for shape text"})),bold:t.Optional(t.Boolean({description:"Bold shape text"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-shape weight (100–900). Overrides `bold` when set."})),italic:t.Optional(t.Boolean({description:"Italic shape text"})),align:t.Optional(or),valign:t.Optional(ar),rotate:t.Optional(t.Number({description:"Rotation angle in degrees"})),angleRange:t.Optional(t.Array(t.Number(),{minItems:2,maxItems:2,description:"Shape arc [start, end] angles in degrees (arc/pie/blockArc/chord shapes)"})),flipH:t.Optional(t.Boolean({description:"Flip shape horizontally"})),flipV:t.Optional(t.Boolean({description:"Flip shape vertically"})),shadow:t.Optional(Jo),rectRadius:t.Optional(t.Number({minimum:0,description:"Corner radius for roundRect shape in inches"})),grid:t.Optional(Gt),style:t.Optional(bl)},{description:"Shape component props",additionalProperties:!1}),Ub=t.Union([t.String({description:"Simple text cell"}),t.Object({text:t.String({description:"Cell text content"}),color:t.Optional(t.String({description:"Text color (hex without #)"})),fill:t.Optional(t.String({description:"Cell background color (hex without #)"})),fontSize:t.Optional(t.Number({description:"Font size in points"})),fontFace:t.Optional(t.String({description:"Font family"})),bold:t.Optional(t.Boolean({description:"Bold text"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-cell weight (100–900). Overrides `bold` when set."})),italic:t.Optional(t.Boolean({description:"Italic text"})),align:t.Optional(or),valign:t.Optional(ar),colspan:t.Optional(t.Number({minimum:1,description:"Column span"})),rowspan:t.Optional(t.Number({minimum:1,description:"Row span"})),margin:t.Optional(t.Union([t.Number({description:"Margin in points (all sides)"}),t.Array(t.Number(),{minItems:4,maxItems:4})]))},{additionalProperties:!1})]),Ll=t.Object({rows:t.Array(t.Array(Ub,{description:"Row of cells"}),{description:"Table rows (array of arrays)",minItems:1}),x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"X as percentage"})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Y as percentage"})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Width as percentage"})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Height as percentage"})])),colW:t.Optional(t.Union([t.Number({description:"Uniform column width in inches"}),t.Array(t.Number(),{description:"Individual column widths in inches"})])),rowH:t.Optional(t.Union([t.Number({description:"Uniform row height in inches"}),t.Array(t.Number(),{description:"Individual row heights in inches"})])),border:t.Optional(t.Object({type:t.Optional(t.Union([t.Literal("solid"),t.Literal("dash"),t.Literal("dot"),t.Literal("none")])),pt:t.Optional(t.Number({minimum:0,description:"Border width in points"})),color:t.Optional(t.String({description:"Border color (hex without #)"}))},{additionalProperties:!1})),fill:t.Optional(t.String({description:"Table background color (hex without #)"})),fontSize:t.Optional(t.Number({minimum:1,description:"Default font size for all cells"})),fontFace:t.Optional(t.String({description:"Default font family for all cells"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Default weight for all cells (100–900). Same sub-family aliasing as the per-cell `fontWeight`; a cell that sets its own `fontWeight` or `bold` opts out."})),color:t.Optional(t.String({description:"Default text color for all cells (hex without #)"})),align:t.Optional(or),valign:t.Optional(ar),headerRow:t.Optional(t.Boolean({description:"Style the first row as a header — bold, on the theme's secondary background. Cells that state their own `bold`, `fill` or `color` keep it. Unlike the DOCX table, which declares its headers structurally, a PPTX table is rows of cells and the first one is a header only because you say so."})),autoPage:t.Optional(t.Boolean({description:"Auto-paginate table across multiple slides when content overflows"})),autoPageRepeatHeader:t.Optional(t.Boolean({description:"Repeat first row as header on each auto-paged slide"})),margin:t.Optional(t.Union([t.Number({description:"Cell margin in points (all sides)"}),t.Array(t.Number(),{minItems:4,maxItems:4})])),borderRadius:t.Optional(t.Number({minimum:0,description:"Rounded corner radius in inches. Renders a roundRect shape behind the table."})),grid:t.Optional(Gt)},{description:"PPTX table component props",additionalProperties:!1}),vl=t.Object({options:t.Intersect([t.Record(t.String(),t.Unknown()),t.Object({chart:t.Object({width:t.Number(),height:t.Number()})})]),scale:t.Optional(t.Number()),serverUrl:t.Optional(t.String({description:"Highcharts Export Server URL (default: http://localhost:7801)"})),resources:t.Optional(t.Object({css:t.Optional(t.String()),js:t.Optional(t.String()),files:t.Optional(t.Array(t.String()))})),x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"X as percentage"})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Y as percentage"})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Width as percentage"})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Height as percentage"})])),grid:t.Optional(Gt)},{description:"PPTX Highcharts component props",additionalProperties:!1}),ci=(e,n)=>t.Union([t.Number({description:e}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:n})]),Mb=t.Union([t.Literal("area"),t.Literal("bar"),t.Literal("bar3D"),t.Literal("bubble"),t.Literal("doughnut"),t.Literal("line"),t.Literal("pie"),t.Literal("radar"),t.Literal("scatter")],{description:"Chart type"}),Bb=t.Object({name:t.Optional(t.String({description:"Series name"})),labels:t.Optional(t.Array(t.String(),{description:"Category labels. Needed on every series, not just the first, and the same length as `values`; a series without both `labels` and `values` drops the whole chart."})),values:t.Optional(t.Array(t.Number(),{description:"Data values, one per label. Needed on every series — see `labels`."})),sizes:t.Optional(t.Array(t.Number(),{description:"Bubble sizes (bubble charts only)"}))},{additionalProperties:!1}),$a=t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dash"),t.Literal("dot"),t.Literal("none")],{description:"Grid line style"})),size:t.Optional(t.Number({minimum:0,description:"Grid line width (points)"})),color:t.Optional(t.String({description:"Grid line color (hex or semantic)"}))},{additionalProperties:!1,description:"Axis grid line styling"}),Pl=t.Object({type:Mb,data:t.Array(Bb,{description:"Chart data series",minItems:1}),showLegend:t.Optional(t.Boolean({description:"Show chart legend"})),showTitle:t.Optional(t.Boolean({description:"Show chart title"})),showValue:t.Optional(t.Boolean({description:"Show data values"})),showPercent:t.Optional(t.Boolean({description:"Show percentages (pie/doughnut)"})),showLabel:t.Optional(t.Boolean({description:"Show category labels on data points"})),showSerName:t.Optional(t.Boolean({description:"Show series name on data points"})),title:t.Optional(t.String({description:"Chart title text"})),titleFontSize:t.Optional(t.Number({description:"Title font size (points)"})),titleColor:t.Optional(t.String({description:"Title color (hex or semantic)"})),titleFontFace:t.Optional(t.String({description:"Title font face"})),titleFontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Title weight (100–900). Rendered as a sub-family alias — see `dataLabelFontWeight`."})),chartColors:t.Optional(t.Array(t.String(),{description:"Series colors (hex or semantic theme names). Defaults to theme palette."})),dataBorder:t.Optional(t.Object({pt:t.Number({minimum:0,description:"Border width (points)"}),color:t.String({description:"Border color (hex or semantic)"})},{additionalProperties:!1,description:"Outline on data elements (bars, slices, areas)"})),legendPos:t.Optional(t.Union([t.Literal("b"),t.Literal("l"),t.Literal("r"),t.Literal("t"),t.Literal("tr")],{description:"Legend position"})),legendFontSize:t.Optional(t.Number({description:"Legend font size"})),legendFontFace:t.Optional(t.String({description:"Legend font face"})),legendFontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Legend weight (100–900). Rendered as a sub-family alias — see `dataLabelFontWeight`. PowerPoint gives the legend no bold toggle, so 400 and 700 both render Regular (700 warns)."})),legendColor:t.Optional(t.String({description:"Legend text color"})),catAxisTitle:t.Optional(t.String({description:"Category axis title"})),catAxisHidden:t.Optional(t.Boolean({description:"Hide category axis"})),catAxisLabelRotate:t.Optional(t.Number({description:"Category axis label rotation (degrees)"})),catAxisLabelFontSize:t.Optional(t.Number({description:"Category axis label font size"})),catAxisLabelColor:t.Optional(t.String({description:"Category axis label color (hex or semantic)"})),catAxisLabelFontFace:t.Optional(t.String({description:"Category axis label font face"})),catAxisLabelFontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Category axis label weight (100–900). Rendered as a sub-family alias — see `dataLabelFontWeight`."})),catGridLine:t.Optional($a),valAxisTitle:t.Optional(t.String({description:"Value axis title"})),valAxisHidden:t.Optional(t.Boolean({description:"Hide value axis"})),valAxisMinVal:t.Optional(t.Number({description:"Value axis minimum"})),valAxisMaxVal:t.Optional(t.Number({description:"Value axis maximum"})),valAxisLabelFormatCode:t.Optional(t.String({description:'Value axis label format (e.g. "$0.00", "#%")'})),valAxisMajorUnit:t.Optional(t.Number({description:"Value axis major unit / tick interval"})),valAxisLabelColor:t.Optional(t.String({description:"Value axis label color (hex or semantic)"})),valAxisLabelFontFace:t.Optional(t.String({description:"Value axis label font face"})),valAxisLabelFontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Value axis label weight (100–900). Rendered as a sub-family alias — see `dataLabelFontWeight`."})),valAxisLabelFontSize:t.Optional(t.Number({description:"Value axis label font size"})),valGridLine:t.Optional($a),catAxisLineShow:t.Optional(t.Boolean({description:"Show the category axis line"})),valAxisLineShow:t.Optional(t.Boolean({description:"Show the value axis line"})),barDir:t.Optional(t.Union([t.Literal("bar"),t.Literal("col")],{description:'Bar direction: "bar" (horizontal) or "col" (vertical, default)'})),barGrouping:t.Optional(t.Union([t.Literal("clustered"),t.Literal("stacked"),t.Literal("percentStacked")],{description:"Bar grouping style"})),barGapWidthPct:t.Optional(t.Number({minimum:0,maximum:500,description:"Bar gap width (0-500%)"})),barOverlapPct:t.Optional(t.Number({minimum:-100,maximum:100,description:"Overlap between series bars (-100 to 100%). 100 = fully overlapped, negative = gap."})),lineSmooth:t.Optional(t.Boolean({description:"Smooth lines"})),lineDataSymbol:t.Optional(t.Union([t.Literal("circle"),t.Literal("dash"),t.Literal("diamond"),t.Literal("dot"),t.Literal("none"),t.Literal("square"),t.Literal("triangle")],{description:"Line data point marker symbol"})),lineSize:t.Optional(t.Number({description:"Line width (points)"})),lineDataSymbolSize:t.Optional(t.Number({minimum:2,maximum:72,description:"Line data point marker size (points)"})),firstSliceAng:t.Optional(t.Number({minimum:0,maximum:359,description:"Angle of first slice (degrees)"})),holeSize:t.Optional(t.Number({minimum:10,maximum:90,description:"Doughnut hole size (%)"})),radarStyle:t.Optional(t.Union([t.Literal("standard"),t.Literal("marker"),t.Literal("filled")],{description:"Radar chart style"})),dataLabelColor:t.Optional(t.String({description:"Data label text color"})),dataLabelFontSize:t.Optional(t.Number({description:"Data label font size"})),dataLabelFontFace:t.Optional(t.String({description:"Data label font face"})),dataLabelFontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:'Data label weight (100–900); overrides `dataLabelFontBold`. PowerPoint chart labels carry no numeric weight, so a non-RIBBI weight renders by rewriting the font face to the matching sub-family ("Inter" at 300 → "Inter Light") — 400 and 700 stay on the family and use the bold toggle. Falls back to the theme body font when the sibling font face is unset.'})),dataLabelFontBold:t.Optional(t.Boolean({description:"Bold data labels"})),dataLabelPosition:t.Optional(t.Union([t.Literal("b"),t.Literal("bestFit"),t.Literal("ctr"),t.Literal("l"),t.Literal("r"),t.Literal("t"),t.Literal("inEnd"),t.Literal("outEnd")],{description:"Data label position"})),x:t.Optional(ci("X position in inches","X as percentage")),y:t.Optional(ci("Y position in inches","Y as percentage")),w:t.Optional(ci("Width in inches","Width as percentage")),h:t.Optional(ci("Height in inches","Height as percentage")),grid:t.Optional(Gt)},{description:"Native PowerPoint chart component props",additionalProperties:!1});function $l(e){var i;if(e.propsRequired!==void 0)return e.propsRequired;const n=e.propsSchema;return n.type!=="object"||(((i=n.required)==null?void 0:i.length)??0)>0}var gt=[{name:"text",propsSchema:yl,hasChildren:!1,category:"content",propsRequired:!0,description:"Text element - displays text with formatting, positioning and styling options. Prefer the named `style` values (title, heading1, body…) and theme color tokens over raw fontSize/hex — a theme swap must restyle the deck without editing every node."},{name:"image",propsSchema:Ol,hasChildren:!1,category:"content",propsRequired:!0,description:"Image element - displays images from file path, URL, or base64 data."},{name:"shape",propsSchema:wl,hasChildren:!1,category:"content",description:"Shape element - draws geometric shapes with optional text, fill, and line styling."},{name:"table",propsSchema:Ll,hasChildren:!1,category:"content",description:"Table element, declared ROW-MAJOR: `props.rows[][]`, an array of rows, each an array of cells, with no structural header — `headerRow: true` styles the first row as one. Note the DOCX `table` is the other way round — columns each carrying their own header and cells — so a table cannot be moved between the formats unchanged."},{name:"highcharts",propsSchema:vl,hasChildren:!1,category:"content",description:"Highcharts element - renders charts via Highcharts Export Server."},{name:"chart",propsSchema:Pl,hasChildren:!1,category:"content",description:"Native PowerPoint chart - editable, scalable, no external server needed. Always set series colors (theme-derived, one accent per series) — the auto-palette reads as default Office."}];function Qt(e){return t.Object({name:t.Literal(e.name),id:t.Optional(t.String()),enabled:t.Optional(t.Boolean({default:!0,description:"When false, this component is filtered out and not rendered. Defaults to true."})),props:$l(e)?e.propsSchema:t.Optional(e.propsSchema)},{additionalProperties:!1,description:e.description})}var Eb=t.Union([Qt(gt[0]),Qt(gt[1]),Qt(gt[2]),Qt(gt[3]),Qt(gt[4]),Qt(gt[5])],{$id:"PptxSlideContent",discriminator:{propertyName:"name"},description:"A single PPTX slide content element (text, image, shape, table, highcharts, or chart)."}),Cb=t.Partial(yl),Db=t.Partial(Ol),zb=t.Partial(wl),_b=t.Partial(Ll),Wb=t.Partial(vl),Hb=t.Partial(Pl),Nl=t.Object({text:t.Optional(Cb),image:t.Optional(Db),shape:t.Optional(zb),table:t.Optional(_b),highcharts:t.Optional(Wb),chart:t.Optional(Hb)},{additionalProperties:!0});function qb(e){switch(e.errorType){case m.ArrayContains:return"Expected array to contain at least one matching value";case m.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case m.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case m.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case m.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case m.ArrayUniqueItems:return"Expected array elements to be unique";case m.Array:return"Expected array";case m.AsyncIterator:return"Expected AsyncIterator";case m.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case m.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case m.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case m.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case m.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case m.BigInt:return"Expected bigint";case m.Boolean:return"Expected boolean";case m.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case m.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case m.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case m.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case m.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case m.Date:return"Expected Date";case m.Function:return"Expected function";case m.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case m.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case m.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case m.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case m.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case m.Integer:return"Expected integer";case m.IntersectUnevaluatedProperties:return"Unexpected property";case m.Intersect:return"Expected all values to match";case m.Iterator:return"Expected Iterator";case m.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case m.Never:return"Never";case m.Not:return"Value should not match";case m.Null:return"Expected null";case m.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case m.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case m.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case m.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case m.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case m.Number:return"Expected number";case m.Object:return"Expected object";case m.ObjectAdditionalProperties:return"Unexpected property";case m.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case m.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case m.ObjectRequiredProperty:return"Expected required property";case m.Promise:return"Expected Promise";case m.RegExp:return"Expected string to match regular expression";case m.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case m.StringFormat:return`Expected string to match '${e.schema.format}' format`;case m.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case m.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case m.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case m.String:return"Expected string";case m.Symbol:return"Expected symbol";case m.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case m.Tuple:return"Expected tuple";case m.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case m.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case m.Uint8Array:return"Expected Uint8Array";case m.Undefined:return"Expected undefined";case m.Union:return"Expected union value";case m.Void:return"Expected void";case m.Kind:return`Expected kind '${e.schema[v]}'`;default:return"Unknown error type"}}let Kb=qb;function Gb(){return Kb}class Vb extends Xe{constructor(n){super(`Unable to dereference schema with $id '${n.$ref}'`),this.schema=n}}function Jb(e,n){const i=n.find(r=>r.$id===e.$ref);if(i===void 0)throw new Vb(e);return Vt(i,n)}function Il(e,n){return!et(e.$id)||n.some(i=>i.$id===e.$id)||n.push(e),n}function Vt(e,n){return e[v]==="This"||e[v]==="Ref"?Jb(e,n):e}class Xb extends Xe{constructor(n){super("Unable to hash value"),this.value=n}}var Re;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(Re||(Re={}));let on=BigInt("14695981039346656037");const[Yb,Zb]=[BigInt("1099511628211"),BigInt("18446744073709551616")],Qb=Array.from({length:256}).map((e,n)=>BigInt(n)),kl=new Float64Array(1),Al=new DataView(kl.buffer),Tl=new Uint8Array(kl.buffer);function*ey(e){const n=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let i=0;i<n;i++)yield e>>8*(n-1-i)&255}function ty(e){Se(Re.Array);for(const n of e)dn(n)}function ny(e){Se(Re.Boolean),Se(e?1:0)}function iy(e){Se(Re.BigInt),Al.setBigInt64(0,e);for(const n of Tl)Se(n)}function ry(e){Se(Re.Date),dn(e.getTime())}function oy(e){Se(Re.Null)}function ay(e){Se(Re.Number),Al.setFloat64(0,e);for(const n of Tl)Se(n)}function sy(e){Se(Re.Object);for(const n of globalThis.Object.getOwnPropertyNames(e).sort())dn(n),dn(e[n])}function ly(e){Se(Re.String);for(let n=0;n<e.length;n++)for(const i of ey(e.charCodeAt(n)))Se(i)}function cy(e){Se(Re.Symbol),dn(e.description)}function dy(e){Se(Re.Uint8Array);for(let n=0;n<e.length;n++)Se(e[n])}function py(e){return Se(Re.Undefined)}function dn(e){if(it(e))return ty(e);if(Ti(e))return ny(e);if(Fi(e))return iy(e);if(Wn(e))return ry(e);if(Ai(e))return oy();if(at(e))return ay(e);if(nt(e))return sy(e);if(et(e))return ly(e);if(ji(e))return cy(e);if(uo(e))return dy(e);if(bt(e))return py();throw new Xb(e)}function Se(e){on=on^Qb[e],on=on*Yb%Zb}function Fl(e){return on=BigInt("14695981039346656037"),dn(e),on}class uy extends Xe{constructor(n){super("Unknown type"),this.schema=n}}function my(e){return e[v]==="Any"||e[v]==="Unknown"}function E(e){return e!==void 0}function fy(e,n,i){return!0}function gy(e,n,i){return!0}function hy(e,n,i){if(!it(i)||E(e.minItems)&&!(i.length>=e.minItems)||E(e.maxItems)&&!(i.length<=e.maxItems)||!i.every(a=>pe(e.items,n,a))||e.uniqueItems===!0&&!function(){const a=new Set;for(const s of i){const c=Fl(s);if(a.has(c))return!1;a.add(c)}return!0}())return!1;if(!(E(e.contains)||at(e.minContains)||at(e.maxContains)))return!0;const r=E(e.contains)?e.contains:te(),o=i.reduce((a,s)=>pe(r,n,s)?a+1:a,0);return!(o===0||at(e.minContains)&&o<e.minContains||at(e.maxContains)&&o>e.maxContains)}function by(e,n,i){return fs(i)}function yy(e,n,i){return!(!Fi(i)||E(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||E(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||E(e.maximum)&&!(i<=e.maximum)||E(e.minimum)&&!(i>=e.minimum)||E(e.multipleOf)&&i%e.multipleOf!==BigInt(0))}function Oy(e,n,i){return Ti(i)}function xy(e,n,i){return pe(e.returns,n,i.prototype)}function Sy(e,n,i){return!(!Wn(i)||E(e.exclusiveMaximumTimestamp)&&!(i.getTime()<e.exclusiveMaximumTimestamp)||E(e.exclusiveMinimumTimestamp)&&!(i.getTime()>e.exclusiveMinimumTimestamp)||E(e.maximumTimestamp)&&!(i.getTime()<=e.maximumTimestamp)||E(e.minimumTimestamp)&&!(i.getTime()>=e.minimumTimestamp)||E(e.multipleOfTimestamp)&&i.getTime()%e.multipleOfTimestamp!==0)}function wy(e,n,i){return mo(i)}function Ly(e,n,i){const r=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];return pe(o,[...n,...r],i)}function vy(e,n,i){return!(!bs(i)||E(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||E(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||E(e.maximum)&&!(i<=e.maximum)||E(e.minimum)&&!(i>=e.minimum)||E(e.multipleOf)&&i%e.multipleOf!==0)}function Py(e,n,i){const r=e.allOf.every(o=>pe(o,n,i));if(e.unevaluatedProperties===!1){const o=new RegExp(vi(e)),a=Object.getOwnPropertyNames(i).every(s=>o.test(s));return r&&a}else if(lt(e.unevaluatedProperties)){const o=new RegExp(vi(e)),a=Object.getOwnPropertyNames(i).every(s=>o.test(s)||pe(e.unevaluatedProperties,n,i[s]));return r&&a}else return r}function $y(e,n,i){return gs(i)}function Ny(e,n,i){return i===e.const}function Iy(e,n,i){return!1}function ky(e,n,i){return!pe(e.not,n,i)}function Ay(e,n,i){return Ai(i)}function Ty(e,n,i){return!(!Te.IsNumberLike(i)||E(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||E(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||E(e.minimum)&&!(i>=e.minimum)||E(e.maximum)&&!(i<=e.maximum)||E(e.multipleOf)&&i%e.multipleOf!==0)}function Fy(e,n,i){if(!Te.IsObjectLike(i)||E(e.minProperties)&&!(Object.getOwnPropertyNames(i).length>=e.minProperties)||E(e.maxProperties)&&!(Object.getOwnPropertyNames(i).length<=e.maxProperties))return!1;const r=Object.getOwnPropertyNames(e.properties);for(const o of r){const a=e.properties[o];if(e.required&&e.required.includes(o)){if(!pe(a,n,i[o])||(Zn(a)||my(a))&&!(o in i))return!1}else if(Te.IsExactOptionalProperty(i,o)&&!pe(a,n,i[o]))return!1}if(e.additionalProperties===!1){const o=Object.getOwnPropertyNames(i);return e.required&&e.required.length===r.length&&o.length===r.length?!0:o.every(a=>r.includes(a))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(i).every(a=>r.includes(a)||pe(e.additionalProperties,n,i[a])):!0}function jy(e,n,i){return hs(i)}function Ry(e,n,i){if(!Te.IsRecordLike(i)||E(e.minProperties)&&!(Object.getOwnPropertyNames(i).length>=e.minProperties)||E(e.maxProperties)&&!(Object.getOwnPropertyNames(i).length<=e.maxProperties))return!1;const[r,o]=Object.entries(e.patternProperties)[0],a=new RegExp(r),s=Object.entries(i).every(([d,g])=>a.test(d)?pe(o,n,g):!0),c=typeof e.additionalProperties=="object"?Object.entries(i).every(([d,g])=>a.test(d)?!0:pe(e.additionalProperties,n,g)):!0,l=e.additionalProperties===!1?Object.getOwnPropertyNames(i).every(d=>a.test(d)):!0;return s&&c&&l}function Uy(e,n,i){return pe(Vt(e,n),n,i)}function My(e,n,i){const r=new RegExp(e.source,e.flags);return E(e.minLength)&&!(i.length>=e.minLength)||E(e.maxLength)&&!(i.length<=e.maxLength)?!1:r.test(i)}function By(e,n,i){return!et(i)||E(e.minLength)&&!(i.length>=e.minLength)||E(e.maxLength)&&!(i.length<=e.maxLength)||E(e.pattern)&&!new RegExp(e.pattern).test(i)?!1:E(e.format)?Ts(e.format)?js(e.format)(i):!1:!0}function Ey(e,n,i){return ji(i)}function Cy(e,n,i){return et(i)&&new RegExp(e.pattern).test(i)}function Dy(e,n,i){return pe(Vt(e,n),n,i)}function zy(e,n,i){if(!it(i)||e.items===void 0&&i.length!==0||i.length!==e.maxItems)return!1;if(!e.items)return!0;for(let r=0;r<e.items.length;r++)if(!pe(e.items[r],n,i[r]))return!1;return!0}function _y(e,n,i){return bt(i)}function Wy(e,n,i){return e.anyOf.some(r=>pe(r,n,i))}function Hy(e,n,i){return!(!uo(i)||E(e.maxByteLength)&&!(i.length<=e.maxByteLength)||E(e.minByteLength)&&!(i.length>=e.minByteLength))}function qy(e,n,i){return!0}function Ky(e,n,i){return Te.IsVoidLike(i)}function Gy(e,n,i){return Po(e[v])?Us(e[v])(e,i):!1}function pe(e,n,i){const r=E(e.$id)?Il(e,n):n,o=e;switch(o[v]){case"Any":return fy();case"Argument":return gy();case"Array":return hy(o,r,i);case"AsyncIterator":return by(o,r,i);case"BigInt":return yy(o,r,i);case"Boolean":return Oy(o,r,i);case"Constructor":return xy(o,r,i);case"Date":return Sy(o,r,i);case"Function":return wy(o,r,i);case"Import":return Ly(o,r,i);case"Integer":return vy(o,r,i);case"Intersect":return Py(o,r,i);case"Iterator":return $y(o,r,i);case"Literal":return Ny(o,r,i);case"Never":return Iy();case"Not":return ky(o,r,i);case"Null":return Ay(o,r,i);case"Number":return Ty(o,r,i);case"Object":return Fy(o,r,i);case"Promise":return jy(o,r,i);case"Record":return Ry(o,r,i);case"Ref":return Uy(o,r,i);case"RegExp":return My(o,r,i);case"String":return By(o,r,i);case"Symbol":return Ey(o,r,i);case"TemplateLiteral":return Cy(o,r,i);case"This":return Dy(o,r,i);case"Tuple":return zy(o,r,i);case"Undefined":return _y(o,r,i);case"Union":return Wy(o,r,i);case"Uint8Array":return Hy(o,r,i);case"Unknown":return qy();case"Void":return Ky(o,r,i);default:if(!Po(o[v]))throw new uy(o);return Gy(o,r,i)}}function sr(...e){return e.length===3?pe(e[0],e[1],e[2]):pe(e[0],[],e[1])}var m;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(m||(m={}));class Vy extends Xe{constructor(n){super("Unknown type"),this.schema=n}}function ot(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function B(e){return e!==void 0}class jl{constructor(n){this.iterator=n}[Symbol.iterator](){return this.iterator}First(){const n=this.iterator.next();return n.done?void 0:n.value}}function w(e,n,i,r,o=[]){return{type:e,schema:n,path:i,value:r,message:Gb()({errorType:e,path:i,schema:n,value:r,errors:o}),errors:o}}function*Jy(e,n,i,r){}function*Xy(e,n,i,r){}function*Yy(e,n,i,r){if(!it(r))return yield w(m.Array,e,i,r);B(e.minItems)&&!(r.length>=e.minItems)&&(yield w(m.ArrayMinItems,e,i,r)),B(e.maxItems)&&!(r.length<=e.maxItems)&&(yield w(m.ArrayMaxItems,e,i,r));for(let s=0;s<r.length;s++)yield*ue(e.items,n,`${i}/${s}`,r[s]);if(e.uniqueItems===!0&&!function(){const s=new Set;for(const c of r){const l=Fl(c);if(s.has(l))return!1;s.add(l)}return!0}()&&(yield w(m.ArrayUniqueItems,e,i,r)),!(B(e.contains)||B(e.minContains)||B(e.maxContains)))return;const o=B(e.contains)?e.contains:te(),a=r.reduce((s,c,l)=>ue(o,n,`${i}${l}`,c).next().done===!0?s+1:s,0);a===0&&(yield w(m.ArrayContains,e,i,r)),at(e.minContains)&&a<e.minContains&&(yield w(m.ArrayMinContains,e,i,r)),at(e.maxContains)&&a>e.maxContains&&(yield w(m.ArrayMaxContains,e,i,r))}function*Zy(e,n,i,r){fs(r)||(yield w(m.AsyncIterator,e,i,r))}function*Qy(e,n,i,r){if(!Fi(r))return yield w(m.BigInt,e,i,r);B(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield w(m.BigIntExclusiveMaximum,e,i,r)),B(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield w(m.BigIntExclusiveMinimum,e,i,r)),B(e.maximum)&&!(r<=e.maximum)&&(yield w(m.BigIntMaximum,e,i,r)),B(e.minimum)&&!(r>=e.minimum)&&(yield w(m.BigIntMinimum,e,i,r)),B(e.multipleOf)&&r%e.multipleOf!==BigInt(0)&&(yield w(m.BigIntMultipleOf,e,i,r))}function*eO(e,n,i,r){Ti(r)||(yield w(m.Boolean,e,i,r))}function*tO(e,n,i,r){yield*ue(e.returns,n,i,r.prototype)}function*nO(e,n,i,r){if(!Wn(r))return yield w(m.Date,e,i,r);B(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)&&(yield w(m.DateExclusiveMaximumTimestamp,e,i,r)),B(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)&&(yield w(m.DateExclusiveMinimumTimestamp,e,i,r)),B(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)&&(yield w(m.DateMaximumTimestamp,e,i,r)),B(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)&&(yield w(m.DateMinimumTimestamp,e,i,r)),B(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0&&(yield w(m.DateMultipleOfTimestamp,e,i,r))}function*iO(e,n,i,r){mo(r)||(yield w(m.Function,e,i,r))}function*rO(e,n,i,r){const o=globalThis.Object.values(e.$defs),a=e.$defs[e.$ref];yield*ue(a,[...n,...o],i,r)}function*oO(e,n,i,r){if(!bs(r))return yield w(m.Integer,e,i,r);B(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield w(m.IntegerExclusiveMaximum,e,i,r)),B(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield w(m.IntegerExclusiveMinimum,e,i,r)),B(e.maximum)&&!(r<=e.maximum)&&(yield w(m.IntegerMaximum,e,i,r)),B(e.minimum)&&!(r>=e.minimum)&&(yield w(m.IntegerMinimum,e,i,r)),B(e.multipleOf)&&r%e.multipleOf!==0&&(yield w(m.IntegerMultipleOf,e,i,r))}function*aO(e,n,i,r){let o=!1;for(const a of e.allOf)for(const s of ue(a,n,i,r))o=!0,yield s;if(o)return yield w(m.Intersect,e,i,r);if(e.unevaluatedProperties===!1){const a=new RegExp(vi(e));for(const s of Object.getOwnPropertyNames(r))a.test(s)||(yield w(m.IntersectUnevaluatedProperties,e,`${i}/${s}`,r))}if(typeof e.unevaluatedProperties=="object"){const a=new RegExp(vi(e));for(const s of Object.getOwnPropertyNames(r))if(!a.test(s)){const c=ue(e.unevaluatedProperties,n,`${i}/${s}`,r[s]).next();c.done||(yield c.value)}}}function*sO(e,n,i,r){gs(r)||(yield w(m.Iterator,e,i,r))}function*lO(e,n,i,r){r!==e.const&&(yield w(m.Literal,e,i,r))}function*cO(e,n,i,r){yield w(m.Never,e,i,r)}function*dO(e,n,i,r){ue(e.not,n,i,r).next().done===!0&&(yield w(m.Not,e,i,r))}function*pO(e,n,i,r){Ai(r)||(yield w(m.Null,e,i,r))}function*uO(e,n,i,r){if(!Te.IsNumberLike(r))return yield w(m.Number,e,i,r);B(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield w(m.NumberExclusiveMaximum,e,i,r)),B(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield w(m.NumberExclusiveMinimum,e,i,r)),B(e.maximum)&&!(r<=e.maximum)&&(yield w(m.NumberMaximum,e,i,r)),B(e.minimum)&&!(r>=e.minimum)&&(yield w(m.NumberMinimum,e,i,r)),B(e.multipleOf)&&r%e.multipleOf!==0&&(yield w(m.NumberMultipleOf,e,i,r))}function*mO(e,n,i,r){if(!Te.IsObjectLike(r))return yield w(m.Object,e,i,r);B(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)&&(yield w(m.ObjectMinProperties,e,i,r)),B(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties)&&(yield w(m.ObjectMaxProperties,e,i,r));const o=Array.isArray(e.required)?e.required:[],a=Object.getOwnPropertyNames(e.properties),s=Object.getOwnPropertyNames(r);for(const c of o)s.includes(c)||(yield w(m.ObjectRequiredProperty,e.properties[c],`${i}/${ot(c)}`,void 0));if(e.additionalProperties===!1)for(const c of s)a.includes(c)||(yield w(m.ObjectAdditionalProperties,e,`${i}/${ot(c)}`,r[c]));if(typeof e.additionalProperties=="object")for(const c of s)a.includes(c)||(yield*ue(e.additionalProperties,n,`${i}/${ot(c)}`,r[c]));for(const c of a){const l=e.properties[c];e.required&&e.required.includes(c)?(yield*ue(l,n,`${i}/${ot(c)}`,r[c]),Zn(e)&&!(c in r)&&(yield w(m.ObjectRequiredProperty,l,`${i}/${ot(c)}`,void 0))):Te.IsExactOptionalProperty(r,c)&&(yield*ue(l,n,`${i}/${ot(c)}`,r[c]))}}function*fO(e,n,i,r){hs(r)||(yield w(m.Promise,e,i,r))}function*gO(e,n,i,r){if(!Te.IsRecordLike(r))return yield w(m.Object,e,i,r);B(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)&&(yield w(m.ObjectMinProperties,e,i,r)),B(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties)&&(yield w(m.ObjectMaxProperties,e,i,r));const[o,a]=Object.entries(e.patternProperties)[0],s=new RegExp(o);for(const[c,l]of Object.entries(r))s.test(c)&&(yield*ue(a,n,`${i}/${ot(c)}`,l));if(typeof e.additionalProperties=="object")for(const[c,l]of Object.entries(r))s.test(c)||(yield*ue(e.additionalProperties,n,`${i}/${ot(c)}`,l));if(e.additionalProperties===!1){for(const[c,l]of Object.entries(r))if(!s.test(c))return yield w(m.ObjectAdditionalProperties,e,`${i}/${ot(c)}`,l)}}function*hO(e,n,i,r){yield*ue(Vt(e,n),n,i,r)}function*bO(e,n,i,r){if(!et(r))return yield w(m.String,e,i,r);if(B(e.minLength)&&!(r.length>=e.minLength)&&(yield w(m.StringMinLength,e,i,r)),B(e.maxLength)&&!(r.length<=e.maxLength)&&(yield w(m.StringMaxLength,e,i,r)),!new RegExp(e.source,e.flags).test(r))return yield w(m.RegExp,e,i,r)}function*yO(e,n,i,r){if(!et(r))return yield w(m.String,e,i,r);B(e.minLength)&&!(r.length>=e.minLength)&&(yield w(m.StringMinLength,e,i,r)),B(e.maxLength)&&!(r.length<=e.maxLength)&&(yield w(m.StringMaxLength,e,i,r)),et(e.pattern)&&(new RegExp(e.pattern).test(r)||(yield w(m.StringPattern,e,i,r))),et(e.format)&&(Ts(e.format)?js(e.format)(r)||(yield w(m.StringFormat,e,i,r)):yield w(m.StringFormatUnknown,e,i,r))}function*OO(e,n,i,r){ji(r)||(yield w(m.Symbol,e,i,r))}function*xO(e,n,i,r){if(!et(r))return yield w(m.String,e,i,r);new RegExp(e.pattern).test(r)||(yield w(m.StringPattern,e,i,r))}function*SO(e,n,i,r){yield*ue(Vt(e,n),n,i,r)}function*wO(e,n,i,r){if(!it(r))return yield w(m.Tuple,e,i,r);if(e.items===void 0&&r.length!==0)return yield w(m.TupleLength,e,i,r);if(r.length!==e.maxItems)return yield w(m.TupleLength,e,i,r);if(e.items)for(let o=0;o<e.items.length;o++)yield*ue(e.items[o],n,`${i}/${o}`,r[o])}function*LO(e,n,i,r){bt(r)||(yield w(m.Undefined,e,i,r))}function*vO(e,n,i,r){if(sr(e,n,r))return;const o=e.anyOf.map(a=>new jl(ue(a,n,i,r)));yield w(m.Union,e,i,r,o)}function*PO(e,n,i,r){if(!uo(r))return yield w(m.Uint8Array,e,i,r);B(e.maxByteLength)&&!(r.length<=e.maxByteLength)&&(yield w(m.Uint8ArrayMaxByteLength,e,i,r)),B(e.minByteLength)&&!(r.length>=e.minByteLength)&&(yield w(m.Uint8ArrayMinByteLength,e,i,r))}function*$O(e,n,i,r){}function*NO(e,n,i,r){Te.IsVoidLike(r)||(yield w(m.Void,e,i,r))}function*IO(e,n,i,r){Us(e[v])(e,r)||(yield w(m.Kind,e,i,r))}function*ue(e,n,i,r){const o=B(e.$id)?[...n,e]:n,a=e;switch(a[v]){case"Any":return yield*Jy();case"Argument":return yield*Xy();case"Array":return yield*Yy(a,o,i,r);case"AsyncIterator":return yield*Zy(a,o,i,r);case"BigInt":return yield*Qy(a,o,i,r);case"Boolean":return yield*eO(a,o,i,r);case"Constructor":return yield*tO(a,o,i,r);case"Date":return yield*nO(a,o,i,r);case"Function":return yield*iO(a,o,i,r);case"Import":return yield*rO(a,o,i,r);case"Integer":return yield*oO(a,o,i,r);case"Intersect":return yield*aO(a,o,i,r);case"Iterator":return yield*sO(a,o,i,r);case"Literal":return yield*lO(a,o,i,r);case"Never":return yield*cO(a,o,i,r);case"Not":return yield*dO(a,o,i,r);case"Null":return yield*pO(a,o,i,r);case"Number":return yield*uO(a,o,i,r);case"Object":return yield*mO(a,o,i,r);case"Promise":return yield*fO(a,o,i,r);case"Record":return yield*gO(a,o,i,r);case"Ref":return yield*hO(a,o,i,r);case"RegExp":return yield*bO(a,o,i,r);case"String":return yield*yO(a,o,i,r);case"Symbol":return yield*OO(a,o,i,r);case"TemplateLiteral":return yield*xO(a,o,i,r);case"This":return yield*SO(a,o,i,r);case"Tuple":return yield*wO(a,o,i,r);case"Undefined":return yield*LO(a,o,i,r);case"Union":return yield*vO(a,o,i,r);case"Uint8Array":return yield*PO(a,o,i,r);case"Unknown":return yield*$O();case"Void":return yield*NO(a,o,i,r);default:if(!Po(a[v]))throw new Vy(e);return yield*IO(a,o,i,r)}}function kO(...e){const n=e.length===3?ue(e[0],e[1],"",e[2]):ue(e[0],[],"",e[1]);return new jl(n)}function AO(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=Bt(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=Bt(e[i]);return n}function TO(e){return e.map(n=>Bt(n))}function FO(e){return e.slice()}function jO(e){return new Map(Bt([...e.entries()]))}function RO(e){return new Set(Bt([...e.entries()]))}function UO(e){return new Date(e.toISOString())}function Bt(e){if(it(e))return TO(e);if(Wn(e))return UO(e);if(Pp(e))return FO(e);if(Lp(e))return jO(e);if(vp(e))return RO(e);if(nt(e))return AO(e);if(Np(e))return e;throw new Error("ValueClone: Unable to clone value")}function ut(e,n){const i=$p(e,"default")?e.default:void 0,r=mo(i)?i():Bt(i);return bt(n)?r:nt(n)&&nt(r)?Object.assign(r,n):n}function Hr(e){return ws(e)&&"default"in e}function MO(e,n,i){if(it(i)){for(let o=0;o<i.length;o++)i[o]=Le(e.items,n,i[o]);return i}const r=ut(e,i);if(!it(r))return r;for(let o=0;o<r.length;o++)r[o]=Le(e.items,n,r[o]);return r}function BO(e,n,i){return Wn(i)?i:ut(e,i)}function EO(e,n,i){const r=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];return Le(o,[...n,...r],i)}function CO(e,n,i){const r=ut(e,i);return e.allOf.reduce((o,a)=>{const s=Le(a,n,r);return nt(s)?{...o,...s}:s},{})}function DO(e,n,i){const r=ut(e,i);if(!nt(r))return r;const o=Object.getOwnPropertyNames(e.properties);for(const a of o){const s=Le(e.properties[a],n,r[a]);bt(s)||(r[a]=Le(e.properties[a],n,r[a]))}if(!Hr(e.additionalProperties))return r;for(const a of Object.getOwnPropertyNames(r))o.includes(a)||(r[a]=Le(e.additionalProperties,n,r[a]));return r}function zO(e,n,i){const r=ut(e,i);if(!nt(r))return r;const o=e.additionalProperties,[a,s]=Object.entries(e.patternProperties)[0],c=new RegExp(a);for(const l of Object.getOwnPropertyNames(r))c.test(l)&&Hr(s)&&(r[l]=Le(s,n,r[l]));if(!Hr(o))return r;for(const l of Object.getOwnPropertyNames(r))c.test(l)||(r[l]=Le(o,n,r[l]));return r}function _O(e,n,i){return Le(Vt(e,n),n,ut(e,i))}function WO(e,n,i){return Le(Vt(e,n),n,i)}function HO(e,n,i){const r=ut(e,i);if(!it(r)||bt(e.items))return r;const[o,a]=[e.items,Math.max(e.items.length,r.length)];for(let s=0;s<a;s++)s<o.length&&(r[s]=Le(o[s],n,r[s]));return r}function qO(e,n,i){const r=ut(e,i);for(const o of e.anyOf){const a=Le(o,n,Bt(r));if(sr(o,n,a))return a}return r}function Le(e,n,i){const r=Il(e,n),o=e;switch(o[v]){case"Array":return MO(o,r,i);case"Date":return BO(o,r,i);case"Import":return EO(o,r,i);case"Intersect":return CO(o,r,i);case"Object":return DO(o,r,i);case"Record":return zO(o,r,i);case"Ref":return _O(o,r,i);case"This":return WO(o,r,i);case"Tuple":return HO(o,r,i);case"Union":return qO(o,r,i);default:return ut(o,i)}}function KO(...e){return e.length===3?Le(e[0],e[1],e[2]):Le(e[0],[],e[1])}var Qe={};function GO(){return typeof process>"u"||!Qe?!1:!!(Qe.CI||Qe.GITHUB_ACTIONS||Qe.GITLAB_CI)}function VO(){var e;return typeof process>"u"||Qe!=null&&Qe.NO_COLOR?!1:Qe!=null&&Qe.FORCE_COLOR||(e=process.stdout)!=null&&e.isTTY?!0:!GO()}VO();var JO=/^(\d+)\.(\d+)\.(\d+)$/;function Na(e){const n=e.match(JO);if(!n)throw new Error(`Invalid semver: "${e}". Expected format: major.minor.patch`);return{major:Number(n[1]),minor:Number(n[2]),patch:Number(n[3])}}function XO(e,n){const i=Na(e),r=Na(n);return i.major-r.major||i.minor-r.minor||i.patch-r.patch}function Rl(e){if(e.length===0)throw new Error("Cannot determine latest version from empty array");return e.reduce((n,i)=>XO(i,n)>0?i:n)}function Ul(e){var i;if(typeof e!="object"||e===null||Array.isArray(e))return;const n=(i=e.properties)==null?void 0:i.name;return typeof(n==null?void 0:n.const)=="string"?n.const:void 0}function YO(e){var i;const n=(i=e.properties)==null?void 0:i.version;return typeof(n==null?void 0:n.const)=="string"}function ZO(e){return Array.isArray(e.required)&&e.required.includes("name")}function QO(e){const n=new Map;for(const i of e){const r=Ul(i),o=n.get(r);o?o.push(i):n.set(r,[i])}return n}function ex(e,n){const i=n.find(r=>!YO(r)&&typeof r.description=="string")??n.find(r=>typeof r.description=="string");return{const:e,type:"string",...i?{description:i.description}:{}}}function Ml(e){const n=new WeakSet;function i(r){if(typeof r!="object"||r===null||n.has(r))return;if(n.add(r),Array.isArray(r)){r.forEach(i);return}const o=r,a=o.anyOf,c=Array.isArray(a)&&a.length>=2&&a.every(l=>Ul(l)!==void 0&&ZO(l))&&o.properties===void 0&&o.allOf===void 0&&o.if===void 0&&o.required===void 0&&o.additionalProperties===void 0&&(o.type===void 0||o.type==="object")?QO(a):void 0;c&&c.size>=2&&(o.type="object",o.required=["name"],o.properties={name:{description:"Component or registered plugin to render.",anyOf:[...c.entries()].map(([l,d])=>ex(l,d))}},o.allOf=[...c.entries()].map(([l,d])=>({if:{properties:{name:{const:l}},required:["name"]},then:d.length===1?d[0]:{anyOf:d}})),delete o.anyOf);for(const l of Object.values(o))i(l)}i(e)}function qr(e){if(typeof e!="object"||e===null)return[];const n=e;return Array.isArray(n.anyOf)?n.anyOf.filter(i=>typeof i=="object"&&i!==null):Array.isArray(n.allOf)?n.allOf.flatMap(i=>{const r=i==null?void 0:i.then;if(typeof r!="object"||r===null)return[];const o=r.anyOf;return Array.isArray(o)?o.filter(a=>typeof a=="object"&&a!==null):[r]}):[]}function Kr(e,n,i){if(!(typeof e!="object"||e===null)){if(Array.isArray(e)){e.forEach(r=>{typeof r=="object"&&r!==null&&Kr(r,n,i)});return}e.$ref===n&&(e.$ref=i);for(const r of Object.values(e))typeof r=="object"&&r!==null&&Kr(r,n,i)}}function tx(e,n="ComponentDefinition"){const i=new Set(Object.keys(e.definitions??{})),r=s=>{const c=i.has(s)?s:n;return i.has(c)?`#/definitions/${c}`:void 0},o=s=>typeof s=="string"&&(/^T\d+$/.test(s)||s===n||i.has(s));function a(s,c=""){if(!(typeof s!="object"||s===null))for(const[l,d]of Object.entries(s)){const g=c?`${c}.${l}`:l;if(d&&typeof d=="object"){const u=d;if(u.type==="array"&&u.items&&Object.keys(u.items).length===0&&i.has(n)&&(u.items={$ref:`#/definitions/${n}`}),u.type==="array"&&u.items&&typeof u.items=="object"&&"$ref"in u.items&&o(u.items.$ref)){const y=u.items.$ref,p=r(y);u.items=p?{$ref:p}:{}}if(o(u.$ref)){const y=r(u.$ref);y?u.$ref=y:delete u.$ref}if(l==="$id"&&o(d)&&g!==`definitions.${d}.$id`){delete s[l];continue}a(d,g)}}}a(e)}function nx(e,n={}){const{$schema:i="http://json-schema.org/draft-07/schema#",$id:r,title:o,description:a,definitions:s={},enrich:c}=n,l=JSON.parse(JSON.stringify(e));if(l.$id&&typeof l.$id=="string"&&/^T\d+$/.test(l.$id)){const y=l.$id;delete l.$id,Kr(l,y,"#")}const d={...s};function g(y,p=""){if(!(typeof y!="object"||y===null)){for(const[h,b]of Object.entries(y))if(b&&typeof b=="object"){const L=b;if(L.$id&&typeof L.$id=="string"){const A=L.$id;if(p!==`definitions.${A}`){const{$id:N,...S}=L;d[A]=S,y[h]={$ref:`#/definitions/${A}`},g(S,`definitions.${A}`);continue}}g(b,p?`${p}.${h}`:h)}}}g(l);const u={$schema:i};return r&&(u.$id=r),Object.assign(u,l),u.$schema=i,r&&(u.$id=r),o!==void 0&&(u.title=o),a!==void 0&&(u.description=a),Object.keys(d).length>0&&(u.definitions=d),tx(u),c==null||c(u),Ml(u),u}var ix=[{id:"scaffold-marker",kind:"scaffold-marker",expression:/\{\{\s*[^{}\n]*?\S[^{}\n]*?\s*\}\}/},{id:"lorem-ipsum",kind:"filler",expression:/lorem\s+ipsum/i},{id:"your-x-here",kind:"filler",expression:/\byour\b[^.!?\n]{0,40}?\bhere\b/i},{id:"goes-here",kind:"filler",expression:/\b(?:goes\s+here|go\s+here|(?:text|title|subtitle|content|image|logo|caption|name)\s+here)\b/i},{id:"click-to-add",kind:"filler",expression:/\bclick\s+to\s+(?:add|edit)\b/i},{id:"bracketed",kind:"filler",expression:/^\[[^[\]\n]*[A-Za-z][^[\]\n]*\]$/},{id:"debris",kind:"filler",expression:/^(?:todo|fixme|x{3,}|placeholder|sample\s+text|dummy\s+text|insert\s+text)$/i}];ix.map(e=>e.id);var Ia=200,ka=36,Aa=600,rx=new Set(["family","fontFace","titleFontFace","legendFontFace","dataLabelFontFace","catAxisLabelFontFace","valAxisLabelFontFace"]),ox=new Set(["heading","body","mono","light"]),ax=new Set(["fontRegistry"]);function Gr(e,n,i){if(e!=null){if(typeof e=="string"){if(i&&(rx.has(i)||ox.has(i))){const r=e.trim();r.length>0&&n.add(r)}return}if(Array.isArray(e)){for(const r of e)Gr(r,n,i);return}if(typeof e=="object"){const r=e.fonts;if(i==="theme"&&r&&typeof r=="object"){for(const[o,a]of Object.entries(r))if(typeof a=="string"){const s=a.trim();s.length>0&&n.add(s)}else if(a&&typeof a=="object"){const s=a.family;typeof s=="string"&&s.trim().length>0&&n.add(s.trim())}}for(const[o,a]of Object.entries(e))ax.has(o)||Gr(a,n,o)}}}function Bl(e){const n=new Set;return Gr(e,n),n}var H0=Bl,q0=Bl,K0={100:"Thin",200:"ExtraLight",300:"Light",400:"Regular",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"},sx=["actionTitle","takeaway","source","tracker","footer"],lx=t.Recursive(e=>t.Object({type:t.Union(["string","number","integer","boolean","object","array","component"].map(n=>t.Literal(n)),{description:"Content type accepted by this slot. Use component for a document component or registered plugin."}),description:t.Optional(t.String({description:"Explain this slot’s content and purpose to authors."})),required:t.Optional(t.Boolean({description:"Require a value when no default is provided. Defaults to false."})),default:t.Optional(t.Unknown({description:"Value used when the caller omits this slot. Must satisfy the slot’s type and constraints."})),enum:t.Optional(t.Array(t.Union([t.String(),t.Number(),t.Boolean()]),{minItems:1,description:"Allowed scalar values for this slot."})),minItems:t.Optional(t.Integer({minimum:0,description:"Minimum number of array entries, inclusive."})),maxItems:t.Optional(t.Integer({minimum:0,description:"Maximum number of array entries, inclusive."})),minLength:t.Optional(t.Integer({minimum:0,description:"Minimum string length in characters, inclusive."})),maxLength:t.Optional(t.Integer({minimum:0,description:"Maximum string length in characters, inclusive."})),minimum:t.Optional(t.Number({description:"Minimum numeric value, inclusive."})),maximum:t.Optional(t.Number({description:"Maximum numeric value, inclusive."})),maxWords:t.Optional(t.Integer({minimum:1,description:"Maximum whitespace-separated word count. Exceeding it fails validation."})),oneLine:t.Optional(t.Boolean({description:"Reject newline characters in string values. Does not prevent visual line wrapping."})),items:t.Optional({...e,description:"Slot type and constraints for each array entry."}),properties:t.Optional(t.Record(t.String(),e,{description:"Named child slots accepted by an object slot. Undeclared properties are rejected."})),role:t.Optional(t.Union(sx.map(n=>t.Literal(n)),{description:"Content role for quality profiles: actionTitle, takeaway, source, tracker or footer. A profile may require or measure it; the theme only styles it."}))},{additionalProperties:!1}),{$id:"BlockSlot"}),El=t.Unsafe(t.Object({description:t.Optional(t.String({description:"Describe what this reusable block renders and when to use it."})),slots:t.Record(t.String(),lx,{description:"Named inputs and their types, defaults and constraints. Use an empty object for a block with no inputs."}),body:t.Array(t.Unknown(),{description:"Components and binding directives expanded in order when this block is invoked."}),section:t.Optional(t.Object({tracker:t.Optional(t.Unknown({description:"Section tracker value or binding, available to headers and footers through $context at /section/tracker."})),header:t.Optional(t.Array(t.Unknown(),{description:"Header component templates. Explicit header settings on the section take precedence."})),footer:t.Optional(t.Array(t.Unknown(),{description:"Footer component templates. Explicit footer settings on the section take precedence."})),pageBreak:t.Optional(t.Boolean({description:"Start the containing section on a new page. An explicit section pageBreak setting takes precedence."})),scope:t.Optional(t.Union([t.Literal("section"),t.Literal("following")],{description:"Apply header/footer templates to this section only, or inherit them in following sections. Defaults to section."}))},{additionalProperties:!1,description:"DOCX section tracker, header/footer templates and page-break behavior. Place this block at the section boundary."})),slide:t.Optional(t.Object({background:t.Optional(t.Unknown({description:"Slide background (color, gradient or image) or a binding. A background the slide states itself takes precedence."})),grid:t.Optional(t.Unknown({description:"Grid configuration merged over the presentation grid when resolving grid placements in this block’s body."})),notes:t.Optional(t.Unknown({description:"Speaker notes or a binding. Notes the slide states itself take precedence."}))},{additionalProperties:!1,description:"PPTX slide background, grid and notes supplied by this block. Invoke the block as a direct child of a slide."}))},{additionalProperties:!1})),Cl=t.Record(t.String({pattern:"^[a-zA-Z][a-zA-Z0-9_-]*$"}),El,{description:"Document-local JSON block definitions. Names are not built into the engine."}),Dl=t.Object({ref:t.String({minLength:1,description:"Name in this document’s props.blocks."}),slots:t.Optional(t.Record(t.String(),t.Unknown(),{description:"Input values keyed by the slot names declared in the referenced block definition."}))},{additionalProperties:!1}),Xo={$slot:{keys:["$slot","default","props"],result:"dynamic"},$item:{keys:["$item","default","props"],result:"dynamic"},$theme:{keys:["$theme","default"],result:"dynamic"},$context:{keys:["$context","default"],result:"dynamic"},$count:{keys:["$count"],result:"number"},$if:{keys:["$if","then","else"],result:"dynamic"},$each:{keys:["$each","template"],result:"array"},$join:{keys:["$join","separator","keepEmpty"],result:"string"},$measure:{keys:["$measure","fraction","unit"],result:"number"}},cx=["$item","$slot","$context","$theme"],Pi=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),dx=["x","y","w","h","position","grid","gridConfig","direction","gap","weights","alignment","spacing"];Object.fromEntries(Object.entries(Xo).map(([e,n])=>[e,n.keys]));var wr=["null","boolean","number","string","array","object"],en=(e,n)=>new Set([...e].filter(i=>n.has(i))),px=e=>new Set(e.flatMap(n=>[...n])),Ta=e=>e===null?"null":Array.isArray(e)?"array":typeof e;function An(e,n,i=new Set){if(e===!1)return new Set;if(e===!0||i.has(e))return new Set(wr);const r=e.not;if(r===!0||r&&typeof r=="object"&&Object.keys(r).length===0)return new Set;const o=new Set(i).add(e);let a=new Set(wr);if(e.type){const s=Array.isArray(e.type)?e.type:[e.type];a=en(a,new Set(wr.filter(c=>s.includes(c)||c==="number"&&s.includes("integer"))))}if(Object.hasOwn(e,"const")&&(a=en(a,new Set([Ta(e.const)]))),Array.isArray(e.enum)&&(a=en(a,new Set(e.enum.map(Ta)))),typeof e.$ref=="string"){const s=n(e.$ref);s!==void 0&&(a=en(a,An(s,n,o)))}for(const s of["anyOf","oneOf"])Array.isArray(e[s])&&(a=en(a,px(e[s].map(c=>An(c,n,o)))));if(Array.isArray(e.allOf))for(const s of e.allOf)a=en(a,An(s,n,o));if(r&&typeof r=="object"&&r.type&&Object.keys(r).every(s=>["type","description","title","$comment"].includes(s))){const s=(Array.isArray(r.type)?r.type:[r.type]).filter(c=>c!=="integer");a=new Set([...a].filter(c=>!s.includes(c)))}return a}function yi(e,n,i=new Set){if(e===!1)return!1;if(e===!0||i.has(e))return{};const r=new Set(i).add(e),o=[];if(typeof e.$ref=="string"){const a=n(e.$ref);a!==void 0&&o.push(yi(a,n,r))}e.items!==void 0&&o.push(Array.isArray(e.items)?{anyOf:[...e.items,...e.additionalItems===!1?[]:[e.additionalItems??{}]]}:e.items);for(const a of["anyOf","oneOf"])Array.isArray(e[a])&&o.push({anyOf:e[a].filter(s=>An(s,n).has("array")).map(s=>yi(s,n,r))});return Array.isArray(e.allOf)&&o.push(...e.allOf.map(a=>yi(a,n,r))),o.length===0?{}:o.length===1?o[0]:{allOf:o}}var kt=(e,n)=>({type:"object",properties:e,required:n,additionalProperties:!1}),Tn=e=>({type:"string",pattern:"^(|/.*)$",description:e}),ux=e=>({anyOf:[Tn(e),{type:"array",minItems:1,items:Tn(e),description:e}],description:e}),mx=e=>({$slot:"Read a named input slot by JSON Pointer, e.g. /title or /client/name.",$item:"Read the current $each entry by JSON Pointer. Use an empty string for the whole entry or /title for a property.",$theme:'Read the active theme by JSON Pointer, e.g. /colors/primary, or by a list of pointers tried in order, e.g. ["/chrome/sourceLine/color", "/styles/source/color"] — the chrome recipe if the theme sets one, else the type role. A missing value requires a default.',$context:e==="pptx"?"Read deck or slide context by JSON Pointer, e.g. /document/title, /slide/width or /slide/index.":"Read document or section context by JSON Pointer, e.g. /document/title or /section/tracker."}),fx=e=>e==="pptx"?{axis:"Measure the slide canvas width or height, in the unit given.",unit:"Measurement unit: points, twentieths of a point, or inches. Defaults to pt; use in for frame coordinates."}:{axis:"Measure the usable page width or height after margins, using the containing section’s page settings.",unit:"Measurement unit: points, twentieths of a point, or inches. Defaults to pt."},di=(e,n)=>({...typeof e=="boolean"?{allOf:[e]}:e,description:n}),Lr=e=>typeof e=="boolean"?{}:{...e.description&&{description:e.description},...e.markdownDescription&&{markdownDescription:e.markdownDescription}},gx=e=>({type:"object",required:[e]}),pi=Object.keys(Xo);function zl(e,n,i=[],r="docx"){const o=`BlockTemplate_${n}`,a=mx(r),s=fx(r),c=I=>({description:I,anyOf:[Tn(I),...cx.map(M=>kt({[M]:Tn(a[M])},[M]))]}),l=`${o}_Body`,d=I=>({$ref:`#/definitions/${I}`});if(e[l])return d(l);const g={...e},u=g[n];g[n]={...u,anyOf:(u.anyOf??[u]).filter(I=>{var M,J;return!i.includes((J=(M=I.properties)==null?void 0:M.name)==null?void 0:J.const)})};const y=I=>{if(!I.startsWith("#/definitions/"))return;let M=g;for(const J of I.slice(14).split("/")){const ee=J.replace(/~1/g,"/").replace(/~0/g,"~");if(!M||typeof M!="object"||!Object.hasOwn(M,ee))return;M=M[ee]}return typeof M=="boolean"||M&&typeof M=="object"?M:void 0},p=new Map,h=new Map;let b=0;const L=d(n),A=new Map,N=I=>{const M=JSON.stringify(I);let J=A.get(M);return J||(J=`${o}_Shared${b++}`,A.set(M,J),e[J]=I),d(J)},S=Object.fromEntries(pi.map(I=>[I,N(gx(I))])),U=N({anyOf:Object.values(S)}),j=[...new Set(["",...pi.flatMap(I=>Array.from({length:I.length-1},(M,J)=>I.slice(0,J+1)))])],k=N({type:"object",propertyNames:{pattern:`^(?:${j.map(I=>I.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})$`}});function T(I){if(typeof I=="boolean")return I;const M=JSON.stringify(I),J=h.get(M);if(J)return{...d(J),...Lr(I)};const ee=`${o}_Literal${b++}`;h.set(M,ee);const X=e[ee]={};if(Object.assign(X,I),typeof I.$ref=="string"){const O=y(I.$ref);if(O!==void 0){const F=T(O);typeof F=="object"?X.$ref=F.$ref:(delete X.$ref,F||(X.not={}))}}I.properties&&(X.properties=Object.fromEntries(Object.entries(I.properties).map(([O,F])=>[O,["name","version"].includes(O)&&typeof F=="object"&&typeof F.const=="string"?F:W(F)]))),I.patternProperties&&(X.patternProperties=Object.fromEntries(Object.entries(I.patternProperties).map(([O,F])=>[O,W(F)]))),I.items!==void 0&&(X.items=Array.isArray(I.items)?I.items.map(O=>W(O,!0)):W(I.items,!0));for(const O of["additionalProperties","additionalItems"])typeof I[O]=="object"&&(X[O]=W(I[O],O==="additionalItems"));for(const O of["anyOf","oneOf","allOf"])Array.isArray(I[O])&&(X[O]=I[O].map(F=>{var ce,_;const Y=T(F);return typeof F=="object"&&typeof((_=(ce=F.properties)==null?void 0:ce.name)==null?void 0:_.const)=="string"&&typeof Y=="object"&&Y.$ref?e[Y.$ref.slice(14)]:Y}));for(const O of["then","else"])I[O]!==void 0&&(X[O]=T(I[O]));return{...d(ee),...Lr(I)}}function W(I,M=!1){if(I===!1)return!1;const J=Lr(I),ee=typeof I=="object"?{...I}:I;typeof ee=="object"&&(delete ee.description,delete ee.markdownDescription);const X=`${M?"sequence":"value"}:${JSON.stringify(ee)}`,O=p.get(X);if(O)return{...d(O),...J};const F=`${o}_Value${b++}`;p.set(X,F),e[F]={};const Y=d(F),ce=An(ee,y);if(ce.size===0)return e[F]={allOf:[T(ee)]},Y;const _=()=>M?W(ee):Y,Xt=()=>M?{anyOf:[Y,{type:"array",items:Y}]}:Y,ge=()=>M?_():W(yi(ee,y)),Z={};for(const H of pi){const Ze=Xo[H].result;if(!(Ze!=="dynamic"&&!ce.has(Ze)&&!(M&&Ze==="array")))switch(H){case"$slot":case"$item":case"$theme":case"$context":Z[H]=kt({[H]:H==="$theme"?ux(a[H]):Tn(a[H]),default:di(_(),"Fallback value or binding used only when the referenced value is missing. Null, false and empty values do not trigger it."),...H==="$slot"||H==="$item"?{props:{type:"object",description:"Component props merged beneath a component-slot value. Put placement (x, y, w, h, grid) and styling defaults here; the slot content may override styling but never placement."}}:{}},[H]);break;case"$if":Z[H]=kt({$if:c('Test a slot by JSON Pointer, e.g. /subtitle, or a reference such as { "$item": "/numeric" } or { "$theme": "/chrome/keyTakeaways/fill" }. Missing, null, false, empty text and empty arrays select else; zero selects then.'),then:di(Xt(),"Value or components to emit when the slot tested by $if is present."),else:di(Xt(),"Value or components to emit otherwise. Omit to produce no output.")},["$if","then"]);break;case"$each":Z[H]=kt({$each:c('Repeat template for each entry in an array slot, e.g. /items, or in an array named by a reference, { "$item": "/cells" } or { "$theme": "/palette/chart" }. Read the current entry with $item.'),template:di(ge(),"One template evaluated per array entry. Use $item for the current entry and a group for multiple components.")},["$each","template"]);break;case"$count":Z[H]=kt({$count:c('Return the number of entries in an array slot, e.g. /items, or in an array of the current entry, { "$item": "/cells" }.')},["$count"]);break;case"$join":Z[H]=kt({$join:{type:"array",items:W({}),description:"Evaluate these values or bindings and join them as text. Empty values are skipped unless keepEmpty is true."},separator:{type:"string",description:"Text inserted between joined values. Defaults to an empty string."},keepEmpty:{type:"boolean",description:"Keep missing, null, false, empty text and empty arrays in the join. Defaults to false."}},["$join"]);break;case"$measure":Z[H]=kt({$measure:{enum:["width","height"],description:s.axis},fraction:{type:"number",minimum:0,maximum:1,description:"Fraction of the measured dimension, from 0 to 1. Defaults to 1."},unit:{enum:["pt","twip","in"],description:s.unit}},["$measure"]);break;default:{const Yt=H;throw new Error(`Missing authoring schema for directive ${Yt}`)}}}return e[F]={allOf:[{if:U,then:{allOf:pi.map(H=>({if:S[H],then:Z[H]?N({...Z[H],properties:Object.fromEntries(Object.entries(Z[H].properties).map(([Ze,Yt])=>[Ze,N(Yt)]))}):!1}))},else:T(ee)},{if:k,then:{properties:Object.fromEntries(Object.entries(Z).map(([H,Ze])=>[H,N(Ze.properties[H])]))}}]},{...Y,...J}}return e[l]=W(L,!0),d(l)}var hx="^\\s*\\{\\{\\s*[^{}\\n]*?\\S[^{}\\n]*?\\s*\\}\\}\\s*$",Yo=e=>JSON.parse(JSON.stringify(e));function vr(e,n,i){if(e!==void 0&&n!==void 0)return e===n?`${e} ${i}`:`${e}–${n} ${i}`;if(e!==void 0)return`at least ${e} ${i}`;if(n!==void 0)return`at most ${n} ${i}`}function bx(e){const n=[];e.required&&e.default===void 0&&n.push("Required"),e.default!==void 0&&n.push(`Default: \`${JSON.stringify(e.default)}\``),e.type==="component"&&n.push("A component; placement stays in the definition"),e.enum&&n.push(`One of ${e.enum.map(a=>`\`${JSON.stringify(a)}\``).join(", ")}`);const i=vr(e.minLength,e.maxLength,"characters");i&&n.push(i),e.maxWords!==void 0&&n.push(`at most ${e.maxWords} words`),e.oneLine&&n.push("one line");const r=vr(e.minimum,e.maximum,"");r&&n.push(r.trim());const o=vr(e.minItems,e.maxItems,"entries");return o&&n.push(o),e.role&&n.push(`Role: ${e.role}`),n}function yx(e){return[e.description,bx(e).join(" · ")].filter(Boolean).join(`
3
+
4
+ `)}function Vr(e,n){let i;if(e.type==="component")i=n?{allOf:[n,{properties:{props:{propertyNames:{not:{enum:[...dx]},errorMessage:"Block placement belongs in the definition, not in a component slot."}}}}]}:{type:"object",properties:{name:{type:"string"}},required:["name"]};else{const{oneLine:o,properties:a,items:s,...c}=e;for(const l of["role","required","maxWords","description"])delete c[l];if(i={...c},c.minLength!==void 0||c.maxLength!==void 0||c.enum!==void 0){const{minLength:l,maxLength:d,enum:g,...u}=c;i={...u,anyOf:[{...l!==void 0&&{minLength:l},...d!==void 0&&{maxLength:d},...g!==void 0&&{enum:g}},{type:"string",pattern:hx}]}}o&&(i.pattern="^[^\\r\\n]*$"),s&&(i.items=Vr(s,n)),a&&(i.properties=Object.fromEntries(Object.entries(a).map(([l,d])=>[l,Vr(d,n)])),i.required=Object.entries(a).filter(([,l])=>l.required&&l.default===void 0).map(([l])=>l),i.additionalProperties=!1)}e.description&&(i.description=e.description);const r=yx(e);return r&&(i.markdownDescription=r),i}function Ox(e,n){return{type:"object",additionalProperties:!1,description:"Input values keyed by the slot names declared in the referenced block definition.",properties:Object.fromEntries(Object.entries(e.slots).map(([i,r])=>[i,Vr(r,n)])),required:Object.entries(e.slots).filter(([,i])=>i.required&&i.default===void 0).map(([i])=>i)}}function xx(e,n){const i=Object.keys(e),r={type:"object",additionalProperties:!1,required:["ref"],properties:{ref:{type:"string",minLength:1,description:"Name in this document’s props.blocks.",...i.length&&{anyOf:i.map(o=>({const:o,type:"string",description:e[o].description??`Block "${o}", defined in this document.`}))}},slots:{type:"object",description:"Input values keyed by the slot names declared in the referenced block definition."}}};return i.length&&(r.allOf=i.map(o=>({if:{properties:{ref:{const:o}},required:["ref"]},then:{properties:{slots:Ox(e[o],n)}}}))),r}function Sx(e,n,i){var r;for(const o of i){const a=(r=e.definitions)==null?void 0:r[o.name];if(!a)continue;const s=xx(n,o.componentRef),c=new Set,l=d=>{var u,y;if(!d||typeof d!="object"||c.has(d))return;if(c.add(d),Array.isArray(d)){d.forEach(l);return}const g=d;if(((y=(u=g.properties)==null?void 0:u.name)==null?void 0:y.const)==="block"&&g.properties.props){g.properties.props=Yo(s);return}for(const[p,h]of Object.entries(g))p!=="$ref"&&l(h)};l(a)}}function Jr(e,n){if(Array.isArray(e)){e.forEach(i=>Jr(i,n));return}if(Pi(e)){e.name==="block"&&Pi(e.props)&&typeof e.props.ref=="string"&&n(e.props.ref,e);for(const i of Object.values(e))Jr(i,n)}}function _l(e,n,i){var r;if(e.default!==void 0)return Yo(e.default);if((r=e.enum)!=null&&r.length)return e.enum[0];switch(e.type){case"string":return n;case"number":case"integer":{const o=e.minimum??0;return e.maximum!==void 0&&e.maximum<o?e.maximum:o}case"boolean":return!0;case"array":{const o=Math.min(Math.max(3,e.minItems??0),e.maxItems??Number.POSITIVE_INFINITY),a=e.items??{type:"string"};return Array.from({length:o},(s,c)=>_l(a,`${n} ${c+1}`,i))}case"object":return Wl(e.properties??{},i);case"component":return i==="docx"?{name:"paragraph",props:{text:n}}:{name:"text",props:{text:n}};default:return n}}function Wl(e,n){return Object.fromEntries(Object.entries(e).filter(([,i])=>i.required&&i.default===void 0||i.role).map(([i,r])=>[i,_l(r,i,n)]))}function wx(e,n,i){let r;if(Pi(i.document)){const o=Object.fromEntries(Object.entries(i.document).filter(([a])=>a!=="props"));Jr(o,(a,s)=>{if(r||a!==e)return;const c=s.props;r={name:"block",props:{ref:a,...Pi(c.slots)&&{slots:Yo(c.slots)}}}})}return r??{name:"block",props:{ref:e,slots:Wl(n.slots,i.format)}}}var Lx=["docx","pptx"],Pr=t.String({pattern:"^[a-z][a-z0-9]*(-[a-z0-9]+)*$",description:"Kebab-case identifier."}),vx=t.Object({min:t.Integer({minimum:1}),max:t.Integer({minimum:1})},{additionalProperties:!1,description:"Expected length once filled: pages for a document, slides for a deck."}),Px=t.Object({description:t.String({minLength:1}),whenToUse:t.String({minLength:1}),pages:vx,metadata:t.Optional(t.Record(t.String(),t.String(),{description:"Document metadata the scaffold writes; a value may be a scaffold marker."})),children:t.Array(t.Unknown(),{minItems:1,description:"The top-level children of the scaffolded document, in order: sections holding block invocations and ordinary components, every slot carrying a {{…}} marker whose text is the guidance for filling it."})},{additionalProperties:!1});t.Object({id:Pr,format:t.Union(Lx.map(e=>t.Literal(e))),title:t.String({minLength:1}),description:t.String({minLength:1}),whenToUse:t.String({minLength:1}),theme:t.String({minLength:1,description:"Recommended theme. Any theme renders the scaffold; this one is the archetype’s house look."}),profile:Pr,definitions:t.String({minLength:1,description:"The playground template whose props.blocks the variants invoke. The scaffold copies the definitions it needs, and their dependencies, into the document."}),numbering:t.Union([t.Literal("none"),t.Literal("sections")],{description:"Whether section openers carry numbers the reader cites (01, 02, …)."}),toc:t.Boolean({description:"Whether the scaffold places a table of contents."}),variants:t.Record(Pr,Px,{minProperties:1,description:"Structural variants of the same archetype, so two documents from one brief do not look alike."})},{additionalProperties:!1,description:"A document archetype as data."});var Fa=["consulting","dark","default","devportal","minimal","vermilion"],$x=t.Union([t.Number({description:"Margin in inches (all sides)"}),t.Object({top:t.Number({description:"Top margin in inches"}),right:t.Number({description:"Right margin in inches"}),bottom:t.Number({description:"Bottom margin in inches"}),left:t.Number({description:"Left margin in inches"})},{additionalProperties:!1})],{description:"Slide margins in inches"}),Nx=t.Union([t.Number({description:"Gutter in inches (both axes)"}),t.Object({column:t.Number({description:"Column gutter in inches"}),row:t.Number({description:"Row gutter in inches"})},{additionalProperties:!1})],{description:"Gaps between grid tracks in inches"}),Hl=t.Object({columns:t.Optional(t.Number({minimum:1,description:"Number of columns (default: 12)"})),rows:t.Optional(t.Number({minimum:1,description:"Number of rows (default: 6)"})),margin:t.Optional($x),gutter:t.Optional(Nx)},{additionalProperties:!1,description:"Grid layout configuration"}),He=t.String({pattern:"^#?[0-9A-Fa-f]{6}$",description:"Hex color (e.g. #FF0000)"}),Ix=t.Object({fontSize:t.Optional(t.Number()),fontFace:t.Optional(Tt),fontColor:t.Optional(Vo),bold:t.Optional(t.Boolean()),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900})),italic:t.Optional(t.Boolean()),align:t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")])),lineSpacing:t.Optional(t.Number()),charSpacing:t.Optional(t.Number()),paraSpaceAfter:t.Optional(t.Number()),paraSpaceBefore:t.Optional(t.Number()),case:t.Optional(Go)},{additionalProperties:!1,description:"Text style preset"}),ql=t.Object({...rr,displayName:t.Optional(t.String()),description:t.Optional(t.String({description:"The visual voice: what the theme looks like, in one sentence."})),whenToUse:t.Optional(t.String({description:"The decks the theme suits; discovery and the design guide quote it."})),version:t.Optional(t.String()),name:t.String({description:"Theme name"}),colors:t.Object({primary:He,secondary:He,accent:He,background:He,text:He,text2:t.Optional(He),background2:t.Optional(He),accent4:t.Optional(He),accent5:t.Optional(He),accent6:t.Optional(He)},{additionalProperties:!1,description:"Theme color palette (10-slot scheme)"}),fonts:t.Object({heading:Tt,body:Tt,mono:t.Optional(Tt),light:t.Optional(Tt)},{additionalProperties:!1,description:"Font families"}),fontRegistry:t.Optional(ir),defaults:t.Object({fontSize:t.Number({description:"Default font size in points"}),fontColor:He},{additionalProperties:!1,description:"Default text styling"}),styles:t.Optional(t.Partial(t.Object(Object.fromEntries(hl.map(e=>[e,Ix]))),{additionalProperties:!1,description:"Named text style presets"})),componentDefaults:t.Optional(Nl)},{additionalProperties:!1,description:"Presentation theme configuration"}),Rt=["pptxgenjs","office-open"],Oi="pptxgenjs";function lr(e){return`PptxComponentDefinition_${e}`}function kx(e,n,i){const r=Xr(n),o=$i(r);if(i==="pptxgenjs")return e==="slide"&&(o==null||delete o.transition),r;switch(e){case"image":for(const a of["svg","sizing","rotate","rounding","hyperlink"])o==null||delete o[a];break;case"shape":o==null||delete o.flipV;break;case"table":for(const a of["autoPage","autoPageRepeatHeader","margin","borderRadius"])o==null||delete o[a];Ax(r);break}return Kl(r),r}function Ax(e){var o,a;const n=(o=$i(e))==null?void 0:o.rows,i=(a=n==null?void 0:n.items)==null?void 0:a.items,r=i==null?void 0:i.anyOf;if(Array.isArray(r))for(const s of r){const c=$i(s);c!=null&&c.text&&(delete c.colspan,delete c.rowspan,delete c.margin,Kl(s))}}function $i(e){if(!(!e||typeof e!="object"))return e.properties}function Kl(e){const n=$i(e),i=e.required;if(!n||!i)return;const r=i.filter(o=>o in n);r.length>0?e.required=r:delete e.required}function Xr(e){if(Array.isArray(e))return e.map(Xr);if(!e||typeof e!="object")return e;const n=Object.create(Object.getPrototypeOf(e));for(const i of Reflect.ownKeys(e))n[i]=Xr(e[i]);return n}var ui=(e,n)=>t.Union([t.Number({description:e}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:n})]),Tx=t.Object({x:t.Optional(ui("Frame left edge in inches, relative to the enclosing frame or slide","Frame left edge as a percentage of the enclosing width")),y:t.Optional(ui("Frame top edge in inches, relative to the enclosing frame or slide","Frame top edge as a percentage of the enclosing height")),w:t.Optional(ui("Frame width in inches","Frame width as a percentage of the enclosing width")),h:t.Optional(ui("Frame height in inches","Frame height as a percentage of the enclosing height")),grid:t.Optional(Gt),gridConfig:t.Optional(t.Object({...Hl.properties},{additionalProperties:!1,description:"Grid used for grid placements of this group’s descendants, merged over the enclosing grid field by field. Inside a frame the grid spans the frame."})),direction:t.Optional(t.Union([t.Literal("row"),t.Literal("column")],{description:"Distribute the children into cells along this axis: equal cells, or weighted by `weights`. Each child fills its cell unless it states its own offsets; an omitted optional child simply redistributes the rest."})),gap:t.Optional(t.Number({minimum:0,description:"Space between distributed cells, in inches. Default 0."})),weights:t.Optional(t.Array(t.Number({exclusiveMinimum:0}),{minItems:1,description:"Relative cell sizes in child order (e.g. [1.1, 1] for a 1.1 : 1 split). Missing entries count as 1."}))},{additionalProperties:!1,description:"Transparent group. Without a frame, a plain sequence of slide content; with `x`/`y`/`w`/`h` or `grid`, a frame its children position within (numbers are offsets in inches, percentages are fractions of the frame, omitted values fill it); with `direction`, a row or column that distributes its children into cells."}),Fx=t.Object({title:t.Optional(t.String({description:"Presentation title metadata"})),author:t.Optional(t.String({description:"Presentation author metadata"})),subject:t.Optional(t.String({description:"Presentation subject metadata"})),company:t.Optional(t.String({description:"Company name metadata"})),theme:t.Optional(t.Union([t.String({description:`Theme name to apply (default: "default"). Built-ins: ${Fa.join(", ")} (consulting is the house style).`,examples:[...Fa],default:"default"}),ql],{description:'Theme to apply: a built-in/custom theme name (default: "default"), or an inline theme config object so the document stays self-contained'})),fontRegistry:t.Optional(ir),slideWidth:t.Optional(t.Number({description:"Slide width in inches (default: 10)",default:10})),slideHeight:t.Optional(t.Number({description:"Slide height in inches (default: 7.5)",default:7.5})),rtlMode:t.Optional(t.Boolean({description:"Right-to-left text direction"})),language:t.Optional(t.String({pattern:"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",description:'Default presentation language (BCP-47 tag, e.g. "en-US"). Sets the spell-check language for all text; individual text components can override it.',examples:["en-US","fr-FR","de-DE","it-IT","es-ES"]})),pageNumberFormat:t.Optional(t.Union([t.Literal("9"),t.Literal("09")],{description:'Format for {PAGE_NUMBER} placeholders: "9" = bare number (default), "09" = zero-padded',default:"9"})),componentDefaults:t.Optional(Nl),grid:t.Optional(Hl),blocks:t.Optional(Cl),qualityProfile:t.Optional(t.String({description:"The quality profile validation judges this deck by when the caller names none — a blueprint scaffold writes its archetype’s profile here. A profile names required structure and content; the theme only paints. Built-ins: consulting-deck, executive-presentation, technical-presentation; an unknown name falls back to the format default.",examples:["consulting-deck","executive-presentation","technical-presentation"]}))},{description:"Presentation container props",additionalProperties:!1});t.Object({x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'X position as percentage (e.g., "10%")'})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Y position as percentage (e.g., "10%")'})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Width as percentage (e.g., "80%")'})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Height as percentage (e.g., "20%")'})]))},{description:"Position and size in inches or percentages",additionalProperties:!1});var jx=t.Object({color:t.Optional(Vo),gradient:t.Optional(Sl),image:t.Optional(t.Object({path:t.Optional(t.String({description:"Image file path or URL"})),base64:t.Optional(t.String({description:"Base64-encoded image data"}))},{description:"Background image",additionalProperties:!1}))},{description:"Slide background configuration",additionalProperties:!1}),Rx=t.Object({type:t.Optional(t.Union([t.Literal("fade"),t.Literal("push"),t.Literal("wipe"),t.Literal("zoom"),t.Literal("none")],{description:"Transition effect type"})),speed:t.Optional(t.Union([t.Literal("slow"),t.Literal("medium"),t.Literal("fast")],{description:"Transition speed"}))},{description:"Slide transition configuration",additionalProperties:!1}),Ux=t.Object({meta:t.Optional(t.Object({title:t.Optional(t.String({description:"Authoring label for this slide, shown in editors and outlines. Never rendered — slide content is unaffected."}))},{additionalProperties:!1,description:"Authoring metadata; has no effect on the presentation."})),background:t.Optional(jx),transition:t.Optional(Rx),notes:t.Optional(t.String({description:"Speaker notes for this slide"})),hidden:t.Optional(t.Boolean({description:"Hide this slide from presentation"}))},{description:"Slide container props",additionalProperties:!1}),ja=[...gt.map(({name:e})=>e),"block","group"],En=[{name:"pptx",propsSchema:Fx,hasChildren:!0,allowedChildren:["slide"],category:"container",propsRequired:!0,description:"Main presentation container - defines the overall presentation structure. Required as the root component. Always declare `slideWidth`/`slideHeight` (13.333 × 7.5 for 16:9) — omitted, the renderer silently falls back to 4:3 and 16:9 content leaves a dead strip.",special:{hasSchemaField:!0}},{name:"slide",propsSchema:Ux,hasChildren:!0,allowedChildren:ja,category:"container",description:"Slide container - groups content elements on a single slide. One idea per slide: past roughly 40 words of body text, split the content across more slides."},{name:"group",propsSchema:Tx,hasChildren:!0,allowedChildren:ja,category:"layout",description:"Transparent group of slide content; also the inspectable result of block expansion. Give it a frame (x/y/w/h or grid) to position children within it, and a direction to distribute them into equal or weighted cells."},{name:"block",propsSchema:Dl,hasChildren:!1,category:"layout",description:"Invoke a JSON block defined in this document’s props.blocks. Fill its named slots; no block names are built into the engine and no coordinates are accepted here."},...gt];function Nn(e,n,i){var o;const r={name:t.Literal(e.name),id:t.Optional(t.String()),enabled:t.Optional(t.Boolean({default:!0,description:"When false, this component is filtered out and not rendered. Defaults to true."}))};return(o=e.special)!=null&&o.hasSchemaField&&(r.$schema=t.Optional(t.String({format:"uri"})),r.renderer=i?i.requireDiscriminator?t.Literal(i.renderer,{description:"Renderer backend for this presentation"}):t.Optional(t.Literal(i.renderer,{description:'Renderer backend. Omitted defaults to "pptxgenjs".'})):t.Optional(t.Union(Rt.map(a=>t.Literal(a)),{description:'Renderer backend. Omitted defaults to "pptxgenjs".'}))),r.props=i?kx(e.name,e.propsSchema,i.renderer):e.propsSchema,e.hasChildren&&n&&(r.children=t.Optional(t.Array(n))),$l(e)||(r.props=t.Optional(r.props)),t.Object(r,{additionalProperties:!1,description:e.description})}function Mx(e){return En.map(n=>Nn(n,e))}function Gl(e,n=[],i){const r=new Map;for(const c of En)c.hasChildren||r.set(c.name,Nn(c,void 0,i));const o=En.filter(c=>c.hasChildren),a=new Map,s=[...o];for(;s.length>0;){const c=s.length;for(let l=s.length-1;l>=0;l--){const d=s[l];if(d.name==="group"){const h=t.Intersect([e,t.Object({name:t.Union([...d.allowedChildren.map(b=>t.Literal(b)),...n.map(b=>{var L;return((L=b.properties)==null?void 0:L.name)??t.String()})])})]);a.set(d.name,Nn(d,h,i)),s.splice(l,1);continue}if(!d.allowedChildren){a.set(d.name,Nn(d,e,i)),s.splice(l,1);continue}if(!d.allowedChildren.filter(h=>o.some(b=>b.name===h)).every(h=>a.has(h)))continue;const y=[...d.allowedChildren.map(h=>a.get(h)??r.get(h)).filter(h=>h!==void 0),...n],p=y.length===1?y[0]:t.Union(y);a.set(d.name,Nn(d,p,i)),s.splice(l,1)}if(s.length===c)throw new Error(`Circular allowedChildren among: ${s.map(l=>l.name).join(", ")}`)}return[...a.values(),...r.values()]}function Bx(e,n,i,r){const o={name:t.Literal(e.name),id:t.Optional(t.String()),enabled:t.Optional(t.Boolean({default:!0,description:"When false, this component is filtered out and not rendered. Defaults to true."})),version:r?t.Optional(t.Literal(n.version)):t.Literal(n.version),props:n.propsSchema};return n.hasChildren&&(o.children=t.Optional(t.Array(i))),t.Object(o,{additionalProperties:!1,description:n.description??e.name})}function Ex(e={}){const{customComponents:n=[]}=e,i=Rt.map(r=>Cx(n,r,r!==Oi));return t.Union(i,{description:"Presentation definition, discriminated by the optional renderer field. Omitted renderer means pptxgenjs."})}function Cx(e,n,i){return t.Recursive(r=>{const o=[];for(const c of e)if(c.versions.length>0){const l=Rl(c.versions.map(g=>g.version)),d=c.versions.map(g=>Bx(c,g,r,g.version===l));o.push(...d)}const s=[...Gl(r,o,{renderer:n,requireDiscriminator:i}),...o];return s.length===0?t.Object({}):t.Union(s)},{$id:lr(n)})}t.Union([...Mx(t.Any())],{discriminator:{propertyName:"name"},description:"Standard PPTX component definition with discriminated union"});t.Recursive(e=>t.Union([...Gl(e)],{discriminator:{propertyName:"name"},description:"PPTX component definition with discriminated union"}));function Dx(e){const n=e.definitions??{},i=new Map;for(const o of Rt){const a=lr(o);n[a]&&i.set(o,zl(n,a,["pptx","slide"],"pptx"))}const r=o=>{var s,c,l,d,g,u;if(!o||typeof o!="object")return;if(Array.isArray(o)){o.forEach(r);return}const a=o;if(((c=(s=a.properties)==null?void 0:s.name)==null?void 0:c.const)==="pptx"){const y=i.get((l=a.properties.renderer)==null?void 0:l.const),p=(u=(g=(d=a.properties.props)==null?void 0:d.properties)==null?void 0:g.blocks)==null?void 0:u.patternProperties;if(y&&p)for(const h of Object.values(p))h.properties.body.items=y}Object.values(a).forEach(r)};r(e)}function zx(e){const n=e.anyOf;if(!Array.isArray(n))return;const i=new Map;for(const a of Rt){const s=`#/definitions/${lr(a)}`,c=n.find(l=>l&&l.$ref===s);c&&i.set(a,c)}if(i.size!==n.length||!i.has(Oi))return;const r=a=>({properties:{renderer:{const:a}},required:["renderer"]}),o=Rt.filter(a=>a!==Oi&&i.has(a));delete e.anyOf,e.type="object",e.properties={renderer:{description:'Renderer backend. Omitted defaults to "pptxgenjs".',anyOf:Rt.filter(a=>i.has(a)).map(a=>({const:a,type:"string"}))}},e.allOf=[...o.map(a=>({if:r(a),then:i.get(a)})),{if:{not:{anyOf:o.map(r)}},then:i.get(Oi)}]}function _x(e){var r,o;const n=e.definitions??{},i=[];for(const a of Rt){const s=lr(a),c=n[s];if(!c)continue;const l=`PptxSlotContent_${a}`;if(!n[l]){const g=qr(c).find(y=>{var p,h;return((h=(p=y.properties)==null?void 0:p.name)==null?void 0:h.const)==="slide"}),u=(o=(r=g==null?void 0:g.properties)==null?void 0:r.children)==null?void 0:o.items;u&&(n[l]=JSON.parse(JSON.stringify(u)))}if(!n[l]){i.push({name:s});continue}const d={$ref:`#/definitions/${l}`};i.push({name:s,componentRef:d},{name:l,componentRef:d})}return i}function Wx(e,n={}){return nx(e,{...n,enrich:i=>{Dx(i),zx(i)}})}Object.fromEntries(En.map(e=>[e.name,e.propsSchema]));new Set(En.filter(e=>{var n;return!!((n=e.special)!=null&&n.hasSchemaField)}).map(e=>e.name));var Vl=new Set(["name","id","enabled","props","children"]);[...Vl];var Hx=new Set([...Vl,"$schema"]);Hx.add("renderer");var q=t.String({pattern:"^(#[0-9A-Fa-f]{6}|[a-zA-Z][a-zA-Z0-9]*)$",description:'Hex color with # prefix (e.g. "#000000") or theme color name'}),Jl=t.String({pattern:"^(transparent|#[0-9A-Fa-f]{6}|[a-zA-Z][a-zA-Z0-9]*)$",description:'Hex color with # prefix, theme color name, or "transparent"'}),Xl=t.String({pattern:"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",description:'BCP-47 language tag for spell/grammar checking (e.g. "en-US", "fr-FR", "de-DE")',examples:["en-US","fr-FR","de-DE","it-IT","es-ES"]}),Yl=t.Boolean({description:"Disable spell/grammar checking for this text (e.g. code snippets or identifiers)"}),Zo=t.Array(t.String({minLength:1}),{description:"Words that should never be flagged as misspelled (whole-word, case-insensitive). E.g. brand names or technical terms.",examples:[["Wiseair","json-to-office","pptx"]]}),Qo=t.Object({case:t.Optional(Go),size:t.Optional(t.Number({minimum:8,maximum:1638})),color:t.Optional(q),bold:t.Optional(t.Boolean()),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-run weight (100–900). Any integer accepted; renderer picks the closest embedded variant via CSS font-matching. `bold: true` is shorthand for `fontWeight: 700`; if both are set, `fontWeight` wins."})),italic:t.Optional(t.Boolean()),underline:t.Optional(t.Boolean()),lineSpacing:t.Optional(t.Object({type:t.Union([t.Literal("single"),t.Literal("atLeast"),t.Literal("exactly"),t.Literal("double"),t.Literal("multiple")],{description:"`single`/`double` ignore `value`; `multiple` scales single spacing by it; `atLeast` is a floor the line grows past; `exactly` pins an absolute box the glyphs are clipped to."}),value:t.Optional(t.Number({minimum:0,description:"Points for `exactly` and `atLeast`, a factor of single spacing for `multiple`. Unlike `size` this has no floor — an empty spacer paragraph legitimately pins a fraction of a point — so an `exactly` box too small for the text it holds is reported as W_QUALITY_LINE_BOX_COLLAPSE instead."}))},{additionalProperties:!1})),spacing:t.Optional(t.Object({before:t.Optional(t.Number({minimum:0})),after:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1})),characterSpacing:t.Optional(t.Object({type:t.Union([t.Literal("condensed"),t.Literal("expanded")]),value:t.Number()},{additionalProperties:!1})),scale:t.Optional(t.Number({minimum:1,maximum:600,description:"Character width scaling in percent (w:w). 100 is normal; values below compress glyphs, above expand them (e.g. 55, 115)."}))},{additionalProperties:!1}),Ft=t.Object({family:Tt,...Qo.properties},{description:"Font definition with family and optional formatting properties",additionalProperties:!1}),cr=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")],{description:"Text alignment options"}),Zl=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Text alignment options including justify"}),qx=t.Union([t.Literal(1),t.Literal(2),t.Literal(3),t.Literal(4),t.Literal(5),t.Literal(6)],{description:"Heading level (1-6)"}),Pt=t.Object({before:t.Optional(t.Number({minimum:0,description:"Spacing before element in points"})),after:t.Optional(t.Number({minimum:0,description:"Spacing after element in points"}))},{description:"Spacing configuration",additionalProperties:!1}),Kx=t.Object({before:t.Optional(t.Number({minimum:0,description:"Spacing before list in points"})),after:t.Optional(t.Number({minimum:0,description:"Spacing after list in points"})),item:t.Optional(t.Number({minimum:0,description:"Spacing between list items in points"}))},{description:"List spacing configuration with item spacing",additionalProperties:!1});t.Object({top:t.Optional(t.Number({minimum:0})),bottom:t.Optional(t.Number({minimum:0})),left:t.Optional(t.Number({minimum:0})),right:t.Optional(t.Number({minimum:0}))},{description:"Margin configuration",additionalProperties:!1});t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double"),t.Literal("none")])),width:t.Optional(t.Number({minimum:0})),color:t.Optional(q)},{description:"Border configuration",additionalProperties:!1});var Ql=t.Object({type:t.Union([t.Literal("single"),t.Literal("atLeast"),t.Literal("exactly"),t.Literal("double"),t.Literal("multiple")],{description:"`single`/`double` ignore `value`; `multiple` scales single spacing by it; `atLeast` is a floor the line grows past; `exactly` pins an absolute box the glyphs are clipped to."}),value:t.Optional(t.Number({minimum:0,description:"Points for `exactly` and `atLeast`, a factor of single spacing for `multiple`. `exactly` has no floor of its own — an empty spacer paragraph legitimately pins a fraction of a point — so a box smaller than the text it holds is accepted here and clips it."}))},{description:"Line spacing configuration",additionalProperties:!1}),dr=t.Object({left:t.Optional(t.Number({minimum:0,description:"Left indentation in points. Omit to inherit the per-level default of 36pt (half an inch) per level."})),hanging:t.Optional(t.Number({minimum:0,description:"Hanging indent in points — how far the marker sits left of the text. Omit for the 18pt default."}))},{description:"Indentation configuration, in points",additionalProperties:!1}),ec=t.Object({left:t.Optional(t.Number({description:"Left indentation in twips (1/20 of a point)"})),right:t.Optional(t.Number({description:"Right indentation in twips (1/20 of a point)"})),hanging:t.Optional(t.Number({minimum:0,description:"Hanging indent in twips: first line stays at the left indent, following lines are indented. Mutually exclusive with firstLine."})),firstLine:t.Optional(t.Number({minimum:0,description:"First-line indent in twips: only the first line is indented. Mutually exclusive with hanging."}))},{description:"Paragraph indentation (w:ind) in twips. Use either hanging or firstLine, not both.",additionalProperties:!1}),Gx=t.Union([t.Literal("left"),t.Literal("right"),t.Literal("center"),t.Literal("decimal"),t.Literal("bar")],{description:"Tab stop alignment type"}),Vx=t.Union([t.Literal("dot"),t.Literal("hyphen"),t.Literal("underscore"),t.Literal("middleDot"),t.Literal("none")],{description:"Leader character filling the space before the tab stop"}),Jx=t.Object({type:Gx,position:t.Number({minimum:0,description:"Tab stop position in twips (1/20 of a point)"}),leader:t.Optional(Vx)},{description:"Tab stop definition (w:tab in w:tabs)",additionalProperties:!1}),Xx=t.Array(Jx,{description:"Tab stops for the paragraph. Tab characters (\\t) in the text jump to these positions."}),Yx=t.Union([t.Literal("character"),t.Literal("column"),t.Literal("margin"),t.Literal("page"),t.Literal("text")],{description:"Horizontal position relative to"}),Zx=t.Union([t.Literal("margin"),t.Literal("page"),t.Literal("paragraph"),t.Literal("line"),t.Literal("text")],{description:"Vertical position relative to"}),Qx=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("inside"),t.Literal("outside")],{description:"Horizontal alignment"}),eS=t.Union([t.Literal("top"),t.Literal("center"),t.Literal("bottom"),t.Literal("inside"),t.Literal("outside")],{description:"Vertical alignment"}),tS=t.Union([t.Literal("none"),t.Literal("square"),t.Literal("topAndBottom"),t.Literal("around"),t.Literal("tight"),t.Literal("through")],{description:"Text wrapping type"}),nS=t.Union([t.Literal("bothSides"),t.Literal("left"),t.Literal("right"),t.Literal("largest")],{description:"Text wrapping side"}),pr=t.Object({horizontalPosition:t.Optional(t.Object({relative:t.Optional(Yx),align:t.Optional(Qx),offset:t.Optional(t.Union([t.Number({description:"Horizontal offset in twips (1/20 of a point)"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Horizontal offset as percentage (e.g., "50%") relative to page or margin width'})]))},{description:"Horizontal positioning (use either align or offset, not both)",additionalProperties:!1})),verticalPosition:t.Optional(t.Object({relative:t.Optional(Zx),align:t.Optional(eS),offset:t.Optional(t.Union([t.Number({description:"Vertical offset in twips (1/20 of a point)"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Vertical offset as percentage (e.g., "50%") relative to page or margin height'})]))},{description:"Vertical positioning (use either align or offset, not both)",additionalProperties:!1})),wrap:t.Optional(t.Object({type:tS,side:t.Optional(nS),margins:t.Optional(t.Object({top:t.Optional(t.Union([t.Number({description:"Top margin in twips"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Top margin as percentage of page height"})])),bottom:t.Optional(t.Union([t.Number({description:"Bottom margin in twips"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Bottom margin as percentage of page height"})])),left:t.Optional(t.Union([t.Number({description:"Left margin in twips"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Left margin as percentage of page width"})])),right:t.Optional(t.Union([t.Number({description:"Right margin in twips"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Right margin as percentage of page width"})]))},{description:"Distance from text margins",additionalProperties:!1}))},{description:"Text wrapping configuration",additionalProperties:!1})),allowOverlap:t.Optional(t.Boolean({description:"Allow element to overlap with other elements"})),behindDocument:t.Optional(t.Boolean({description:"Place element behind document text"})),lockAnchor:t.Optional(t.Boolean({description:"Lock the anchor position"})),layoutInCell:t.Optional(t.Boolean({description:"Layout element within table cell"})),zIndex:t.Optional(t.Number({minimum:0,description:"Z-order for overlapping elements (must be non-negative)"})),rotation:t.Optional(t.Number({description:"Rotation angle in degrees"})),visibility:t.Optional(t.Union([t.Literal("hidden"),t.Literal("inherit")],{description:"Visibility of the floating element"}))},{description:"Floating element properties",additionalProperties:!1});t.Object({start:t.Optional(t.Number({minimum:1})),style:t.Optional(t.Union([t.Literal("decimal"),t.Literal("lowerLetter"),t.Literal("upperLetter"),t.Literal("lowerRoman"),t.Literal("upperRoman")])),separator:t.Optional(t.String())},{description:"Numbering configuration for lists",additionalProperties:!1});var iS={};t.Object(iS,{description:"Base component props",additionalProperties:!0});var $t=t.String({pattern:"^(#?[0-9A-Fa-f]{6}|[a-zA-Z][a-zA-Z0-9]*)$",description:'Hex colour ("#0F172A" or "0F172A") or a docx theme colour name (e.g. "primary")'}),rS="^-?\\d+(\\.\\d+)?%$",oS="^\\d+(\\.\\d+)?%$",Ra=t.Union([t.Number({description:"Inches from the canvas origin"}),t.String({pattern:rS,description:'Percentage of the canvas extent on this axis, e.g. "25%"'})],{description:"Position in inches (number) or as a canvas percentage"}),Ua=t.Union([t.Number({minimum:0,description:"Size in inches"}),t.String({pattern:oS,description:'Percentage of the canvas extent on this axis, e.g. "50%"'})],{description:"Size in inches (number) or as a canvas percentage"}),ea={x:t.Optional(Ra),y:t.Optional(Ra),w:t.Optional(Ua),h:t.Optional(Ua),rotate:t.Optional(t.Number({description:"Clockwise rotation in degrees"}))},tc=t.Union([t.Boolean({description:"Single underline in the text colour"}),t.Object({style:t.Optional(t.Union([t.Literal("sng"),t.Literal("dbl"),t.Literal("dash"),t.Literal("dotted")],{description:'Underline style (default "sng")'})),color:t.Optional($t)},{additionalProperties:!1})],{description:"Underline: true for a single line, or a style/colour object"}),ur={fontFace:t.Optional(t.String({description:"Font family name"})),fontSize:t.Optional(t.Number({minimum:1,description:"Font size in points"})),bold:t.Optional(t.Boolean()),italic:t.Optional(t.Boolean())},aS=t.Object({text:t.String({description:"Run text"}),color:t.Optional($t),...ur,underline:t.Optional(tc),strike:t.Optional(t.Boolean({description:"Strikethrough"})),breakLine:t.Optional(t.Boolean({description:"Start a new line after this run"}))},{additionalProperties:!1,description:"A formatted run inside a native visual text element"}),sS=t.Object({text:t.String({description:"Segment text"}),color:t.Optional($t),...ur,breakLine:t.Optional(t.Boolean({description:"Start a new line after this segment"}))},{additionalProperties:!1,description:"A formatted segment of a native visual shape’s text"}),nc=t.Object({color:t.Optional($t),transparency:t.Optional(t.Number({minimum:0,maximum:100,description:"Fill transparency, 0 (opaque) to 100 (invisible)"}))},{additionalProperties:!1,description:"Solid fill. Omit the whole property for no fill; gradients and patterns are raster-only."}),lS=t.Object({color:t.Optional($t),width:t.Optional(t.Number({minimum:0,description:"Outline width in points"})),dashType:t.Optional(t.Union([t.Literal("solid"),t.Literal("dash"),t.Literal("dot"),t.Literal("dashDot")],{description:'Outline dash pattern (default "solid")'}))},{additionalProperties:!1,description:"Shape outline"}),ic=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Horizontal text alignment"}),rc=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical text anchoring inside the box"}),oc=t.Union([t.Number({minimum:0,description:"Inset on every side, in points"}),t.Array(t.Number({minimum:0}),{minItems:4,maxItems:4,description:"Insets as [top, right, bottom, left], in points"})],{description:"Text insets in points"}),cS=t.Object({text:t.Optional(t.String({description:"Plain text content"})),runs:t.Optional(t.Array(aS,{minItems:1,description:'Formatted runs, as an alternative to "text"'})),...ea,color:t.Optional($t),...ur,underline:t.Optional(tc),strike:t.Optional(t.Boolean({description:"Strikethrough"})),align:t.Optional(ic),valign:t.Optional(rc),margin:t.Optional(oc),fill:t.Optional(nc)},{additionalProperties:!1,description:"Native visual text element — becomes a Word text box (wps:wsp) inside the drawing group"}),dS=t.Object({type:xl,...ea,fill:t.Optional(nc),line:t.Optional(lS),text:t.Optional(t.Union([t.String(),t.Array(sS,{minItems:1})],{description:"Text drawn inside the shape"})),...ur,fontColor:t.Optional($t),align:t.Optional(ic),valign:t.Optional(rc),margin:t.Optional(oc),flipH:t.Optional(t.Boolean({description:"Mirror horizontally"})),flipV:t.Optional(t.Boolean({description:"Mirror vertically"}))},{additionalProperties:!1,description:"Native visual shape element — becomes a preset-geometry shape (wps:wsp) inside the drawing group"}),pS=t.Object({path:t.Optional(t.String({description:"File path or http(s) URL"})),base64:t.Optional(t.String({description:"Base64 data URI"})),svg:t.Optional(t.String({description:"Raw SVG markup"})),...ea,sizing:t.Optional(t.Object({type:t.Union([t.Literal("contain"),t.Literal("cover"),t.Literal("crop")],{description:"How the image fills its box"}),w:t.Optional(t.Number({minimum:0,description:'Box width in inches; overrides the element’s own "w"'})),h:t.Optional(t.Number({minimum:0,description:'Box height in inches; overrides the element’s own "h"'}))},{additionalProperties:!1,description:'How the image fills its box. "w"/"h" state the box itself, taking precedence over the element’s "w"/"h", as they do in raster mode.'})),alt:t.Optional(t.String({description:"Alternative text for accessibility"}))},{additionalProperties:!1,description:"Native visual image element — becomes a native picture inside the drawing group"});function $r(e,n,i){return t.Object({name:t.Literal(e),id:t.Optional(t.String()),enabled:t.Optional(t.Boolean({default:!0,description:"When false, this element is filtered out and not drawn. Defaults to true."})),props:n},{additionalProperties:!1,description:i})}var uS=t.Union([$r("text",cS,"Text element - a native Word text box drawn on the visual canvas."),$r("shape",dS,"Shape element - a native preset-geometry shape, optionally holding text."),$r("image",pS,"Image element - a native picture; an SVG stays vector.")],{$id:"DocxNativeVisualContent",discriminator:{propertyName:"name"},description:"A single native visual element (text, shape, or image)."}),mS=t.Object({width:t.Number({minimum:.1,description:"Canvas width in inches"}),height:t.Number({minimum:.1,description:"Canvas height in inches"}),background:t.Optional(t.Object({color:t.Optional($t),image:t.Optional(t.Object({path:t.Optional(t.String()),base64:t.Optional(t.String())},{additionalProperties:!1}))},{additionalProperties:!1,description:"Canvas background. A colour becomes the bottom-most rectangle; an image becomes the bottom-most picture."}))},{additionalProperties:!1,description:"Drawing canvas for a native visual"}),fS=t.Object({color:t.Optional(t.String({description:'Background color (hex like "#FFFFFF" or a theme color name)'})),image:t.Optional(t.Object({path:t.Optional(t.String()),base64:t.Optional(t.String())},{additionalProperties:!1}))},{additionalProperties:!1}),gS=t.Object({width:t.Number({minimum:.1,description:"Canvas width in inches (pptx slideWidth)"}),height:t.Number({minimum:.1,description:"Canvas height in inches (pptx slideHeight)"}),theme:t.Optional(t.String({description:"pptx theme name applied to the slide"})),background:t.Optional(fS)},{description:"pptx canvas definition for the visual",additionalProperties:!1}),ac={width:t.Optional(t.Union([t.Number({minimum:1,description:"Rendered width in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Rendered width as percentage (e.g. "90%")'})],{description:"Rendered width in the document, in pixels (number) or percentage string. Defaults to the canvas physical size."})),height:t.Optional(t.Union([t.Number({minimum:1,description:"Rendered height in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Rendered height as percentage (e.g. "90%")'})])),alignment:t.Optional(cr),caption:t.Optional(t.String({description:"Caption (supports rich text with **bold**, *italic*, ***both***)"})),alt:t.Optional(t.String({description:"Alternative text for accessibility"})),spacing:t.Optional(Pt),floating:t.Optional(pr),keepNext:t.Optional(t.Boolean({description:"Keep paragraph with next paragraph on same page"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of paragraph together on same page"}))},hS=t.Object({renderMode:t.Optional(t.Literal("raster",{description:"Render as a rasterized pptx slide (the default when omitted)."})),canvas:gS,elements:t.Optional(t.Array(Eb,{description:"pptx slide content elements (text, image, shape, table, highcharts, chart), positioned with x/y/w/h in inches"})),dpi:t.Optional(t.Number({minimum:ka,maximum:Aa,default:Ia,description:`Raster resolution in DPI (default ${Ia}, range ${ka}-${Aa}). Higher = sharper + larger.`})),serverUrl:t.Optional(t.String({description:"Rasterization service URL override (default from services.pptx)"})),...ac},{$id:"DocxVisualRasterProps",description:"Visual component props (pptx-rendered graphic)",additionalProperties:!1}),bS=t.Object({renderMode:t.Literal("native",{description:'Draw natively as a Word DrawingML group. Requires the "office-open" renderer.'}),canvas:mS,elements:t.Optional(t.Array(uS,{description:"Native drawing elements (text, shape, image), positioned with x/y/w/h in inches or canvas percentages"})),...ac},{$id:"DocxVisualNativeProps",description:'Visual component props (native Word drawing group; requires renderer "office-open")',additionalProperties:!1}),yS=t.Union([hS,bS],{description:"Visual component props — rasterized pptx slide (default) or a native Word drawing group"}),mr=["docxjs","office-open"],OS="docxjs";function Cn(e){return`ComponentDefinition_${e}`}function xS(e){return e?`FlowContent_${e}`:"FlowContent"}function sc(e,n,i){const r=Qr(n);return Zr(r,Cn(i)),e==="visual"&&i!=="office-open"?SS(r)??r:(i==="office-open"&&Yr(r),r)}function SS(e){const n=e.anyOf;return Array.isArray(n)&&n.length>0?n[0]:void 0}function Yr(e){if(Array.isArray(e)){e.forEach(Yr);return}if(!e||typeof e!="object")return;const n=e,i=n.properties;if(i!=null&&i.text&&(i!=null&&i.author)&&(i.replies||i.resolved)&&typeof n.description=="string"&&n.description.includes("Word review comment")){delete i.replies,delete i.resolved;const r=n.required;r&&(n.required=r.filter(o=>o!=="replies"&&o!=="resolved"))}for(const r of Reflect.ownKeys(n))Yr(n[r])}function Zr(e,n){if(Array.isArray(e)){e.forEach(r=>Zr(r,n));return}if(!e||typeof e!="object")return;const i=e;i.type==="array"&&i.items&&typeof i.items=="object"&&Object.keys(i.items).length===0&&i.items[v]==="Any"&&(i.items={$ref:n});for(const r of Reflect.ownKeys(i))Zr(i[r],n)}function Qr(e){if(Array.isArray(e))return e.map(Qr);if(!e||typeof e!="object")return e;const n=Object.create(Object.getPrototypeOf(e));for(const i of Reflect.ownKeys(e))n[i]=Qr(e[i]);return n}function wS(e){const n=e.definitions??{},i=new Map;for(const o of mr){const a=Cn(o);n[a]&&i.set(o,zl(n,a,["docx","section"]))}const r=o=>{var s,c,l,d,g,u;if(!o||typeof o!="object")return;if(Array.isArray(o)){o.forEach(r);return}const a=o;if(((c=(s=a.properties)==null?void 0:s.name)==null?void 0:c.const)==="docx"){const y=i.get((l=a.properties.renderer)==null?void 0:l.const),p=(u=(g=(d=a.properties.props)==null?void 0:d.properties)==null?void 0:g.blocks)==null?void 0:u.patternProperties;if(y&&p)for(const h of Object.values(p)){h.properties.body.items=y;for(const b of["header","footer"])h.properties.section.properties[b].items=y}}Object.values(a).forEach(r)};r(e)}function LS(e){const n=e.definitions??{};return mr.filter(i=>n[Cn(i)]).map(i=>{const r=Cn(i);return{name:r,componentRef:{$ref:`#/definitions/${r}`}}})}var vS=t.Object({type:t.Union([t.Literal("equal"),t.Literal("insert"),t.Literal("delete")],{description:"Segment kind: 'equal' renders as normal text, 'insert' as a tracked insertion, 'delete' as a tracked deletion"}),text:t.String({description:"Literal text of this segment (rendered without markdown)"})},{description:"A contiguous run of text sharing one revision state",additionalProperties:!1}),fr=t.Object({author:t.Optional(t.String({description:'Revision author shown in Word (default: "json-to-office")'})),date:t.Optional(t.String({format:"date-time",description:"Revision timestamp (ISO 8601). Defaults to the Unix epoch for deterministic output"})),segments:t.Array(vS,{minItems:1,description:"Ordered text segments; concatenating equal+insert segments yields the new text, equal+delete the old text"})},{description:"Tracked-change data: renders the component text as native Word revisions (accept/reject in Word)",additionalProperties:!1}),PS=t.Object({type:t.Union([t.Literal("insert"),t.Literal("delete")],{description:"Whether the element was inserted or deleted"}),author:t.Optional(t.String({description:'Revision author shown in Word (default: "json-to-office")'})),date:t.Optional(t.String({format:"date-time",description:"Revision timestamp (ISO 8601). Defaults to the Unix epoch for deterministic output"}))},{description:"Structural tracked change: the element itself was inserted or deleted",additionalProperties:!1}),lc={text:t.String({minLength:1,description:"Comment body. Newlines split it into separate paragraphs in the comment pane."}),author:t.Optional(t.String({description:'Comment author shown in Word (default: "json-to-office")'})),initials:t.Optional(t.String({description:"Author initials shown on the comment bubble (derived from the author when omitted)"})),date:t.Optional(t.String({format:"date-time",description:"Comment timestamp (ISO 8601). Defaults to the Unix epoch for deterministic output"}))},$S=t.Object(lc,{description:"A reply within a comment thread",additionalProperties:!1}),gr=t.Object({...lc,replies:t.Optional(t.Array($S,{minItems:1,description:"Replies, in order. They anchor to the same text and Word shows them as one thread."})),resolved:t.Optional(t.Boolean({description:"Mark the whole thread resolved (w15:done). Word writes the thread state only when the document contains at least one reply."}))},{description:"A Word review comment anchored to this component's text",additionalProperties:!1}),cc=t.Object({text:t.String({description:"Heading text (required)"}),level:t.Optional(qx),font:t.Optional(t.Partial(Ft)),language:t.Optional(Xl),noProof:t.Optional(Yl),noProofWords:t.Optional(Zo),alignment:t.Optional(Zl),spacing:t.Optional(Pt),indent:t.Optional(ec),lineSpacing:t.Optional(t.Union([t.Number({minimum:0}),Ql],{description:"A bare number is a multiple of single spacing. Takes precedence over `font.lineSpacing`. An `exactly` box smaller than the heading it holds is reported as W_QUALITY_LINE_BOX_COLLAPSE."})),pageBreak:t.Optional(t.Boolean({description:"Insert page break before heading"})),columnBreak:t.Optional(t.Boolean({description:"Insert column break before heading"})),numbering:t.Optional(t.Boolean({description:"Number this heading with the document's multilevel heading numbering (1., 1.1., 1.1.1.). Set globally via componentDefaults.heading.numbering; false opts a single heading out."})),keepNext:t.Optional(t.Boolean({description:"Keep heading with next paragraph on same page"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of heading together on same page"})),revision:t.Optional(fr),comment:t.Optional(gr)},{description:"Heading component props",additionalProperties:!1}),dc=t.Object({id:t.String({minLength:1,pattern:"^[^\\]\\s]+$",description:'Marker id referenced from the text as `[^id]`. Any characters except whitespace and "]".'}),text:t.String({minLength:1,description:"Note body. Newlines split it into separate paragraphs where the note is placed."})},{description:"A note body bound to an inline `[^id]` marker",additionalProperties:!1}),NS=t.Array(dc,{description:"Footnote bodies for `[^id]` markers in this paragraph, placed at the foot of the page. An unreferenced body is not emitted.",minItems:1}),IS=t.Array(dc,{description:"Endnote bodies for `[^id]` markers in this paragraph, collected at the end of the document. An unreferenced body is not emitted.",minItems:1}),kS=t.Union([t.Literal("around"),t.Literal("none"),t.Literal("notBeside"),t.Literal("through"),t.Literal("tight"),t.Literal("auto")],{description:"Frame text wrapping type"}),Ma=t.Union([t.Literal("margin"),t.Literal("page"),t.Literal("text")],{description:"Frame anchor type"}),AS=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("inside"),t.Literal("outside")],{description:"Frame horizontal alignment"}),TS=t.Union([t.Literal("top"),t.Literal("center"),t.Literal("bottom"),t.Literal("inside"),t.Literal("outside")],{description:"Frame vertical alignment"}),FS=t.Object({horizontalPosition:t.Optional(t.Object({relative:t.Optional(Ma),align:t.Optional(AS),offset:t.Optional(t.Union([t.Number({description:"Horizontal offset in twips (1/20 of a point)"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Horizontal offset as percentage (e.g., "50%") relative to page or margin width'})]))},{description:"Horizontal positioning (use either align or offset, not both)",additionalProperties:!1})),verticalPosition:t.Optional(t.Object({relative:t.Optional(Ma),align:t.Optional(TS),offset:t.Optional(t.Union([t.Number({description:"Vertical offset in twips (1/20 of a point)"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Vertical offset as percentage (e.g., "50%") relative to page or margin height'})]))},{description:"Vertical positioning (use either align or offset, not both)",additionalProperties:!1})),wrap:t.Optional(t.Object({type:kS},{description:"Text wrapping configuration",additionalProperties:!1})),lockAnchor:t.Optional(t.Boolean({description:"Lock the anchor position"})),width:t.Optional(t.Number({minimum:1,description:"Frame width in twips (DXA units)"})),height:t.Optional(t.Number({minimum:1,description:"Frame height in twips (DXA units)"}))},{description:"Floating text frame properties",additionalProperties:!1}),jS=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Paragraph text alignment"}),pc=t.Object({text:t.String({description:"Text content (required)"}),font:t.Optional(t.Partial(Ft)),themeStyle:t.Optional(t.String()),language:t.Optional(Xl),noProof:t.Optional(Yl),noProofWords:t.Optional(Zo),boldColor:t.Optional(q),spacing:t.Optional(Pt),alignment:t.Optional(jS),indent:t.Optional(ec),tabStops:t.Optional(Xx),pageBreak:t.Optional(t.Boolean({description:"Insert page break before paragraph"})),columnBreak:t.Optional(t.Boolean({description:"Insert column break before paragraph"})),floating:t.Optional(FS),keepNext:t.Optional(t.Boolean({description:"Keep paragraph with next paragraph on same page"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of paragraph together on same page"})),id:t.Optional(t.String({description:"Unique identifier for internal linking (bookmark anchor)"})),revision:t.Optional(fr),comment:t.Optional(gr),footnotes:t.Optional(NS),endnotes:t.Optional(IS)},{description:"Paragraph component props (font nested for theme consistency; no flat font properties)",additionalProperties:!1}),uc=t.Object({path:t.Optional(t.String({description:"Image source URL or file path (mutually exclusive with base64 and svg)"})),base64:t.Optional(t.String({description:'Base64-encoded image data in data URI format (e.g., "data:image/png;base64,iVBORw0KGgo...") (mutually exclusive with path and svg)'})),svg:t.Optional(t.String({description:'Raw inline SVG markup, e.g. "<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 24 24\\">...</svg>" (mutually exclusive with path and base64). Renders as a vector image (Word 2016+); intrinsic size taken from the SVG viewBox/width/height when width/height omitted.'})),alt:t.Optional(t.String({description:"Alternative text for accessibility"})),width:t.Optional(t.Union([t.Number({minimum:1,description:"Image width in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Image width as percentage (e.g., "90%") relative to widthRelativeTo (defaults to content width)'})],{description:'Image width in pixels (number) or as percentage string (e.g., "90%")',default:"100%"})),height:t.Optional(t.Union([t.Number({minimum:1,description:"Image height in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Image height as percentage (e.g., "90%") relative to heightRelativeTo (defaults to content height)'})],{description:'Image height in pixels (number) or as percentage string (e.g., "90%")'})),widthRelativeTo:t.Optional(t.Union([t.Literal("content"),t.Literal("page")],{description:"Reference for width percentages: content (page width minus margins) or page (full page width)",default:"content"})),heightRelativeTo:t.Optional(t.Union([t.Literal("content"),t.Literal("page")],{description:"Reference for height percentages: content (page height minus margins) or page (full page height)",default:"content"})),alignment:t.Optional(cr),caption:t.Optional(t.String({description:"Image caption (supports rich text with **bold**, *italic*, ***both***)"})),spacing:t.Optional(Pt),floating:t.Optional(pr),keepNext:t.Optional(t.Boolean({description:"Keep paragraph with next paragraph on same page"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of paragraph together on same page"}))},{description:"Image component props",additionalProperties:!1}),mc=t.Object({number:t.String({description:"Statistic number/value (required)"}),description:t.String({description:"Statistic description (required)"}),unit:t.Optional(t.String({description:"Unit of measurement"})),format:t.Optional(t.String({description:"Number format pattern"})),trend:t.Optional(t.Union([t.Literal("up"),t.Literal("down"),t.Literal("neutral")])),trendValue:t.Optional(t.Union([t.String(),t.Number()])),alignment:t.Optional(cr),spacing:t.Optional(Pt),size:t.Optional(t.Union([t.Literal("small"),t.Literal("medium"),t.Literal("large")]))},{description:"Statistic component props",additionalProperties:!1}),RS=t.Recursive(e=>t.Union([t.String(),t.Object({name:t.String(),props:t.Object({},{additionalProperties:!0}),children:t.Optional(t.Array(e))},{additionalProperties:!1})])),fc=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Horizontal text alignment"}),gc=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical cell alignment"}),hc=t.Object({family:t.Optional(t.String({description:"Font family name"})),size:t.Optional(t.Number({minimum:0,description:"Font size in points"})),bold:t.Optional(t.Boolean({description:"Bold text"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-cell weight (100–900). Overrides `bold` when set."})),italic:t.Optional(t.Boolean({description:"Italic text"})),underline:t.Optional(t.Boolean({description:"Underlined text"})),lineSpacing:t.Optional(t.Object({...Ql.properties},{description:"Line spacing of the cell's paragraph. Overrides the theme's tableCell style; `exactly` gives dense, fixed-height rows.",additionalProperties:!1}))},{additionalProperties:!1}),eo=t.Union([t.String({description:"Border color for all sides (hex without #)"}),t.Object({bottom:t.Optional(t.String({description:"Bottom border color (hex without #)"})),top:t.Optional(t.String({description:"Top border color (hex without #)"})),right:t.Optional(t.String({description:"Right border color (hex without #)"})),left:t.Optional(t.String({description:"Left border color (hex without #)"}))},{additionalProperties:!1})]),to=t.Union([t.Number({minimum:0,description:"Border size for all sides in points"}),t.Object({bottom:t.Optional(t.Number({minimum:0,description:"Bottom border size in points"})),top:t.Optional(t.Number({minimum:0,description:"Top border size in points"})),right:t.Optional(t.Number({minimum:0,description:"Right border size in points"})),left:t.Optional(t.Number({minimum:0,description:"Left border size in points"}))},{additionalProperties:!1})]),US=t.Union([t.Boolean({description:"Hide all borders when true. A side named in a cell/column per-side borderColor or borderSize keeps its border"}),t.Object({bottom:t.Optional(t.Boolean({description:"Hide bottom border"})),top:t.Optional(t.Boolean({description:"Hide top border"})),right:t.Optional(t.Boolean({description:"Hide right border"})),left:t.Optional(t.Boolean({description:"Hide left border"})),insideHorizontal:t.Optional(t.Boolean({description:"Hide horizontal borders between rows"})),insideVertical:t.Optional(t.Boolean({description:"Hide vertical borders between columns"}))},{description:"Selectively hide specific borders",additionalProperties:!1})]),bc=t.Union([t.Number({minimum:0,description:"Padding for all sides in points"}),t.Object({bottom:t.Optional(t.Number({minimum:0,description:"Bottom padding in points"})),top:t.Optional(t.Number({minimum:0,description:"Top padding in points"})),right:t.Optional(t.Number({minimum:0,description:"Right padding in points"})),left:t.Optional(t.Number({minimum:0,description:"Left padding in points"}))},{additionalProperties:!1})]),Nr=t.Object({color:t.Optional(q),backgroundColor:t.Optional(Jl),horizontalAlignment:t.Optional(fc),verticalAlignment:t.Optional(gc),font:t.Optional(hc),borderColor:t.Optional(eo),borderSize:t.Optional(to),padding:t.Optional(bc),height:t.Optional(t.Number({minimum:0,description:"Cell height in points"}))},{additionalProperties:!1});function yc(e){const n=t.Union([t.String(),e]),i={color:t.Optional(q),backgroundColor:t.Optional(Jl),horizontalAlignment:t.Optional(fc),verticalAlignment:t.Optional(gc),font:t.Optional(hc),borderColor:t.Optional(eo),borderSize:t.Optional(to),padding:t.Optional(bc),height:t.Optional(t.Number({minimum:0,description:"Cell height in points"})),comment:t.Optional(gr),revision:t.Optional(fr)},r=t.Object({...i,content:t.Optional(n)},{additionalProperties:!1}),o=t.Object({...i,content:t.Optional(n)},{additionalProperties:!1}),a=t.Object({width:t.Optional(t.Union([t.Number({minimum:0,description:"Column width in points. When set on some columns, remaining columns will automatically share the leftover table space equally. Leave undefined to distribute space evenly among unspecified columns."}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Column width as percentage of available width (e.g., "40%")'})])),cellDefaults:t.Optional(Nr),header:t.Optional(r),cells:t.Optional(t.Array(o))},{additionalProperties:!1});return t.Object({borderColor:t.Optional(eo),borderSize:t.Optional(to),hideBorders:t.Optional(US),cellDefaults:t.Optional(Nr),headerCellDefaults:t.Optional(Nr),width:t.Optional(t.Number({minimum:0,maximum:100,description:"Table width in percentage (0-100)"})),columns:t.Array(a,{description:"Table columns with headers and cells",minItems:1}),rows:t.Optional(t.Array(t.Object({revision:t.Optional(PS),cantSplit:t.Optional(t.Boolean({description:"Keep this row on one page"})),tableHeader:t.Optional(t.Boolean({description:"Repeat this row as a header on each page"}))},{additionalProperties:!1}),{description:"Row-parallel properties, indexed like `columns[].cells`. The model is column-major, so anything that belongs to a whole row lives here."})),keepInOnePage:t.Optional(t.Boolean({description:"Keep table rows together on the same page by setting keepNext on all paragraphs"})),keepNext:t.Optional(t.Boolean({description:"Set keepNext on the last row to keep it connected to the next element. Works independently of keepInOnePage. Defaults to false."})),repeatHeaderOnPageBreak:t.Optional(t.Boolean({description:"Repeat the header row on each page when the table spans multiple pages. Defaults to true.",default:!0}))},{description:"Table component props with column-based structure",additionalProperties:!1})}var Oc=yc(RS),xc=e=>t.Object({meta:t.Optional(t.Object({title:t.Optional(t.String({description:"Authoring label for this section, shown in editors and outlines. Never rendered — add a heading child for a visible title."}))},{additionalProperties:!1,description:"Authoring metadata; has no effect on the document."})),header:t.Optional(t.Union([t.Array(e||t.Any(),{description:"Section header components"}),t.Literal("linkToPrevious",{description:"Link header to previous section"})])),footer:t.Optional(t.Union([t.Array(e||t.Any(),{description:"Section footer components"}),t.Literal("linkToPrevious",{description:"Link footer to previous section"})])),pageBreak:t.Optional(t.Boolean({description:"Insert page break before section",default:!0})),spacing:t.Optional(Pt),page:t.Optional(t.Object({size:t.Optional(t.Union([t.Literal("A4"),t.Literal("A3"),t.Literal("LETTER"),t.Literal("LEGAL"),t.Object({width:t.Number({minimum:0}),height:t.Number({minimum:0})})])),margins:t.Optional(t.Object({top:t.Optional(t.Number({minimum:0})),bottom:t.Optional(t.Number({minimum:0})),left:t.Optional(t.Number({minimum:0})),right:t.Optional(t.Number({minimum:0})),header:t.Optional(t.Number({minimum:0})),footer:t.Optional(t.Number({minimum:0})),gutter:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1}))},{description:"Page configuration override for this section (overrides theme page settings)",additionalProperties:!1}))},{description:"Section component props",additionalProperties:!1}),Sc=xc(),MS=t.Object({width:t.Optional(t.Union([t.Number({minimum:1,description:"Column width in points"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Column width as percentage of available width (e.g., "30%")'}),t.Literal("auto",{description:"Auto width: consume remaining space after fixed widths and gaps"})])),gap:t.Optional(t.Union([t.Number({minimum:0,description:"Gap after this column in points"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Gap after this column as percentage of available width (e.g., "5%")'})]))},{additionalProperties:!1}),wc=t.Object({columns:t.Union([t.Number({minimum:1,description:"Number of equal-width columns (converter will normalize to array)"}),t.Array(MS,{minItems:1,description:"List of columns in order; width and gap can be points, percentages, or auto width"})]),gap:t.Optional(t.Union([t.Number({minimum:0,description:"Default gap applied after each column except the last (points)"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Default gap applied after each column except the last as percentage of available width (e.g., "5%")'})]))},{description:"Columns component props",additionalProperties:!1}),Lc=t.Union([t.Literal("decimal"),t.Literal("upperRoman"),t.Literal("lowerRoman"),t.Literal("upperLetter"),t.Literal("lowerLetter"),t.Literal("bullet"),t.Literal("ordinal"),t.Literal("cardinalText"),t.Literal("ordinalText"),t.Literal("hex"),t.Literal("chicago"),t.Literal("ideographDigital"),t.Literal("japaneseCounting"),t.Literal("aiueo"),t.Literal("iroha"),t.Literal("decimalFullWidth"),t.Literal("decimalHalfWidth"),t.Literal("japaneseLegal"),t.Literal("japaneseDigitalTenThousand"),t.Literal("decimalEnclosedCircle"),t.Literal("decimalFullWidth2"),t.Literal("aiueoFullWidth"),t.Literal("irohaFullWidth"),t.Literal("decimalZero"),t.Literal("ganada"),t.Literal("chosung"),t.Literal("decimalEnclosedFullstop"),t.Literal("decimalEnclosedParen"),t.Literal("decimalEnclosedCircleChinese"),t.Literal("ideographEnclosedCircle"),t.Literal("ideographTraditional"),t.Literal("ideographZodiac"),t.Literal("ideographZodiacTraditional"),t.Literal("taiwaneseCounting"),t.Literal("ideographLegalTraditional"),t.Literal("taiwaneseCountingThousand"),t.Literal("taiwaneseDigital"),t.Literal("chineseCounting"),t.Literal("chineseLegalSimplified"),t.Literal("chineseCountingThousand"),t.Literal("koreanDigital"),t.Literal("koreanCounting"),t.Literal("koreanLegal"),t.Literal("koreanDigital2"),t.Literal("vietnameseCounting"),t.Literal("russianLower"),t.Literal("russianUpper"),t.Literal("none"),t.Literal("numberInDash"),t.Literal("hebrew1"),t.Literal("hebrew2"),t.Literal("arabicAlpha"),t.Literal("arabicAbjad"),t.Literal("hindiVowels"),t.Literal("hindiConsonants"),t.Literal("hindiNumbers"),t.Literal("hindiCounting"),t.Literal("thaiLetters"),t.Literal("thaiNumbers"),t.Literal("thaiCounting")],{description:"Number or bullet format for list levels"}),BS=t.Object({family:t.Optional(t.String({description:"Font family name"})),size:t.Optional(t.Number({minimum:1,description:"Marker size in points"})),color:t.Optional(q),bold:t.Optional(t.Boolean({description:"Bold marker"})),italic:t.Optional(t.Boolean({description:"Italic marker"})),underline:t.Optional(t.Boolean({description:"Underlined marker"}))},{description:"Styling for the number/bullet glyph only. The list text is unaffected.",additionalProperties:!1}),ES=t.Object({level:t.Number({minimum:0,maximum:8,description:"Nesting level (0 = root, 1 = first sublevel, etc.)"}),format:t.Optional(Lc),text:t.Optional(t.String({description:'Number format string (e.g., "%1." for "1.", "%1)" for "1)", custom bullet character for bullet format)'})),alignment:t.Optional(t.Union([t.Literal("start"),t.Literal("end"),t.Literal("left"),t.Literal("right"),t.Literal("center")],{description:"Alignment of the numbering/bullet"})),indent:t.Optional(dr),start:t.Optional(t.Number({minimum:1,description:"Starting number for this level (default: 1)"})),font:t.Optional(BS)},{description:"Configuration for a single list level",additionalProperties:!1}),vc=t.Object({items:t.Array(t.Union([t.String(),t.Object({text:t.String(),level:t.Optional(t.Number({minimum:0,maximum:8,description:"Nesting level for this item"})),id:t.Optional(t.String({description:"Bookmark id for this item, targetable by internal links (#id) and cross-references ([@id])"})),revision:t.Optional(fr)},{additionalProperties:!1})]),{description:"List items (required)",minItems:1}),reference:t.Optional(t.String({description:"Unique reference ID for this numbering configuration (auto-generated if not provided)"})),levels:t.Optional(t.Array(ES,{description:"Configuration for each nesting level",minItems:1,maxItems:9})),format:t.Optional(t.Union([Lc,t.Literal("numbered"),t.Literal("none")],{description:"Format for level 0 (simplified option when levels not specified)"})),bullet:t.Optional(t.String({description:"Custom bullet character (simplified option when levels not specified)"})),start:t.Optional(t.Number({minimum:1,description:"Starting number for level 0. Applies whether or not `levels` is given; a `start` on the level itself wins."})),font:t.Optional(t.Partial(Ft)),spacing:t.Optional(Kx),alignment:t.Optional(Zl),keepNext:t.Optional(t.Boolean({description:"Keep every item with what follows, so the list stays with the text that introduces it"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of each item together on the same page"})),indent:t.Optional(t.Union([t.Number({minimum:0}),dr])),comment:t.Optional(gr)},{description:"List component props",additionalProperties:!1}),ta=["revision","comment","footnotes","endnotes"],CS=t.Partial(t.Omit(cc,ta)),DS=t.Partial(t.Omit(pc,ta)),zS=t.Partial(uc),_S=t.Partial(mc),WS=t.Partial(t.Omit(Oc,["rows"])),HS=t.Partial(Sc),qS=t.Partial(wc),KS=t.Partial(t.Omit(vc,ta)),Pc=t.Object({heading:t.Optional(CS),paragraph:t.Optional(DS),image:t.Optional(zS),statistic:t.Optional(_S),table:t.Optional(WS),section:t.Optional(HS),columns:t.Optional(qS),list:t.Optional(KS)},{additionalProperties:!0}),Ba=["consulting","devportal","minimal","vermilion"],GS=t.Object({top:t.Number({minimum:0}),bottom:t.Number({minimum:0}),left:t.Number({minimum:0}),right:t.Number({minimum:0}),header:t.Number({minimum:0}),footer:t.Number({minimum:0}),gutter:t.Number({minimum:0})},{additionalProperties:!1,description:"Document margin configuration"});t.Object({width:t.Number({minimum:0}),height:t.Number({minimum:0})},{additionalProperties:!1,description:"Page dimensions in twips"});var VS=t.Object({size:t.Union([t.Literal("A4"),t.Literal("A3"),t.Literal("LETTER"),t.Literal("LEGAL"),t.Object({width:t.Number({minimum:0}),height:t.Number({minimum:0})},{additionalProperties:!1})],{description:"Standard page size or custom dimensions"}),margins:GS},{description:"Page configuration including dimensions and margins",additionalProperties:!1}),$c=t.Object({heading:Ft,body:Ft,mono:Ft,light:Ft},{additionalProperties:!1,description:"Font definitions for different text types"}),JS=t.Union([t.Literal("single"),t.Literal("dashDotStroked"),t.Literal("dashed"),t.Literal("dashSmallGap"),t.Literal("dotDash"),t.Literal("dotDotDash"),t.Literal("dotted"),t.Literal("double"),t.Literal("doubleWave"),t.Literal("inset"),t.Literal("nil"),t.Literal("none"),t.Literal("outset"),t.Literal("thick"),t.Literal("thickThinLargeGap"),t.Literal("thickThinMediumGap"),t.Literal("thickThinSmallGap"),t.Literal("thinThickLargeGap"),t.Literal("thinThickMediumGap"),t.Literal("thinThickSmallGap"),t.Literal("thinThickThinLargeGap"),t.Literal("thinThickThinMediumGap"),t.Literal("thinThickThinSmallGap"),t.Literal("threeDEmboss"),t.Literal("threeDEngrave"),t.Literal("triple"),t.Literal("wave")],{description:"Paragraph border style"}),Nc={style:JS,size:t.Number({minimum:0,description:"Width in eighths of a point (docx sz)"}),color:q,space:t.Optional(t.Number({minimum:0,description:"Space between text and border in points"}))},mi=t.Object(Nc,{additionalProperties:!1,description:"Paragraph border side definition"}),XS=t.Object(Nc,{additionalProperties:!1,description:"Rule drawn between consecutive paragraphs sharing this border set (w:between), in place of their adjoining bottom and top edges"}),Ic=t.Object({top:t.Optional(mi),bottom:t.Optional(mi),left:t.Optional(mi),right:t.Optional(mi),between:t.Optional(XS)},{additionalProperties:!1,description:"Paragraph borders (per side, plus the between-paragraph rule)"}),kc=t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")])),qe=t.Object({font:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),...Qo.properties,alignment:kc,priority:t.Optional(t.Number()),baseStyle:t.Optional(t.String()),followingStyle:t.Optional(t.String()),widowControl:t.Optional(t.Boolean()),keepNext:t.Optional(t.Boolean()),keepLinesTogether:t.Optional(t.Boolean()),outlineLevel:t.Optional(t.Number()),borders:t.Optional(Ic),indent:t.Optional(dr)},{additionalProperties:!1}),YS=t.Union([t.Literal("dot"),t.Literal("hyphen"),t.Literal("middleDot"),t.Literal("none"),t.Literal("underscore")],{description:"Tab leader style: dot (dotted), hyphen (dashed), middleDot, none (blank), or underscore"}),ZS=t.Union([t.Literal("left"),t.Literal("right"),t.Literal("center"),t.Literal("bar"),t.Literal("clear"),t.Literal("decimal"),t.Literal("end"),t.Literal("num"),t.Literal("start")],{description:"Tab stop alignment type"}),QS=t.Object({type:ZS,position:t.Union([t.Number({description:"Tab stop position in twips (1/1440 inch). Common: 9026 for right-aligned at page margin"}),t.Literal("max",{description:"Use maximum position (TabStopPosition.MAX = 9026 twips)"})]),leader:t.Optional(YS)},{description:"Tab stop configuration with position, alignment, and optional leader",additionalProperties:!1}),tn=t.Object({font:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),...Qo.properties,alignment:kc,tabStops:t.Optional(t.Array(QS,{description:"Tab stops for TOC entries. Use right-aligned tab with leader to create dotted lines to page numbers.",default:[{type:"right",position:"max",leader:"none"}]})),priority:t.Optional(t.Number()),followingStyle:t.Optional(t.String()),widowControl:t.Optional(t.Boolean()),keepNext:t.Optional(t.Boolean()),keepLinesTogether:t.Optional(t.Boolean()),outlineLevel:t.Optional(t.Number()),borders:t.Optional(Ic),indent:t.Optional(dr)},{additionalProperties:!1}),Ac=t.Object({normal:t.Optional(qe),heading1:t.Optional(qe),heading2:t.Optional(qe),heading3:t.Optional(qe),heading4:t.Optional(qe),heading5:t.Optional(qe),heading6:t.Optional(qe),title:t.Optional(qe),subtitle:t.Optional(qe),TOC1:t.Optional(tn),TOC2:t.Optional(tn),TOC3:t.Optional(tn),TOC4:t.Optional(tn),TOC5:t.Optional(tn),TOC6:t.Optional(tn)},{additionalProperties:qe,description:"Style definitions supporting predefined styles (normal, heading1..6, title, subtitle), TOC entry styles (TOC1..TOC6), and arbitrary custom styles."});t.Object({level:t.Union([t.Literal(1),t.Literal(2),t.Literal(3),t.Literal(4),t.Literal(5),t.Literal(6)]),...qe.properties},{additionalProperties:!1});var Tc=t.Object({primary:q,secondary:q,accent:q,text:q,background:q,border:q,textPrimary:q,textSecondary:q,textMuted:q,borderPrimary:q,borderSecondary:q,backgroundPrimary:q,backgroundSecondary:q,accent4:t.Optional(q),accent5:t.Optional(q),accent6:t.Optional(q)},{additionalProperties:!1}),ew=t.Object({...rr,colors:t.Optional(t.Partial(Tc)),fonts:t.Optional(t.Partial($c)),styles:t.Optional(Ac)},{additionalProperties:!1,description:"Partial theme deep-merged over the resolved named theme: define or override palette tokens, font roles, and named styles in-document."}),tw=t.Object({...rr,$schema:t.Optional(t.String()),name:t.String(),displayName:t.String(),description:t.String({description:"The visual voice: what the theme looks like, in one sentence."}),whenToUse:t.Optional(t.String({description:"The documents the theme suits; discovery and the design guide quote it."})),version:t.String(),colors:Tc,fonts:$c,fontRegistry:t.Optional(ir),page:VS,styles:t.Optional(Ac),componentDefaults:t.Optional(Pc),noProofWords:t.Optional(t.Array(t.String({minLength:1}),{description:"Words that should never be flagged as misspelled (whole-word, case-insensitive)."}))},{additionalProperties:!1,description:"Theme configuration"});function G0(e="minimal-theme"){return{name:e,displayName:e.split(/[-_\s]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")||e,description:"A minimal theme with basic styling",version:"1.0.0",colors:{primary:"#2563EB",secondary:"#64748B",accent:"#F8FAFC",text:"#334155",background:"#FFFFFF",border:"#E2E8F0",textPrimary:"#334155",textSecondary:"#64748B",textMuted:"#94A3B8",borderPrimary:"#CBD5E1",borderSecondary:"#E2E8F0",backgroundPrimary:"#FFFFFF",backgroundSecondary:"#F8FAFC"},fonts:{heading:{family:"Arial",size:14},body:{family:"Arial",size:11},mono:{family:"Courier New",size:10},light:{family:"Arial",size:10}},page:{size:"A4",margins:{top:1440,bottom:1440,left:1440,right:1440,header:720,footer:720,gutter:0}},styles:{normal:{font:"body",size:11,color:"#334155",alignment:"left",lineSpacing:{type:"multiple",value:1.15},spacing:{after:8}}}}}var nw=t.Object({},{additionalProperties:!1}),iw=e=>t.Object({blocks:t.Optional(Cl),theme:t.Optional(t.String({description:`Theme name to apply (default: "minimal"). Built-ins: ${Ba.join(", ")} (consulting is the house style).`,examples:[...Ba],default:"minimal"})),themeOverrides:t.Optional(ew),qualityProfile:t.Optional(t.String({description:"The quality profile validation judges this document by when the caller names none — a blueprint scaffold writes its archetype’s profile here. A profile names required structure and content; the theme only paints. Built-ins: client-report, technical-report, executive-report, legal-appendix, general (the format default); an unknown name falls back to it.",examples:["client-report","technical-report","executive-report","legal-appendix","general"]})),fontRegistry:t.Optional(ir),componentDefaults:t.Optional(Pc),language:t.Optional(t.String({pattern:"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",description:`Default document language (BCP-47 tag, e.g. "en-US"). Sets Word's default proofing/spell-check language; individual components can override it locally.`,examples:["en-US","fr-FR","de-DE","it-IT","es-ES"]})),noProofWords:t.Optional(Zo),trackRevisions:t.Optional(t.Boolean({description:"Open the document in track-changes mode: Word marks any further edits as revisions. Set automatically on redline documents produced by the diff engine"})),metadata:t.Optional(t.Object({title:t.Optional(t.String({description:"Document title",examples:["Annual Report 2024","Technical Documentation"]})),subtitle:t.Optional(t.String({description:"Document subtitle"})),description:t.Optional(t.String()),author:t.Optional(t.String()),company:t.Optional(t.String({description:"Company name, written to docProps/custom.xml (Word has no core-property slot for it)"})),date:t.Optional(t.String({description:"Document date used by {DATE}/{DATETIME} placeholders (defaults to the generation timestamp)"})),version:t.Optional(t.String({description:"Document version, written to docProps/custom.xml",examples:["1.0","2024.3"]})),tags:t.Optional(t.Array(t.String()))},{description:"Document metadata (title, author, company, version, etc.). Package timestamps (dcterms:created/modified) are not part of this object: they come from the `generatedAt` generation option so repeated builds stay byte-identical.",additionalProperties:!1}))},{description:"Report component props",additionalProperties:!1}),rw=iw(),ow=t.Object({width:t.Optional(t.Union([t.Number({minimum:1,description:"Text box width in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Text box width as percentage (e.g., "50%") relative to content width'})],{description:'Text box width in pixels (number) or as percentage string (e.g., "50%")'})),height:t.Optional(t.Union([t.Number({minimum:1,description:"Text box height in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Text box height as percentage (e.g., "50%") relative to content height'})],{description:'Text box height in pixels (number) or as percentage string (e.g., "50%")'})),renderAs:t.Optional(t.Union([t.Literal("table"),t.Literal("shape")],{description:"Rendering strategy. 'table' (default): borderless one-cell table — height auto-fits content, per-side borders and percentage widths resolve in Word. 'shape': native Word text box (WPS shape) — real wrap modes and z-order, but requires explicit width and height (no autofit), a single uniform border, and eagerly-resolved percentage sizes."})),floating:t.Optional(pr),style:t.Optional(t.Object({padding:t.Optional(t.Object({top:t.Optional(t.Number({minimum:0})),right:t.Optional(t.Number({minimum:0})),bottom:t.Optional(t.Number({minimum:0})),left:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1})),border:t.Optional(t.Object({top:t.Optional(t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double"),t.Literal("none")])),width:t.Optional(t.Number({minimum:0})),color:t.Optional(q)},{additionalProperties:!1})),right:t.Optional(t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double"),t.Literal("none")])),width:t.Optional(t.Number({minimum:0})),color:t.Optional(q)},{additionalProperties:!1})),bottom:t.Optional(t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double"),t.Literal("none")])),width:t.Optional(t.Number({minimum:0})),color:t.Optional(q)},{additionalProperties:!1})),left:t.Optional(t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double"),t.Literal("none")])),width:t.Optional(t.Number({minimum:0})),color:t.Optional(q)},{additionalProperties:!1}))},{additionalProperties:!1})),shading:t.Optional(t.Object({fill:t.Optional(q)},{additionalProperties:!1}))},{additionalProperties:!1}))},{additionalProperties:!1,allOf:[{if:{properties:{renderAs:{const:"shape"}},required:["renderAs"]},then:{required:["width","height"],properties:{style:{properties:{border:{properties:Object.fromEntries(["top","right","bottom","left"].map(e=>[e,{properties:{style:{enum:["solid","none"]}}}]))}}}}}}]}),aw=t.Union([t.Literal("numeric"),t.Literal("bullet"),t.Literal("none")],{description:"TOC numbering style — accepted but not applied (Word TOC fields carry no numbering switch); setting it logs a warning during generation"}),sw=t.Union([t.Literal("document"),t.Literal("section")],{description:"TOC scope: document-wide or section-only"}),lw=t.Object({styleId:t.String({description:"Custom style ID matching a key in theme.styles"}),level:t.Number({minimum:1,maximum:6,description:"TOC level (1-6) to assign to this style"})},{description:"Mapping of custom style to TOC level",additionalProperties:!1});t.Object({from:t.Optional(t.Number({minimum:1,maximum:6,default:1,description:"Starting heading level (1-6). Defaults to 1 if not specified."})),to:t.Optional(t.Number({minimum:1,maximum:6,default:3,description:"Ending heading level (1-6). Defaults to 3 if not specified."}))},{description:'Range of heading levels to include in TOC. Specify at least one of "from" or "to".',additionalProperties:!1});var cw=t.Object({pageBreak:t.Optional(t.Boolean({description:"Insert page break before TOC block"})),depth:t.Optional(t.Object({from:t.Optional(t.Number({minimum:1,maximum:6,default:1,description:"Starting heading level (1-6). Defaults to 1 if not specified."})),to:t.Optional(t.Number({minimum:1,maximum:6,default:3,description:"Ending heading level (1-6). Defaults to 3 if not specified."}))},{description:'Range of heading levels to include in TOC. Specify "from", "to", or both. Defaults: from=1, to=3',additionalProperties:!1,default:{to:3}})),pageNumbersDepth:t.Optional(t.Object({from:t.Optional(t.Number({minimum:1,maximum:6,default:1,description:"Starting heading level (1-6). Defaults to 1 if not specified."})),to:t.Optional(t.Number({minimum:1,maximum:6,default:3,description:"Ending heading level (1-6). Defaults to 3 if not specified."}))},{description:'Range of heading levels to show page numbers. Specify "from", "to", or both. When specified, page numbers are hidden for entries outside this range.',additionalProperties:!1})),numberingStyle:t.Optional(aw),title:t.Optional(t.String({description:"TOC heading title"})),includePageNumbers:t.Optional(t.Boolean({default:!0,description:"Show page numbers next to entries"})),numberSeparator:t.Optional(t.Boolean({default:!0,description:'Use tab separator between entry and page number. True applies "\\t" (default), false applies " "'})),scope:t.Optional(t.Union([sw,t.Literal("auto")],{default:"auto",description:'TOC scope: "document" for entire document, "section" for parent section only, "auto" for automatic detection (section if inside section, otherwise document)'})),styles:t.Optional(t.Array(lw,{description:"Custom style mappings for TOC entries. Maps custom theme styles to TOC levels."}))},{description:"Table of Contents component props",additionalProperties:!1}),dw=t.Object({thickness:t.Optional(t.Number({minimum:.25,maximum:12,description:"Line weight in points (default 1). OOXML measures a border in eighths of a point and Word stops at 12pt, so this is the whole usable range."})),color:t.Optional(q),style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double")],{description:'Line style (default "solid"). `double` draws two lines and is measured per line, so it reads about twice as tall as its thickness.'})),width:t.Optional(t.Union([t.Number({minimum:1,description:"Divider width in points"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Divider width as a percentage of the text measure (e.g. "40%")'})],{description:"How far the line runs (default: the full text measure). A percentage or a point width is turned into paragraph indents, resolved against the theme page — so a partial divider inside a column or a re-margined section is measured against the page, while the default full-measure divider is exact everywhere."})),alignment:t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")],{description:'Which end of the measure a partial divider sits at (default "left"). Ignored at full width.'})),spacing:t.Optional(Pt)},{description:"Horizontal divider — a thin line across the measure, drawn as a Word paragraph border so it stays editable in Word.",additionalProperties:!1}),pw=t.Object({options:t.Intersect([t.Record(t.String(),t.Unknown()),t.Object({chart:t.Object({width:t.Number(),height:t.Number()})})]),scale:t.Optional(t.Number()),resources:t.Optional(t.Object({css:t.Optional(t.String()),js:t.Optional(t.String()),files:t.Optional(t.Array(t.String()))})),serverUrl:t.Optional(t.String({description:"Highcharts Export Server URL (default: http://localhost:7801)"})),width:t.Optional(t.Union([t.Number({minimum:1,description:"Image width in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Image width as percentage (e.g., "90%") relative to content width'})],{description:'Rendered image width in pixels (number) or as percentage string (e.g., "90%")'})),height:t.Optional(t.Union([t.Number({minimum:1,description:"Image height in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Image height as percentage (e.g., "90%") relative to content height'})],{description:'Rendered image height in pixels (number) or as percentage string (e.g., "90%")'}))}),uw=t.Union([t.Literal("area"),t.Literal("bar"),t.Literal("column"),t.Literal("doughnut"),t.Literal("line"),t.Literal("pie"),t.Literal("radar"),t.Literal("scatter")],{description:"Chart type"}),mw=t.Object({name:t.Optional(t.String({description:"Series name"})),labels:t.Optional(t.Array(t.String(),{description:"Category labels. Needed on every series, not just the first, and the same length as `values`; a series without both `labels` and `values` drops the whole chart."})),values:t.Optional(t.Array(t.Number(),{description:"Data values, one per label. Needed on every series — see `labels`."}))},{additionalProperties:!1}),fw=t.Object({type:uw,data:t.Array(mw,{description:"Chart data series",minItems:1}),title:t.Optional(t.String({description:"Chart title text"})),showTitle:t.Optional(t.Boolean({description:"Show the chart title. Defaults to true when `title` is set."})),showLegend:t.Optional(t.Boolean({description:"Show chart legend"})),legendPos:t.Optional(t.Union([t.Literal("b"),t.Literal("l"),t.Literal("r"),t.Literal("t"),t.Literal("tr")],{description:"Legend position"})),chartColors:t.Optional(t.Array(t.String(),{description:"Series colors (hex or semantic theme names). Defaults to the theme palette."})),catAxisTitle:t.Optional(t.String({description:"Category axis title"})),valAxisTitle:t.Optional(t.String({description:"Value axis title"})),width:t.Optional(t.Number({minimum:0,exclusiveMinimum:0,description:"Chart width in inches. Defaults to the content width."})),height:t.Optional(t.Number({minimum:0,exclusiveMinimum:0,description:"Chart height in inches. Defaults to 3."})),alignment:t.Optional(cr),caption:t.Optional(t.String({description:"Chart caption (supports rich text with **bold**, *italic*, ***both***)"})),alt:t.Optional(t.String({description:"Alternative text for accessibility"})),spacing:t.Optional(Pt),floating:t.Optional(pr),keepNext:t.Optional(t.Boolean({description:"Keep paragraph with next paragraph on same page"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of paragraph together on same page"}))},{description:'Native Word chart - editable, scalable, no export server needed. Requires renderer "office-open".',additionalProperties:!1}),jt=["block","group","heading","paragraph","image","statistic","table","list","toc","divider","highcharts","chart","visual","columns","text-box"],Jt=[{name:"docx",propsSchema:rw,hasChildren:!0,allowedChildren:["section"],category:"container",description:"Main document container - defines the overall document structure. Required as the root component.",special:{hasSchemaField:!0}},{name:"section",propsSchema:Sc,createPropsSchema:xc,embeddedComponents:[{path:["header"],arity:"component-array",reportStructure:!0},{path:["footer"],arity:"component-array",reportStructure:!0}],hasChildren:!0,allowedChildren:jt,category:"container",description:"Section container - groups related content with optional title. Use for organizing document structure."},{name:"columns",propsSchema:wc,hasChildren:!0,allowedChildren:jt.filter(e=>e!=="columns"),category:"layout",description:"Multi-column layout - arranges content in 2-4 columns. Great for side-by-side content."},{name:"text-box",propsSchema:ow,hasChildren:!0,allowedChildren:jt,category:"layout",description:"Floating text container - allows positioning text anywhere on the page with absolute or relative positioning. Holds any flow content, tables and columns included."},{name:"heading",propsSchema:cc,hasChildren:!1,category:"content",description:"Heading text - supports levels 1-6 for document hierarchy. Level 1 is largest. Never skip a level going down (1 → 3): the gap breaks the document outline."},{name:"paragraph",propsSchema:pc,hasChildren:!1,category:"content",description:"Paragraph text - supports formatting like bold, italic, and color. Main content element."},{name:"image",propsSchema:uc,hasChildren:!1,category:"content",description:"Image element - displays images with optional caption. Supports various formats."},{name:"statistic",propsSchema:mc,hasChildren:!1,category:"content",description:"Statistic display - shows a number with description. Perfect for KPIs and metrics."},{name:"block",propsSchema:Dl,hasChildren:!1,category:"content",description:"Invoke a JSON block defined in this document’s props.blocks. Fill its named slots; no block names are built into the engine."},{name:"group",propsSchema:nw,hasChildren:!0,allowedChildren:jt,category:"container",description:"Transparent group of flow components; also the inspectable result of block expansion."},{name:"table",propsSchema:Oc,createPropsSchema:yc,embeddedComponents:[{path:["columns","*","header","content"],arity:"component",reportStructure:!1},{path:["columns","*","cells","*","content"],arity:"component",reportStructure:!1}],hasChildren:!1,category:"content",description:"Data table, declared COLUMN-MAJOR: `props.columns[]`, each with its own `header` and its own `cells[]` running down the column. Note the PPTX `table` is the other way round — rows of cells — so a table cannot be moved between the formats unchanged. Fixed column widths are points and must fit the page; leave some columns unsized so they share the leftover space."},{name:"list",propsSchema:vc,hasChildren:!1,category:"content",description:"List element - bulleted or numbered list items. Supports nested lists."},{name:"toc",propsSchema:cw,hasChildren:!1,category:"content",description:"Table of contents - automatically generates TOC from document headings. Supports depth ranges and custom styles."},{name:"divider",propsSchema:dw,hasChildren:!1,category:"content",description:"Horizontal divider - a thin line across the measure, for separating sections. Drawn as a Word paragraph border, so it stays a real Word object. Use this rather than collapsing a paragraph's line spacing to fake one."},{name:"highcharts",propsSchema:pw,hasChildren:!1,category:"content",description:"Chart component powered by Highcharts - render line, bar, pie, heatmap, and more with rich options."},{name:"chart",propsSchema:fw,hasChildren:!1,renderers:["office-open"],category:"content",description:'Native Word chart - editable, scalable, no export server needed. Requires renderer "office-open".'},{name:"visual",propsSchema:yS,hasChildren:!1,category:"content",description:'Free-canvas graphic for infographics, diagrams and layered compositions the document flow cannot express. Rasterized from a pptx slide by default; renderMode "native" draws it as an editable Word drawing group (renderer "office-open").'}];function Ea(e){return Jt.find(n=>n.name===e)}function gw(e){var i;const n=e;return n.type!=="object"||(((i=n.required)==null?void 0:i.length)??0)>0}function In(e,n,i,r){var c,l;const o={name:t.Literal(e.name),id:t.Optional(t.String()),enabled:t.Optional(t.Boolean({default:!0,description:"When false, this component is filtered out and not rendered. Defaults to true. Useful for conditional component inclusion."}))};(c=e.special)!=null&&c.hasSchemaField&&(o.$schema=t.Optional(t.String({format:"uri"})),o.renderer=r?r.requireDiscriminator?t.Literal(r.renderer,{description:"Renderer backend for this document"}):t.Optional(t.Literal(r.renderer,{description:'Renderer backend. Omitted defaults to "docxjs".'})):t.Optional(t.Union(mr.map(d=>t.Literal(d)),{description:'Renderer backend. Omitted defaults to "docxjs".'})));const a=e.createPropsSchema&&i?e.createPropsSchema(i):e.propsSchema,s=r?sc(e.name,a,r.renderer):a;return o.props=gw(s)?s:t.Optional(s),e.hasChildren&&n&&(o.children=(l=e.special)!=null&&l.hasSchemaField?t.Array(n):t.Optional(t.Array(n))),t.Object(o,{additionalProperties:!1,description:e.description})}function hw(e){return Jt.map(n=>In(n,e))}function bw(e,n){const i=new Set(e);return e.length===i.size&&n.length===i.size&&n.every(r=>i.has(r))}function Fc(e,n=[],i){const r=u=>!i||!u.renderers||u.renderers.includes(i.renderer),o=Jt.filter(r),a=new Set(jt),s=new Map;for(const u of o)u.hasChildren||s.set(u.name,In(u,void 0,e,i));const c=(u,y)=>{const p=[...u];for(;p.length>0;){const h=p.length;for(let b=p.length-1;b>=0;b--){const L=p[b];if(!L.allowedChildren){s.set(L.name,In(L,e,e,i)),p.splice(b,1);continue}if(bw(L.allowedChildren,jt)){s.set(L.name,In(L,y,e,i)),p.splice(b,1);continue}if(!L.allowedChildren.filter(j=>o.some(k=>k.name===j&&k.hasChildren)).every(j=>s.has(j)))continue;const S=[...L.allowedChildren.map(j=>s.get(j)).filter(j=>j!==void 0),...n],U=S.length===1?S[0]:t.Union(S);s.set(L.name,In(L,U,e,i)),p.splice(b,1)}if(p.length===h)throw new Error(`Circular allowedChildren among: ${p.map(b=>b.name).join(", ")}`)}},l=t.Recursive(u=>{c(o.filter(p=>p.hasChildren&&a.has(p.name)),u);const y=jt.map(p=>s.get(p)).filter(p=>p!==void 0);return t.Union([...y,...n],{discriminator:{propertyName:"name"},description:"Flow content: what a section body holds, and so what a group, columns or text-box holds."})},{$id:xS(i==null?void 0:i.renderer)});c(o.filter(u=>u.hasChildren&&!a.has(u.name)),l);const d=o.map(u=>s.get(u.name)).filter(u=>u!==void 0),g=o.filter(u=>!a.has(u.name)).map(u=>s.get(u.name));return{schemas:d,byName:s,flow:l,roots:g}}function yw(e,n="ComponentDefinition"){const i=new Set(Object.keys(e.definitions??{})),r=s=>{const c=i.has(s)?s:n;return i.has(c)?`#/definitions/${c}`:void 0},o=s=>typeof s=="string"&&(/^T\d+$/.test(s)||s===n||i.has(s));function a(s,c=""){if(!(typeof s!="object"||s===null))for(const[l,d]of Object.entries(s)){const g=c?`${c}.${l}`:l;if(d&&typeof d=="object"){const u=d;if(u.type==="array"&&u.items&&Object.keys(u.items).length===0&&i.has(n)&&(u.items={$ref:`#/definitions/${n}`}),u.type==="array"&&u.items&&typeof u.items=="object"&&"$ref"in u.items&&o(u.items.$ref)){const y=r(u.items.$ref);u.items=y?{$ref:y}:{}}if(o(u.$ref)){const y=r(u.$ref);y?u.$ref=y:delete u.$ref}if(l==="$id"&&o(d)&&g!==`definitions.${d}.$id`){delete s[l];continue}a(d,g)}}}a(e)}function Ow(e,n={}){const{$schema:i="http://json-schema.org/draft-07/schema#",$id:r,title:o,description:a,definitions:s={}}=n,c=JSON.parse(JSON.stringify(e)),l={...s};function d(u,y=""){if(!(typeof u!="object"||u===null)){for(const[p,h]of Object.entries(u))if(h&&typeof h=="object"){const b=h;if(b.$id&&typeof b.$id=="string"){const L=b.$id;if(y!==`definitions.${L}`){const{$id:A,...N}=b;l[L]=N,u[p]={$ref:`#/definitions/${L}`},d(N,`definitions.${L}`);continue}}d(h,y?`${y}.${p}`:p)}}}d(c);const g={$schema:i};return r&&(g.$id=r),Object.assign(g,c),o!==void 0&&(g.title=o),a!==void 0&&(g.description=a),Object.keys(l).length>0&&(g.definitions=l),yw(g),wS(g),Ml(g),g}function xw(e={}){return t.Union(mr.map(n=>Sw(e,n,n!==OS)),{description:"Document definition, discriminated by the optional renderer field. Omitted renderer means docxjs."})}function Sw(e,n,i){const{includeStandardComponents:r=!0,customComponents:o=[],title:a="JSON Report Definition",description:s="JSON report definition with TypeBox schemas"}=e;let c=[],l=[];const d=Cn(n),g=t.Recursive(y=>{const p=[];for(const N of o)if(N.versionedProps&&N.versionedProps.length>0){const S=N.versionedProps,U=Rl(S.map(W=>W.version));for(const W of S){const I=W.description||N.description,M={name:t.Literal(N.name),id:t.Optional(t.String()),version:I?t.Literal(W.version,{description:I}):t.Literal(W.version),props:W.propsSchema};W.hasChildren&&(M.children=t.Optional(t.Array(y)));const J=W.description?`${N.name} v${W.version} — ${W.description}`:N.description?`${N.name} v${W.version} — ${N.description}`:`${N.name} v${W.version}`;p.push(t.Object(M,{additionalProperties:!1,description:J}))}const j=S.find(W=>W.version===U),k={name:t.Literal(N.name),id:t.Optional(t.String()),props:j.propsSchema};j.hasChildren&&(k.children=t.Optional(t.Array(y)));const T=j.description?`${N.name} (latest: v${U}) — ${j.description}`:N.description?`${N.name} (latest: v${U}) — ${N.description}`:`${N.name} (latest: v${U})`;p.push(t.Object(k,{additionalProperties:!1,description:T}))}else{const S=!!N.hasChildren,U={name:t.Literal(N.name),id:t.Optional(t.String()),props:N.propsSchema};S&&(U.children=t.Optional(t.Array(y))),p.push(t.Object(U,{additionalProperties:!1,...N.description?{description:N.description}:{}}))}const{schemas:h,byName:b}=r?Fc(y,p,{renderer:n,requireDiscriminator:i}):{schemas:[],byName:new Map},L=Ea("section");c=["section",...(L==null?void 0:L.allowedChildren)??[]].map(N=>b.get(N)).filter(N=>N!==void 0),l=p;const A=[...h,...p];if(A.length===0)return t.Any();if(A.length===1)return A[0];{const N=o.length>0?"Component definition with discriminated union including custom components":"Component definition with discriminated union";return t.Union(A,{discriminator:{propertyName:"name"},description:N})}},{$id:d}),u=Ea("docx");if(!u)throw new Error("Docx root component not found in registry");if(c.length===0)throw new Error("Root child schemas not found in narrowed standard schemas");return t.Object({name:t.Literal("docx"),id:t.Optional(t.String()),$schema:t.Optional(t.String({format:"uri"})),renderer:i?t.Literal(n,{description:"Renderer backend for this document"}):t.Optional(t.Literal(n,{description:'Renderer backend. Omitted defaults to "docxjs".'})),props:t.Optional(sc(u.name,u.propsSchema,n)),children:t.Array(t.Union([...c,...l],{discriminator:{propertyName:"name"}}))},{additionalProperties:!1,title:a,description:s,definitions:{[d]:g}})}t.Union([...hw(t.Any())],{discriminator:{propertyName:"name"},description:"Standard component definition with discriminated union"});var ww=t.Recursive(e=>{const{roots:n,flow:i}=Fc(e);return t.Union([...n,i],{discriminator:{propertyName:"name"},description:"Component definition with discriminated union"})}),Lw=t.Object({content:t.String({description:"Text content (required)"}),spaceAfter:t.Optional(t.Number({minimum:0,description:"Spacing after text in points"})),fontSize:t.Optional(t.Number({minimum:1})),fontFamily:t.Optional(t.String()),bold:t.Optional(t.Boolean()),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900})),italic:t.Optional(t.Boolean()),underline:t.Optional(t.Boolean()),color:t.Optional(t.String({pattern:"^#[0-9A-Fa-f]{6}$"})),alignment:t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")]))}),vw=t.Object({name:t.Literal("text-space-after"),id:t.Optional(t.String()),props:Lw}),Pw=vw;Object.fromEntries([...Jt.map(e=>[e.name,e.propsSchema]),["custom",Pw]]);new Map(Jt.filter(e=>{var n;return(((n=e.embeddedComponents)==null?void 0:n.length)??0)>0}).map(e=>[e.name,e.embeddedComponents]));new Set(Jt.filter(e=>{var n;return!!((n=e.special)!=null&&n.hasSchemaField)}).map(e=>e.name));new Map(Jt.map(e=>{var n;return[e.name,new Set(["name","id","enabled","props",...e.hasChildren?["children"]:[],...(n=e.special)!=null&&n.hasSchemaField?["$schema","renderer"]:[]])]}));var ve={};function $w(){return{includeEmojis:!jc(),verbosity:"normal",includeSuggestions:!0,includePath:!0,maxMessageLength:0,includeDocLinks:!1,colorSupport:Nw()}}$w();function jc(){return typeof process>"u"||!ve?!1:!!(ve.CI||ve.CONTINUOUS_INTEGRATION||ve.GITHUB_ACTIONS||ve.GITLAB_CI||ve.CIRCLECI||ve.TRAVIS||ve.JENKINS_URL)}function Nw(){var e;return typeof process>"u"||ve!=null&&ve.NO_COLOR?!1:ve!=null&&ve.FORCE_COLOR||(e=process.stdout)!=null&&e.isTTY?!0:!jc()}t.Object({definition:ww,format:t.Optional(t.Union([t.Literal("docx"),t.Literal("pdf"),t.Literal("html")])),options:t.Optional(t.Object({includeMetadata:t.Optional(t.Boolean()),includeComments:t.Optional(t.Boolean({deprecated:!0,description:"Deprecated and ignored. Comments are authored per component via the `comment` prop."})),trackChanges:t.Optional(t.Boolean())},{additionalProperties:!0}))},{additionalProperties:!1,description:"Document generation request"});t.Object({definition:t.Unknown(),strict:t.Optional(t.Boolean())},{additionalProperties:!1,description:"Document validation request"});t.Object({success:t.Boolean(),documentId:t.Optional(t.String()),downloadUrl:t.Optional(t.String()),error:t.Optional(t.String()),metadata:t.Optional(t.Object({pageCount:t.Optional(t.Number()),wordCount:t.Optional(t.Number()),generatedAt:t.Optional(t.String({format:"date-time"}))},{additionalProperties:!0}))},{additionalProperties:!1,description:"Document generation response"});t.Object({valid:t.Boolean(),errors:t.Array(t.Object({path:t.String(),message:t.String(),code:t.Optional(t.String())})),warnings:t.Optional(t.Array(t.Object({path:t.String(),message:t.String(),code:t.Optional(t.String())})))},{additionalProperties:!1,description:"Document validation response"});Fs("uri",e=>{try{return new URL(e),!0}catch{return e.includes(".json")||e.includes("/")||e.includes("\\")?!0:/^https?:\/\/.+/.test(e)}});Fs("date-time",e=>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?$/.test(e)&&!isNaN(Date.parse(e)));var Iw=["chart","columns","divider","heading","highcharts","image","list","paragraph","docx","section","statistic","table","text-box","toc","visual","block","group"];new Set(Iw);const Ir=t.Object({basePath:t.String({default:""})});function kw(e){const n=KO(Ir,e);if(n.basePath&&n.basePath!==""&&(!n.basePath.startsWith("/")||n.basePath.endsWith("/")))throw new Error("basePath must start with / and not end with /");if(!sr(Ir,n)){const i=[...kO(Ir,n)];throw new Error(`Environment validation failed: ${i.map(r=>r.message).join(", ")}`)}return n}kw({basePath:""});const Aw=["docx","pptx"];function Tw(){if(typeof window>"u")return"docx";const e=window.__JTO_FORMAT__;return Aw.includes(e)?e:"docx"}const Ce=Tw(),V0=Ce==="docx"?"Document":"Presentation",J0=Ce==="docx"?".docx":".pptx";function Fw(){var r;const e=xw({customComponents:[]}),n=Ow(e,{$schema:"http://json-schema.org/draft-07/schema#",$id:"https://json-to-office.dev/schema/document/v1.0.0",title:"JSON to DOCX Document Definition",description:"Schema for JSON to DOCX JSON document definitions"}),i={...n,default:{name:"docx",props:{title:"New Document"},children:[]},properties:{...n.properties,children:{...((r=n.properties)==null?void 0:r.children)||{},description:'Array of document components. Type "name" to see available component types.',markdownDescription:"Array of document components. Available types:\n- `docx` - Main container\n- `section` - Section container\n- `heading` - Heading element\n- `paragraph` - Paragraph element\n- `image` - Image element\n- `table` - Data table\n- `list` - List element\n- `columns` - Column layout\n- `statistic` - Statistic element\n- `highcharts` - Highcharts chart\n- `toc` - Table of contents"}},definitions:{...n.definitions||{}}};return na(i),i}function jw(){var r;const e=Ex({customComponents:[]}),n=Wx(e,{$schema:"http://json-schema.org/draft-07/schema#",$id:"https://json-to-office.dev/schema/presentation/v1.0.0",title:"JSON to PPTX Presentation Definition",description:"Schema for JSON to PPTX JSON presentation definitions"}),i={...n,default:{name:"pptx",props:{title:"New Presentation"},children:[]},properties:{...n.properties,children:{...((r=n.properties)==null?void 0:r.children)||{},description:'Array of slide components. Type "name" to see available component types.',markdownDescription:"Array of presentation components. Available types:\n- `pptx` - Main container\n- `slide` - Slide container\n- `text` - Text element\n- `image` - Image element\n- `shape` - Shape element\n- `table` - Data table\n- `highcharts` - Highcharts chart"}},definitions:{...n.definitions||{}}};return na(i),i}function Rw(){return Ce==="docx"?Fw():jw()}function Uw(){const n=JSON.parse(JSON.stringify(Ce==="docx"?tw:ql));no(n,!1);const i=Ce==="docx"?"DOCX":"PPTX";return{...n,$schema:"http://json-schema.org/draft-07/schema#",$id:"https://json-to-office.dev/schemas/theme/v1.0.0",title:`JSON to ${i} Theme`,description:`Theme definition for JSON to ${i} ${Ce==="docx"?"documents":"presentations"}`}}function Mw(e=Ce==="docx"?["*.docx.json"]:["*.pptx.json"]){return{uri:"https://json-to-office.dev/schema/report/v1.0.0",fileMatch:e,schema:Rw()}}function Bw(e=[`*.${Ce}.theme.json`]){return{uri:"https://json-to-office.dev/schemas/theme/v1.0.0",fileMatch:e,schema:Uw()}}function na(e){var n,i,r;if(!(typeof e!="object"||e===null)){if(typeof((i=(n=e.properties)==null?void 0:n.name)==null?void 0:i.const)=="string"){const o=e.properties.name.const;e.description||(e.description=Ew(o)),(r=e.properties)!=null&&r.props&&Cw(o,e.properties.props)}Object.values(e).forEach(o=>{typeof o=="object"&&o!==null&&na(o)})}}function Ew(e){return{docx:"Main document container - defines the overall document structure.",section:"Section container - groups content within a document section.",heading:"Heading element - displays headings with level and formatting.",paragraph:"Paragraph element - displays text with formatting.",columns:"Column layout - arranges content in multiple columns.",list:"List element - displays ordered or unordered lists.",statistic:"Statistic element - displays key metrics.",highcharts:"Highcharts chart - renders a chart from Highcharts options.",toc:"Table of contents - generates a document TOC.","text-box":"Text box element - a positioned box with text content.",pptx:"Main presentation container - defines the overall presentation structure.",slide:"Slide container - groups content elements within a single slide.",text:"Text element - displays text with formatting and positioning.",shape:"Shape element - geometric shapes with optional text and styling.",image:"Image element - displays images with sizing and positioning.",table:"Table element - displays tabular data with headers and rows.",custom:"Custom component - user-defined component type for specialized content."}[e]||`${e} component`}function Cw(e,n){if(!n.properties)return;const r={text:{text:"The text content to display",fontSize:"Font size in points",bold:"Whether to bold the text",color:"Text color as hex string",align:"Text alignment"},shape:{type:"Shape type (rect, ellipse, etc.)",text:"Text content inside the shape",fill:"Fill color"},heading:{text:"The heading text",level:"Heading level (1-6)"},paragraph:{text:"The paragraph text content"},image:{path:"Path or URL to the image",w:"Image width in inches",h:"Image height in inches"},table:{rows:"Array of rows, each containing cell values",colW:"Column widths"}}[e];r&&Object.entries(r).forEach(([o,a])=>{n.properties[o]&&(n.properties[o].description=a)})}function no(e,n=!0){if(!(typeof e!="object"||e===null)){if(e.$id&&/^T\d+$/.test(e.$id)&&delete e.$id,e.$ref&&/^T\d+$/.test(e.$ref)&&(n?e.$ref="#/definitions/ComponentDefinition":delete e.$ref),Array.isArray(e)){e.forEach(i=>no(i,n));return}Object.keys(e).forEach(i=>{typeof e[i]=="object"&&e[i]!==null&&no(e[i],n)})}}const ke="/api",At=`${ke}/${Ce}`,X0={discovery:{all:`${ke}/discovery/all`,plugins:`${ke}/discovery/plugins`,documents:`${ke}/discovery/documents`,themes:`${ke}/discovery/themes`,schemas:{document:`${ke}/discovery/schemas/document`,theme:`${ke}/discovery/schemas/theme`}},generate:`${At}/generate`,validate:`${At}/validate`,diff:`${At}/diff`,fonts:{catalog:`${ke}/fonts/catalog`,materialize:`${ke}/fonts/materialize`},preview:{libreoffice:`${At}/preview/libreoffice`,libreofficeFromJson:`${At}/preview/libreoffice-from-json`},renderers:`${At}/renderers`,cacheStats:`${At}/cache-stats`};class Dw{constructor(){rt(this,"documentSchemaCache",null);rt(this,"themeSchemaCache",null);rt(this,"pluginSchemaCache",new Map);rt(this,"cacheTimestamp",{});rt(this,"CACHE_DURATION",5*60*1e3);rt(this,"MAX_PLUGIN_CACHE",10);rt(this,"inFlight",new Map);rt(this,"cacheEpoch",0)}async fetchDocumentSchema(n,i,r){const o=i&&i.length>0?`+browser:${JSON.stringify(i)}`:"",a=n?`document-${[...n].sort().join(",")}${o}`:`document${o}`;if(!(r!=null&&r.bypassCache)){if(n||o){const d=this.pluginSchemaCache.get(a);if(d&&this.isCacheValid(a))return d}else if(this.documentSchemaCache&&this.isCacheValid("document"))return this.documentSchemaCache}const s=this.cacheEpoch,c=this.inFlight.get(a);if(c&&c.epoch>=s)return c.promise;const l=this.requestDocumentSchema(a,n,i,o,s).finally(()=>{var d;((d=this.inFlight.get(a))==null?void 0:d.promise)===l&&this.inFlight.delete(a)});return this.inFlight.set(a,{promise:l,epoch:s}),l}async requestDocumentSchema(n,i,r,o,a){try{let s;if(o)s=await fetch(`${ke}/discovery/schemas/document`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...i?{plugins:i}:{},customComponents:r})});else{let l=`${ke}/discovery/schemas/document`;if(i){const d=new URLSearchParams;d.append("plugins",i.join(",")),l=`${l}?${d.toString()}`}s=await fetch(l)}if(!s.ok)throw new Error(`Failed to fetch document schema: ${s.statusText}`);const c=await s.json();if(!c.success||!c.data)throw new Error(c.error||"Failed to fetch document schema");if(a===this.cacheEpoch){if(i||o){if(this.pluginSchemaCache.size>=this.MAX_PLUGIN_CACHE){const l=this.pluginSchemaCache.keys().next().value;l&&this.pluginSchemaCache.delete(l)}this.pluginSchemaCache.set(n,c.data)}else this.documentSchemaCache=c.data;this.cacheTimestamp[n]=Date.now()}return c.data}catch(s){throw console.error("Error fetching document schema:",s),s}}async fetchThemeSchema(){if(this.themeSchemaCache&&this.isCacheValid("theme"))return this.themeSchemaCache;try{const n=await fetch(`${ke}/discovery/schemas/theme`);if(!n.ok)throw new Error(`Failed to fetch theme schema: ${n.statusText}`);const i=await n.json();if(!i.success||!i.data)throw new Error(i.error||"Failed to fetch theme schema");return this.themeSchemaCache=i.data,this.cacheTimestamp.theme=Date.now(),i.data}catch(n){throw console.error("Error fetching theme schema:",n),n}}async getSchemaForActiveTab(n){return n==="theme"?this.fetchThemeSchema():this.fetchDocumentSchema()}clearCache(){this.documentSchemaCache=null,this.themeSchemaCache=null,this.pluginSchemaCache.clear(),this.cacheTimestamp={},this.cacheEpoch++}clearPluginSchemaCache(){this.pluginSchemaCache.clear(),Object.keys(this.cacheTimestamp).forEach(n=>{n.startsWith("document-")&&delete this.cacheTimestamp[n]}),this.cacheEpoch++}isCacheValid(n){const i=this.cacheTimestamp[n];return i?Date.now()-i<this.CACHE_DURATION:!1}formatSchemaForDisplay(n){return JSON.stringify(n,null,2)}getSchemaMetadata(n){return{title:n.title,description:n.description,version:n.version||n.$id,$schema:n.$schema}}}const zw=new Dw,_w=new Set(["family","fontFace","titleFontFace","legendFontFace","dataLabelFontFace","catAxisLabelFontFace","valAxisLabelFontFace"]),Ww=new Set(["heading","body"]);function Hw(e){const n=[],i=[{kind:"object"}];let r=0;const o=[],a=h=>h===" "||h===" "||h===`
5
+ `||h==="\r",s=()=>{for(;r<e.length&&a(e[r]);)r++},c=()=>{const h=r;r++;let b="";for(;r<e.length;){const L=e[r];if(L==="\\"){const A=e[r+1];if(A==='"')b+='"';else if(A==="\\")b+="\\";else if(A==="/")b+="/";else if(A==="n")b+=`
6
+ `;else if(A==="r")b+="\r";else if(A==="t")b+=" ";else if(A==="u"){const N=e.slice(r+2,r+6);/^[0-9a-fA-F]{4}$/.test(N)?(b+=String.fromCharCode(parseInt(N,16)),r+=6):(b+="\\u",r+=2);continue}else b+=A??"";r+=2;continue}if(L==='"')return r++,{value:b,start:h,end:r};b+=L,r++}return{value:b,start:h,end:r}},l=()=>{for(;r<e.length;){const h=e[r];if(h===","||h==="}"||h==="]"||a(h))return;r++}},d=()=>{const h=i[i.length-1];return h?h.kind==="object"?h.key===void 0?o.slice():[...o,h.key]:h.kind==="array"?[...o,h.index??0]:o.slice():o.slice()},g=()=>{const h=i[i.length-1];if(!h||h.kind!=="object")return!1;const b=h.key;return!b||o.includes("fontRegistry")?!1:_w.has(b)?!0:Ww.has(b)?o[o.length-1]==="fonts":!1},u=()=>{if(s(),r>=e.length)return;const h=e[r];if(h==='"'){const{value:b,start:L,end:A}=c();g()&&n.push({path:d(),value:b,valueStart:L,valueEnd:A});return}if(h==="{"){const b=i[i.length-1],L=(b==null?void 0:b.kind)==="object"?b.key:(b==null?void 0:b.kind)==="array"?b.index:void 0;L!==void 0&&o.push(L),r++,i.push({kind:"object",parentKey:L}),y(),i.pop(),L!==void 0&&o.pop();return}if(h==="["){const b=i[i.length-1],L=(b==null?void 0:b.kind)==="object"?b.key:(b==null?void 0:b.kind)==="array"?b.index:void 0;L!==void 0&&o.push(L),r++,i.push({kind:"array",index:0,parentKey:L}),p(),i.pop(),L!==void 0&&o.pop();return}l()},y=()=>{if(s(),e[r]==="}"){r++;return}for(;r<e.length;){if(s(),e[r]!=='"'){for(;r<e.length&&e[r]!=="}";)r++;e[r]==="}"&&r++;return}const{value:h}=c();if(s(),e[r]!==":")return;r++;const b=i[i.length-1];if(b&&(b.key=h),u(),b&&(b.key=void 0),s(),e[r]===","){r++;continue}if(e[r]==="}"){r++;return}return}},p=()=>{if(s(),e[r]==="]"){r++;return}for(;r<e.length;){if(u(),s(),e[r]===","){r++;const h=i[i.length-1];h&&h.kind==="array"&&(h.index=(h.index??0)+1);continue}if(e[r]==="]"){r++;return}return}};return s(),u(),n}const qw=Xa(e=>({open:!1,contextual:void 0,openFor:n=>e({open:!0,contextual:n}),close:()=>e({open:!1,contextual:void 0})})),Ca="jto.pickFont";let kr=null,Ar=null;function Kw(e){kr&&kr.dispose(),Ar&&Ar.dispose(),Ar=e.editor.registerCommand(Ca,(n,i,r)=>{qw.getState().openFor({jsonPath:i,currentValue:r})}),kr=e.languages.registerCodeLensProvider("json",{provideCodeLenses(n){const i=n.getValue();return{lenses:Hw(i).map(o=>{const a=n.getPositionAt(o.valueStart),s=n.getPositionAt(o.valueEnd);return{range:{startLineNumber:a.lineNumber,startColumn:a.column,endLineNumber:s.lineNumber,endColumn:s.column},id:`jto-pick-font-${o.valueStart}`,command:{id:Ca,title:o.value?`Pick font… (current: ${o.value})`:"Pick font…",arguments:[o.path,o.value]}}}),dispose:()=>{}}},resolveCodeLens(n,i){return i}})}const Rc="jto-light",Uc="jto-dark",Gw={surface:"#ffffff",popover:"#ffffff",foreground:"#1a1f2e",muted:"#546f9c",border:"#e2e6ed",fill:"#f8f9fc",lineHighlight:"#edeff3",selection:"#4f7ef833",inserted:"#16a34a26",removed:"#ef444426"},Vw={surface:"#282c3e",popover:"#32374e",foreground:"#fafafa",muted:"#a4b2cc",border:"#494e65",fill:"#3b4054",lineHighlight:"#3b405499",selection:"#85a6fa33",inserted:"#34d39926",removed:"#fca5a526"};function Da(e){return{"editor.background":e.surface,"editor.foreground":e.foreground,"editor.lineHighlightBackground":e.lineHighlight,"editor.lineHighlightBorder":"#00000000","editor.selectionBackground":e.selection,"editor.inactiveSelectionBackground":e.fill,"editorCursor.foreground":e.foreground,"editorGutter.background":e.surface,"editorLineNumber.foreground":`${e.muted}99`,"editorLineNumber.activeForeground":e.foreground,"editorIndentGuide.background1":e.border,"editorIndentGuide.activeBackground1":e.muted,"editorWhitespace.foreground":e.border,"editorWidget.background":e.popover,"editorWidget.border":e.border,"editorSuggestWidget.background":e.popover,"editorSuggestWidget.border":e.border,"editorSuggestWidget.selectedBackground":e.fill,"editorSuggestWidget.foreground":e.foreground,"editorHoverWidget.background":e.popover,"editorHoverWidget.border":e.border,"input.background":e.surface,"input.border":e.border,"dropdown.background":e.popover,"dropdown.border":e.border,"list.hoverBackground":e.fill,"list.activeSelectionBackground":e.fill,"list.activeSelectionForeground":e.foreground,"scrollbar.shadow":"#00000000","scrollbarSlider.background":`${e.muted}33`,"scrollbarSlider.hoverBackground":`${e.muted}55`,"scrollbarSlider.activeBackground":`${e.muted}77`,"diffEditor.insertedTextBackground":e.inserted,"diffEditor.removedTextBackground":e.removed,"diffEditor.border":e.border,"editorGroupHeader.tabsBackground":e.fill,"editorOverviewRuler.border":"#00000000"}}let za=!1;function Jw(e){za||(e.editor.defineTheme(Rc,{base:"vs",inherit:!0,rules:[],colors:Da(Gw)}),e.editor.defineTheme(Uc,{base:"vs-dark",inherit:!0,rules:[],colors:Da(Vw)}),za=!0)}function Y0(e){return e==="dark"?Uc:Rc}const Xw={docx:[{id:"docx/table-width",label:"Table width",category:"integrity",defaultSeverity:"warning",description:"Explicit column widths that sum past the usable width of their section.",parameters:[{name:"toleranceTwips",type:"number",default:10,description:"Slack before an overflow counts, in twips (20 = 1pt)."}]},{id:"docx/heading-hierarchy",label:"Heading hierarchy",category:"hierarchy",defaultSeverity:"info",description:"A heading that skips a level and breaks the outline.",parameters:[]},{id:"docx/text-fit",label:"Text fit",category:"integrity",defaultSeverity:"warning",description:"A word too wide for its floating frame, or a frame whose wrapped text runs off the sheet.",parameters:[{name:"widthTolerance",type:"number",default:1.08,description:"How far past the frame the estimate must reach before it counts — 1.08 is the measured error of the width model."}]},{id:"docx/frame-collision",label:"Frame collision",category:"integrity",defaultSeverity:"warning",description:"Two page-anchored frames whose estimated text lands on the same region of a page.",parameters:[{name:"minOverlapWidthTwips",type:"number",default:240,description:"Shared width before an overlap counts, in twips (240 = 12pt)."},{name:"minOverlapLines",type:"number",default:1,description:"Shared height, in lines of text. Below one line the overlap costs no words."}]},{id:"docx/svg-text-bounds",label:"SVG text bounds",category:"integrity",defaultSeverity:"warning",description:"A text baseline outside an inline SVG’s viewBox, so the words are never painted.",parameters:[]},{id:"docx/line-box",label:"Line box",category:"legibility",defaultSeverity:"warning",description:"An `exactly` line box shorter than the capitals it has to hold.",parameters:[{name:"minimumLineBoxRatio",type:"number",default:.7,description:"Smallest line box as a fraction of font size. 0.7 em is cap height on the faces the stock templates use."}]},{id:"docx/placeholder-text",label:"Placeholder text",category:"integrity",defaultSeverity:"warning",description:"An unfilled scaffold slot, or leftover filler copy.",parameters:[]},{id:"docx/slot-budget",label:"Slot budget",category:"composition",defaultSeverity:"warning",description:"A block slot holding more words than its budget allows — a takeaway past the word count the block sets.",parameters:[]},{id:"docx/chart-design",label:"Chart design",category:"information-design",defaultSeverity:"warning",description:"What a chart claims about its numbers: the comparison, the palette, the unit and the caption.",parameters:[{name:"maximumSeries",type:"number",default:4,description:"Series before the reader spends the chart on its legend."},{name:"maximumSlices",type:"number",default:6,description:"Slices before a pie’s wedges are too close in angle to rank by eye."}]},{id:"docx/table-design",label:"Table design",category:"information-design",defaultSeverity:"warning",description:"How a table lays its numbers out: alignment, rounding, rules and length.",parameters:[{name:"maximumRows",type:"number",default:25,description:"Rows before a table is a data dump rather than something read in place."}]},{id:"docx/font-count",label:"Font count",category:"brand",defaultSeverity:"warning",description:"Distinct font families the document can paint.",parameters:[{name:"maximumFamilies",type:"number",default:3,description:"Families before a document reads as assembled rather than designed."}]},{id:"docx/palette-adherence",label:"Palette adherence",category:"brand",defaultSeverity:"info",description:"A literal colour the resolved theme does not define.",parameters:[]},{id:"docx/required-chrome",label:"Required chrome",category:"consistency",defaultSeverity:"warning",description:"A block slot with a role a profile or policy requires — a takeaway, a source — left empty. Off until one names roles.",parameters:[{name:"required",type:"string-list",default:[],description:"Slot roles every block that declares them must fill: actionTitle, takeaway, source, tracker, footer."}]},{id:"docx/running-head",label:"Running head",category:"consistency",defaultSeverity:"warning",description:"A body section without the running head a profile or policy expects. Off until one names parts.",parameters:[{name:"required",type:"string-list",default:[],description:"Parts every section from fromSection on must carry: header, footer, pageNumber."},{name:"fromSection",type:"number",default:1,description:"Zero-based index of the first section that owes a running head; 1 leaves the cover section clean."}]},{id:"docx/exhibit-required",label:"Exhibit required",category:"composition",defaultSeverity:"warning",description:"Fewer data exhibits — charts, or tables of two or more columns — than a profile or policy expects. Off until one sets a minimum.",parameters:[{name:"minimumExhibits",type:"number",default:1,description:"Charts plus tables of two or more columns the document must carry; a kpi-row does not count."}]},{id:"docx/type-scale",label:"Type scale",category:"consistency",defaultSeverity:"warning",description:"An authored size the theme never paints: not a style, not a font role, not a step of its scale. Off until a profile or policy enables it.",parameters:[]},{id:"docx/size-count",label:"Size count",category:"consistency",defaultSeverity:"warning",description:"More distinct text sizes than maximumSizes allows, blocks included. Off until a profile or policy enables it.",parameters:[{name:"maximumSizes",type:"number",default:8,description:"Distinct sizes a document may paint; the client-report profile keeps the default."}]},{id:"docx/role-drift",label:"Role drift",category:"consistency",defaultSeverity:"warning",description:"One heading level, table role or paragraph style painted at two sizes; the theme size is the fix. Off until a profile or policy enables it.",parameters:[]},{id:"docx/body-measure",label:"Body measure",category:"legibility",defaultSeverity:"warning",description:"A section whose body copy runs outside the readable measure. Off until a profile or policy enables it.",parameters:[{name:"minimumCharacters",type:"number",default:45,description:"Shortest line of body copy a reader follows comfortably."},{name:"maximumCharacters",type:"number",default:90,description:"Longest line of body copy a reader follows comfortably."}]},{id:"docx/section-content",label:"Section content",category:"hierarchy",defaultSeverity:"warning",description:"A section that renders nothing, or one that carries body copy under no heading. Off until a profile or policy enables it.",parameters:[{name:"minimumWordsForHeading",type:"number",default:60,description:"Words past which a section owes the reader a heading."}]},{id:"docx/heading-keep-next",label:"Heading keep-next",category:"hierarchy",defaultSeverity:"warning",description:"A heading that is not bound to the content under it, so a page break can strand it; the fix sets keepNext on an authored heading. Off until a profile or policy enables it.",parameters:[]},{id:"docx/figure-label",label:"Figure label",category:"accessibility",defaultSeverity:"warning",description:"An image with neither a caption beside it nor alt text on it. Off until a profile or policy enables it.",parameters:[]},{id:"docx/image-aspect",label:"Image aspect",category:"integrity",defaultSeverity:"warning",description:"An image drawn at an aspect the asset does not have, where the asset can be read from the document.",parameters:[{name:"tolerance",type:"number",default:.02,description:"How far the drawn aspect may sit from the asset’s, as a fraction."}]},{id:"docx/contents-missing",label:"Contents missing",category:"hierarchy",defaultSeverity:"info",description:"More headings than minimumHeadings with no table of contents. Off at 0.",parameters:[{name:"minimumHeadings",type:"number",default:0,description:"Headings past which a document owes a contents page; 0 disables the rule."}]}],pptx:[{id:"pptx/canvas",label:"Canvas",category:"composition",defaultSeverity:"info",description:"Slide dimensions: partially declared, legacy 4:3, or a size matching no known preset.",parameters:[]},{id:"pptx/minimum-font-size",label:"Minimum font size",category:"legibility",defaultSeverity:"warning",description:"Text below the size a projected slide can carry.",parameters:[{name:"minimumFontPt",type:"number",default:7,description:"Smallest acceptable point size. The executive profile raises this to 14."}]},{id:"pptx/text-fit",label:"Text fit",category:"integrity",defaultSeverity:"info",description:"Estimated text height against its box. An estimate, not a measurement.",parameters:[{name:"characterWidthFactor",type:"number",default:.46,description:"Average glyph width as a fraction of point size. Tuned against rendered ground truth — changing it moves both detection and false alarms."},{name:"safetyBufferPt",type:"number",default:8,description:"Slack before a tight fit is called an overflow."}]},{id:"pptx/slide-density",label:"Slide density",category:"information-design",defaultSeverity:"warning",description:"Body word count per slide.",parameters:[{name:"maximumBodyWords",type:"number",default:130,description:"Words before a slide reads as dense. The executive profile lowers this to 70."}]},{id:"pptx/text-contrast",label:"Text contrast",category:"accessibility",defaultSeverity:"warning",description:"Text against the surface behind it, judged by WCAG AA. Text over an image or a chart is skipped.",parameters:[{name:"normalRatio",type:"number",default:4.5,description:"Contrast ratio normal text has to clear."},{name:"largeRatio",type:"number",default:3,description:"Contrast ratio large text has to clear."},{name:"largeTextPt",type:"number",default:18,description:"Point size from which text counts as large."},{name:"largeBoldTextPt",type:"number",default:14,description:"Point size from which bold text counts as large."}]},{id:"pptx/placeholder-text",label:"Placeholder text",category:"integrity",defaultSeverity:"warning",description:"An unfilled scaffold slot, or leftover filler copy.",parameters:[]},{id:"pptx/box-overlap",label:"Box overlap",category:"integrity",defaultSeverity:"info",description:"Two opaque boxes on one slide that land on each other. A duplicate, or anything covering data, is a warning.",parameters:[{name:"minimumOverlapPt",type:"number",default:4,description:"Overlap on both axes before two boxes count as colliding, in points."},{name:"minimumAreaRatio",type:"number",default:.15,description:"Overlap as a fraction of the smaller box before it is reported."}]},{id:"pptx/chart-design",label:"Chart design",category:"information-design",defaultSeverity:"warning",description:"What a chart claims about its numbers: the comparison, the scale, the palette and the unit.",parameters:[{name:"maximumSeries",type:"number",default:4,description:"Series before the reader spends the chart on its legend."},{name:"maximumSlices",type:"number",default:6,description:"Slices before a pie’s wedges are too close in angle to rank by eye."}]},{id:"pptx/table-design",label:"Table design",category:"information-design",defaultSeverity:"warning",description:"How a table lays its numbers out: alignment, rounding, rules and length.",parameters:[{name:"maximumRows",type:"number",default:12,description:"Rows a slide table can carry at a size an audience can read."}]},{id:"pptx/font-count",label:"Font count",category:"brand",defaultSeverity:"warning",description:"Distinct font families the deck can paint.",parameters:[{name:"maximumFamilies",type:"number",default:3,description:"Families before a deck reads as assembled rather than designed."}]},{id:"pptx/palette-adherence",label:"Palette adherence",category:"brand",defaultSeverity:"info",description:"A literal colour the resolved theme does not define.",parameters:[]},{id:"pptx/off-canvas",label:"Off canvas",category:"integrity",defaultSeverity:"warning",description:"Text ink drawn past the edge of the slide.",parameters:[{name:"tolerancePt",type:"number",default:2,description:"Overrun in points to forgive as renderer rounding."},{name:"characterWidthFactor",type:"number",default:.46,description:"Average glyph advance as a fraction of the font size, for the ink estimate."}]},{id:"pptx/slot-budget",label:"Slot budget",category:"composition",defaultSeverity:"warning",description:"A block slot over the word budget its definition declares.",parameters:[]},{id:"pptx/required-chrome",label:"Required chrome",category:"consistency",defaultSeverity:"warning",description:"A block slot with a role a profile or policy requires — a takeaway, a source — left empty. Off until one names roles.",parameters:[{name:"required",type:"string-list",default:[],description:"Slot roles every block that declares them must fill: actionTitle, takeaway, source, tracker, footer."}]},{id:"pptx/action-title",label:"Action title length",category:"hierarchy",defaultSeverity:"warning",description:"An action-title slot that wraps past the lines a profile or policy allows. Off at 0.",parameters:[{name:"maxLines",type:"number",default:0,description:"Lines an action title may take in the box its definition drew; 0 disables the rule."}]},{id:"pptx/type-scale",label:"Type scale",category:"consistency",defaultSeverity:"warning",description:"An authored size the theme never paints: not a style, not a type role, not a step of its scale. Off until a profile or policy enables it.",parameters:[]},{id:"pptx/size-count",label:"Size count",category:"consistency",defaultSeverity:"warning",description:"More distinct text sizes than maximumSizes allows, blocks included. Off until a profile or policy enables it.",parameters:[{name:"maximumSizes",type:"number",default:8,description:"Distinct text sizes the deck may paint."}]},{id:"pptx/role-drift",label:"Role drift",category:"consistency",defaultSeverity:"warning",description:"One named style or type role painted at two sizes across the deck; the theme size is the fix. Off until a profile or policy enables it.",parameters:[]},{id:"pptx/title-drift",label:"Title drift",category:"consistency",defaultSeverity:"warning",description:"A slide title away from the left edge or baseline the deck’s other titles of that kind share. Off until a profile or policy enables it.",parameters:[{name:"titleStyles",type:"string-list",default:["title"],description:"Named styles a hand-placed title is set in; block titles are found by their actionTitle slot."},{name:"tolerancePt",type:"number",default:2,description:"How far two titles may sit apart before the deck reads as unaligned."}]},{id:"pptx/bullet-density",label:"Bullet density",category:"information-design",defaultSeverity:"warning",description:"More bullets in one box, or more words in one bullet, than the profile allows. Off at 0.",parameters:[{name:"maximumBullets",type:"number",default:0,description:"Bullets one box may carry; 0 disables the count."},{name:"maximumWordsPerBullet",type:"number",default:0,description:"Words one bullet may run to; 0 disables the length check."}]},{id:"pptx/safe-area",label:"Safe area",category:"composition",defaultSeverity:"warning",description:"Content outside the theme’s safe area that is neither chrome nor a full bleed. Off until a profile or policy enables it.",parameters:[{name:"tolerancePt",type:"number",default:2,description:"How far a box may cross the safe area before it is reported."}]},{id:"pptx/slide-title",label:"Slide title",category:"hierarchy",defaultSeverity:"warning",description:"A content slide with no title: no actionTitle slot, no box in a title style. Off until a profile or policy enables it.",parameters:[{name:"titleStyles",type:"string-list",default:["title","display","heading1"],description:"Named styles that read as a slide title."}]},{id:"pptx/image-aspect",label:"Image aspect",category:"integrity",defaultSeverity:"warning",description:"An image drawn at an aspect the asset does not have, where the asset can be read from the document.",parameters:[{name:"tolerance",type:"number",default:.02,description:"How far the drawn aspect may sit from the asset’s, as a fraction."}]}]};function Yw(){return Xw[Ce]}const Zw="inmemory://jto/quality-policy.json",Qw="https://json-to-office.dev/schema/quality-policy/v1",e0={enum:["error","warning","info"],description:"Overrides the severity this rule reports at."};function t0(){const e=Yw(),n={};for(const i of e){const r={};for(const o of i.parameters)r[o.name]=o.type==="string-list"?{type:"array",items:{type:"string"},default:[...o.default],description:`${o.description} (default ${JSON.stringify(o.default)})`}:{type:"number",default:o.default,description:`${o.description} (default ${o.default})`};n[i.id]={type:"object",description:`${i.description} Category ${i.category}; reports at ${i.defaultSeverity} by default.`,properties:{enabled:{type:"boolean",description:"Set false to switch this rule off for the run."},severity:{type:"string",...e0},...i.parameters.length>0&&{parameters:{type:"object",description:"Tuning for this rule.",properties:r,additionalProperties:!1}}},additionalProperties:!1}}return{uri:Qw,fileMatch:[Zw,"*quality-policy.json"],schema:{type:"object",title:"Quality run policy",description:"Per-run rule configuration. The gate and profile have their own controls and are not set here.",properties:{rules:{type:"object",description:"Overrides keyed by rule id.",properties:n,additionalProperties:!1},suppressions:{type:"array",description:"Findings to mute. Every entry must say why, so a muted rule stays accountable.",items:{type:"object",required:["reason"],properties:{ruleId:{type:"string",enum:e.map(i=>i.id),description:"Mute this rule."},code:{type:"string",description:"Mute this diagnostic code, e.g. W_QUALITY_HEADING_SKIP."},path:{type:"string",description:"RFC 6901 pointer the suppression applies to."},pathMatch:{enum:["exact","subtree"],description:"`subtree` also mutes everything beneath `path`. Defaults to exact."},reason:{type:"string",minLength:1,description:"Why this finding is acceptable here."}},additionalProperties:!1}},maxDiagnostics:{type:"integer",minimum:0,description:"Stop after this many diagnostics. The report is marked truncated."},onRuleError:{enum:["continue","throw"],description:"What a crashing rule does: report and carry on, or fail the run."}},additionalProperties:!1}}}const n0=Xa((e,n)=>({editors:new Map,activeEditorName:null,registerEditor:(i,r,o,a,s,c)=>{e(l=>{const d=new Map(l.editors);return d.set(i,{editor:r,monaco:o,documentName:i,toStorageValue:a??(g=>g),collapse:s,flushPendingSave:c}),{editors:d}})},unregisterEditor:i=>{e(r=>{const o=new Map(r.editors);return o.delete(i),{editors:o,activeEditorName:r.activeEditorName===i?null:r.activeEditorName}})},setActiveEditor:i=>{e({activeEditorName:i})},getActiveEditor:()=>{const i=n();return i.activeEditorName&&i.editors.get(i.activeEditorName)||null},getEditor:i=>n().editors.get(i)||null,getEditorForModel:i=>{for(const r of n().editors.values())if(r.editor.getModel()===i)return r;return null}})),i0=3e4;let Tr=null;function Mc(){return Tr??(Tr=fetch(`${ke}/discovery/blocks`).then(async e=>{if(!e.ok)throw new Error(`Block discovery failed: ${e.statusText}`);const n=await e.json();if(!n.success||!n.data)throw new Error(n.error||"Block discovery failed");return n.data}).catch(e=>(console.warn("[blocks] reference catalog unavailable:",e),setTimeout(()=>{Tr=null},i0),[]))),Tr}function r0(e,n=!1){const i=e.length;let r=0,o="",a=0,s=16,c=0,l=0,d=0,g=0,u=0;function y(S,U){let j=0,k=0;for(;j<S;){let T=e.charCodeAt(r);if(T>=48&&T<=57)k=k*16+T-48;else if(T>=65&&T<=70)k=k*16+T-65+10;else if(T>=97&&T<=102)k=k*16+T-97+10;else break;r++,j++}return j<S&&(k=-1),k}function p(S){r=S,o="",a=0,s=16,u=0}function h(){let S=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&nn(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&nn(e.charCodeAt(r)))for(r++;r<e.length&&nn(e.charCodeAt(r));)r++;else return u=3,e.substring(S,r);let U=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&nn(e.charCodeAt(r))){for(r++;r<e.length&&nn(e.charCodeAt(r));)r++;U=r}else u=3;return e.substring(S,U)}function b(){let S="",U=r;for(;;){if(r>=i){S+=e.substring(U,r),u=2;break}const j=e.charCodeAt(r);if(j===34){S+=e.substring(U,r),r++;break}if(j===92){if(S+=e.substring(U,r),r++,r>=i){u=2;break}switch(e.charCodeAt(r++)){case 34:S+='"';break;case 92:S+="\\";break;case 47:S+="/";break;case 98:S+="\b";break;case 102:S+="\f";break;case 110:S+=`
7
+ `;break;case 114:S+="\r";break;case 116:S+=" ";break;case 117:const T=y(4);T>=0?S+=String.fromCharCode(T):u=4;break;default:u=5}U=r;continue}if(j>=0&&j<=31)if($n(j)){S+=e.substring(U,r),u=2;break}else u=6;r++}return S}function L(){if(o="",u=0,a=r,l=c,g=d,r>=i)return a=i,s=17;let S=e.charCodeAt(r);if(Fr(S)){do r++,o+=String.fromCharCode(S),S=e.charCodeAt(r);while(Fr(S));return s=15}if($n(S))return r++,o+=String.fromCharCode(S),S===13&&e.charCodeAt(r)===10&&(r++,o+=`
8
+ `),c++,d=r,s=14;switch(S){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,o=b(),s=10;case 47:const U=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<i&&!$n(e.charCodeAt(r));)r++;return o=e.substring(U,r),s=12}if(e.charCodeAt(r+1)===42){r+=2;const j=i-1;let k=!1;for(;r<j;){const T=e.charCodeAt(r);if(T===42&&e.charCodeAt(r+1)===47){r+=2,k=!0;break}r++,$n(T)&&(T===13&&e.charCodeAt(r)===10&&r++,c++,d=r)}return k||(r++,u=1),o=e.substring(U,r),s=13}return o+=String.fromCharCode(S),r++,s=16;case 45:if(o+=String.fromCharCode(S),r++,r===i||!nn(e.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=h(),s=11;default:for(;r<i&&A(S);)r++,S=e.charCodeAt(r);if(a!==r){switch(o=e.substring(a,r),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(S),r++,s=16}}function A(S){if(Fr(S)||$n(S))return!1;switch(S){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function N(){let S;do S=L();while(S>=12&&S<=15);return S}return{setPosition:p,getPosition:()=>r,scan:n?N:L,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>l,getTokenStartCharacter:()=>a-g,getTokenError:()=>u}}function Fr(e){return e===32||e===9}function $n(e){return e===10||e===13}function nn(e){return e>=48&&e<=57}var _a;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(_a||(_a={}));new Array(20).fill(0).map((e,n)=>" ".repeat(n));const rn=200;new Array(rn).fill(0).map((e,n)=>`
9
+ `+" ".repeat(n)),new Array(rn).fill(0).map((e,n)=>"\r"+" ".repeat(n)),new Array(rn).fill(0).map((e,n)=>`\r
10
+ `+" ".repeat(n)),new Array(rn).fill(0).map((e,n)=>`
11
+ `+" ".repeat(n)),new Array(rn).fill(0).map((e,n)=>"\r"+" ".repeat(n)),new Array(rn).fill(0).map((e,n)=>`\r
12
+ `+" ".repeat(n));var Dn;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Dn||(Dn={}));function o0(e,n){const i=[],r=new Object;let o;const a={value:{},offset:0,length:0,type:"object",parent:void 0};let s=!1;function c(l,d,g,u){a.value=l,a.offset=d,a.length=g,a.type=u,a.colonOffset=void 0,o=a}try{ia(e,{onObjectBegin:(l,d)=>{if(n<=l)throw r;o=void 0,s=n>l,i.push("")},onObjectProperty:(l,d,g)=>{if(n<d||(c(l,d,g,"property"),i[i.length-1]=l,n<=d+g))throw r},onObjectEnd:(l,d)=>{if(n<=l)throw r;o=void 0,i.pop()},onArrayBegin:(l,d)=>{if(n<=l)throw r;o=void 0,i.push(0)},onArrayEnd:(l,d)=>{if(n<=l)throw r;o=void 0,i.pop()},onLiteralValue:(l,d,g)=>{if(n<d||(c(l,d,g,Ec(l)),n<=d+g))throw r},onSeparator:(l,d,g)=>{if(n<=d)throw r;if(l===":"&&o&&o.type==="property")o.colonOffset=d,s=!1,o=void 0;else if(l===","){const u=i[i.length-1];typeof u=="number"?i[i.length-1]=u+1:(s=!0,i[i.length-1]=""),o=void 0}}})}catch(l){if(l!==r)throw l}return{path:i,previousNode:o,isAtPropertyKey:s,matches:l=>{let d=0;for(let g=0;d<l.length&&g<i.length;g++)if(l[d]===i[g]||l[d]==="*")d++;else if(l[d]!=="**")return!1;return d===l.length}}}function a0(e,n=[],i=Dn.DEFAULT){let r=null,o=[];const a=[];function s(l){Array.isArray(o)?o.push(l):r!==null&&(o[r]=l)}return ia(e,{onObjectBegin:()=>{const l={};s(l),a.push(o),o=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{o=a.pop()},onArrayBegin:()=>{const l=[];s(l),a.push(o),o=l,r=null},onArrayEnd:()=>{o=a.pop()},onLiteralValue:s,onError:(l,d,g)=>{n.push({error:l,offset:d,length:g})}},i),o[0]}function s0(e,n=[],i=Dn.DEFAULT){let r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function o(l){r.type==="property"&&(r.length=l-r.offset,r=r.parent)}function a(l){return r.children.push(l),l}ia(e,{onObjectBegin:l=>{r=a({type:"object",offset:l,length:-1,parent:r,children:[]})},onObjectProperty:(l,d,g)=>{r=a({type:"property",offset:d,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:l,offset:d,length:g,parent:r})},onObjectEnd:(l,d)=>{o(l+d),r.length=l+d-r.offset,r=r.parent,o(l+d)},onArrayBegin:(l,d)=>{r=a({type:"array",offset:l,length:-1,parent:r,children:[]})},onArrayEnd:(l,d)=>{r.length=l+d-r.offset,r=r.parent,o(l+d)},onLiteralValue:(l,d,g)=>{a({type:Ec(l),offset:d,length:g,parent:r,value:l}),o(d+g)},onSeparator:(l,d,g)=>{r.type==="property"&&(l===":"?r.colonOffset=d:l===","&&o(d))},onError:(l,d,g)=>{n.push({error:l,offset:d,length:g})}},i);const c=r.children[0];return c&&delete c.parent,c}function l0(e,n){if(!e)return;let i=e;for(let r of n)if(typeof r=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;let o=!1;for(const a of i.children)if(Array.isArray(a.children)&&a.children[0].value===r&&a.children.length===2){i=a.children[1],o=!0;break}if(!o)return}else{const o=r;if(i.type!=="array"||o<0||!Array.isArray(i.children)||o>=i.children.length)return;i=i.children[o]}return i}function io(e){switch(e.type){case"array":return e.children.map(io);case"object":const n=Object.create(null);for(let i of e.children){const r=i.children[1];r&&(n[i.children[0].value]=io(r))}return n;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function c0(e,n,i=!1){return n>=e.offset&&n<e.offset+e.length||i&&n===e.offset+e.length}function Bc(e,n,i=!1){if(c0(e,n,i)){const r=e.children;if(Array.isArray(r))for(let o=0;o<r.length&&r[o].offset<=n;o++){const a=Bc(r[o],n,i);if(a)return a}return e}}function ia(e,n,i=Dn.DEFAULT){const r=r0(e,!1),o=[];let a=0;function s(O){return O?()=>a===0&&O(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(O){return O?F=>a===0&&O(F,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(O){return O?F=>a===0&&O(F,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function d(O){return O?()=>{a>0?a++:O(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())===!1&&(a=1)}:()=>!0}function g(O){return O?()=>{a>0&&a--,a===0&&O(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}const u=d(n.onObjectBegin),y=l(n.onObjectProperty),p=g(n.onObjectEnd),h=d(n.onArrayBegin),b=g(n.onArrayEnd),L=l(n.onLiteralValue),A=c(n.onSeparator),N=s(n.onComment),S=c(n.onError),U=i&&i.disallowComments,j=i&&i.allowTrailingComma;function k(){for(;;){const O=r.scan();switch(r.getTokenError()){case 4:T(14);break;case 5:T(15);break;case 3:T(13);break;case 1:U||T(11);break;case 2:T(12);break;case 6:T(16);break}switch(O){case 12:case 13:U?T(10):N();break;case 16:T(1);break;case 15:case 14:break;default:return O}}}function T(O,F=[],Y=[]){if(S(O),F.length+Y.length>0){let ce=r.getToken();for(;ce!==17;){if(F.indexOf(ce)!==-1){k();break}else if(Y.indexOf(ce)!==-1)break;ce=k()}}}function W(O){const F=r.getTokenValue();return O?L(F):(y(F),o.push(F)),k(),!0}function I(){switch(r.getToken()){case 11:const O=r.getTokenValue();let F=Number(O);isNaN(F)&&(T(2),F=0),L(F);break;case 7:L(null);break;case 8:L(!0);break;case 9:L(!1);break;default:return!1}return k(),!0}function M(){return r.getToken()!==10?(T(3,[],[2,5]),!1):(W(!1),r.getToken()===6?(A(":"),k(),X()||T(4,[],[2,5])):T(5,[],[2,5]),o.pop(),!0)}function J(){u(),k();let O=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(O||T(4,[],[]),A(","),k(),r.getToken()===2&&j)break}else O&&T(6,[],[]);M()||T(4,[],[2,5]),O=!0}return p(),r.getToken()!==2?T(7,[2],[]):k(),!0}function ee(){h(),k();let O=!0,F=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(F||T(4,[],[]),A(","),k(),r.getToken()===4&&j)break}else F&&T(6,[],[]);O?(o.push(0),O=!1):o[o.length-1]++,X()||T(4,[],[4,5]),F=!0}return b(),O||o.pop(),r.getToken()!==4?T(8,[4],[]):k(),!0}function X(){switch(r.getToken()){case 3:return ee();case 1:return J();case 10:return W(!0);default:return I()}}return k(),r.getToken()===17?i.allowEmptyContent?!0:(T(4,[],[]),!1):X()?(r.getToken()!==17&&T(9,[],[]),!0):(T(4,[],[]),!1)}function Ec(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}var Wa;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Wa||(Wa={}));var Ha;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Ha||(Ha={}));const d0=o0,p0=a0,Cc=s0,pn=l0,u0=Bc,m0=io;var qa;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(qa||(qa={}));const f0={pptx:["slide","group"],docx:["docx","section","group"]};function Ka(e,n){const i=pn(e,[...n,"name"]);return(i==null?void 0:i.type)==="string"?i.value:void 0}function g0(e,n){return!e.slice(n.offset,n.offset+n.length).includes(`
13
+ `)}function ra(e){try{return Cc(e,[],{allowTrailingComma:!0})}catch{return}}function h0(e,n,i,r=ra(e)){var y,p,h;if(!r)return null;const o=d0(e,n),a=o.path,s=u0(r,n,!0);if(!o.isAtPropertyKey&&a.length>=2&&a[a.length-1]==="ref"&&a[a.length-2]==="props"&&Ka(r,a.slice(0,-2))==="block"&&(s==null?void 0:s.type)==="string")return{kind:"ref",replace:{offset:s.offset,length:s.length}};let c=-1;for(let b=a.length-1;b>=1;b--)if(typeof a[b]=="number"&&a[b-1]==="children"){c=b;break}if(c<0)return null;const l=Ka(r,a.slice(0,c-1));if(!l||!f0[i].includes(l))return null;const d=pn(r,a.slice(0,c+1));if(!d){const b=pn(r,a.slice(0,c));return(b==null?void 0:b.type)!=="array"||(((y=b.children)==null?void 0:y.length)??0)>0?null:{kind:"component",replace:{offset:n,length:0}}}if(d.type!=="object"||!g0(e,d))return null;const g=d.children??[];return!(g.length===0||g.length===1&&["","name"].includes(String(((h=(p=g[0].children)==null?void 0:p[0])==null?void 0:h.value)??"")))||a.length>c+2?null:{kind:"component",replace:{offset:d.offset,length:d.length}}}function b0(e){return e.replace(/[\\$}]/g,n=>`\\${n}`)}function Ga(e,n=" "){const i=[],r=s=>`\x07${s}\x07`,o=Object.fromEntries(Object.entries(e.props.slots??{}).map(([s,c])=>[s,typeof c=="string"?r(i.push(c)):c]));return JSON.stringify({name:"block",props:{ref:e.props.ref,slots:o}},null,n).replace(/"\\u0007(\d+)\\u0007"/g,(s,c)=>{const l=JSON.stringify(i[Number(c)-1]).slice(1,-1);return`"\${${c}:${b0(l)}}"`})}function Dc(e){var n;return((n=/\n([ \t]+)\S/.exec(e))==null?void 0:n[1])??" "}function y0(e,n){var r;const i=e.lastIndexOf(`
14
+ `,n-1)+1;return((r=/^[ \t]*/.exec(e.slice(i,n)))==null?void 0:r[0])??""}function O0(e,n){return e.split(`
15
+ `).map((i,r)=>r===0?i:n+i).join(`
16
+ `)}function x0(e,n,i=ra(e)){var L;if(!i||i.type!=="object")return[];const r=Dc(e),o=pn(i,["props","blocks"]),a=pn(i,["props"]),s=new Set((o==null?void 0:o.type)==="object"?(o.children??[]).map(A=>{var N,S;return String(((S=(N=A.children)==null?void 0:N[0])==null?void 0:S.value)??"")}):[]),c=Object.entries(n).filter(([A])=>!s.has(A));if(!c.length)return[];const l=(o==null?void 0:o.type)==="object"?o:(a==null?void 0:a.type)==="object"?a:i,d=l===o?1:l===a?2:3,g=y0(e,l.offset),u=A=>g+r.repeat(A),y=c.map(([A,N])=>`${u(d)}${JSON.stringify(A)}: ${O0(JSON.stringify(N,null,r),u(d))}`).join(`,
17
+ `),p=l===o?y:l===a?`${u(1)}"blocks": {
18
+ ${y}
19
+ ${u(1)}}`:`${u(1)}"props": {
20
+ ${u(2)}"blocks": {
21
+ ${y}
22
+ ${u(2)}}
23
+ ${u(1)}}`,b=(((L=l.children)==null?void 0:L.length)??0)>0?`
24
+ ${p},`:`
25
+ ${p}
26
+ ${g}`;return[{offset:l.offset+1,length:0,content:b}]}function S0(e,n,i){const r={};for(const o of[...e.dependencies,e.name]){if(o in i)continue;const a=n.find(s=>s.template===e.template&&s.name===o);a&&(r[o]=a.definition)}return r}function w0(e,n,i){const r=ra(e),o=h0(e,n,i.format,r);if(!o)return[];const a=e.slice(o.replace.offset,n).replace(/[\w-]*$/,""),s=(p,h,b,L,A,N)=>({kind:p,label:h,detail:b,documentation:L,insertText:A,filterText:a+h,replace:o.replace,additionalEdits:N}),c=i.references.filter(p=>p.format===i.format&&!(p.name in i.definitions)),l=p=>x0(e,S0(p,i.references,i.definitions),r);if(o.kind==="ref")return c.map(p=>s("ref",p.name,`block from ${p.template}`,p.description,JSON.stringify(p.name),l(p)));const d=Dc(e);let g=i.document;if(g===void 0)try{g=p0(e,[],{allowTrailingComma:!0})}catch{g=void 0}const u=Object.entries(i.definitions).map(([p,h])=>s("component",p,"block defined in this document",h.description??"",Ga(wx(p,h,{document:g,format:i.format}),d),[])),y=c.map(p=>s("component",p.name,`block from ${p.template}`,p.description,Ga(p.example,d),l(p)));return[...u,...y]}function L0(e){if(!e.trim())return{};let n;try{n=Cc(e,[],{allowTrailingComma:!0})}catch{return{}}if(!n)return{};const i=pn(n,["props","blocks"]);if(!i||i.type!=="object")return{};const r={};for(const o of i.children??[]){if(o.type!=="property"||!o.children)continue;const[a,s]=o.children,c=a==null?void 0:a.value;if(typeof c!="string"||!s)continue;let l;try{l=m0(s)}catch{continue}sr(El,l)&&(r[c]=l)}return r}function zc(e){return JSON.stringify(e)}let ro=!1,fi=null,oo=[],jr=[],Rr=0,Ni=null,oa={},Va=zc({});const Ii="https://json-to-office.dev/schema/report/v1.0.0";async function aa(){if(!ro)try{const e=await id.init();sa(e),ro=!0,console.log("Monaco configured globally with JSON schemas")}catch(e){console.error("Failed to configure Monaco globally:",e)}}function _c(e){return e.replace(/,(\s*[}\]])/g,"$1")}function sa(e){Jw(e),e.languages.json.jsonDefaults.setModeConfiguration({documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!1,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0}),e.languages.registerDocumentFormattingEditProvider("json",{provideDocumentFormattingEdits(i){const r=i.getValue(),o=_c(r);try{const a=JSON.parse(o),s=JSON.stringify(a,null,2);return[{range:i.getFullModelRange(),text:s}]}catch{return[{range:i.getFullModelRange(),text:o}]}}}),k0(e),Mc(),Kw(e);const n=Mw();ki(n.schema),Ni=n.schema,la(e),console.log("Monaco instance configured with schemas:",{reportSchema:{uri:Ii,fileMatch:n.fileMatch,schemaKeys:Object.keys(n.schema)}})}function v0(e){return Ce==="pptx"?_x(e):LS(e)}function la(e){if(!Ni)return;const n=JSON.parse(JSON.stringify(Ni));oo.length&&N0(n,oo),Sx(n,oa,v0(n));const i={uri:Ii,fileMatch:["*.docx.json","*.pptx.json"],schema:n};e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,allowComments:!1,trailingCommas:"error",schemaValidation:"error",schemas:[i,Bw(),t0()],schemaRequest:"ignore"})}function P0(e,n){const i=zc(n);return i===Va?!1:(oa=n,Va=i,la(e),!0)}async function $0(){ro=!1,await aa()}function ki(e){if(!(typeof e!="object"||e===null)){if(Array.isArray(e)){e.forEach(n=>ki(n));return}delete e.discriminator;for(const n of Object.values(e))ki(n)}}function N0(e,n){var o,a,s,c,l,d,g,u,y;function i(p){if(!p)return;const h=p.anyOf??p.oneOf;if(Array.isArray(h)){h.forEach(i);return}if(p.type!=="string")return;const b=Array.isArray(p.examples)?p.examples:[];p.examples=[...new Set([...b,...n])]}i((s=(a=(o=e==null?void 0:e.properties)==null?void 0:o.props)==null?void 0:a.properties)==null?void 0:s.theme);const r=p=>{var h;return typeof(p==null?void 0:p.$ref)=="string"?(h=e==null?void 0:e.definitions)==null?void 0:h[p.$ref.replace("#/definitions/","")]:p};for(const p of qr(e)){const h=r(p);i((d=(l=(c=h==null?void 0:h.properties)==null?void 0:c.props)==null?void 0:l.properties)==null?void 0:d.theme);for(const b of qr(h))i((y=(u=(g=b==null?void 0:b.properties)==null?void 0:g.props)==null?void 0:u.properties)==null?void 0:y.theme)}}function I0(e,n){return e===void 0?n.languages.CompletionItemKind.Property:{1:n.languages.CompletionItemKind.Text,2:n.languages.CompletionItemKind.Method,3:n.languages.CompletionItemKind.Function,4:n.languages.CompletionItemKind.Constructor,5:n.languages.CompletionItemKind.Field,6:n.languages.CompletionItemKind.Variable,7:n.languages.CompletionItemKind.Class,8:n.languages.CompletionItemKind.Interface,9:n.languages.CompletionItemKind.Module,10:n.languages.CompletionItemKind.Property,11:n.languages.CompletionItemKind.Unit,12:n.languages.CompletionItemKind.Value,13:n.languages.CompletionItemKind.Enum,14:n.languages.CompletionItemKind.Keyword,15:n.languages.CompletionItemKind.Snippet,16:n.languages.CompletionItemKind.Color,17:n.languages.CompletionItemKind.File,18:n.languages.CompletionItemKind.Reference,19:n.languages.CompletionItemKind.Folder,20:n.languages.CompletionItemKind.EnumMember,21:n.languages.CompletionItemKind.Constant,22:n.languages.CompletionItemKind.Struct,23:n.languages.CompletionItemKind.Event,24:n.languages.CompletionItemKind.Operator,25:n.languages.CompletionItemKind.TypeParameter}[e]??n.languages.CompletionItemKind.Property}function k0(e){fi&&(fi.dispose(),fi=null),fi=e.languages.registerCompletionItemProvider("json",{triggerCharacters:['"',":"," "],async provideCompletionItems(n,i){var y;const r=e.languages.json.getWorker;if(!r)return{suggestions:[]};const s=await(await(await r())(n.uri)).doComplete(n.uri.toString(),{line:i.lineNumber-1,character:i.column-1}),c=((s==null?void 0:s.items)??[]).map(p=>{var S,U,j;let h="";p.documentation&&(typeof p.documentation=="string"?h=p.documentation:p.documentation.value&&(h=p.documentation.value)),!h&&p.detail&&(h=p.detail);let b;if(p.textEdit){const k=p.textEdit.range;b={startLineNumber:k.start.line+1,startColumn:k.start.character+1,endLineNumber:k.end.line+1,endColumn:k.end.character+1}}else{const k=n.getWordUntilPosition(i);b={startLineNumber:i.lineNumber,startColumn:k.startColumn,endLineNumber:i.lineNumber,endColumn:k.endColumn}}const L=((S=p.textEdit)==null?void 0:S.newText)??p.insertText??(typeof p.label=="string"?p.label:((U=p.label)==null?void 0:U.label)??"");let A;p.documentation&&(typeof p.documentation=="string"?A=p.documentation:p.documentation.kind==="markdown"?A={value:p.documentation.value}:A=p.documentation.value);const N={label:typeof p.label=="string"?p.label:((j=p.label)==null?void 0:j.label)??"",kind:I0(p.kind,e),detail:h,documentation:A,insertText:L,range:b,sortText:p.sortText,filterText:p.filterText,preselect:p.preselect};return p.insertTextFormat===2&&(N.insertTextRules=e.languages.CompletionItemInsertTextRule.InsertAsSnippet),N}),l=n.getValue(),d=((y=n0.getState().getEditorForModel(n))==null?void 0:y.toStorageValue(l))??l;let g;try{g=JSON.parse(d)}catch{g=void 0}const u=p=>{const h=n.getPositionAt(p.offset),b=n.getPositionAt(p.offset+p.length);return{startLineNumber:h.lineNumber,startColumn:h.column,endLineNumber:b.lineNumber,endColumn:b.column}};for(const p of w0(l,n.getOffsetAt(i),{references:await Mc(),definitions:L0(d),format:Ce,document:g}))c.push({label:p.label,kind:p.kind==="ref"?e.languages.CompletionItemKind.Value:e.languages.CompletionItemKind.Snippet,detail:p.detail,documentation:p.documentation?{value:p.documentation}:void 0,insertText:p.insertText,filterText:p.filterText,insertTextRules:p.kind==="component"?e.languages.CompletionItemInsertTextRule.InsertAsSnippet:void 0,range:u(p.replace),additionalTextEdits:p.additionalEdits.map(h=>({range:u(h),text:h.content})),sortText:`0 ${p.label}`});return{suggestions:c}}})}async function A0(e,n,i,r){var a;const o=++Rr;try{r&&(jr=r);const s=await zw.fetchDocumentSchema(n,jr,{bypassCache:!0});if(o!==Rr)return!0;const c=JSON.parse(JSON.stringify(s));if(!c||typeof c!="object")throw new Error("Invalid schema received from server");ki(c),i&&(oo=i),e.languages.registerDocumentFormattingEditProvider("json",{provideDocumentFormattingEdits(y){const p=y.getValue(),h=_c(p);try{const b=JSON.parse(h),L=JSON.stringify(b,null,2);return[{range:y.getFullModelRange(),text:L}]}catch{return[{range:y.getFullModelRange(),text:h}]}}}),Ni=c,la(e),console.log("Monaco updated with plugin-aware schemas:",{plugins:n||[],browserPlugins:jr.map(y=>y.name),blocks:Object.keys(oa),reportSchema:{uri:Ii}});const l=e.editor.getModels();let d=!0;if(l.forEach(y=>{if(y.getLanguageId()==="json")try{e.editor.setModelLanguage(y,"json"),console.log("🔄 Re-validating model:",y.uri.toString())}catch(p){console.error("Failed to revalidate model:",y.uri.toString(),p),d=!1}}),!((a=e.languages.json.jsonDefaults.diagnosticsOptions.schemas)==null?void 0:a.some(y=>y.uri===Ii)))throw new Error("Schema was not properly applied to Monaco editor");return console.log("✅ Schema validation successful"),d}catch(s){throw console.error("Failed to update Monaco with plugin schemas:",s),o===Rr&&sa(e),s}}const Z0=Object.freeze(Object.defineProperty({__proto__:null,configureMonaco:aa,configureMonacoInstance:sa,resetMonacoConfig:$0,updateMonacoDocumentBlocks:P0,updateMonacoWithPlugins:A0},Symbol.toStringTag,{value:"Module"}));aa().then(()=>{console.log("Monaco editor configured with JSON schemas for better autocomplete")}).catch(e=>{console.error("Failed to configure Monaco:",e)});const T0=document.getElementById("root"),F0=Vc.createRoot(T0);F0.render(R.jsx(up,{}));export{ke as A,P0 as B,sr as C,L0 as D,kO as E,Ce as F,Z0 as G,En as P,Zw as Q,op as S,t as T,K0 as W,ao as _,X0 as a,G0 as b,ht as c,Jd as d,z0 as e,_0 as f,Xd as g,n0 as h,D0 as i,V0 as j,q0 as k,H0 as l,W0 as m,J0 as n,qw as o,Cc as p,Jt as q,A0 as r,zw as s,Jw as t,np as u,Y0 as v,Yw as w,pn as x,tw as y,ql as z};
27
+ //# sourceMappingURL=index-2S58SOrb.js.map