@json-to-office/jto 3.2.0 → 4.0.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 (30) hide show
  1. package/dist/cli.js +4 -1
  2. package/dist/cli.js.map +1 -1
  3. package/dist/client/assets/{HomePage-tunH4yrJ.js → HomePage-BYwbxHMm.js} +4 -4
  4. package/dist/client/assets/{HomePage-tunH4yrJ.js.map → HomePage-BYwbxHMm.js.map} +1 -1
  5. package/dist/client/assets/{JsonEditorPage-BoWB1SW8.js → JsonEditorPage-D-MrEL0a.js} +3 -3
  6. package/dist/client/assets/{JsonEditorPage-BoWB1SW8.js.map → JsonEditorPage-D-MrEL0a.js.map} +1 -1
  7. package/dist/client/assets/{MonacoPluginProvider-CZLdOK0o.js → MonacoPluginProvider-TvgcvXjE.js} +5 -5
  8. package/dist/client/assets/{MonacoPluginProvider-CZLdOK0o.js.map → MonacoPluginProvider-TvgcvXjE.js.map} +1 -1
  9. package/dist/client/assets/{_virtual_jto-plugin-type-libs-BP6g-o7Z.js → _virtual_jto-plugin-type-libs-C5SUUP6w.js} +106 -8
  10. package/dist/client/assets/{_virtual_jto-plugin-type-libs-BP6g-o7Z.js.map → _virtual_jto-plugin-type-libs-C5SUUP6w.js.map} +1 -1
  11. package/dist/client/assets/_virtual_jto-sandbox-runtime-DQLwb05P.js +2 -0
  12. package/dist/client/assets/_virtual_jto-sandbox-runtime-DQLwb05P.js.map +1 -0
  13. package/dist/client/assets/{editor-C6m04j66.js → editor-CpMileWb.js} +2 -2
  14. package/dist/client/assets/{editor-C6m04j66.js.map → editor-CpMileWb.js.map} +1 -1
  15. package/dist/client/assets/{editor-monaco-json-DsYufbUM.js → editor-monaco-json-CL3Vyeb9.js} +2 -2
  16. package/dist/client/assets/{editor-monaco-json-DsYufbUM.js.map → editor-monaco-json-CL3Vyeb9.js.map} +1 -1
  17. package/dist/client/assets/{index-BDoOeKmB.js → index-B5lbDTGF.js} +2 -2
  18. package/dist/client/assets/{index-BDoOeKmB.js.map → index-B5lbDTGF.js.map} +1 -1
  19. package/dist/client/assets/index-daXsvrCR.js +27 -0
  20. package/dist/client/assets/index-daXsvrCR.js.map +1 -0
  21. package/dist/client/assets/{preview-CutpTQQJ.js → preview-C6F_ULv-.js} +2 -2
  22. package/dist/client/assets/{preview-CutpTQQJ.js.map → preview-C6F_ULv-.js.map} +1 -1
  23. package/dist/client/assets/{useQualityAnalysis-k0GXJxAw.js → useQualityAnalysis-F0fVOTPN.js} +3 -3
  24. package/dist/client/assets/{useQualityAnalysis-k0GXJxAw.js.map → useQualityAnalysis-F0fVOTPN.js.map} +1 -1
  25. package/dist/client/index.html +1 -1
  26. package/package.json +8 -8
  27. package/dist/client/assets/_virtual_jto-sandbox-runtime-U0ykVFSo.js +0 -2
  28. package/dist/client/assets/_virtual_jto-sandbox-runtime-U0ykVFSo.js.map +0 -1
  29. package/dist/client/assets/index-B7DLwiJH.js +0 -27
  30. package/dist/client/assets/index-B7DLwiJH.js.map +0 -1
@@ -1,27 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-tunH4yrJ.js","assets/react-vendor-BmQ2Ko_D.js","assets/MonacoPluginProvider-CZLdOK0o.js","assets/state-vendor-Cq67_JbF.js","assets/monaco-editor-DJsdM0WK.js","assets/radix-ui-BzbaiLpZ.js","assets/ui-vendor-BsAtAN16.js","assets/index-BDoOeKmB.js","assets/query-vendor--rhYD8mC.js","assets/JsonEditorPage-BoWB1SW8.js","assets/NotFoundPage-rSUaByPC.js"])))=>i.map(i=>d[i]);
2
- var Cc=Object.defineProperty;var Dc=(e,n,i)=>n in e?Cc(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var rt=(e,n,i)=>Dc(e,typeof n!="symbol"?n+"":n,i);import{r as he,j,O as zc,u as _c,B as Wc,d as Hc}from"./react-vendor-BmQ2Ko_D.js";import{Q as Kc,a as qc}from"./query-vendor--rhYD8mC.js";import{P as Gc,C as Ka,A as Vc,a as Jc,R as Xc,T as Yc}from"./radix-ui-BzbaiLpZ.js";import{c as Zc}from"./ui-vendor-BsAtAN16.js";import{loader as Qc}from"./monaco-editor-DJsdM0WK.js";import{c as qa}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 ed="modulepreload",td=function(e){return"/"+e},la={},ro=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=td(l),l in la)return;la[l]=!0;const d=l.endsWith(".css"),g=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${g}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":ed,d||(p.as="script"),p.crossOrigin="",p.href=l,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((O,m)=>{p.addEventListener("load",O),p.addEventListener("error",()=>m(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)})},nd={theme:"system",setTheme:()=>null,resolvedTheme:"light"},Ga=he.createContext(nd);function id({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 j.jsx(Ga.Provider,{...r,value:c,children:e})}const N0=()=>{const e=he.useContext(Ga);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},oo="-",rd=e=>{const n=ad(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const c=s.split(oo);return c[0]===""&&c.length!==1&&c.shift(),Va(c,n)||od(s)},getConflictingClassGroupIds:(s,c)=>{const l=i[s]||[];return c&&r[s]?[...l,...r[s]]:l}}},Va=(e,n)=>{var s;if(e.length===0)return n.classGroupId;const i=e[0],r=n.nextPart.get(i),o=r?Va(e.slice(1),r):void 0;if(o)return o;if(n.validators.length===0)return;const a=e.join(oo);return(s=n.validators.find(({validator:c})=>c(a)))==null?void 0:s.classGroupId},ca=/^\[(.+)\]$/,od=e=>{if(ca.test(e)){const n=ca.exec(e)[1],i=n==null?void 0:n.substring(0,n.indexOf(":"));if(i)return"arbitrary.."+i}},ad=e=>{const{theme:n,classGroups:i}=e,r={nextPart:new Map,validators:[]};for(const o in i)jr(i[o],r,o,n);return r},jr=(e,n,i,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?n:da(n,o);a.classGroupId=i;return}if(typeof o=="function"){if(sd(o)){jr(o(r),n,i,r);return}n.validators.push({validator:o,classGroupId:i});return}Object.entries(o).forEach(([a,s])=>{jr(s,da(n,a),i,r)})})},da=(e,n)=>{let i=e;return n.split(oo).forEach(r=>{i.nextPart.has(r)||i.nextPart.set(r,{nextPart:new Map,validators:[]}),i=i.nextPart.get(r)}),i},sd=e=>e.isThemeGetter,ld=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)}}},Rr="!",Ur=":",cd=Ur.length,dd=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===Ur){a.push(o.slice(l,h)),l=h+cd;continue}if(b==="/"){d=h;continue}}b==="["?s++:b==="]"?s--:b==="("?c++:b===")"&&c--}const g=a.length===0?o:o.substring(l),p=pd(g),O=p!==g,m=d&&d>l?d-l:void 0;return{modifiers:a,hasImportantModifier:O,baseClassName:p,maybePostfixModifierPosition:m}};if(n){const o=n+Ur,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},pd=e=>e.endsWith(Rr)?e.substring(0,e.length-1):e.startsWith(Rr)?e.substring(1):e,ud=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}},md=e=>({cache:ld(e.cacheSize),parseClassName:dd(e),sortModifiers:ud(e),...rd(e)}),fd=/\s+/,gd=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=n,s=[],c=e.trim().split(fd);let l="";for(let d=c.length-1;d>=0;d-=1){const g=c[d],{isExternal:p,modifiers:O,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:b}=i(g);if(p){l=g+(l.length>0?" "+l:l);continue}let L=!!b,N=r(L?h.substring(0,b):h);if(!N){if(!L){l=g+(l.length>0?" "+l:l);continue}if(N=r(h),!N){l=g+(l.length>0?" "+l:l);continue}L=!1}const I=a(O).join(":"),w=m?I+Rr:I,D=w+N;if(s.includes(D))continue;s.push(D);const _=o(N,L);for(let T=0;T<_.length;++T){const k=_[T];s.push(w+k)}l=g+(l.length>0?" "+l:l)}return l};function hd(){let e=0,n,i,r="";for(;e<arguments.length;)(n=arguments[e++])&&(i=Ja(n))&&(r&&(r+=" "),r+=i);return r}const Ja=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=Ja(e[r]))&&(i&&(i+=" "),i+=n);return i};function bd(e,...n){let i,r,o,a=s;function s(l){const d=n.reduce((g,p)=>p(g),e());return i=md(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=gd(l,i);return o(l,g),g}return function(){return a(hd.apply(null,arguments))}}const de=e=>{const n=i=>i[e]||[];return n.isThemeGetter=!0,n},Xa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ya=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Od=/^\d+\/\d+$/,yd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xd=/\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$/,Sd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,wd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ld=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>Od.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),Nt=e=>!!e&&Number.isInteger(Number(e)),pa=e=>e.endsWith("%")&&B(e.slice(0,-1)),mt=e=>yd.test(e),Pd=()=>!0,vd=e=>xd.test(e)&&!Sd.test(e),ao=()=>!1,$d=e=>wd.test(e),Id=e=>Ld.test(e),Nd=e=>!v(e)&&!$(e),Ad=e=>pn(e,es,ao),v=e=>Xa.test(e),At=e=>pn(e,ts,vd),gr=e=>pn(e,Dd,B),kd=e=>pn(e,Za,ao),Td=e=>pn(e,Qa,Id),Fd=e=>pn(e,ao,$d),$=e=>Ya.test(e),ii=e=>un(e,ts),jd=e=>un(e,zd),Rd=e=>un(e,Za),Ud=e=>un(e,es),Md=e=>un(e,Qa),Bd=e=>un(e,_d,!0),pn=(e,n,i)=>{const r=Xa.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},un=(e,n,i=!1)=>{const r=Ya.exec(e);return r?r[1]?n(r[1]):i:!1},Za=e=>e==="position",Ed=new Set(["image","url"]),Qa=e=>Ed.has(e),Cd=new Set(["length","size","percentage"]),es=e=>Cd.has(e),ts=e=>e==="length",Dd=e=>e==="number",zd=e=>e==="family-name",_d=e=>e==="shadow",Wd=()=>{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"),p=de("inset-shadow"),O=de("drop-shadow"),m=de("blur"),h=de("perspective"),b=de("aspect"),L=de("ease"),N=de("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],T=()=>[Xt,"px","full","auto",$,v,l],k=()=>[Nt,"none","subgrid",$,v],W=()=>["auto",{span:["full",Nt,$,v]},$,v],A=()=>[Nt,"auto",$,v],R=()=>["auto","min","max","fr",$,v],J=()=>[$,v,l],Q=()=>["start","end","center","between","around","evenly","stretch","baseline"],X=()=>["start","end","center","stretch"],y=()=>[$,v,l],F=()=>["px",...y()],Y=()=>["px","auto",...y()],ce=()=>[Xt,"auto","px","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",$,v,l],z=()=>[e,$,v],Vt=()=>[pa,At],ge=()=>["","none","full",d,$,v],Z=()=>["",B,ii,At],G=()=>["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"],Jt=()=>["","none",m,$,v],sa=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$,v],ei=()=>["none",B,$,v],ti=()=>["none",B,$,v],fr=()=>[B,$,v],ni=()=>[Xt,"full","px",$,v,l];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mt],breakpoint:[mt],color:[Pd],container:[mt],"drop-shadow":[mt],ease:["in","out","in-out"],font:[Nd],"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:[B],text:[mt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xt,v,$,b]}],container:["container"],columns:[{columns:[B,v,$,c]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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:[...w(),v,$]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[Nt,"auto",$,v]}],basis:[{basis:[Xt,"full","auto",$,v,c,l]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[B,Xt,"auto","initial","none",v]}],grow:[{grow:["",B,$,v]}],shrink:[{shrink:["",B,$,v]}],order:[{order:[Nt,"first","last","none",$,v]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:J()}],"gap-x":[{"gap-x":J()}],"gap-y":[{"gap-y":J()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...X(),"baseline"]}],"align-self":[{self:["auto",...X(),"baseline"]}],"place-content":[{"place-content":Q()}],"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":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"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,ii,At]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,$,gr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pa,v]}],"font-family":[{font:[jd,v,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,$,v]}],"line-clamp":[{"line-clamp":[B,"none",$,gr]}],leading:[{leading:[$,v,a,l]}],"list-image":[{"list-image":["none",$,v]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$,v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[B,"from-font","auto",$,At]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[B,"auto",$,v]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:["px",...y()]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$,v]}],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",$,v]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...w(),Rd,kd]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Ud,Ad]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nt,$,v],radial:["",$,v],conic:[Nt,$,v]},Md,Td]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:Vt()}],"gradient-via-pos":[{via:Vt()}],"gradient-to-pos":[{to:Vt()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],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:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[B,$,v]}],"outline-w":[{outline:["",B,ii,At]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",g,Bd,Fd]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",$,v,p]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[B,At]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":z()}],opacity:[{opacity:[B,$,v]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ze()}],filter:[{filter:["","none",$,v]}],blur:[{blur:Jt()}],brightness:[{brightness:[B,$,v]}],contrast:[{contrast:[B,$,v]}],"drop-shadow":[{"drop-shadow":["","none",O,$,v]}],grayscale:[{grayscale:["",B,$,v]}],"hue-rotate":[{"hue-rotate":[B,$,v]}],invert:[{invert:["",B,$,v]}],saturate:[{saturate:[B,$,v]}],sepia:[{sepia:["",B,$,v]}],"backdrop-filter":[{"backdrop-filter":["","none",$,v]}],"backdrop-blur":[{"backdrop-blur":Jt()}],"backdrop-brightness":[{"backdrop-brightness":[B,$,v]}],"backdrop-contrast":[{"backdrop-contrast":[B,$,v]}],"backdrop-grayscale":[{"backdrop-grayscale":["",B,$,v]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,$,v]}],"backdrop-invert":[{"backdrop-invert":["",B,$,v]}],"backdrop-opacity":[{"backdrop-opacity":[B,$,v]}],"backdrop-saturate":[{"backdrop-saturate":[B,$,v]}],"backdrop-sepia":[{"backdrop-sepia":["",B,$,v]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",$,v]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[B,"initial",$,v]}],ease:[{ease:["linear","initial",L,$,v]}],delay:[{delay:[B,$,v]}],animate:[{animate:["none",N,$,v]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,$,v]}],"perspective-origin":[{"perspective-origin":sa()}],rotate:[{rotate:ei()}],"rotate-x":[{"rotate-x":ei()}],"rotate-y":[{"rotate-y":ei()}],"rotate-z":[{"rotate-z":ei()}],scale:[{scale:ti()}],"scale-x":[{"scale-x":ti()}],"scale-y":[{"scale-y":ti()}],"scale-z":[{"scale-z":ti()}],"scale-3d":["scale-3d"],skew:[{skew:fr()}],"skew-x":[{"skew-x":fr()}],"skew-y":[{"skew-y":fr()}],transform:[{transform:[$,v,"","none","gpu","cpu"]}],"transform-origin":[{origin:sa()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ni()}],"translate-x":[{"translate-x":ni()}],"translate-y":[{"translate-y":ni()}],"translate-z":[{"translate-z":ni()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$,v]}],"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":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"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",$,v]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[B,ii,At,gr]}],stroke:[{stroke:["none",...z()]}],"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","*","**"]}},Hd=bd(Wd);function bt(...e){return Hd(Zc(e))}const Kd=Jc,A0=Xc,k0=Yc,qd=he.forwardRef(({className:e,sideOffset:n=4,children:i,...r},o)=>j.jsx(Gc,{children:j.jsxs(Ka,{ref:o,"data-slot":"tooltip-content",sideOffset:n,className:bt("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,j.jsx(Vc,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-popover fill-popover"})]})}));qd.displayName=Ka.displayName;const ns=he.forwardRef(({className:e,variant:n="default",title:i,description:r,action:o,open:a,onOpenChange:s,...c},l)=>j.jsx("div",{ref:l,className:bt("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}));ns.displayName="Toast";const Gd=he.forwardRef(({className:e,...n},i)=>j.jsx("button",{ref:i,className:bt("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}));Gd.displayName="ToastAction";const is=he.forwardRef(({className:e,...n},i)=>j.jsx("button",{ref:i,type:"button",className:bt("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:j.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:[j.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}));is.displayName="ToastClose";const rs=he.forwardRef(({className:e,...n},i)=>j.jsx("div",{ref:i,className:bt("text-sm font-semibold",e),...n}));rs.displayName="ToastTitle";const os=he.forwardRef(({className:e,...n},i)=>j.jsx("div",{ref:i,className:bt("text-sm opacity-90",e),...n}));os.displayName="ToastDescription";const as=he.forwardRef(({className:e,...n},i)=>j.jsx("ol",{ref:i,className:bt("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}));as.displayName="ToastViewport";const Vd=1,ss=5e3;let hr=0;function Jd(){return hr=(hr+1)%Number.MAX_SAFE_INTEGER,hr.toString()}const br=new Map,ua=e=>{if(br.has(e))return;const n=setTimeout(()=>{br.delete(e),Nn({type:"REMOVE_TOAST",toastId:e})},ss);br.set(e,n)},Xd=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,Vd)};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?ua(i):e.toasts.forEach(r=>{ua(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)}}},mi=[];let fi={toasts:[]};function Nn(e){fi=Xd(fi,e),mi.forEach(n=>{n(fi)})}function Yd({...e}){const n=Jd(),i=o=>Nn({type:"UPDATE_TOAST",toast:{...o,id:n}}),r=()=>Nn({type:"DISMISS_TOAST",toastId:n});return Nn({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:o=>{o||r()}}}),setTimeout(()=>{r()},ss),{id:n,dismiss:r,update:i}}function Zd(){const[e,n]=he.useState(fi);return he.useEffect(()=>(mi.push(n),()=>{const i=mi.indexOf(n);i>-1&&mi.splice(i,1)}),[e]),{...e,toast:Yd,dismiss:i=>Nn({type:"DISMISS_TOAST",toastId:i})}}function Qd(){const{toasts:e,dismiss:n}=Zd();return j.jsx(as,{children:e.map(function({id:i,title:r,description:o,action:a,open:s,...c}){return s===!1?null:j.jsxs(ns,{...c,children:[j.jsxs("div",{className:"grid gap-1",children:[r&&j.jsx(rs,{children:r}),o&&j.jsx(os,{children:o})]}),a,j.jsx(is,{onClick:l=>{l.preventDefault(),l.stopPropagation(),n(i)}})]},i)})})}function ep(){return j.jsx(id,{defaultTheme:"system",storageKey:"vite-ui-theme",children:j.jsxs(Kd,{delayDuration:300,children:[j.jsx("div",{className:"min-h-screen bg-background font-sans antialiased",children:j.jsx(zc,{})}),j.jsx(Qd,{})]})})}function tp({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 j.jsx("div",{className:bt("animate-spin rounded-full border-2 border-solid",o[n],a[i],e),style:{borderRightColor:"transparent"},...r})}const np=he.lazy(()=>ro(()=>import("./HomePage-tunH4yrJ.js").then(e=>e.H),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.HomePage}))),ip=he.lazy(()=>ro(()=>import("./JsonEditorPage-BoWB1SW8.js"),__vite__mapDeps([9,1,2,3,4,8,5,6])).then(e=>({default:e.JsonEditorPage}))),rp=he.lazy(()=>ro(()=>import("./NotFoundPage-rSUaByPC.js"),__vite__mapDeps([10,1])).then(e=>({default:e.NotFoundPage}))),Or=({children:e})=>j.jsx(he.Suspense,{fallback:j.jsx("div",{className:"flex items-center justify-center h-screen",children:j.jsx(tp,{className:"w-8 h-8"})}),children:e}),op=[{path:"/",element:j.jsx(ep,{}),children:[{index:!0,element:j.jsx(Or,{children:j.jsx(np,{})})},{path:"json-editor",element:j.jsx(Or,{children:j.jsx(ip,{})})}]},{path:"*",element:j.jsx(Or,{children:j.jsx(rp,{})})}];function ap(){return _c(op)}const sp=new Kc({defaultOptions:{queries:{staleTime:1e3*60*5,retry:1}}});function lp(){return j.jsx(qc,{client:sp,children:j.jsx(Wc,{children:j.jsx(ap,{})})})}function cp(e){return oe(e)&&!Ne(e)&&!Dn(e)&&Symbol.asyncIterator in e}function Ne(e){return Array.isArray(e)}function ls(e){return typeof e=="bigint"}function Cn(e){return typeof e=="boolean"}function so(e){return e instanceof globalThis.Date}function dp(e){return typeof e=="function"}function pp(e){return oe(e)&&!Ne(e)&&!Dn(e)&&Symbol.iterator in e}function up(e){return e===null}function tt(e){return typeof e=="number"}function oe(e){return typeof e=="object"&&e!==null}function cs(e){return e instanceof globalThis.RegExp}function ne(e){return typeof e=="string"}function mp(e){return typeof e=="symbol"}function Dn(e){return e instanceof globalThis.Uint8Array}function ie(e){return e===void 0}function fp(e){return e.map(n=>Oi(n))}function gp(e){return new Date(e.getTime())}function hp(e){return new Uint8Array(e)}function bp(e){return new RegExp(e.source,e.flags)}function Op(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=Oi(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=Oi(e[i]);return n}function Oi(e){return Ne(e)?fp(e):so(e)?gp(e):Dn(e)?hp(e):cs(e)?bp(e):oe(e)?Op(e):e}function ke(e){return Oi(e)}function lo(e,n){return ke(n===void 0?e:{...n,...e})}function ds(e){return nt(e)&&globalThis.Symbol.asyncIterator in e}function ps(e){return nt(e)&&globalThis.Symbol.iterator in e}function us(e){return e instanceof globalThis.Promise}function zn(e){return e instanceof Date&&globalThis.Number.isFinite(e.getTime())}function yp(e){return e instanceof globalThis.Map}function xp(e){return e instanceof globalThis.Set}function Sp(e){return globalThis.ArrayBuffer.isView(e)}function co(e){return e instanceof globalThis.Uint8Array}function wp(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 Ot(e){return e===void 0}function Ni(e){return e===null}function Ai(e){return typeof e=="boolean"}function at(e){return typeof e=="number"}function ms(e){return globalThis.Number.isInteger(e)}function ki(e){return typeof e=="bigint"}function et(e){return typeof e=="string"}function po(e){return typeof e=="function"}function Ti(e){return typeof e=="symbol"}function Lp(e){return ki(e)||Ai(e)||Ni(e)||at(e)||et(e)||Ti(e)||Ot(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=Ot(s);return e.AllowNullVoid?c||s===null:c}e.IsVoidLike=a})(Te||(Te={}));function Pp(e){return globalThis.Object.freeze(e).map(n=>yi(n))}function vp(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=yi(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=yi(e[i]);return globalThis.Object.freeze(n)}function yi(e){return Ne(e)?Pp(e):so(e)?e:Dn(e)?e:cs(e)?e:oe(e)?vp(e):e}function x(e,n){const i=n!==void 0?{...n,...e}:e;switch(Te.InstanceMode){case"freeze":return yi(i);case"clone":return ke(i);default:return i}}class Xe extends Error{constructor(n){super(n)}}const Ee=Symbol.for("TypeBox.Transform"),_n=Symbol.for("TypeBox.Readonly"),dt=Symbol.for("TypeBox.Optional"),Fi=Symbol.for("TypeBox.Hint"),P=Symbol.for("TypeBox.Kind");function uo(e){return oe(e)&&e[_n]==="Readonly"}function yt(e){return oe(e)&&e[dt]==="Optional"}function fs(e){return E(e,"Any")}function gs(e){return E(e,"Argument")}function mn(e){return E(e,"Array")}function ji(e){return E(e,"AsyncIterator")}function Ri(e){return E(e,"BigInt")}function Wn(e){return E(e,"Boolean")}function fn(e){return E(e,"Computed")}function gn(e){return E(e,"Constructor")}function $p(e){return E(e,"Date")}function hn(e){return E(e,"Function")}function bn(e){return E(e,"Integer")}function ze(e){return E(e,"Intersect")}function Ui(e){return E(e,"Iterator")}function E(e,n){return oe(e)&&P in e&&e[P]===n}function hs(e){return Cn(e)||tt(e)||ne(e)}function Bt(e){return E(e,"Literal")}function Et(e){return E(e,"MappedKey")}function Ue(e){return E(e,"MappedResult")}function Hn(e){return E(e,"Never")}function Ip(e){return E(e,"Not")}function mo(e){return E(e,"Null")}function On(e){return E(e,"Number")}function Ye(e){return E(e,"Object")}function Mi(e){return E(e,"Promise")}function Bi(e){return E(e,"Record")}function $e(e){return E(e,"Ref")}function bs(e){return E(e,"RegExp")}function Kn(e){return E(e,"String")}function fo(e){return E(e,"Symbol")}function Ct(e){return E(e,"TemplateLiteral")}function Np(e){return E(e,"This")}function Ei(e){return oe(e)&&Ee in e}function Dt(e){return E(e,"Tuple")}function go(e){return E(e,"Undefined")}function fe(e){return E(e,"Union")}function Ap(e){return E(e,"Uint8Array")}function kp(e){return E(e,"Unknown")}function Tp(e){return E(e,"Unsafe")}function Fp(e){return E(e,"Void")}function Os(e){return oe(e)&&P in e&&ne(e[P])}function lt(e){return fs(e)||gs(e)||mn(e)||Wn(e)||Ri(e)||ji(e)||fn(e)||gn(e)||$p(e)||hn(e)||bn(e)||ze(e)||Ui(e)||Bt(e)||Et(e)||Ue(e)||Hn(e)||Ip(e)||mo(e)||On(e)||Ye(e)||Mi(e)||Bi(e)||$e(e)||bs(e)||Kn(e)||fo(e)||Ct(e)||Np(e)||Dt(e)||go(e)||fe(e)||Ap(e)||kp(e)||Tp(e)||Fp(e)||Os(e)}const jp=["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 ys(e){try{return new RegExp(e),!0}catch{return!1}}function ho(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 xs(e){return bo(e)||Oe(e)}function Ln(e){return ie(e)||ls(e)}function V(e){return ie(e)||tt(e)}function bo(e){return ie(e)||Cn(e)}function q(e){return ie(e)||ne(e)}function Rp(e){return ie(e)||ne(e)&&ho(e)&&ys(e)}function Up(e){return ie(e)||ne(e)&&ho(e)}function Ss(e){return ie(e)||Oe(e)}function xi(e){return oe(e)&&e[dt]==="Optional"}function qe(e){return C(e,"Any")&&q(e.$id)}function Mp(e){return C(e,"Argument")&&tt(e.index)}function zt(e){return C(e,"Array")&&e.type==="array"&&q(e.$id)&&Oe(e.items)&&V(e.minItems)&&V(e.maxItems)&&bo(e.uniqueItems)&&Ss(e.contains)&&V(e.minContains)&&V(e.maxContains)}function Oo(e){return C(e,"AsyncIterator")&&e.type==="AsyncIterator"&&q(e.$id)&&Oe(e.items)}function Ci(e){return C(e,"BigInt")&&e.type==="bigint"&&q(e.$id)&&Ln(e.exclusiveMaximum)&&Ln(e.exclusiveMinimum)&&Ln(e.maximum)&&Ln(e.minimum)&&Ln(e.multipleOf)}function _t(e){return C(e,"Boolean")&&e.type==="boolean"&&q(e.$id)}function Bp(e){return C(e,"Computed")&&ne(e.target)&&Ne(e.parameters)&&e.parameters.every(n=>Oe(n))}function Di(e){return C(e,"Constructor")&&e.type==="Constructor"&&q(e.$id)&&Ne(e.parameters)&&e.parameters.every(n=>Oe(n))&&Oe(e.returns)}function zi(e){return C(e,"Date")&&e.type==="Date"&&q(e.$id)&&V(e.exclusiveMaximumTimestamp)&&V(e.exclusiveMinimumTimestamp)&&V(e.maximumTimestamp)&&V(e.minimumTimestamp)&&V(e.multipleOfTimestamp)}function _i(e){return C(e,"Function")&&e.type==="Function"&&q(e.$id)&&Ne(e.parameters)&&e.parameters.every(n=>Oe(n))&&Oe(e.returns)}function pt(e){return C(e,"Integer")&&e.type==="integer"&&q(e.$id)&&V(e.exclusiveMaximum)&&V(e.exclusiveMinimum)&&V(e.maximum)&&V(e.minimum)&&V(e.multipleOf)}function ws(e){return oe(e)&&Object.entries(e).every(([n,i])=>ho(n)&&Oe(i))}function Wt(e){return C(e,"Intersect")&&!(ne(e.type)&&e.type!=="object")&&Ne(e.allOf)&&e.allOf.every(n=>Oe(n)&&!Wp(n))&&q(e.type)&&(bo(e.unevaluatedProperties)||Ss(e.unevaluatedProperties))&&q(e.$id)}function yo(e){return C(e,"Iterator")&&e.type==="Iterator"&&q(e.$id)&&Oe(e.items)}function C(e,n){return oe(e)&&P in e&&e[P]===n}function Ls(e){return xt(e)&&ne(e.const)}function Ps(e){return xt(e)&&tt(e.const)}function vs(e){return xt(e)&&Cn(e.const)}function xt(e){return C(e,"Literal")&&q(e.$id)&&Ep(e.const)}function Ep(e){return Cn(e)||tt(e)||ne(e)}function Cp(e){return C(e,"MappedKey")&&Ne(e.keys)&&e.keys.every(n=>tt(n)||ne(n))}function Dp(e){return C(e,"MappedResult")&&ws(e.properties)}function St(e){return C(e,"Never")&&oe(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function on(e){return C(e,"Not")&&Oe(e.not)}function xo(e){return C(e,"Null")&&e.type==="null"&&q(e.$id)}function ve(e){return C(e,"Number")&&e.type==="number"&&q(e.$id)&&V(e.exclusiveMaximum)&&V(e.exclusiveMinimum)&&V(e.maximum)&&V(e.minimum)&&V(e.multipleOf)}function ee(e){return C(e,"Object")&&e.type==="object"&&q(e.$id)&&ws(e.properties)&&xs(e.additionalProperties)&&V(e.minProperties)&&V(e.maxProperties)}function So(e){return C(e,"Promise")&&e.type==="Promise"&&q(e.$id)&&Oe(e.item)}function be(e){return C(e,"Record")&&e.type==="object"&&q(e.$id)&&xs(e.additionalProperties)&&oe(e.patternProperties)&&(n=>{const i=Object.getOwnPropertyNames(n.patternProperties);return i.length===1&&ys(i[0])&&oe(n.patternProperties)&&Oe(n.patternProperties[i[0]])})(e)}function zp(e){return C(e,"Ref")&&q(e.$id)&&ne(e.$ref)}function kn(e){return C(e,"RegExp")&&q(e.$id)&&ne(e.source)&&ne(e.flags)&&V(e.maxLength)&&V(e.minLength)}function Ge(e){return C(e,"String")&&e.type==="string"&&q(e.$id)&&V(e.minLength)&&V(e.maxLength)&&Rp(e.pattern)&&Up(e.format)}function Tn(e){return C(e,"Symbol")&&e.type==="symbol"&&q(e.$id)}function Fn(e){return C(e,"TemplateLiteral")&&e.type==="string"&&ne(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function _p(e){return C(e,"This")&&q(e.$id)&&ne(e.$ref)}function Wp(e){return oe(e)&&Ee in e}function Wi(e){return C(e,"Tuple")&&e.type==="array"&&q(e.$id)&&tt(e.minItems)&&tt(e.maxItems)&&e.minItems===e.maxItems&&(ie(e.items)&&ie(e.additionalItems)&&e.minItems===0||Ne(e.items)&&e.items.every(n=>Oe(n)))}function Rt(e){return C(e,"Undefined")&&e.type==="undefined"&&q(e.$id)}function ct(e){return C(e,"Union")&&q(e.$id)&&oe(e)&&Ne(e.anyOf)&&e.anyOf.every(n=>Oe(n))}function qn(e){return C(e,"Uint8Array")&&e.type==="Uint8Array"&&q(e.$id)&&V(e.minByteLength)&&V(e.maxByteLength)}function Ve(e){return C(e,"Unknown")&&q(e.$id)}function Hp(e){return C(e,"Unsafe")}function Hi(e){return C(e,"Void")&&e.type==="void"&&q(e.$id)}function Kp(e){return oe(e)&&P in e&&ne(e[P])&&!jp.includes(e[P])}function Oe(e){return oe(e)&&(qe(e)||Mp(e)||zt(e)||_t(e)||Ci(e)||Oo(e)||Bp(e)||Di(e)||zi(e)||_i(e)||pt(e)||Wt(e)||yo(e)||xt(e)||Cp(e)||Dp(e)||St(e)||on(e)||xo(e)||ve(e)||ee(e)||So(e)||be(e)||zp(e)||kn(e)||Ge(e)||Tn(e)||Fn(e)||_p(e)||Wi(e)||Rt(e)||ct(e)||qn(e)||Ve(e)||Hp(e)||Hi(e)||Kp(e))}const qp="(true|false)",gi="(0|[1-9][0-9]*)",$s="(.*)",Gp="(?!.*)",an=`^${gi}$`,sn=`^${$s}$`,Vp=`^${Gp}$`,wo=new Map;function Is(e){return wo.has(e)}function Ns(e,n){wo.set(e,n)}function As(e){return wo.get(e)}const ks=new Map;function Lo(e){return ks.has(e)}function Ts(e){return ks.get(e)}function Jp(e,n){return e.includes(n)}function Xp(e){return[...new Set(e)]}function Yp(e,n){return e.filter(i=>n.includes(i))}function Zp(e,n){return e.reduce((i,r)=>Yp(i,r),n)}function Qp(e){return e.length===1?e[0]:e.length>1?Zp(e.slice(1),e[0]):[]}function eu(e){const n=[];for(const i of e)n.push(...i);return n}function jn(e){return x({[P]:"Any"},e)}function Po(e,n){return x({[P]:"Array",type:"array",items:e},n)}function tu(e){return x({[P]:"Argument",index:e})}function vo(e,n){return x({[P]:"AsyncIterator",type:"AsyncIterator",items:e},n)}function le(e,n,i){return x({[P]:"Computed",target:e,parameters:n},i)}function nu(e,n){const{[n]:i,...r}=e;return r}function Fe(e,n){return n.reduce((i,r)=>nu(i,r),e)}function te(e){return x({[P]:"Never",not:{}},e)}function ye(e){return x({[P]:"MappedResult",properties:e})}function $o(e,n,i){return x({[P]:"Constructor",type:"Constructor",parameters:e,returns:n},i)}function Gn(e,n,i){return x({[P]:"Function",type:"Function",parameters:e,returns:n},i)}function Mr(e,n){return x({[P]:"Union",anyOf:e},n)}function iu(e){return e.some(n=>yt(n))}function ma(e){return e.map(n=>yt(n)?ru(n):n)}function ru(e){return Fe(e,[dt])}function ou(e,n){return iu(e)?Pt(Mr(ma(e),n)):Mr(ma(e),n)}function yn(e,n){return e.length===1?x(e[0],n):e.length===0?te(n):ou(e,n)}function xe(e,n){return e.length===0?te(n):e.length===1?x(e[0],n):Mr(e,n)}class fa extends Xe{}function au(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function Io(e,n,i){return e[n]===i&&e.charCodeAt(n-1)!==92}function st(e,n){return Io(e,n,"(")}function Rn(e,n){return Io(e,n,")")}function Fs(e,n){return Io(e,n,"|")}function su(e){if(!(st(e,0)&&Rn(e,e.length-1)))return!1;let n=0;for(let i=0;i<e.length;i++)if(st(e,i)&&(n+=1),Rn(e,i)&&(n-=1),n===0&&i!==e.length-1)return!1;return!0}function lu(e){return e.slice(1,e.length-1)}function cu(e){let n=0;for(let i=0;i<e.length;i++)if(st(e,i)&&(n+=1),Rn(e,i)&&(n-=1),Fs(e,i)&&n===0)return!0;return!1}function du(e){for(let n=0;n<e.length;n++)if(st(e,n))return!0;return!1}function pu(e){let[n,i]=[0,0];const r=[];for(let a=0;a<e.length;a++)if(st(e,a)&&(n+=1),Rn(e,a)&&(n-=1),Fs(e,a)&&n===0){const s=e.slice(i,a);s.length>0&&r.push(ln(s)),i=a+1}const o=e.slice(i);return o.length>0&&r.push(ln(o)),r.length===0?{type:"const",const:""}:r.length===1?r[0]:{type:"or",expr:r}}function uu(e){function n(o,a){if(!st(o,a))throw new fa("TemplateLiteralParser: Index must point to open parens");let s=0;for(let c=a;c<o.length;c++)if(st(o,c)&&(s+=1),Rn(o,c)&&(s-=1),s===0)return[a,c];throw new fa("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(ln(c)),o=s}else{const[a,s]=i(e,o),c=e.slice(a,s);c.length>0&&r.push(ln(c)),o=s-1}return r.length===0?{type:"const",const:""}:r.length===1?r[0]:{type:"and",expr:r}}function ln(e){return su(e)?ln(lu(e)):cu(e)?pu(e):du(e)?uu(e):{type:"const",const:au(e)}}function No(e){return ln(e.slice(1,e.length-1))}class mu extends Xe{}function fu(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 gu(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 hu(e){return e.type==="const"&&e.const===".*"}function Un(e){return fu(e)||hu(e)?!1:gu(e)?!0:e.type==="and"?e.expr.every(n=>Un(n)):e.type==="or"?e.expr.every(n=>Un(n)):e.type==="const"?!0:(()=>{throw new mu("Unknown expression type")})()}function bu(e){const n=No(e.pattern);return Un(n)}class Ou extends Xe{}function*js(e){if(e.length===1)return yield*e[0];for(const n of e[0])for(const i of js(e.slice(1)))yield`${n}${i}`}function*yu(e){return yield*js(e.expr.map(n=>[...Ki(n)]))}function*xu(e){for(const n of e.expr)yield*Ki(n)}function*Su(e){return yield e.const}function*Ki(e){return e.type==="and"?yield*yu(e):e.type==="or"?yield*xu(e):e.type==="const"?yield*Su(e):(()=>{throw new Ou("Unknown expression")})()}function Rs(e){const n=No(e.pattern);return Un(n)?[...Ki(n)]:[]}function re(e,n){return x({[P]:"Literal",const:e,type:typeof e},n)}function Us(e){return x({[P]:"Boolean",type:"boolean"},e)}function Ao(e){return x({[P]:"BigInt",type:"bigint"},e)}function Ht(e){return x({[P]:"Number",type:"number"},e)}function Ut(e){return x({[P]:"String",type:"string"},e)}function*wu(e){const n=e.trim().replace(/"|'/g,"");return n==="boolean"?yield Us():n==="number"?yield Ht():n==="bigint"?yield Ao():n==="string"?yield Ut():yield(()=>{const i=n.split("|").map(r=>re(r.trim()));return i.length===0?te():i.length===1?i[0]:yn(i)})()}function*Lu(e){if(e[1]!=="{"){const n=re("$"),i=Br(e.slice(1));return yield*[n,...i]}for(let n=2;n<e.length;n++)if(e[n]==="}"){const i=wu(e.slice(2,n)),r=Br(e.slice(n+1));return yield*[...i,...r]}yield re(e)}function*Br(e){for(let n=0;n<e.length;n++)if(e[n]==="$"){const i=re(e.slice(0,n)),r=Lu(e.slice(n));return yield*[i,...r]}yield re(e)}function Pu(e){return[...Br(e)]}class vu extends Xe{}function $u(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ms(e,n){return Ct(e)?e.pattern.slice(1,e.pattern.length-1):fe(e)?`(${e.anyOf.map(i=>Ms(i,n)).join("|")})`:On(e)?`${n}${gi}`:bn(e)?`${n}${gi}`:Ri(e)?`${n}${gi}`:Kn(e)?`${n}${$s}`:Bt(e)?`${n}${$u(e.const.toString())}`:Wn(e)?`${n}${qp}`:(()=>{throw new vu(`Unexpected Kind '${e[P]}'`)})()}function ga(e){return`^${e.map(n=>Ms(n,"")).join("")}$`}function Si(e){const i=Rs(e).map(r=>re(r));return yn(i)}function Bs(e,n){const i=ne(e)?ga(Pu(e)):ga(e);return x({[P]:"TemplateLiteral",type:"string",pattern:i},n)}function Iu(e){return Rs(e).map(i=>i.toString())}function Nu(e){const n=[];for(const i of e)n.push(...wt(i));return n}function Au(e){return[e.toString()]}function wt(e){return[...new Set(Ct(e)?Iu(e):fe(e)?Nu(e.anyOf):Bt(e)?Au(e.const):On(e)?["[number]"]:bn(e)?["[number]"]:[])]}function ku(e,n,i){const r={};for(const o of Object.getOwnPropertyNames(n))r[o]=qi(e,wt(n[o]),i);return r}function Tu(e,n,i){return ku(e,n.properties,i)}function Fu(e,n,i){const r=Tu(e,n,i);return ye(r)}function Es(e,n){return e.map(i=>Cs(i,n))}function ju(e){return e.filter(n=>!Hn(n))}function Ru(e,n){return Ws(ju(Es(e,n)))}function Uu(e){return e.some(n=>Hn(n))?[]:e}function Mu(e,n){return yn(Uu(Es(e,n)))}function Bu(e,n){return n in e?e[n]:n==="[number]"?yn(e):te()}function Eu(e,n){return n==="[number]"?e:te()}function Cu(e,n){return n in e?e[n]:te()}function Cs(e,n){return ze(e)?Ru(e.allOf,n):fe(e)?Mu(e.anyOf,n):Dt(e)?Bu(e.items??[],n):mn(e)?Eu(e.items,n):Ye(e)?Cu(e.properties,n):te()}function Ds(e,n){return n.map(i=>Cs(e,i))}function ha(e,n){return yn(Ds(e,n))}function qi(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)?Fu(e,n,i):Et(n)?Wu(e,n,i):x(lt(n)?ha(e,wt(n)):ha(e,n),i)}function Du(e,n,i){return{[n]:qi(e,[n],ke(i))}}function zu(e,n,i){return n.reduce((r,o)=>({...r,...Du(e,o,i)}),{})}function _u(e,n,i){return zu(e,n.keys,i)}function Wu(e,n,i){const r=_u(e,n,i);return ye(r)}function ko(e,n){return x({[P]:"Iterator",type:"Iterator",items:e},n)}function Hu(e){const n=[];for(let i in e)yt(e[i])||n.push(i);return n}function Ku(e,n){const i=Hu(e),r=i.length>0?{[P]:"Object",type:"object",properties:e,required:i}:{[P]:"Object",type:"object",properties:e};return x(r,n)}var me=Ku;function zs(e,n){return x({[P]:"Promise",type:"Promise",item:e},n)}function qu(e){return x(Fe(e,[_n]))}function Gu(e){return x({...e,[_n]:"Readonly"})}function Vu(e,n){return n===!1?qu(e):Gu(e)}function Lt(e,n){const i=n??!0;return Ue(e)?Yu(e,i):Vu(e,i)}function Ju(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Lt(e[r],n);return i}function Xu(e,n){return Ju(e.properties,n)}function Yu(e,n){const i=Xu(e,n);return ye(i)}function xn(e,n){return x(e.length>0?{[P]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[P]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},n)}function _s(e,n){return e in n?Me(e,n[e]):ye(n)}function Zu(e){return{[e]:re(e)}}function Qu(e){const n={};for(const i of e)n[i]=re(i);return n}function em(e,n){return Jp(n,e)?Zu(e):Qu(n)}function tm(e,n){const i=em(e,n);return _s(e,i)}function Pn(e,n){return n.map(i=>Me(e,i))}function nm(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)?Pt(Me(e,Fe(n,[dt]))):uo(n)?Lt(Me(e,Fe(n,[_n]))):Ue(n)?_s(e,n.properties):Et(n)?tm(e,n.keys):gn(n)?$o(Pn(e,n.parameters),Me(e,n.returns),i):hn(n)?Gn(Pn(e,n.parameters),Me(e,n.returns),i):ji(n)?vo(Me(e,n.items),i):Ui(n)?ko(Me(e,n.items),i):ze(n)?vt(Pn(e,n.allOf),i):fe(n)?xe(Pn(e,n.anyOf),i):Dt(n)?xn(Pn(e,n.items??[]),i):Ye(n)?me(nm(e,n.properties),i):mn(n)?Po(Me(e,n.items),i):Mi(n)?zs(Me(e,n.item),i):n}function im(e,n){const i={};for(const r of e)i[r]=Me(r,n);return i}function rm(e,n,i){const r=lt(e)?wt(e):e,o=n({[P]:"MappedKey",keys:r}),a=im(r,o);return me(a,i)}function om(e){return x(Fe(e,[dt]))}function am(e){return x({...e,[dt]:"Optional"})}function sm(e,n){return n===!1?om(e):am(e)}function Pt(e,n){const i=n??!0;return Ue(e)?dm(e,i):sm(e,i)}function lm(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Pt(e[r],n);return i}function cm(e,n){return lm(e.properties,n)}function dm(e,n){const i=cm(e,n);return ye(i)}function Er(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,[P]:"Intersect",type:"object",allOf:e}:{...r,[P]:"Intersect",allOf:e},n)}function pm(e){return e.every(n=>yt(n))}function um(e){return Fe(e,[dt])}function ba(e){return e.map(n=>yt(n)?um(n):n)}function mm(e,n){return pm(e)?Pt(Er(ba(e),n)):Er(ba(e),n)}function Ws(e,n={}){if(e.length===1)return x(e[0],n);if(e.length===0)return te(n);if(e.some(i=>Ei(i)))throw new Error("Cannot intersect transform types");return mm(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=>Ei(i)))throw new Error("Cannot intersect transform types");return Er(e,n)}function Vn(...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({[P]:"Ref",$ref:n},i)}function fm(e,n){return le("Awaited",[le(e,n)])}function gm(e){return le("Awaited",[Vn(e)])}function hm(e){return vt(Hs(e))}function bm(e){return xe(Hs(e))}function Om(e){return Gi(e)}function Hs(e){return e.map(n=>Gi(n))}function Gi(e,n){return x(fn(e)?fm(e.target,e.parameters):ze(e)?hm(e.allOf):fe(e)?bm(e.anyOf):Mi(e)?Om(e.item):$e(e)?gm(e.$ref):e,n)}function Ks(e){const n=[];for(const i of e)n.push(Vi(i));return n}function ym(e){const n=Ks(e);return eu(n)}function xm(e){const n=Ks(e);return Qp(n)}function Sm(e){return e.map((n,i)=>i.toString())}function wm(e){return["[number]"]}function Lm(e){return globalThis.Object.getOwnPropertyNames(e)}function Pm(e){return Cr?globalThis.Object.getOwnPropertyNames(e).map(i=>i[0]==="^"&&i[i.length-1]==="$"?i.slice(1,i.length-1):i):[]}function Vi(e){return ze(e)?ym(e.allOf):fe(e)?xm(e.anyOf):Dt(e)?Sm(e.items??[]):mn(e)?wm(e.items):Ye(e)?Lm(e.properties):Bi(e)?Pm(e.patternProperties):[]}let Cr=!1;function wi(e){Cr=!0;const n=Vi(e);return Cr=!1,`^(${n.map(r=>`(${r})`).join("|")})$`}function vm(e,n){return le("KeyOf",[le(e,n)])}function $m(e){return le("KeyOf",[Vn(e)])}function Im(e,n){const i=Vi(e),r=Nm(i),o=yn(r);return x(o,n)}function Nm(e){return e.map(n=>n==="[number]"?Ht():re(n))}function To(e,n){return fn(e)?vm(e.target,e.parameters):$e(e)?$m(e.$ref):Ue(e)?Tm(e,n):Im(e,n)}function Am(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=To(e[r],ke(n));return i}function km(e,n){return Am(e.properties,n)}function Tm(e,n){const i=km(e,n);return ye(i)}function Fm(e){const n=[];for(const i of e)n.push(...Vi(i));return Xp(n)}function jm(e){return e.filter(n=>!Hn(n))}function Rm(e,n){const i=[];for(const r of e)i.push(...Ds(r,[n]));return jm(i)}function Um(e,n){const i={};for(const r of n)i[r]=Ws(Rm(e,r));return i}function Mm(e,n){const i=Fm(e),r=Um(e,i);return me(r,n)}function qs(e){return x({[P]:"Date",type:"Date"},e)}function Gs(e){return x({[P]:"Null",type:"null"},e)}function Vs(e){return x({[P]:"Symbol",type:"symbol"},e)}function Js(e){return x({[P]:"Undefined",type:"undefined"},e)}function Xs(e){return x({[P]:"Uint8Array",type:"Uint8Array"},e)}function Ji(e){return x({[P]:"Unknown"},e)}function Bm(e){return e.map(n=>Fo(n,!1))}function Em(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=Lt(Fo(e[i],!1));return n}function ri(e,n){return n===!0?e:Lt(e)}function Fo(e,n){return cp(e)||pp(e)?ri(jn(),n):Ne(e)?Lt(xn(Bm(e))):Dn(e)?Xs():so(e)?qs():oe(e)?ri(me(Em(e)),n):dp(e)?ri(Gn([],Ji()),n):ie(e)?Js():up(e)?Gs():mp(e)?Vs():ls(e)?Ao():tt(e)||Cn(e)||ne(e)?re(e):me({})}function Cm(e,n){return x(Fo(e,!0),n)}function Dm(e,n){return gn(e)?xn(e.parameters,n):te(n)}function zm(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,[Fi]:"Enum"})}class _m 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 Sn(e){throw new _m(e)}function ae(e){return St(e)||Wt(e)||ct(e)||Ve(e)||qe(e)}function se(e,n){return St(n)?Qs():Wt(n)?Xi(e,n):ct(n)?Ro(e,n):Ve(n)?il():qe(n)?jo():Sn("StructuralRight")}function jo(e,n){return f.True}function Wm(e,n){return Wt(n)?Xi(e,n):ct(n)&&n.anyOf.some(i=>qe(i)||Ve(i))?f.True:ct(n)?f.Union:Ve(n)||qe(n)?f.True:f.Union}function Hm(e,n){return Ve(e)?f.False:qe(e)?f.Union:St(e)?f.True:f.False}function Km(e,n){return ee(n)&&Yi(n)?f.True:ae(n)?se(e,n):zt(n)?De(K(e.items,n.items)):f.False}function qm(e,n){return ae(n)?se(e,n):Oo(n)?De(K(e.items,n.items)):f.False}function Gm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Ci(n)?f.True:f.False}function Ys(e,n){return vs(e)||_t(e)?f.True:f.False}function Vm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):_t(n)?f.True:f.False}function Jm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):Di(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 Xm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):zi(n)?f.True:f.False}function Ym(e,n){return ae(n)?se(e,n):ee(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 Zs(e,n){return xt(e)&&tt(e.const)||ve(e)||pt(e)?f.True:f.False}function Zm(e,n){return pt(n)||ve(n)?f.True:ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):f.False}function Xi(e,n){return n.allOf.every(i=>K(e,i)===f.True)?f.True:f.False}function Qm(e,n){return e.allOf.some(i=>K(i,n)===f.True)?f.True:f.False}function ef(e,n){return ae(n)?se(e,n):yo(n)?De(K(e.items,n.items)):f.False}function tf(e,n){return xt(n)&&n.const===e.const?f.True:ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Ge(n)?nl(e):ve(n)?el(e):pt(n)?Zs(e):_t(n)?Ys(e):f.False}function Qs(e,n){return f.False}function nf(e,n){return f.True}function Oa(e){let[n,i]=[e,0];for(;on(n);)n=n.not,i+=1;return i%2===0?n:Ji()}function rf(e,n){return on(e)?K(Oa(e),n):on(n)?K(e,Oa(n)):Sn("Invalid fallthrough for Not")}function of(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):xo(n)?f.True:f.False}function el(e,n){return Ps(e)||ve(e)||pt(e)?f.True:f.False}function af(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):pt(n)||ve(n)?f.True:f.False}function Ie(e,n){return Object.getOwnPropertyNames(e.properties).length===n}function ya(e){return Yi(e)}function xa(e){return Ie(e,0)||Ie(e,1)&&"description"in e.properties&&ct(e.properties.description)&&e.properties.description.anyOf.length===2&&(Ge(e.properties.description.anyOf[0])&&Rt(e.properties.description.anyOf[1])||Ge(e.properties.description.anyOf[1])&&Rt(e.properties.description.anyOf[0]))}function yr(e){return Ie(e,0)}function Sa(e){return Ie(e,0)}function sf(e){return Ie(e,0)}function lf(e){return Ie(e,0)}function cf(e){return Yi(e)}function df(e){const n=Ht();return Ie(e,0)||Ie(e,1)&&"length"in e.properties&&De(K(e.properties.length,n))===f.True}function pf(e){return Ie(e,0)}function Yi(e){const n=Ht();return Ie(e,0)||Ie(e,1)&&"length"in e.properties&&De(K(e.properties.length,n))===f.True}function uf(e){const n=Gn([jn()],jn());return Ie(e,0)||Ie(e,1)&&"then"in e.properties&&De(K(e.properties.then,n))===f.True}function tl(e,n){return K(e,n)===f.False||xi(e)&&!xi(n)?f.False:f.True}function we(e,n){return Ve(e)?f.False:qe(e)?f.Union:St(e)||Ls(e)&&ya(n)||Ps(e)&&yr(n)||vs(e)&&Sa(n)||Tn(e)&&xa(n)||Ci(e)&&sf(n)||Ge(e)&&ya(n)||Tn(e)&&xa(n)||ve(e)&&yr(n)||pt(e)&&yr(n)||_t(e)&&Sa(n)||qn(e)&&cf(n)||zi(e)&&lf(n)||Di(e)&&pf(n)||_i(e)&&df(n)?f.True:be(e)&&Ge(Dr(e))?n[Fi]==="Record"?f.True:f.False:be(e)&&ve(Dr(e))?Ie(n,0)?f.True:f.False:f.False}function mf(e,n){return ae(n)?se(e,n):be(n)?_e(e,n):ee(n)?(()=>{for(const i of Object.getOwnPropertyNames(n.properties)){if(!(i in e.properties)&&!xi(n.properties[i]))return f.False;if(xi(n.properties[i]))return f.True;if(tl(e.properties[i],n.properties[i])===f.False)return f.False}return f.True})():f.False}function ff(e,n){return ae(n)?se(e,n):ee(n)&&uf(n)?f.True:So(n)?De(K(e.item,n.item)):f.False}function Dr(e){return an in e.patternProperties?Ht():sn in e.patternProperties?Ut():Sn("Unknown record key pattern")}function zr(e){return an in e.patternProperties?e.patternProperties[an]:sn in e.patternProperties?e.patternProperties[sn]:Sn("Unable to get record value schema")}function _e(e,n){const[i,r]=[Dr(n),zr(n)];return Ls(e)&&ve(i)&&De(K(e,r))===f.True?f.True:qn(e)&&ve(i)||Ge(e)&&ve(i)||zt(e)&&ve(i)?K(e,r):ee(e)?(()=>{for(const o of Object.getOwnPropertyNames(e.properties))if(tl(r,e.properties[o])===f.False)return f.False;return f.True})():f.False}function gf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?K(zr(e),zr(n)):f.False}function hf(e,n){const i=kn(e)?Ut():e,r=kn(n)?Ut():n;return K(i,r)}function nl(e,n){return xt(e)&&ne(e.const)||Ge(e)?f.True:f.False}function bf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Ge(n)?f.True:f.False}function Of(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Tn(n)?f.True:f.False}function yf(e,n){return Fn(e)?K(Si(e),n):Fn(n)?K(e,Si(n)):Sn("Invalid fallthrough for TemplateLiteral")}function xf(e,n){return zt(n)&&e.items!==void 0&&e.items.every(i=>K(i,n.items)===f.True)}function Sf(e,n){return St(e)?f.True:Ve(e)?f.False:qe(e)?f.Union:f.False}function wf(e,n){return ae(n)?se(e,n):ee(n)&&Yi(n)||zt(n)&&xf(e,n)?f.True:Wi(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 Lf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):qn(n)?f.True:f.False}function Pf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Hi(n)?If(e):Rt(n)?f.True:f.False}function Ro(e,n){return n.anyOf.some(i=>K(e,i)===f.True)?f.True:f.False}function vf(e,n){return e.anyOf.every(i=>K(i,n)===f.True)?f.True:f.False}function il(e,n){return f.True}function $f(e,n){return St(n)?Qs():Wt(n)?Xi(e,n):ct(n)?Ro(e,n):qe(n)?jo():Ge(n)?nl(e):ve(n)?el(e):pt(n)?Zs(e):_t(n)?Ys(e):zt(n)?Hm(e):Wi(n)?Sf(e):ee(n)?we(e,n):Ve(n)?f.True:f.False}function If(e,n){return Rt(e)||Rt(e)?f.True:f.False}function Nf(e,n){return Wt(n)?Xi(e,n):ct(n)?Ro(e,n):Ve(n)?il():qe(n)?jo():ee(n)?we(e,n):Hi(n)?f.True:f.False}function K(e,n){return Fn(e)||Fn(n)?yf(e,n):kn(e)||kn(n)?hf(e,n):on(e)||on(n)?rf(e,n):qe(e)?Wm(e,n):zt(e)?Km(e,n):Ci(e)?Gm(e,n):_t(e)?Vm(e,n):Oo(e)?qm(e,n):Di(e)?Jm(e,n):zi(e)?Xm(e,n):_i(e)?Ym(e,n):pt(e)?Zm(e,n):Wt(e)?Qm(e,n):yo(e)?ef(e,n):xt(e)?tf(e,n):St(e)?nf():xo(e)?of(e,n):ve(e)?af(e,n):ee(e)?mf(e,n):be(e)?gf(e,n):Ge(e)?bf(e,n):Tn(e)?Of(e,n):Wi(e)?wf(e,n):So(e)?ff(e,n):qn(e)?Lf(e,n):Rt(e)?Pf(e,n):ct(e)?vf(e,n):Ve(e)?$f(e,n):Hi(e)?Nf(e,n):Sn(`Unknown left type operand '${e[P]}'`)}function Jn(e,n){return K(e,n)}function Af(e,n,i,r,o){const a={};for(const s of globalThis.Object.getOwnPropertyNames(e))a[s]=Uo(e[s],n,i,r,ke(o));return a}function kf(e,n,i,r,o){return Af(e.properties,n,i,r,o)}function Tf(e,n,i,r,o){const a=kf(e,n,i,r,o);return ye(a)}function Ff(e,n,i,r){const o=Jn(e,n);return o===f.Union?xe([i,r]):o===f.True?i:r}function Uo(e,n,i,r,o){return Ue(e)?Tf(e,n,i,r,o):Et(e)?x(Mf(e,n,i,r,o)):x(Ff(e,n,i,r),o)}function jf(e,n,i,r,o){return{[e]:Uo(re(e),n,i,r,ke(o))}}function Rf(e,n,i,r,o){return e.reduce((a,s)=>({...a,...jf(s,n,i,r,o)}),{})}function Uf(e,n,i,r,o){return Rf(e.keys,n,i,r,o)}function Mf(e,n,i,r,o){const a=Uf(e,n,i,r,o);return ye(a)}function Bf(e){return e.allOf.every(n=>Xn(n))}function Ef(e){return e.anyOf.some(n=>Xn(n))}function Cf(e){return!Xn(e.not)}function Xn(e){return e[P]==="Intersect"?Bf(e):e[P]==="Union"?Ef(e):e[P]==="Not"?Cf(e):e[P]==="Undefined"}function Df(e,n){return Mo(Si(e),n)}function zf(e,n){const i=e.filter(r=>Jn(r,n)===f.False);return i.length===1?i[0]:xe(i)}function Mo(e,n,i={}){return Ct(e)?x(Df(e,n),i):Ue(e)?x(Hf(e,n),i):x(fe(e)?zf(e.anyOf,n):Jn(e,n)!==f.False?te():e,i)}function _f(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Mo(e[r],n);return i}function Wf(e,n){return _f(e.properties,n)}function Hf(e,n){const i=Wf(e,n);return ye(i)}function Kf(e,n){return Bo(Si(e),n)}function qf(e,n){const i=e.filter(r=>Jn(r,n)!==f.False);return i.length===1?i[0]:xe(i)}function Bo(e,n,i){return Ct(e)?x(Kf(e,n),i):Ue(e)?x(Jf(e,n),i):x(fe(e)?qf(e.anyOf,n):Jn(e,n)!==f.False?e:te(),i)}function Gf(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Bo(e[r],n);return i}function Vf(e,n){return Gf(e.properties,n)}function Jf(e,n){const i=Vf(e,n);return ye(i)}function Xf(e,n){return gn(e)?x(e.returns,n):te(n)}function rl(e){return Lt(Pt(e))}function Kt(e,n,i){return x({[P]:"Record",type:"object",patternProperties:{[e]:n}},i)}function Eo(e,n,i){const r={};for(const o of e)r[o]=n;return me(r,{...i,[Fi]:"Record"})}function Yf(e,n,i){return bu(e)?Eo(wt(e),n,i):Kt(e.pattern,n,i)}function Zf(e,n,i){return Eo(wt(xe(e)),n,i)}function Qf(e,n,i){return Eo([e.toString()],n,i)}function eg(e,n,i){return Kt(e.source,n,i)}function tg(e,n,i){const r=ie(e.pattern)?sn:e.pattern;return Kt(r,n,i)}function ng(e,n,i){return Kt(sn,n,i)}function ig(e,n,i){return Kt(Vp,n,i)}function rg(e,n,i){return me({true:n,false:n},i)}function og(e,n,i){return Kt(an,n,i)}function ag(e,n,i){return Kt(an,n,i)}function ol(e,n,i={}){return fe(e)?Zf(e.anyOf,n,i):Ct(e)?Yf(e,n,i):Bt(e)?Qf(e.const,n,i):Wn(e)?rg(e,n,i):bn(e)?og(e,n,i):On(e)?ag(e,n,i):bs(e)?eg(e,n,i):Kn(e)?tg(e,n,i):fs(e)?ng(e,n,i):Hn(e)?ig(e,n,i):te(i)}function Co(e){return globalThis.Object.getOwnPropertyNames(e.patternProperties)[0]}function sg(e){const n=Co(e);return n===sn?Ut():n===an?Ht():Ut({pattern:n})}function al(e){return e.patternProperties[Co(e)]}function lg(e,n){return n.parameters=Yn(e,n.parameters),n.returns=Je(e,n.returns),n}function cg(e,n){return n.parameters=Yn(e,n.parameters),n.returns=Je(e,n.returns),n}function dg(e,n){return n.allOf=Yn(e,n.allOf),n}function pg(e,n){return n.anyOf=Yn(e,n.anyOf),n}function ug(e,n){return ie(n.items)||(n.items=Yn(e,n.items)),n}function mg(e,n){return n.items=Je(e,n.items),n}function fg(e,n){return n.items=Je(e,n.items),n}function gg(e,n){return n.items=Je(e,n.items),n}function hg(e,n){return n.item=Je(e,n.item),n}function bg(e,n){const i=Sg(e,n.properties);return{...n,...me(i)}}function Og(e,n){const i=Je(e,sg(n)),r=Je(e,al(n)),o=ol(i,r);return{...n,...o}}function yg(e,n){return n.index in e?e[n.index]:Ji()}function xg(e,n){const i=uo(n),r=yt(n),o=Je(e,n);return i&&r?rl(o):i&&!r?Lt(o):!i&&r?Pt(o):o}function Sg(e,n){return globalThis.Object.getOwnPropertyNames(n).reduce((i,r)=>({...i,[r]:xg(e,n[r])}),{})}function Yn(e,n){return n.map(i=>Je(e,i))}function Je(e,n){return gn(n)?lg(e,n):hn(n)?cg(e,n):ze(n)?dg(e,n):fe(n)?pg(e,n):Dt(n)?ug(e,n):mn(n)?mg(e,n):ji(n)?fg(e,n):Ui(n)?gg(e,n):Mi(n)?hg(e,n):Ye(n)?bg(e,n):Bi(n)?Og(e,n):gs(n)?yg(e,n):n}function wg(e,n){return Je(n,lo(e))}function Lg(e){return x({[P]:"Integer",type:"integer"},e)}function Pg(e,n,i){return{[e]:wn(re(e),n,ke(i))}}function vg(e,n,i){return e.reduce((o,a)=>({...o,...Pg(a,n,i)}),{})}function $g(e,n,i){return vg(e.keys,n,i)}function Ig(e,n,i){const r=$g(e,n,i);return ye(r)}function Ng(e){const[n,i]=[e.slice(0,1),e.slice(1)];return[n.toLowerCase(),i].join("")}function Ag(e){const[n,i]=[e.slice(0,1),e.slice(1)];return[n.toUpperCase(),i].join("")}function kg(e){return e.toUpperCase()}function Tg(e){return e.toLowerCase()}function Fg(e,n,i){const r=No(e.pattern);if(!Un(r))return{...e,pattern:sl(e.pattern,n)};const s=[...Ki(r)].map(d=>re(d)),c=ll(s,n),l=xe(c);return Bs([l],i)}function sl(e,n){return typeof e=="string"?n==="Uncapitalize"?Ng(e):n==="Capitalize"?Ag(e):n==="Uppercase"?kg(e):n==="Lowercase"?Tg(e):e:e.toString()}function ll(e,n){return e.map(i=>wn(i,n))}function wn(e,n,i={}){return Et(e)?Ig(e,n,i):Ct(e)?Fg(e,n,i):fe(e)?xe(ll(e.anyOf,n),i):Bt(e)?re(sl(e.const,n),i):x(e,i)}function jg(e,n={}){return wn(e,"Capitalize",n)}function Rg(e,n={}){return wn(e,"Lowercase",n)}function Ug(e,n={}){return wn(e,"Uncapitalize",n)}function Mg(e,n={}){return wn(e,"Uppercase",n)}function Bg(e,n,i){const r={};for(const o of globalThis.Object.getOwnPropertyNames(e))r[o]=Zi(e[o],n,ke(i));return r}function Eg(e,n,i){return Bg(e.properties,n,i)}function Cg(e,n,i){const r=Eg(e,n,i);return ye(r)}function Dg(e,n){return e.map(i=>Do(i,n))}function zg(e,n){return e.map(i=>Do(i,n))}function _g(e,n){const{[n]:i,...r}=e;return r}function Wg(e,n){return n.reduce((i,r)=>_g(i,r),e)}function Hg(e,n){const i=Fe(e,[Ee,"$id","required","properties"]),r=Wg(e.properties,n);return me(r,i)}function Kg(e){const n=e.reduce((i,r)=>hs(r)?[...i,re(r)]:i,[]);return xe(n)}function Do(e,n){return ze(e)?vt(Dg(e.allOf,n)):fe(e)?xe(zg(e.anyOf,n)):Ye(e)?Hg(e,n):me({})}function Zi(e,n,i){const r=Ne(n)?Kg(n):n,o=lt(n)?wt(n):n,a=$e(e),s=$e(n);return Ue(e)?Cg(e,o,i):Et(n)?Jg(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({...Do(e,o),...i})}function qg(e,n,i){return{[n]:Zi(e,[n],ke(i))}}function Gg(e,n,i){return n.reduce((r,o)=>({...r,...qg(e,o,i)}),{})}function Vg(e,n,i){return Gg(e,n.keys,i)}function Jg(e,n,i){const r=Vg(e,n,i);return ye(r)}function Xg(e,n,i){const r={};for(const o of globalThis.Object.getOwnPropertyNames(e))r[o]=Qi(e[o],n,ke(i));return r}function Yg(e,n,i){return Xg(e.properties,n,i)}function Zg(e,n,i){const r=Yg(e,n,i);return ye(r)}function Qg(e,n){return e.map(i=>zo(i,n))}function eh(e,n){return e.map(i=>zo(i,n))}function th(e,n){const i={};for(const r of n)r in e&&(i[r]=e[r]);return i}function nh(e,n){const i=Fe(e,[Ee,"$id","required","properties"]),r=th(e.properties,n);return me(r,i)}function ih(e){const n=e.reduce((i,r)=>hs(r)?[...i,re(r)]:i,[]);return xe(n)}function zo(e,n){return ze(e)?vt(Qg(e.allOf,n)):fe(e)?xe(eh(e.anyOf,n)):Ye(e)?nh(e,n):me({})}function Qi(e,n,i){const r=Ne(n)?ih(n):n,o=lt(n)?wt(n):n,a=$e(e),s=$e(n);return Ue(e)?Zg(e,o,i):Et(n)?sh(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({...zo(e,o),...i})}function rh(e,n,i){return{[n]:Qi(e,[n],ke(i))}}function oh(e,n,i){return n.reduce((r,o)=>({...r,...rh(e,o,i)}),{})}function ah(e,n,i){return oh(e,n.keys,i)}function sh(e,n,i){const r=ah(e,n,i);return ye(r)}function lh(e,n){return le("Partial",[le(e,n)])}function ch(e){return le("Partial",[Vn(e)])}function dh(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=Pt(e[i]);return n}function ph(e){const n=Fe(e,[Ee,"$id","required","properties"]),i=dh(e.properties);return me(i,n)}function wa(e){return e.map(n=>cl(n))}function cl(e){return fn(e)?lh(e.target,e.parameters):$e(e)?ch(e.$ref):ze(e)?vt(wa(e.allOf)):fe(e)?xe(wa(e.anyOf)):Ye(e)?ph(e):Ri(e)||Wn(e)||bn(e)||Bt(e)||mo(e)||On(e)||Kn(e)||fo(e)||go(e)?e:me({})}function _o(e,n){return Ue(e)?fh(e,n):x({...cl(e),...n})}function uh(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=_o(e[r],ke(n));return i}function mh(e,n){return uh(e.properties,n)}function fh(e,n){const i=mh(e,n);return ye(i)}function gh(e,n){return le("Required",[le(e,n)])}function hh(e){return le("Required",[Vn(e)])}function bh(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=Fe(e[i],[dt]);return n}function Oh(e){const n=Fe(e,[Ee,"$id","required","properties"]),i=bh(e.properties);return me(i,n)}function La(e){return e.map(n=>dl(n))}function dl(e){return fn(e)?gh(e.target,e.parameters):$e(e)?hh(e.$ref):ze(e)?vt(La(e.allOf)):fe(e)?xe(La(e.anyOf)):Ye(e)?Oh(e):Ri(e)||Wn(e)||bn(e)||Bt(e)||mo(e)||On(e)||Kn(e)||fo(e)||go(e)?e:me({})}function Wo(e,n){return Ue(e)?Sh(e,n):x({...dl(e),...n})}function yh(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Wo(e[r],n);return i}function xh(e,n){return yh(e.properties,n)}function Sh(e,n){const i=xh(e,n);return ye(i)}function wh(e,n){return n.map(i=>$e(i)?Ho(e,i.$ref):je(e,i))}function Ho(e,n){return n in e?$e(e[n])?Ho(e,e[n].$ref):je(e,e[n]):te()}function Lh(e){return Gi(e[0])}function Ph(e){return qi(e[0],e[1])}function vh(e){return To(e[0])}function $h(e){return _o(e[0])}function Ih(e){return Zi(e[0],e[1])}function Nh(e){return Qi(e[0],e[1])}function Ah(e){return Wo(e[0])}function kh(e,n,i){const r=wh(e,i);return n==="Awaited"?Lh(r):n==="Index"?Ph(r):n==="KeyOf"?vh(r):n==="Partial"?$h(r):n==="Omit"?Ih(r):n==="Pick"?Nh(r):n==="Required"?Ah(r):te()}function Th(e,n){return Po(je(e,n))}function Fh(e,n){return vo(je(e,n))}function jh(e,n,i){return $o(Zn(e,n),je(e,i))}function Rh(e,n,i){return Gn(Zn(e,n),je(e,i))}function Uh(e,n){return vt(Zn(e,n))}function Mh(e,n){return ko(je(e,n))}function Bh(e,n){return me(globalThis.Object.keys(n).reduce((i,r)=>({...i,[r]:je(e,n[r])}),{}))}function Eh(e,n){const[i,r]=[je(e,al(n)),Co(n)],o=lo(n);return o.patternProperties[r]=i,o}function Ch(e,n){return $e(n)?{...Ho(e,n.$ref),[Ee]:n[Ee]}:n}function Dh(e,n){return xn(Zn(e,n))}function zh(e,n){return xe(Zn(e,n))}function Zn(e,n){return n.map(i=>je(e,i))}function je(e,n){return yt(n)?x(je(e,Fe(n,[dt])),n):uo(n)?x(je(e,Fe(n,[_n])),n):Ei(n)?x(Ch(e,n),n):mn(n)?x(Th(e,n.items),n):ji(n)?x(Fh(e,n.items),n):fn(n)?x(kh(e,n.target,n.parameters)):gn(n)?x(jh(e,n.parameters,n.returns),n):hn(n)?x(Rh(e,n.parameters,n.returns),n):ze(n)?x(Uh(e,n.allOf),n):Ui(n)?x(Mh(e,n.items),n):Ye(n)?x(Bh(e,n.properties),n):Bi(n)?x(Eh(e,n)):Dt(n)?x(Dh(e,n.items||[]),n):fe(n)?x(zh(e,n.anyOf),n):n}function _h(e,n){return n in e?je(e,e[n]):te()}function Wh(e){return globalThis.Object.getOwnPropertyNames(e).reduce((n,i)=>({...n,[i]:_h(e,i)}),{})}class Hh{constructor(n){const i=Wh(n),r=this.WithIdentifiers(i);this.$defs=r}Import(n,i){const r={...this.$defs,[n]:x(this.$defs[n],i)};return x({[P]:"Import",$defs:r,$ref:n})}WithIdentifiers(n){return globalThis.Object.getOwnPropertyNames(n).reduce((i,r)=>({...i,[r]:{...n[r],$id:r}}),{})}}function Kh(e){return new Hh(e)}function qh(e,n){return x({[P]:"Not",not:e},n)}function Gh(e,n){return hn(e)?xn(e.parameters,n):te()}let Vh=0;function Jh(e,n={}){ie(n.$id)&&(n.$id=`T${Vh++}`);const i=lo(e({[P]:"This",$ref:`${n.$id}`}));return i.$id=n.$id,x({[Fi]:"Recursive",...i},n)}function Xh(e,n){const i=ne(e)?new globalThis.RegExp(e):e;return x({[P]:"RegExp",type:"RegExp",source:i.source,flags:i.flags},n)}function Yh(e){return ze(e)?e.allOf:fe(e)?e.anyOf:Dt(e)?e.items??[]:[]}function Zh(e){return Yh(e)}function Qh(e,n){return hn(e)?x(e.returns,n):te(n)}class eb{constructor(n){this.schema=n}Decode(n){return new tb(this.schema,n)}}class tb{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 Ei(this.schema)?this.EncodeTransform(n,this.schema):this.EncodeSchema(n,this.schema)}}function nb(e){return new eb(e)}function ib(e={}){return x({[P]:e[P]??"Unsafe"},e)}function rb(e){return x({[P]:"Void",type:"void"},e)}const ob=Object.freeze(Object.defineProperty({__proto__:null,Any:jn,Argument:tu,Array:Po,AsyncIterator:vo,Awaited:Gi,BigInt:Ao,Boolean:Us,Capitalize:jg,Composite:Mm,Const:Cm,Constructor:$o,ConstructorParameters:Dm,Date:qs,Enum:zm,Exclude:Mo,Extends:Uo,Extract:Bo,Function:Gn,Index:qi,InstanceType:Xf,Instantiate:wg,Integer:Lg,Intersect:vt,Iterator:ko,KeyOf:To,Literal:re,Lowercase:Rg,Mapped:rm,Module:Kh,Never:te,Not:qh,Null:Gs,Number:Ht,Object:me,Omit:Zi,Optional:Pt,Parameters:Gh,Partial:_o,Pick:Qi,Promise:zs,Readonly:Lt,ReadonlyOptional:rl,Record:ol,Recursive:Jh,Ref:Vn,RegExp:Xh,Required:Wo,Rest:Zh,ReturnType:Qh,String:Ut,Symbol:Vs,TemplateLiteral:Bs,Transform:nb,Tuple:xn,Uint8Array:Xs,Uncapitalize:Ug,Undefined:Js,Union:xe,Unknown:Ji,Unsafe:ib,Uppercase:Mg,Void:rb},Symbol.toStringTag,{value:"Module"})),t=ob;var ab=["Arial","Calibri","Cambria","Consolas","Courier New","Georgia","Segoe UI","Tahoma","Times New Roman","Trebuchet MS","Verdana","Helvetica","Helvetica Neue","Menlo","Monaco"];function T0(e){const n=e.toLowerCase();return ab.some(i=>i.toLowerCase()===n)}var Ft=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"]}),Qn=t.Number({minimum:100,maximum:900,description:"OpenType weight (100 thin ... 900 black). Default 400."}),er=t.Boolean({description:"Whether this source is italic. Default false."}),sb=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"}),lb=t.Object({kind:t.Literal("google"),family:t.String({description:'Exact Google Fonts family name (e.g. "Inter").'}),weights:t.Optional(t.Array(Qn,{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"}),cb=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(Qn),italic:t.Optional(er)},{additionalProperties:!1,description:"Local font file to embed"}),db=t.Object({kind:t.Literal("url"),url:t.String({description:"HTTPS URL of a TTF or OTF file."}),weight:t.Optional(Qn),italic:t.Optional(er)},{additionalProperties:!1,description:"Direct TTF/OTF URL (non-Google CDN)"}),pb=t.Object({kind:t.Literal("variable"),url:t.String({description:"HTTPS URL of a variable TTF (`fvar` axis table required)."}),weight:Qn,italic:t.Optional(er),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."}),ub=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(Qn),italic:t.Optional(er)},{additionalProperties:!1,description:"Inline base64 font — portable"}),mb=t.Union([sb,lb,cb,ub,db,pb],{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.'}),fb=t.Union([t.Literal("sans"),t.Literal("serif"),t.Literal("mono"),t.Literal("display"),t.Literal("handwriting")],{description:"Broad category used for fallback selection"}),gb=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(fb),sources:t.Array(mb,{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.*."}),tr=t.Array(gb,{description:"Document-scoped font registry. Every non-safe font used in this document must be registered here."}),pl=["eyebrow","display","stat","quote","label","footer","tableHeader","tableCell","chartLabel","tracker","source"],hb=t.Union(pl.map(e=>t.Literal(e))),Ko=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."}),bb=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(Ko),color:t.Optional(Be),spaceBefore:t.Optional(t.Number({minimum:0})),spaceAfter:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1}),Ob=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}),oi=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}),yb=t.Object({roles:t.Optional(Ob),scale:t.Optional(t.Object({a4:t.Optional(oi),letter:t.Optional(oi),wide169:t.Optional(oi),standard43:t.Optional(oi)},{additionalProperties:!1}))},{additionalProperties:!1}),ai=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}),xb=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(ai),letter:t.Optional(ai),wide169:t.Optional(ai),standard43:t.Optional(ai)},{additionalProperties:!1}))},{additionalProperties:!1}),ft=t.Object({type:t.Optional(hb),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}),Sb=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."}),wb=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."}),nr={palette:t.Optional(bb),typography:t.Optional(yb),spacing:t.Optional(xb),chrome:t.Optional(Sb),motif:t.Optional(wb)};t.Object(nr,{additionalProperties:!1});var Lb=t.String({pattern:"^#?[0-9A-Fa-f]{6}$",description:"Hex color (e.g. #FF0000)"}),Pb=["primary","secondary","accent","background","text","text2","background2","accent4","accent5","accent6"],vb=["accent1","accent2","accent3","tx1","tx2","bg1","bg2"],qo=t.Union([Lb,...Pb.map(e=>t.Literal(e)),...vb.map(e=>t.Literal(e))],{description:"Hex color or semantic theme color name"}),ul=["title","subtitle","heading1","heading2","heading3","body","caption",...pl],ml=t.Union(ul.map(e=>t.Literal(e)),{description:"Predefined style name"}),ir=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")],{description:"Horizontal alignment options"}),rr=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical alignment options"}),Go=t.Object({type:t.Optional(t.Union([t.Literal("outer"),t.Literal("inner")],{description:"Shadow type"})),color:t.Optional(qo),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}),qt=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"}),$b=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}),fl=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($b,{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(Ft),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(ir),valign:t.Optional(rr),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(Go),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(qt),style:t.Optional(ml)},{description:"Text component props",additionalProperties:!1}),gl=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(Go),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(qt)},{description:"PPTX image component props",additionalProperties:!1}),hl=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"}),Ib=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}),Nb=["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"],Ab=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"}),bl=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(Ab,{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"}),kb=t.Object({preset:t.Union(Nb.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"}),Ol=t.Object({type:hl,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(bl),pattern:t.Optional(kb)},{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(Ib,{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(ir),valign:t.Optional(rr),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(Go),rectRadius:t.Optional(t.Number({minimum:0,description:"Corner radius for roundRect shape in inches"})),grid:t.Optional(qt),style:t.Optional(ml)},{description:"Shape component props",additionalProperties:!1}),Tb=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(ir),valign:t.Optional(rr),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})]),yl=t.Object({rows:t.Array(t.Array(Tb,{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(ir),valign:t.Optional(rr),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(qt)},{description:"PPTX table component props",additionalProperties:!1}),xl=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(qt)},{description:"PPTX Highcharts component props",additionalProperties:!1}),si=(e,n)=>t.Union([t.Number({description:e}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:n})]),Fb=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"}),jb=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}),Pa=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"}),Sl=t.Object({type:Fb,data:t.Array(jb,{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(Pa),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(Pa),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(si("X position in inches","X as percentage")),y:t.Optional(si("Y position in inches","Y as percentage")),w:t.Optional(si("Width in inches","Width as percentage")),h:t.Optional(si("Height in inches","Height as percentage")),grid:t.Optional(qt)},{description:"Native PowerPoint chart component props",additionalProperties:!1});function wl(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:fl,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:gl,hasChildren:!1,category:"content",propsRequired:!0,description:"Image element - displays images from file path, URL, or base64 data."},{name:"shape",propsSchema:Ol,hasChildren:!1,category:"content",description:"Shape element - draws geometric shapes with optional text, fill, and line styling."},{name:"table",propsSchema:yl,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:xl,hasChildren:!1,category:"content",description:"Highcharts element - renders charts via Highcharts Export Server."},{name:"chart",propsSchema:Sl,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 Yt(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:wl(e)?e.propsSchema:t.Optional(e.propsSchema)},{additionalProperties:!1,description:e.description})}var Rb=t.Union([Yt(gt[0]),Yt(gt[1]),Yt(gt[2]),Yt(gt[3]),Yt(gt[4]),Yt(gt[5])],{$id:"PptxSlideContent",discriminator:{propertyName:"name"},description:"A single PPTX slide content element (text, image, shape, table, highcharts, or chart)."}),Ub=t.Partial(fl),Mb=t.Partial(gl),Bb=t.Partial(Ol),Eb=t.Partial(yl),Cb=t.Partial(xl),Db=t.Partial(Sl),Ll=t.Object({text:t.Optional(Ub),image:t.Optional(Mb),shape:t.Optional(Bb),table:t.Optional(Eb),highcharts:t.Optional(Cb),chart:t.Optional(Db)},{additionalProperties:!0});function zb(e){switch(e.errorType){case u.ArrayContains:return"Expected array to contain at least one matching value";case u.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case u.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case u.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case u.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case u.ArrayUniqueItems:return"Expected array elements to be unique";case u.Array:return"Expected array";case u.AsyncIterator:return"Expected AsyncIterator";case u.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case u.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case u.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case u.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case u.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case u.BigInt:return"Expected bigint";case u.Boolean:return"Expected boolean";case u.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case u.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case u.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case u.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case u.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case u.Date:return"Expected Date";case u.Function:return"Expected function";case u.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case u.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case u.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case u.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case u.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case u.Integer:return"Expected integer";case u.IntersectUnevaluatedProperties:return"Unexpected property";case u.Intersect:return"Expected all values to match";case u.Iterator:return"Expected Iterator";case u.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case u.Never:return"Never";case u.Not:return"Value should not match";case u.Null:return"Expected null";case u.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case u.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case u.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case u.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case u.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case u.Number:return"Expected number";case u.Object:return"Expected object";case u.ObjectAdditionalProperties:return"Unexpected property";case u.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case u.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case u.ObjectRequiredProperty:return"Expected required property";case u.Promise:return"Expected Promise";case u.RegExp:return"Expected string to match regular expression";case u.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case u.StringFormat:return`Expected string to match '${e.schema.format}' format`;case u.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case u.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case u.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case u.String:return"Expected string";case u.Symbol:return"Expected symbol";case u.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case u.Tuple:return"Expected tuple";case u.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case u.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case u.Uint8Array:return"Expected Uint8Array";case u.Undefined:return"Expected undefined";case u.Union:return"Expected union value";case u.Void:return"Expected void";case u.Kind:return`Expected kind '${e.schema[P]}'`;default:return"Unknown error type"}}let _b=zb;function Wb(){return _b}class Hb extends Xe{constructor(n){super(`Unable to dereference schema with $id '${n.$ref}'`),this.schema=n}}function Kb(e,n){const i=n.find(r=>r.$id===e.$ref);if(i===void 0)throw new Hb(e);return Gt(i,n)}function Pl(e,n){return!et(e.$id)||n.some(i=>i.$id===e.$id)||n.push(e),n}function Gt(e,n){return e[P]==="This"||e[P]==="Ref"?Kb(e,n):e}class qb 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 nn=BigInt("14695981039346656037");const[Gb,Vb]=[BigInt("1099511628211"),BigInt("18446744073709551616")],Jb=Array.from({length:256}).map((e,n)=>BigInt(n)),vl=new Float64Array(1),$l=new DataView(vl.buffer),Il=new Uint8Array(vl.buffer);function*Xb(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 Yb(e){Se(Re.Array);for(const n of e)cn(n)}function Zb(e){Se(Re.Boolean),Se(e?1:0)}function Qb(e){Se(Re.BigInt),$l.setBigInt64(0,e);for(const n of Il)Se(n)}function eO(e){Se(Re.Date),cn(e.getTime())}function tO(e){Se(Re.Null)}function nO(e){Se(Re.Number),$l.setFloat64(0,e);for(const n of Il)Se(n)}function iO(e){Se(Re.Object);for(const n of globalThis.Object.getOwnPropertyNames(e).sort())cn(n),cn(e[n])}function rO(e){Se(Re.String);for(let n=0;n<e.length;n++)for(const i of Xb(e.charCodeAt(n)))Se(i)}function oO(e){Se(Re.Symbol),cn(e.description)}function aO(e){Se(Re.Uint8Array);for(let n=0;n<e.length;n++)Se(e[n])}function sO(e){return Se(Re.Undefined)}function cn(e){if(it(e))return Yb(e);if(Ai(e))return Zb(e);if(ki(e))return Qb(e);if(zn(e))return eO(e);if(Ni(e))return tO();if(at(e))return nO(e);if(nt(e))return iO(e);if(et(e))return rO(e);if(Ti(e))return oO(e);if(co(e))return aO(e);if(Ot(e))return sO();throw new qb(e)}function Se(e){nn=nn^Jb[e],nn=nn*Gb%Vb}function Nl(e){return nn=BigInt("14695981039346656037"),cn(e),nn}class lO extends Xe{constructor(n){super("Unknown type"),this.schema=n}}function cO(e){return e[P]==="Any"||e[P]==="Unknown"}function M(e){return e!==void 0}function dO(e,n,i){return!0}function pO(e,n,i){return!0}function uO(e,n,i){if(!it(i)||M(e.minItems)&&!(i.length>=e.minItems)||M(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=Nl(s);if(a.has(c))return!1;a.add(c)}return!0}())return!1;if(!(M(e.contains)||at(e.minContains)||at(e.maxContains)))return!0;const r=M(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 mO(e,n,i){return ds(i)}function fO(e,n,i){return!(!ki(i)||M(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||M(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||M(e.maximum)&&!(i<=e.maximum)||M(e.minimum)&&!(i>=e.minimum)||M(e.multipleOf)&&i%e.multipleOf!==BigInt(0))}function gO(e,n,i){return Ai(i)}function hO(e,n,i){return pe(e.returns,n,i.prototype)}function bO(e,n,i){return!(!zn(i)||M(e.exclusiveMaximumTimestamp)&&!(i.getTime()<e.exclusiveMaximumTimestamp)||M(e.exclusiveMinimumTimestamp)&&!(i.getTime()>e.exclusiveMinimumTimestamp)||M(e.maximumTimestamp)&&!(i.getTime()<=e.maximumTimestamp)||M(e.minimumTimestamp)&&!(i.getTime()>=e.minimumTimestamp)||M(e.multipleOfTimestamp)&&i.getTime()%e.multipleOfTimestamp!==0)}function OO(e,n,i){return po(i)}function yO(e,n,i){const r=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];return pe(o,[...n,...r],i)}function xO(e,n,i){return!(!ms(i)||M(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||M(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||M(e.maximum)&&!(i<=e.maximum)||M(e.minimum)&&!(i>=e.minimum)||M(e.multipleOf)&&i%e.multipleOf!==0)}function SO(e,n,i){const r=e.allOf.every(o=>pe(o,n,i));if(e.unevaluatedProperties===!1){const o=new RegExp(wi(e)),a=Object.getOwnPropertyNames(i).every(s=>o.test(s));return r&&a}else if(lt(e.unevaluatedProperties)){const o=new RegExp(wi(e)),a=Object.getOwnPropertyNames(i).every(s=>o.test(s)||pe(e.unevaluatedProperties,n,i[s]));return r&&a}else return r}function wO(e,n,i){return ps(i)}function LO(e,n,i){return i===e.const}function PO(e,n,i){return!1}function vO(e,n,i){return!pe(e.not,n,i)}function $O(e,n,i){return Ni(i)}function IO(e,n,i){return!(!Te.IsNumberLike(i)||M(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||M(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||M(e.minimum)&&!(i>=e.minimum)||M(e.maximum)&&!(i<=e.maximum)||M(e.multipleOf)&&i%e.multipleOf!==0)}function NO(e,n,i){if(!Te.IsObjectLike(i)||M(e.minProperties)&&!(Object.getOwnPropertyNames(i).length>=e.minProperties)||M(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])||(Xn(a)||cO(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 AO(e,n,i){return us(i)}function kO(e,n,i){if(!Te.IsRecordLike(i)||M(e.minProperties)&&!(Object.getOwnPropertyNames(i).length>=e.minProperties)||M(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 TO(e,n,i){return pe(Gt(e,n),n,i)}function FO(e,n,i){const r=new RegExp(e.source,e.flags);return M(e.minLength)&&!(i.length>=e.minLength)||M(e.maxLength)&&!(i.length<=e.maxLength)?!1:r.test(i)}function jO(e,n,i){return!et(i)||M(e.minLength)&&!(i.length>=e.minLength)||M(e.maxLength)&&!(i.length<=e.maxLength)||M(e.pattern)&&!new RegExp(e.pattern).test(i)?!1:M(e.format)?Is(e.format)?As(e.format)(i):!1:!0}function RO(e,n,i){return Ti(i)}function UO(e,n,i){return et(i)&&new RegExp(e.pattern).test(i)}function MO(e,n,i){return pe(Gt(e,n),n,i)}function BO(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 EO(e,n,i){return Ot(i)}function CO(e,n,i){return e.anyOf.some(r=>pe(r,n,i))}function DO(e,n,i){return!(!co(i)||M(e.maxByteLength)&&!(i.length<=e.maxByteLength)||M(e.minByteLength)&&!(i.length>=e.minByteLength))}function zO(e,n,i){return!0}function _O(e,n,i){return Te.IsVoidLike(i)}function WO(e,n,i){return Lo(e[P])?Ts(e[P])(e,i):!1}function pe(e,n,i){const r=M(e.$id)?Pl(e,n):n,o=e;switch(o[P]){case"Any":return dO();case"Argument":return pO();case"Array":return uO(o,r,i);case"AsyncIterator":return mO(o,r,i);case"BigInt":return fO(o,r,i);case"Boolean":return gO(o,r,i);case"Constructor":return hO(o,r,i);case"Date":return bO(o,r,i);case"Function":return OO(o,r,i);case"Import":return yO(o,r,i);case"Integer":return xO(o,r,i);case"Intersect":return SO(o,r,i);case"Iterator":return wO(o,r,i);case"Literal":return LO(o,r,i);case"Never":return PO();case"Not":return vO(o,r,i);case"Null":return $O(o,r,i);case"Number":return IO(o,r,i);case"Object":return NO(o,r,i);case"Promise":return AO(o,r,i);case"Record":return kO(o,r,i);case"Ref":return TO(o,r,i);case"RegExp":return FO(o,r,i);case"String":return jO(o,r,i);case"Symbol":return RO(o,r,i);case"TemplateLiteral":return UO(o,r,i);case"This":return MO(o,r,i);case"Tuple":return BO(o,r,i);case"Undefined":return EO(o,r,i);case"Union":return CO(o,r,i);case"Uint8Array":return DO(o,r,i);case"Unknown":return zO();case"Void":return _O(o,r,i);default:if(!Lo(o[P]))throw new lO(o);return WO(o,r,i)}}function or(...e){return e.length===3?pe(e[0],e[1],e[2]):pe(e[0],[],e[1])}var u;(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"})(u||(u={}));class HO extends Xe{constructor(n){super("Unknown type"),this.schema=n}}function ot(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function U(e){return e!==void 0}class Al{constructor(n){this.iterator=n}[Symbol.iterator](){return this.iterator}First(){const n=this.iterator.next();return n.done?void 0:n.value}}function S(e,n,i,r,o=[]){return{type:e,schema:n,path:i,value:r,message:Wb()({errorType:e,path:i,schema:n,value:r,errors:o}),errors:o}}function*KO(e,n,i,r){}function*qO(e,n,i,r){}function*GO(e,n,i,r){if(!it(r))return yield S(u.Array,e,i,r);U(e.minItems)&&!(r.length>=e.minItems)&&(yield S(u.ArrayMinItems,e,i,r)),U(e.maxItems)&&!(r.length<=e.maxItems)&&(yield S(u.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=Nl(c);if(s.has(l))return!1;s.add(l)}return!0}()&&(yield S(u.ArrayUniqueItems,e,i,r)),!(U(e.contains)||U(e.minContains)||U(e.maxContains)))return;const o=U(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 S(u.ArrayContains,e,i,r)),at(e.minContains)&&a<e.minContains&&(yield S(u.ArrayMinContains,e,i,r)),at(e.maxContains)&&a>e.maxContains&&(yield S(u.ArrayMaxContains,e,i,r))}function*VO(e,n,i,r){ds(r)||(yield S(u.AsyncIterator,e,i,r))}function*JO(e,n,i,r){if(!ki(r))return yield S(u.BigInt,e,i,r);U(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield S(u.BigIntExclusiveMaximum,e,i,r)),U(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield S(u.BigIntExclusiveMinimum,e,i,r)),U(e.maximum)&&!(r<=e.maximum)&&(yield S(u.BigIntMaximum,e,i,r)),U(e.minimum)&&!(r>=e.minimum)&&(yield S(u.BigIntMinimum,e,i,r)),U(e.multipleOf)&&r%e.multipleOf!==BigInt(0)&&(yield S(u.BigIntMultipleOf,e,i,r))}function*XO(e,n,i,r){Ai(r)||(yield S(u.Boolean,e,i,r))}function*YO(e,n,i,r){yield*ue(e.returns,n,i,r.prototype)}function*ZO(e,n,i,r){if(!zn(r))return yield S(u.Date,e,i,r);U(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)&&(yield S(u.DateExclusiveMaximumTimestamp,e,i,r)),U(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)&&(yield S(u.DateExclusiveMinimumTimestamp,e,i,r)),U(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)&&(yield S(u.DateMaximumTimestamp,e,i,r)),U(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)&&(yield S(u.DateMinimumTimestamp,e,i,r)),U(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0&&(yield S(u.DateMultipleOfTimestamp,e,i,r))}function*QO(e,n,i,r){po(r)||(yield S(u.Function,e,i,r))}function*ey(e,n,i,r){const o=globalThis.Object.values(e.$defs),a=e.$defs[e.$ref];yield*ue(a,[...n,...o],i,r)}function*ty(e,n,i,r){if(!ms(r))return yield S(u.Integer,e,i,r);U(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield S(u.IntegerExclusiveMaximum,e,i,r)),U(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield S(u.IntegerExclusiveMinimum,e,i,r)),U(e.maximum)&&!(r<=e.maximum)&&(yield S(u.IntegerMaximum,e,i,r)),U(e.minimum)&&!(r>=e.minimum)&&(yield S(u.IntegerMinimum,e,i,r)),U(e.multipleOf)&&r%e.multipleOf!==0&&(yield S(u.IntegerMultipleOf,e,i,r))}function*ny(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 S(u.Intersect,e,i,r);if(e.unevaluatedProperties===!1){const a=new RegExp(wi(e));for(const s of Object.getOwnPropertyNames(r))a.test(s)||(yield S(u.IntersectUnevaluatedProperties,e,`${i}/${s}`,r))}if(typeof e.unevaluatedProperties=="object"){const a=new RegExp(wi(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*iy(e,n,i,r){ps(r)||(yield S(u.Iterator,e,i,r))}function*ry(e,n,i,r){r!==e.const&&(yield S(u.Literal,e,i,r))}function*oy(e,n,i,r){yield S(u.Never,e,i,r)}function*ay(e,n,i,r){ue(e.not,n,i,r).next().done===!0&&(yield S(u.Not,e,i,r))}function*sy(e,n,i,r){Ni(r)||(yield S(u.Null,e,i,r))}function*ly(e,n,i,r){if(!Te.IsNumberLike(r))return yield S(u.Number,e,i,r);U(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield S(u.NumberExclusiveMaximum,e,i,r)),U(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield S(u.NumberExclusiveMinimum,e,i,r)),U(e.maximum)&&!(r<=e.maximum)&&(yield S(u.NumberMaximum,e,i,r)),U(e.minimum)&&!(r>=e.minimum)&&(yield S(u.NumberMinimum,e,i,r)),U(e.multipleOf)&&r%e.multipleOf!==0&&(yield S(u.NumberMultipleOf,e,i,r))}function*cy(e,n,i,r){if(!Te.IsObjectLike(r))return yield S(u.Object,e,i,r);U(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)&&(yield S(u.ObjectMinProperties,e,i,r)),U(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties)&&(yield S(u.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 S(u.ObjectRequiredProperty,e.properties[c],`${i}/${ot(c)}`,void 0));if(e.additionalProperties===!1)for(const c of s)a.includes(c)||(yield S(u.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]),Xn(e)&&!(c in r)&&(yield S(u.ObjectRequiredProperty,l,`${i}/${ot(c)}`,void 0))):Te.IsExactOptionalProperty(r,c)&&(yield*ue(l,n,`${i}/${ot(c)}`,r[c]))}}function*dy(e,n,i,r){us(r)||(yield S(u.Promise,e,i,r))}function*py(e,n,i,r){if(!Te.IsRecordLike(r))return yield S(u.Object,e,i,r);U(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)&&(yield S(u.ObjectMinProperties,e,i,r)),U(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties)&&(yield S(u.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 S(u.ObjectAdditionalProperties,e,`${i}/${ot(c)}`,l)}}function*uy(e,n,i,r){yield*ue(Gt(e,n),n,i,r)}function*my(e,n,i,r){if(!et(r))return yield S(u.String,e,i,r);if(U(e.minLength)&&!(r.length>=e.minLength)&&(yield S(u.StringMinLength,e,i,r)),U(e.maxLength)&&!(r.length<=e.maxLength)&&(yield S(u.StringMaxLength,e,i,r)),!new RegExp(e.source,e.flags).test(r))return yield S(u.RegExp,e,i,r)}function*fy(e,n,i,r){if(!et(r))return yield S(u.String,e,i,r);U(e.minLength)&&!(r.length>=e.minLength)&&(yield S(u.StringMinLength,e,i,r)),U(e.maxLength)&&!(r.length<=e.maxLength)&&(yield S(u.StringMaxLength,e,i,r)),et(e.pattern)&&(new RegExp(e.pattern).test(r)||(yield S(u.StringPattern,e,i,r))),et(e.format)&&(Is(e.format)?As(e.format)(r)||(yield S(u.StringFormat,e,i,r)):yield S(u.StringFormatUnknown,e,i,r))}function*gy(e,n,i,r){Ti(r)||(yield S(u.Symbol,e,i,r))}function*hy(e,n,i,r){if(!et(r))return yield S(u.String,e,i,r);new RegExp(e.pattern).test(r)||(yield S(u.StringPattern,e,i,r))}function*by(e,n,i,r){yield*ue(Gt(e,n),n,i,r)}function*Oy(e,n,i,r){if(!it(r))return yield S(u.Tuple,e,i,r);if(e.items===void 0&&r.length!==0)return yield S(u.TupleLength,e,i,r);if(r.length!==e.maxItems)return yield S(u.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*yy(e,n,i,r){Ot(r)||(yield S(u.Undefined,e,i,r))}function*xy(e,n,i,r){if(or(e,n,r))return;const o=e.anyOf.map(a=>new Al(ue(a,n,i,r)));yield S(u.Union,e,i,r,o)}function*Sy(e,n,i,r){if(!co(r))return yield S(u.Uint8Array,e,i,r);U(e.maxByteLength)&&!(r.length<=e.maxByteLength)&&(yield S(u.Uint8ArrayMaxByteLength,e,i,r)),U(e.minByteLength)&&!(r.length>=e.minByteLength)&&(yield S(u.Uint8ArrayMinByteLength,e,i,r))}function*wy(e,n,i,r){}function*Ly(e,n,i,r){Te.IsVoidLike(r)||(yield S(u.Void,e,i,r))}function*Py(e,n,i,r){Ts(e[P])(e,r)||(yield S(u.Kind,e,i,r))}function*ue(e,n,i,r){const o=U(e.$id)?[...n,e]:n,a=e;switch(a[P]){case"Any":return yield*KO();case"Argument":return yield*qO();case"Array":return yield*GO(a,o,i,r);case"AsyncIterator":return yield*VO(a,o,i,r);case"BigInt":return yield*JO(a,o,i,r);case"Boolean":return yield*XO(a,o,i,r);case"Constructor":return yield*YO(a,o,i,r);case"Date":return yield*ZO(a,o,i,r);case"Function":return yield*QO(a,o,i,r);case"Import":return yield*ey(a,o,i,r);case"Integer":return yield*ty(a,o,i,r);case"Intersect":return yield*ny(a,o,i,r);case"Iterator":return yield*iy(a,o,i,r);case"Literal":return yield*ry(a,o,i,r);case"Never":return yield*oy(a,o,i,r);case"Not":return yield*ay(a,o,i,r);case"Null":return yield*sy(a,o,i,r);case"Number":return yield*ly(a,o,i,r);case"Object":return yield*cy(a,o,i,r);case"Promise":return yield*dy(a,o,i,r);case"Record":return yield*py(a,o,i,r);case"Ref":return yield*uy(a,o,i,r);case"RegExp":return yield*my(a,o,i,r);case"String":return yield*fy(a,o,i,r);case"Symbol":return yield*gy(a,o,i,r);case"TemplateLiteral":return yield*hy(a,o,i,r);case"This":return yield*by(a,o,i,r);case"Tuple":return yield*Oy(a,o,i,r);case"Undefined":return yield*yy(a,o,i,r);case"Union":return yield*xy(a,o,i,r);case"Uint8Array":return yield*Sy(a,o,i,r);case"Unknown":return yield*wy();case"Void":return yield*Ly(a,o,i,r);default:if(!Lo(a[P]))throw new HO(e);return yield*Py(a,o,i,r)}}function vy(...e){const n=e.length===3?ue(e[0],e[1],"",e[2]):ue(e[0],[],"",e[1]);return new Al(n)}function $y(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=Mt(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=Mt(e[i]);return n}function Iy(e){return e.map(n=>Mt(n))}function Ny(e){return e.slice()}function Ay(e){return new Map(Mt([...e.entries()]))}function ky(e){return new Set(Mt([...e.entries()]))}function Ty(e){return new Date(e.toISOString())}function Mt(e){if(it(e))return Iy(e);if(zn(e))return Ty(e);if(Sp(e))return Ny(e);if(yp(e))return Ay(e);if(xp(e))return ky(e);if(nt(e))return $y(e);if(Lp(e))return e;throw new Error("ValueClone: Unable to clone value")}function ut(e,n){const i=wp(e,"default")?e.default:void 0,r=po(i)?i():Mt(i);return Ot(n)?r:nt(n)&&nt(r)?Object.assign(r,n):n}function _r(e){return Os(e)&&"default"in e}function Fy(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 jy(e,n,i){return zn(i)?i:ut(e,i)}function Ry(e,n,i){const r=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];return Le(o,[...n,...r],i)}function Uy(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 My(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]);Ot(s)||(r[a]=Le(e.properties[a],n,r[a]))}if(!_r(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 By(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)&&_r(s)&&(r[l]=Le(s,n,r[l]));if(!_r(o))return r;for(const l of Object.getOwnPropertyNames(r))c.test(l)||(r[l]=Le(o,n,r[l]));return r}function Ey(e,n,i){return Le(Gt(e,n),n,ut(e,i))}function Cy(e,n,i){return Le(Gt(e,n),n,i)}function Dy(e,n,i){const r=ut(e,i);if(!it(r)||Ot(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 zy(e,n,i){const r=ut(e,i);for(const o of e.anyOf){const a=Le(o,n,Mt(r));if(or(o,n,a))return a}return r}function Le(e,n,i){const r=Pl(e,n),o=e;switch(o[P]){case"Array":return Fy(o,r,i);case"Date":return jy(o,r,i);case"Import":return Ry(o,r,i);case"Intersect":return Uy(o,r,i);case"Object":return My(o,r,i);case"Record":return By(o,r,i);case"Ref":return Ey(o,r,i);case"This":return Cy(o,r,i);case"Tuple":return Dy(o,r,i);case"Union":return zy(o,r,i);default:return ut(o,i)}}function _y(...e){return e.length===3?Le(e[0],e[1],e[2]):Le(e[0],[],e[1])}var Qe={};function Wy(){return typeof process>"u"||!Qe?!1:!!(Qe.CI||Qe.GITHUB_ACTIONS||Qe.GITLAB_CI)}function Hy(){var e;return typeof process>"u"||Qe!=null&&Qe.NO_COLOR?!1:Qe!=null&&Qe.FORCE_COLOR||(e=process.stdout)!=null&&e.isTTY?!0:!Wy()}Hy();var Ky=/^(\d+)\.(\d+)\.(\d+)$/;function va(e){const n=e.match(Ky);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 qy(e,n){const i=va(e),r=va(n);return i.major-r.major||i.minor-r.minor||i.patch-r.patch}function kl(e){if(e.length===0)throw new Error("Cannot determine latest version from empty array");return e.reduce((n,i)=>qy(i,n)>0?i:n)}function Tl(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 Gy(e){var i;const n=(i=e.properties)==null?void 0:i.version;return typeof(n==null?void 0:n.const)=="string"}function Vy(e){return Array.isArray(e.required)&&e.required.includes("name")}function Jy(e){const n=new Map;for(const i of e){const r=Tl(i),o=n.get(r);o?o.push(i):n.set(r,[i])}return n}function Xy(e,n){const i=n.find(r=>!Gy(r)&&typeof r.description=="string")??n.find(r=>typeof r.description=="string");return{const:e,type:"string",...i?{description:i.description}:{}}}function Fl(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=>Tl(l)!==void 0&&Vy(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")?Jy(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])=>Xy(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 Wr(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 Hr(e,n,i){if(!(typeof e!="object"||e===null)){if(Array.isArray(e)){e.forEach(r=>{typeof r=="object"&&r!==null&&Hr(r,n,i)});return}e.$ref===n&&(e.$ref=i);for(const r of Object.values(e))typeof r=="object"&&r!==null&&Hr(r,n,i)}}function Yy(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 p=d;if(p.type==="array"&&p.items&&Object.keys(p.items).length===0&&i.has(n)&&(p.items={$ref:`#/definitions/${n}`}),p.type==="array"&&p.items&&typeof p.items=="object"&&"$ref"in p.items&&o(p.items.$ref)){const O=p.items.$ref,m=r(O);p.items=m?{$ref:m}:{}}if(o(p.$ref)){const O=r(p.$ref);O?p.$ref=O:delete p.$ref}if(l==="$id"&&o(d)&&g!==`definitions.${d}.$id`){delete s[l];continue}a(d,g)}}}a(e)}function Zy(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 O=l.$id;delete l.$id,Hr(l,O,"#")}const d={...s};function g(O,m=""){if(!(typeof O!="object"||O===null)){for(const[h,b]of Object.entries(O))if(b&&typeof b=="object"){const L=b;if(L.$id&&typeof L.$id=="string"){const N=L.$id;if(m!==`definitions.${N}`){const{$id:I,...w}=L;d[N]=w,O[h]={$ref:`#/definitions/${N}`},g(w,`definitions.${N}`);continue}}g(b,m?`${m}.${h}`:h)}}}g(l);const p={$schema:i};return r&&(p.$id=r),Object.assign(p,l),p.$schema=i,r&&(p.$id=r),o!==void 0&&(p.title=o),a!==void 0&&(p.description=a),Object.keys(d).length>0&&(p.definitions=d),Yy(p),c==null||c(p),Fl(p),p}var $a=200,Ia=36,Na=600,Qy=new Set(["family","fontFace","titleFontFace","legendFontFace","dataLabelFontFace","catAxisLabelFontFace","valAxisLabelFontFace"]),ex=new Set(["heading","body","mono","light"]),tx=new Set(["fontRegistry"]);function Kr(e,n,i){if(e!=null){if(typeof e=="string"){if(i&&(Qy.has(i)||ex.has(i))){const r=e.trim();r.length>0&&n.add(r)}return}if(Array.isArray(e)){for(const r of e)Kr(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))tx.has(o)||Kr(a,n,o)}}}function jl(e){const n=new Set;return Kr(e,n),n}var F0=jl,j0=jl,R0={100:"Thin",200:"ExtraLight",300:"Light",400:"Regular",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"},nx=["actionTitle","takeaway","source","tracker","footer"],ix=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(nx.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"}),Rl=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(),ix,{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})),Ul=t.Record(t.String({pattern:"^[a-zA-Z][a-zA-Z0-9_-]*$"}),Rl,{description:"Document-local JSON block definitions. Names are not built into the engine."}),Ml=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}),Vo={$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"}},rx=["$item","$slot","$context"],Li=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ox=["x","y","w","h","position","grid","gridConfig","direction","gap","weights","alignment","spacing"];Object.fromEntries(Object.entries(Vo).map(([e,n])=>[e,n.keys]));var xr=["null","boolean","number","string","array","object"],Zt=(e,n)=>new Set([...e].filter(i=>n.has(i))),ax=e=>new Set(e.flatMap(n=>[...n])),Aa=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(xr);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(xr);if(e.type){const s=Array.isArray(e.type)?e.type:[e.type];a=Zt(a,new Set(xr.filter(c=>s.includes(c)||c==="number"&&s.includes("integer"))))}if(Object.hasOwn(e,"const")&&(a=Zt(a,new Set([Aa(e.const)]))),Array.isArray(e.enum)&&(a=Zt(a,new Set(e.enum.map(Aa)))),typeof e.$ref=="string"){const s=n(e.$ref);s!==void 0&&(a=Zt(a,An(s,n,o)))}for(const s of["anyOf","oneOf"])Array.isArray(e[s])&&(a=Zt(a,ax(e[s].map(c=>An(c,n,o)))));if(Array.isArray(e.allOf))for(const s of e.allOf)a=Zt(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 hi(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(hi(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=>hi(s,n,r))});return Array.isArray(e.allOf)&&o.push(...e.allOf.map(a=>hi(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}),Sr=e=>({type:"string",pattern:"^(|/.*)$",description:e}),sx=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. 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."}),lx=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."},li=(e,n)=>({...typeof e=="boolean"?{allOf:[e]}:e,description:n}),wr=e=>typeof e=="boolean"?{}:{...e.description&&{description:e.description},...e.markdownDescription&&{markdownDescription:e.markdownDescription}},cx=e=>({type:"object",required:[e]}),ci=Object.keys(Vo);function Bl(e,n,i=[],r="docx"){const o=`BlockTemplate_${n}`,a=sx(r),s=lx(r),c=A=>({description:A,anyOf:[Sr(A),...rx.map(R=>kt({[R]:Sr(a[R])},[R]))]}),l=`${o}_Body`,d=A=>({$ref:`#/definitions/${A}`});if(e[l])return d(l);const g={...e},p=g[n];g[n]={...p,anyOf:(p.anyOf??[p]).filter(A=>{var R,J;return!i.includes((J=(R=A.properties)==null?void 0:R.name)==null?void 0:J.const)})};const O=A=>{if(!A.startsWith("#/definitions/"))return;let R=g;for(const J of A.slice(14).split("/")){const Q=J.replace(/~1/g,"/").replace(/~0/g,"~");if(!R||typeof R!="object"||!Object.hasOwn(R,Q))return;R=R[Q]}return typeof R=="boolean"||R&&typeof R=="object"?R:void 0},m=new Map,h=new Map;let b=0;const L=d(n),N=new Map,I=A=>{const R=JSON.stringify(A);let J=N.get(R);return J||(J=`${o}_Shared${b++}`,N.set(R,J),e[J]=A),d(J)},w=Object.fromEntries(ci.map(A=>[A,I(cx(A))])),D=I({anyOf:Object.values(w)}),_=[...new Set(["",...ci.flatMap(A=>Array.from({length:A.length-1},(R,J)=>A.slice(0,J+1)))])],T=I({type:"object",propertyNames:{pattern:`^(?:${_.map(A=>A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})$`}});function k(A){if(typeof A=="boolean")return A;const R=JSON.stringify(A),J=h.get(R);if(J)return{...d(J),...wr(A)};const Q=`${o}_Literal${b++}`;h.set(R,Q),e[Q]={};const X={...A};if(typeof A.$ref=="string"){const y=O(A.$ref);if(y!==void 0){const F=k(y);typeof F=="object"?X.$ref=F.$ref:(delete X.$ref,F||(X.not={}))}}A.properties&&(X.properties=Object.fromEntries(Object.entries(A.properties).map(([y,F])=>[y,["name","version"].includes(y)&&typeof F=="object"&&typeof F.const=="string"?F:W(F)]))),A.patternProperties&&(X.patternProperties=Object.fromEntries(Object.entries(A.patternProperties).map(([y,F])=>[y,W(F)]))),A.items!==void 0&&(X.items=Array.isArray(A.items)?A.items.map(y=>W(y,!0)):W(A.items,!0));for(const y of["additionalProperties","additionalItems"])typeof A[y]=="object"&&(X[y]=W(A[y],y==="additionalItems"));for(const y of["anyOf","oneOf","allOf"])Array.isArray(A[y])&&(X[y]=A[y].map(F=>{var ce,z;const Y=k(F);return typeof F=="object"&&typeof((z=(ce=F.properties)==null?void 0:ce.name)==null?void 0:z.const)=="string"&&typeof Y=="object"&&Y.$ref?e[Y.$ref.slice(14)]:Y}));for(const y of["then","else"])A[y]!==void 0&&(X[y]=k(A[y]));return e[Q]=X,{...d(Q),...wr(A)}}function W(A,R=!1){if(A===!1)return!1;const J=wr(A),Q=typeof A=="object"?{...A}:A;typeof Q=="object"&&(delete Q.description,delete Q.markdownDescription);const X=`${R?"sequence":"value"}:${JSON.stringify(Q)}`,y=m.get(X);if(y)return{...d(y),...J};const F=`${o}_Value${b++}`;m.set(X,F),e[F]={};const Y=d(F),ce=An(Q,O);if(ce.size===0)return e[F]={allOf:[k(Q)]},Y;const z=()=>R?W(Q):Y,Vt=()=>R?{anyOf:[Y,{type:"array",items:Y}]}:Y,ge=()=>R?z():W(hi(Q,O)),Z={};for(const G of ci){const Ze=Vo[G].result;if(!(Ze!=="dynamic"&&!ce.has(Ze)&&!(R&&Ze==="array")))switch(G){case"$slot":case"$item":case"$theme":case"$context":Z[G]=kt({[G]:Sr(a[G]),default:li(z(),"Fallback value or binding used only when the referenced value is missing. Null, false and empty values do not trigger it."),...G==="$slot"||G==="$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."}}:{}},[G]);break;case"$if":Z[G]=kt({$if:c('Test a slot by JSON Pointer, e.g. /subtitle, or a reference such as { "$item": "/numeric" }. Missing, null, false, empty text and empty arrays select else; zero selects then.'),then:li(Vt(),"Value or components to emit when the slot tested by $if is present."),else:li(Vt(),"Value or components to emit otherwise. Omit to produce no output.")},["$if","then"]);break;case"$each":Z[G]=kt({$each:c('Repeat template for each entry in an array slot, e.g. /items, or in an array of the current entry, { "$item": "/cells" }. Read the current entry with $item.'),template:li(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[G]=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[G]=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[G]=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 Jt=G;throw new Error(`Missing authoring schema for directive ${Jt}`)}}}return e[F]={allOf:[{if:D,then:{allOf:ci.map(G=>({if:w[G],then:Z[G]?I({...Z[G],properties:Object.fromEntries(Object.entries(Z[G].properties).map(([Ze,Jt])=>[Ze,I(Jt)]))}):!1}))},else:k(Q)},{if:T,then:{properties:Object.fromEntries(Object.entries(Z).map(([G,Ze])=>[G,I(Ze.properties[G])]))}}]},{...Y,...J}}return e[l]=W(L,!0),d(l)}var Jo=e=>JSON.parse(JSON.stringify(e));function Lr(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 dx(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=Lr(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=Lr(e.minimum,e.maximum,"");r&&n.push(r.trim());const o=Lr(e.minItems,e.maxItems,"entries");return o&&n.push(o),e.role&&n.push(`Role: ${e.role}`),n}function px(e){return[e.description,dx(e).join(" · ")].filter(Boolean).join(`
3
-
4
- `)}function qr(e,n){let i;if(e.type==="component")i=n?{allOf:[n,{properties:{props:{propertyNames:{not:{enum:[...ox]},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];i={...c},o&&(i.pattern="^[^\\r\\n]*$"),s&&(i.items=qr(s,n)),a&&(i.properties=Object.fromEntries(Object.entries(a).map(([l,d])=>[l,qr(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=px(e);return r&&(i.markdownDescription=r),i}function ux(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,qr(r,n)])),required:Object.entries(e.slots).filter(([,i])=>i.required&&i.default===void 0).map(([i])=>i)}}function mx(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:ux(e[o],n)}}}))),r}function fx(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=mx(n,o.componentRef),c=new Set,l=d=>{var p,O;if(!d||typeof d!="object"||c.has(d))return;if(c.add(d),Array.isArray(d)){d.forEach(l);return}const g=d;if(((O=(p=g.properties)==null?void 0:p.name)==null?void 0:O.const)==="block"&&g.properties.props){g.properties.props=Jo(s);return}for(const[m,h]of Object.entries(g))m!=="$ref"&&l(h)};l(a)}}function Gr(e,n){if(Array.isArray(e)){e.forEach(i=>Gr(i,n));return}if(Li(e)){e.name==="block"&&Li(e.props)&&typeof e.props.ref=="string"&&n(e.props.ref,e);for(const i of Object.values(e))Gr(i,n)}}function El(e,n,i){var r;if(e.default!==void 0)return Jo(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)=>El(a,`${n} ${c+1}`,i))}case"object":return Cl(e.properties??{},i);case"component":return i==="docx"?{name:"paragraph",props:{text:n}}:{name:"text",props:{text:n}};default:return n}}function Cl(e,n){return Object.fromEntries(Object.entries(e).filter(([,i])=>i.required&&i.default===void 0||i.role).map(([i,r])=>[i,El(r,i,n)]))}function gx(e,n,i){let r;if(Li(i.document)){const o=Object.fromEntries(Object.entries(i.document).filter(([a])=>a!=="props"));Gr(o,(a,s)=>{if(r||a!==e)return;const c=s.props;r={name:"block",props:{ref:a,...Li(c.slots)&&{slots:Jo(c.slots)}}}})}return r??{name:"block",props:{ref:e,slots:Cl(n.slots,i.format)}}}var hx=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"}),bx=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"}),Dl=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(hx),gutter:t.Optional(bx)},{additionalProperties:!1,description:"Grid layout configuration"}),He=t.String({pattern:"^#?[0-9A-Fa-f]{6}$",description:"Hex color (e.g. #FF0000)"}),Ox=t.Object({fontSize:t.Optional(t.Number()),fontFace:t.Optional(Ft),fontColor:t.Optional(qo),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(Ko)},{additionalProperties:!1,description:"Text style preset"}),zl=t.Object({...nr,displayName:t.Optional(t.String()),description:t.Optional(t.String()),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:Ft,body:Ft,mono:t.Optional(Ft),light:t.Optional(Ft)},{additionalProperties:!1,description:"Font families"}),fontRegistry:t.Optional(tr),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(ul.map(e=>[e,Ox]))),{additionalProperties:!1,description:"Named text style presets"})),componentDefaults:t.Optional(Ll)},{additionalProperties:!1,description:"Presentation theme configuration"}),jt=["pptxgenjs","office-open"],bi="pptxgenjs";function ar(e){return`PptxComponentDefinition_${e}`}function yx(e,n,i){const r=Vr(n),o=Pi(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];xx(r);break}return _l(r),r}function xx(e){var o,a;const n=(o=Pi(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=Pi(s);c!=null&&c.text&&(delete c.colspan,delete c.rowspan,delete c.margin,_l(s))}}function Pi(e){if(!(!e||typeof e!="object"))return e.properties}function _l(e){const n=Pi(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 Vr(e){if(Array.isArray(e))return e.map(Vr);if(!e||typeof e!="object")return e;const n=Object.create(Object.getPrototypeOf(e));for(const i of Reflect.ownKeys(e))n[i]=Vr(e[i]);return n}var di=(e,n)=>t.Union([t.Number({description:e}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:n})]),Sx=t.Object({x:t.Optional(di("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(di("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(di("Frame width in inches","Frame width as a percentage of the enclosing width")),h:t.Optional(di("Frame height in inches","Frame height as a percentage of the enclosing height")),grid:t.Optional(qt),gridConfig:t.Optional(t.Object({...Dl.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."}),wx=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: consulting (the house style), default, dark, minimal.',examples:["consulting","default","dark","minimal"],default:"default"}),zl],{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(tr),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(Ll),grid:t.Optional(Dl),blocks:t.Optional(Ul)},{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 Lx=t.Object({color:t.Optional(qo),gradient:t.Optional(bl),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}),Px=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}),vx=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(Lx),transition:t.Optional(Px),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}),ka=[...gt.map(({name:e})=>e),"block","group"],Mn=[{name:"pptx",propsSchema:wx,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:vx,hasChildren:!0,allowedChildren:ka,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:Sx,hasChildren:!0,allowedChildren:ka,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:Ml,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 $n(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(jt.map(a=>t.Literal(a)),{description:'Renderer backend. Omitted defaults to "pptxgenjs".'}))),r.props=i?yx(e.name,e.propsSchema,i.renderer):e.propsSchema,e.hasChildren&&n&&(r.children=t.Optional(t.Array(n))),wl(e)||(r.props=t.Optional(r.props)),t.Object(r,{additionalProperties:!1,description:e.description})}function $x(e){return Mn.map(n=>$n(n,e))}function Wl(e,n=[],i){const r=new Map;for(const c of Mn)c.hasChildren||r.set(c.name,$n(c,void 0,i));const o=Mn.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,$n(d,h,i)),s.splice(l,1);continue}if(!d.allowedChildren){a.set(d.name,$n(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 O=[...d.allowedChildren.map(h=>a.get(h)??r.get(h)).filter(h=>h!==void 0),...n],m=O.length===1?O[0]:t.Union(O);a.set(d.name,$n(d,m,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 Ix(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 Nx(e={}){const{customComponents:n=[]}=e,i=jt.map(r=>Ax(n,r,r!==bi));return t.Union(i,{description:"Presentation definition, discriminated by the optional renderer field. Omitted renderer means pptxgenjs."})}function Ax(e,n,i){return t.Recursive(r=>{const o=[];for(const c of e)if(c.versions.length>0){const l=kl(c.versions.map(g=>g.version)),d=c.versions.map(g=>Ix(c,g,r,g.version===l));o.push(...d)}const s=[...Wl(r,o,{renderer:n,requireDiscriminator:i}),...o];return s.length===0?t.Object({}):t.Union(s)},{$id:ar(n)})}t.Union([...$x(t.Any())],{discriminator:{propertyName:"name"},description:"Standard PPTX component definition with discriminated union"});t.Recursive(e=>t.Union([...Wl(e)],{discriminator:{propertyName:"name"},description:"PPTX component definition with discriminated union"}));function kx(e){const n=e.definitions??{},i=new Map;for(const o of jt){const a=ar(o);n[a]&&i.set(o,Bl(n,a,["pptx","slide"],"pptx"))}const r=o=>{var s,c,l,d,g,p;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 O=i.get((l=a.properties.renderer)==null?void 0:l.const),m=(p=(g=(d=a.properties.props)==null?void 0:d.properties)==null?void 0:g.blocks)==null?void 0:p.patternProperties;if(O&&m)for(const h of Object.values(m))h.properties.body.items=O}Object.values(a).forEach(r)};r(e)}function Tx(e){const n=e.anyOf;if(!Array.isArray(n))return;const i=new Map;for(const a of jt){const s=`#/definitions/${ar(a)}`,c=n.find(l=>l&&l.$ref===s);c&&i.set(a,c)}if(i.size!==n.length||!i.has(bi))return;const r=a=>({properties:{renderer:{const:a}},required:["renderer"]}),o=jt.filter(a=>a!==bi&&i.has(a));delete e.anyOf,e.type="object",e.properties={renderer:{description:'Renderer backend. Omitted defaults to "pptxgenjs".',anyOf:jt.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(bi)}]}function Fx(e){var r,o;const n=e.definitions??{},i=[];for(const a of jt){const s=ar(a),c=n[s];if(!c)continue;const l=`PptxSlotContent_${a}`;if(!n[l]){const g=Wr(c).find(O=>{var m,h;return((h=(m=O.properties)==null?void 0:m.name)==null?void 0:h.const)==="slide"}),p=(o=(r=g==null?void 0:g.properties)==null?void 0:r.children)==null?void 0:o.items;p&&(n[l]=JSON.parse(JSON.stringify(p)))}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 jx(e,n={}){return Zy(e,{...n,enrich:i=>{kx(i),Tx(i)}})}Object.fromEntries(Mn.map(e=>[e.name,e.propsSchema]));new Set(Mn.filter(e=>{var n;return!!((n=e.special)!=null&&n.hasSchemaField)}).map(e=>e.name));var Hl=new Set(["name","id","enabled","props","children"]);[...Hl];var Rx=new Set([...Hl,"$schema"]);Rx.add("renderer");var H=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'}),Kl=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"'}),ql=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"]}),Gl=t.Boolean({description:"Disable spell/grammar checking for this text (e.g. code snippets or identifiers)"}),Xo=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"]]}),Yo=t.Object({case:t.Optional(Ko),size:t.Optional(t.Number({minimum:8,maximum:120})),color:t.Optional(H),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}),rn=t.Object({family:Ft,...Yo.properties},{description:"Font definition with family and optional formatting properties",additionalProperties:!1}),sr=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")],{description:"Text alignment options"}),Vl=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Text alignment options including justify"}),Ux=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)"}),$t=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}),Mx=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(H)},{description:"Border configuration",additionalProperties:!1});var Jl=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}),lr=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}),Xl=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}),Bx=t.Union([t.Literal("left"),t.Literal("right"),t.Literal("center"),t.Literal("decimal"),t.Literal("bar")],{description:"Tab stop alignment type"}),Ex=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"}),Cx=t.Object({type:Bx,position:t.Number({minimum:0,description:"Tab stop position in twips (1/20 of a point)"}),leader:t.Optional(Ex)},{description:"Tab stop definition (w:tab in w:tabs)",additionalProperties:!1}),Dx=t.Array(Cx,{description:"Tab stops for the paragraph. Tab characters (\\t) in the text jump to these positions."}),zx=t.Union([t.Literal("character"),t.Literal("column"),t.Literal("margin"),t.Literal("page"),t.Literal("text")],{description:"Horizontal position relative to"}),_x=t.Union([t.Literal("margin"),t.Literal("page"),t.Literal("paragraph"),t.Literal("line"),t.Literal("text")],{description:"Vertical position relative to"}),Wx=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("inside"),t.Literal("outside")],{description:"Horizontal alignment"}),Hx=t.Union([t.Literal("top"),t.Literal("center"),t.Literal("bottom"),t.Literal("inside"),t.Literal("outside")],{description:"Vertical alignment"}),Kx=t.Union([t.Literal("none"),t.Literal("square"),t.Literal("topAndBottom"),t.Literal("around"),t.Literal("tight"),t.Literal("through")],{description:"Text wrapping type"}),qx=t.Union([t.Literal("bothSides"),t.Literal("left"),t.Literal("right"),t.Literal("largest")],{description:"Text wrapping side"}),cr=t.Object({horizontalPosition:t.Optional(t.Object({relative:t.Optional(zx),align:t.Optional(Wx),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(_x),align:t.Optional(Hx),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:Kx,side:t.Optional(qx),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 Gx={};t.Object(Gx,{description:"Base component props",additionalProperties:!0});var It=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")'}),Vx="^-?\\d+(\\.\\d+)?%$",Jx="^\\d+(\\.\\d+)?%$",Ta=t.Union([t.Number({description:"Inches from the canvas origin"}),t.String({pattern:Vx,description:'Percentage of the canvas extent on this axis, e.g. "25%"'})],{description:"Position in inches (number) or as a canvas percentage"}),Fa=t.Union([t.Number({minimum:0,description:"Size in inches"}),t.String({pattern:Jx,description:'Percentage of the canvas extent on this axis, e.g. "50%"'})],{description:"Size in inches (number) or as a canvas percentage"}),Zo={x:t.Optional(Ta),y:t.Optional(Ta),w:t.Optional(Fa),h:t.Optional(Fa),rotate:t.Optional(t.Number({description:"Clockwise rotation in degrees"}))},Yl=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(It)},{additionalProperties:!1})],{description:"Underline: true for a single line, or a style/colour object"}),dr={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())},Xx=t.Object({text:t.String({description:"Run text"}),color:t.Optional(It),...dr,underline:t.Optional(Yl),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"}),Yx=t.Object({text:t.String({description:"Segment text"}),color:t.Optional(It),...dr,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"}),Zl=t.Object({color:t.Optional(It),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."}),Zx=t.Object({color:t.Optional(It),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"}),Ql=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Horizontal text alignment"}),ec=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical text anchoring inside the box"}),tc=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"}),Qx=t.Object({text:t.Optional(t.String({description:"Plain text content"})),runs:t.Optional(t.Array(Xx,{minItems:1,description:'Formatted runs, as an alternative to "text"'})),...Zo,color:t.Optional(It),...dr,underline:t.Optional(Yl),strike:t.Optional(t.Boolean({description:"Strikethrough"})),align:t.Optional(Ql),valign:t.Optional(ec),margin:t.Optional(tc),fill:t.Optional(Zl)},{additionalProperties:!1,description:"Native visual text element — becomes a Word text box (wps:wsp) inside the drawing group"}),eS=t.Object({type:hl,...Zo,fill:t.Optional(Zl),line:t.Optional(Zx),text:t.Optional(t.Union([t.String(),t.Array(Yx,{minItems:1})],{description:"Text drawn inside the shape"})),...dr,fontColor:t.Optional(It),align:t.Optional(Ql),valign:t.Optional(ec),margin:t.Optional(tc),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"}),tS=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"})),...Zo,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 Pr(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 nS=t.Union([Pr("text",Qx,"Text element - a native Word text box drawn on the visual canvas."),Pr("shape",eS,"Shape element - a native preset-geometry shape, optionally holding text."),Pr("image",tS,"Image element - a native picture; an SVG stays vector.")],{$id:"DocxNativeVisualContent",discriminator:{propertyName:"name"},description:"A single native visual element (text, shape, or image)."}),iS=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(It),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"}),rS=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}),oS=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(rS)},{description:"pptx canvas definition for the visual",additionalProperties:!1}),nc={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(sr),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($t),floating:t.Optional(cr),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"}))},aS=t.Object({renderMode:t.Optional(t.Literal("raster",{description:"Render as a rasterized pptx slide (the default when omitted)."})),canvas:oS,elements:t.Optional(t.Array(Rb,{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:Ia,maximum:Na,default:$a,description:`Raster resolution in DPI (default ${$a}, range ${Ia}-${Na}). Higher = sharper + larger.`})),serverUrl:t.Optional(t.String({description:"Rasterization service URL override (default from services.pptx)"})),...nc},{$id:"DocxVisualRasterProps",description:"Visual component props (pptx-rendered graphic)",additionalProperties:!1}),sS=t.Object({renderMode:t.Literal("native",{description:'Draw natively as a Word DrawingML group. Requires the "office-open" renderer.'}),canvas:iS,elements:t.Optional(t.Array(nS,{description:"Native drawing elements (text, shape, image), positioned with x/y/w/h in inches or canvas percentages"})),...nc},{$id:"DocxVisualNativeProps",description:'Visual component props (native Word drawing group; requires renderer "office-open")',additionalProperties:!1}),lS=t.Union([aS,sS],{description:"Visual component props — rasterized pptx slide (default) or a native Word drawing group"}),pr=["docxjs","office-open"],cS="docxjs";function Bn(e){return`ComponentDefinition_${e}`}function ic(e,n,i){const r=Yr(n);return Xr(r,Bn(i)),e==="visual"&&i!=="office-open"?dS(r)??r:(i==="office-open"&&Jr(r),r)}function dS(e){const n=e.anyOf;return Array.isArray(n)&&n.length>0?n[0]:void 0}function Jr(e){if(Array.isArray(e)){e.forEach(Jr);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))Jr(n[r])}function Xr(e,n){if(Array.isArray(e)){e.forEach(r=>Xr(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[P]==="Any"&&(i.items={$ref:n});for(const r of Reflect.ownKeys(i))Xr(i[r],n)}function Yr(e){if(Array.isArray(e))return e.map(Yr);if(!e||typeof e!="object")return e;const n=Object.create(Object.getPrototypeOf(e));for(const i of Reflect.ownKeys(e))n[i]=Yr(e[i]);return n}function pS(e){const n=e.definitions??{},i=new Map;for(const o of pr){const a=Bn(o);n[a]&&i.set(o,Bl(n,a,["docx","section"]))}const r=o=>{var s,c,l,d,g,p;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 O=i.get((l=a.properties.renderer)==null?void 0:l.const),m=(p=(g=(d=a.properties.props)==null?void 0:d.properties)==null?void 0:g.blocks)==null?void 0:p.patternProperties;if(O&&m)for(const h of Object.values(m)){h.properties.body.items=O;for(const b of["header","footer"])h.properties.section.properties[b].items=O}}Object.values(a).forEach(r)};r(e)}function uS(e){const n=e.definitions??{};return pr.filter(i=>n[Bn(i)]).map(i=>{const r=Bn(i);return{name:r,componentRef:{$ref:`#/definitions/${r}`}}})}var mS=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}),ur=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(mS,{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}),fS=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}),rc={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"}))},gS=t.Object(rc,{description:"A reply within a comment thread",additionalProperties:!1}),mr=t.Object({...rc,replies:t.Optional(t.Array(gS,{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}),oc=t.Object({text:t.String({description:"Heading text (required)"}),level:t.Optional(Ux),font:t.Optional(t.Partial(rn)),language:t.Optional(ql),noProof:t.Optional(Gl),noProofWords:t.Optional(Xo),alignment:t.Optional(Vl),spacing:t.Optional($t),indent:t.Optional(Xl),lineSpacing:t.Optional(t.Union([t.Number({minimum:0}),Jl],{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(ur),comment:t.Optional(mr)},{description:"Heading component props",additionalProperties:!1}),ac=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}),hS=t.Array(ac,{description:"Footnote bodies for `[^id]` markers in this paragraph, placed at the foot of the page. An unreferenced body is not emitted.",minItems:1}),bS=t.Array(ac,{description:"Endnote bodies for `[^id]` markers in this paragraph, collected at the end of the document. An unreferenced body is not emitted.",minItems:1}),OS=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"}),ja=t.Union([t.Literal("margin"),t.Literal("page"),t.Literal("text")],{description:"Frame anchor type"}),yS=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("inside"),t.Literal("outside")],{description:"Frame horizontal alignment"}),xS=t.Union([t.Literal("top"),t.Literal("center"),t.Literal("bottom"),t.Literal("inside"),t.Literal("outside")],{description:"Frame vertical alignment"}),SS=t.Object({horizontalPosition:t.Optional(t.Object({relative:t.Optional(ja),align:t.Optional(yS),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(ja),align:t.Optional(xS),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:OS},{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}),wS=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Paragraph text alignment"}),sc=t.Object({text:t.String({description:"Text content (required)"}),font:t.Optional(t.Partial(rn)),themeStyle:t.Optional(t.String()),language:t.Optional(ql),noProof:t.Optional(Gl),noProofWords:t.Optional(Xo),boldColor:t.Optional(H),spacing:t.Optional($t),alignment:t.Optional(wS),indent:t.Optional(Xl),tabStops:t.Optional(Dx),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(SS),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(ur),comment:t.Optional(mr),footnotes:t.Optional(hS),endnotes:t.Optional(bS)},{description:"Paragraph component props (font nested for theme consistency; no flat font properties)",additionalProperties:!1}),lc=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(sr),caption:t.Optional(t.String({description:"Image caption (supports rich text with **bold**, *italic*, ***both***)"})),spacing:t.Optional($t),floating:t.Optional(cr),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}),cc=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(sr),spacing:t.Optional($t),size:t.Optional(t.Union([t.Literal("small"),t.Literal("medium"),t.Literal("large")]))},{description:"Statistic component props",additionalProperties:!1}),LS=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})])),dc=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Horizontal text alignment"}),pc=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical cell alignment"}),uc=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({...Jl.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}),Zr=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})]),Qr=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})]),PS=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})]),mc=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})]),vr=t.Object({color:t.Optional(H),backgroundColor:t.Optional(Kl),horizontalAlignment:t.Optional(dc),verticalAlignment:t.Optional(pc),font:t.Optional(uc),borderColor:t.Optional(Zr),borderSize:t.Optional(Qr),padding:t.Optional(mc),height:t.Optional(t.Number({minimum:0,description:"Cell height in points"}))},{additionalProperties:!1});function fc(e){const n=t.Union([t.String(),e]),i={color:t.Optional(H),backgroundColor:t.Optional(Kl),horizontalAlignment:t.Optional(dc),verticalAlignment:t.Optional(pc),font:t.Optional(uc),borderColor:t.Optional(Zr),borderSize:t.Optional(Qr),padding:t.Optional(mc),height:t.Optional(t.Number({minimum:0,description:"Cell height in points"})),comment:t.Optional(mr),revision:t.Optional(ur)},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(vr),header:t.Optional(r),cells:t.Optional(t.Array(o))},{additionalProperties:!1});return t.Object({borderColor:t.Optional(Zr),borderSize:t.Optional(Qr),hideBorders:t.Optional(PS),cellDefaults:t.Optional(vr),headerCellDefaults:t.Optional(vr),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(fS),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 gc=fc(LS),hc=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($t),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}),bc=hc(),vS=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}),Oc=t.Object({columns:t.Union([t.Number({minimum:1,description:"Number of equal-width columns (converter will normalize to array)"}),t.Array(vS,{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}),yc=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"}),$S=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(H),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}),IS=t.Object({level:t.Number({minimum:0,maximum:8,description:"Nesting level (0 = root, 1 = first sublevel, etc.)"}),format:t.Optional(yc),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(lr),start:t.Optional(t.Number({minimum:1,description:"Starting number for this level (default: 1)"})),font:t.Optional($S)},{description:"Configuration for a single list level",additionalProperties:!1}),xc=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(ur)},{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(IS,{description:"Configuration for each nesting level",minItems:1,maxItems:9})),format:t.Optional(t.Union([yc,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."})),spacing:t.Optional(Mx),alignment:t.Optional(Vl),indent:t.Optional(t.Union([t.Number({minimum:0}),lr])),comment:t.Optional(mr)},{description:"List component props",additionalProperties:!1}),Qo=["revision","comment","footnotes","endnotes"],NS=t.Partial(t.Omit(oc,Qo)),AS=t.Partial(t.Omit(sc,Qo)),kS=t.Partial(lc),TS=t.Partial(cc),FS=t.Partial(t.Omit(gc,["rows"])),jS=t.Partial(bc),RS=t.Partial(Oc),US=t.Partial(t.Omit(xc,Qo)),Sc=t.Object({heading:t.Optional(NS),paragraph:t.Optional(AS),image:t.Optional(kS),statistic:t.Optional(TS),table:t.Optional(FS),section:t.Optional(jS),columns:t.Optional(RS),list:t.Optional(US)},{additionalProperties:!0}),MS=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 BS=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:MS},{description:"Page configuration including dimensions and margins",additionalProperties:!1}),wc=t.Object({heading:rn,body:rn,mono:rn,light:rn},{additionalProperties:!1,description:"Font definitions for different text types"}),ES=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"}),Lc={style:ES,size:t.Number({minimum:0,description:"Width in eighths of a point (docx sz)"}),color:H,space:t.Optional(t.Number({minimum:0,description:"Space between text and border in points"}))},pi=t.Object(Lc,{additionalProperties:!1,description:"Paragraph border side definition"}),CS=t.Object(Lc,{additionalProperties:!1,description:"Rule drawn between consecutive paragraphs sharing this border set (w:between), in place of their adjoining bottom and top edges"}),Pc=t.Object({top:t.Optional(pi),bottom:t.Optional(pi),left:t.Optional(pi),right:t.Optional(pi),between:t.Optional(CS)},{additionalProperties:!1,description:"Paragraph borders (per side, plus the between-paragraph rule)"}),vc=t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")])),Ke=t.Object({font:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),...Yo.properties,alignment:vc,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(Pc),indent:t.Optional(lr)},{additionalProperties:!1}),DS=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"}),_S=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(DS)},{description:"Tab stop configuration with position, alignment, and optional leader",additionalProperties:!1}),Qt=t.Object({font:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),...Yo.properties,alignment:vc,tabStops:t.Optional(t.Array(_S,{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(Pc),indent:t.Optional(lr)},{additionalProperties:!1}),$c=t.Object({normal:t.Optional(Ke),heading1:t.Optional(Ke),heading2:t.Optional(Ke),heading3:t.Optional(Ke),heading4:t.Optional(Ke),heading5:t.Optional(Ke),heading6:t.Optional(Ke),title:t.Optional(Ke),subtitle:t.Optional(Ke),TOC1:t.Optional(Qt),TOC2:t.Optional(Qt),TOC3:t.Optional(Qt),TOC4:t.Optional(Qt),TOC5:t.Optional(Qt),TOC6:t.Optional(Qt)},{additionalProperties:Ke,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)]),...Ke.properties},{additionalProperties:!1});var Ic=t.Object({primary:H,secondary:H,accent:H,text:H,background:H,border:H,textPrimary:H,textSecondary:H,textMuted:H,borderPrimary:H,borderSecondary:H,backgroundPrimary:H,backgroundSecondary:H,accent4:t.Optional(H),accent5:t.Optional(H),accent6:t.Optional(H)},{additionalProperties:!1}),WS=t.Object({...nr,colors:t.Optional(t.Partial(Ic)),fonts:t.Optional(t.Partial(wc)),styles:t.Optional($c)},{additionalProperties:!1,description:"Partial theme deep-merged over the resolved named theme: define or override palette tokens, font roles, and named styles in-document."}),HS=t.Object({...nr,$schema:t.Optional(t.String()),name:t.String(),displayName:t.String(),description:t.String(),version:t.String(),colors:Ic,fonts:wc,fontRegistry:t.Optional(tr),page:BS,styles:t.Optional($c),componentDefaults:t.Optional(Sc),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 U0(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 KS=t.Object({},{additionalProperties:!1}),qS=e=>t.Object({blocks:t.Optional(Ul),theme:t.Optional(t.String({description:'Theme name to apply (default: "minimal"). Built-ins: consulting (the house style), minimal, devportal, vermilion.',examples:["consulting","minimal","devportal","vermilion"],default:"minimal"})),themeOverrides:t.Optional(WS),fontRegistry:t.Optional(tr),componentDefaults:t.Optional(Sc),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(Xo),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}),GS=qS(),VS=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(cr),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(H)},{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(H)},{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(H)},{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(H)},{additionalProperties:!1}))},{additionalProperties:!1})),shading:t.Optional(t.Object({fill:t.Optional(H)},{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"]}}}]))}}}}}}]}),JS=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"}),XS=t.Union([t.Literal("document"),t.Literal("section")],{description:"TOC scope: document-wide or section-only"}),YS=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 ZS=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(JS),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([XS,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(YS,{description:"Custom style mappings for TOC entries. Maps custom theme styles to TOC levels."}))},{description:"Table of Contents component props",additionalProperties:!1}),QS=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(H),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($t)},{description:"Horizontal divider — a thin line across the measure, drawn as a Word paragraph border so it stays editable in Word.",additionalProperties:!1}),ew=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%")'}))}),tw=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"}),nw=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}),iw=t.Object({type:tw,data:t.Array(nw,{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(sr),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($t),floating:t.Optional(cr),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}),ht=[{name:"docx",propsSchema:GS,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:bc,createPropsSchema:hc,embeddedComponents:[{path:["header"],arity:"component-array",reportStructure:!0},{path:["footer"],arity:"component-array",reportStructure:!0}],hasChildren:!0,allowedChildren:["block","group","heading","paragraph","image","statistic","table","list","toc","divider","highcharts","chart","visual","columns","text-box"],category:"container",description:"Section container - groups related content with optional title. Use for organizing document structure."},{name:"columns",propsSchema:Oc,hasChildren:!0,allowedChildren:["block","group","heading","paragraph","image","statistic","table","list","toc","divider","highcharts","chart","visual","text-box"],category:"layout",description:"Multi-column layout - arranges content in 2-4 columns. Great for side-by-side content."},{name:"text-box",propsSchema:VS,hasChildren:!0,allowedChildren:["heading","paragraph","image","divider"],category:"layout",description:"Floating text container - allows positioning text anywhere on the page with absolute or relative positioning."},{name:"heading",propsSchema:oc,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:sc,hasChildren:!1,category:"content",description:"Paragraph text - supports formatting like bold, italic, and color. Main content element."},{name:"image",propsSchema:lc,hasChildren:!1,category:"content",description:"Image element - displays images with optional caption. Supports various formats."},{name:"statistic",propsSchema:cc,hasChildren:!1,category:"content",description:"Statistic display - shows a number with description. Perfect for KPIs and metrics."},{name:"block",propsSchema:Ml,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:KS,hasChildren:!0,allowedChildren:["group","block","heading","paragraph","image","statistic","table","list","toc","divider","highcharts","chart","visual","columns","text-box"],category:"container",description:"Transparent group of flow components; also the inspectable result of block expansion."},{name:"table",propsSchema:gc,createPropsSchema:fc,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:xc,hasChildren:!1,category:"content",description:"List element - bulleted or numbered list items. Supports nested lists."},{name:"toc",propsSchema:ZS,hasChildren:!1,category:"content",description:"Table of contents - automatically generates TOC from document headings. Supports depth ranges and custom styles."},{name:"divider",propsSchema:QS,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:ew,hasChildren:!1,category:"content",description:"Chart component powered by Highcharts - render line, bar, pie, heatmap, and more with rich options."},{name:"chart",propsSchema:iw,hasChildren:!1,renderers:["office-open"],category:"content",description:'Native Word chart - editable, scalable, no export server needed. Requires renderer "office-open".'},{name:"visual",propsSchema:lS,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 Ra(e){return ht.find(n=>n.name===e)}function rw(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(pr.map(d=>t.Literal(d)),{description:'Renderer backend. Omitted defaults to "docxjs".'})));const a=e.createPropsSchema&&i?e.createPropsSchema(i):e.propsSchema,s=r?ic(e.name,a,r.renderer):a;return o.props=rw(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 ow(e){return ht.map(n=>In(n,e))}function Nc(e,n=[],i){const r=d=>!i||!d.renderers||d.renderers.includes(i.renderer),o=new Map;for(const d of ht)r(d)&&(d.hasChildren||o.set(d.name,In(d,void 0,e,i)));const a=ht.filter(d=>d.hasChildren&&r(d)),s=new Map,c=[...a];for(;c.length>0;){const d=c.length;for(let g=c.length-1;g>=0;g--){const p=c[g];if(p.name==="group"){const L=t.Intersect([e,t.Object({name:t.Union([...p.allowedChildren.map(N=>t.Literal(N)),...n.map(N=>N.properties.name)])})]);s.set(p.name,In(p,L,e,i)),c.splice(g,1);continue}if(!p.allowedChildren){s.set(p.name,In(p,e,e,i)),c.splice(g,1);continue}if(!p.allowedChildren.filter(L=>a.some(N=>N.name===L)).every(L=>s.has(L)))continue;const h=[...p.allowedChildren.map(L=>s.get(L)??o.get(L)).filter(L=>L!==void 0),...n],b=h.length===1?h[0]:t.Union(h);s.set(p.name,In(p,b,e,i)),c.splice(g,1)}if(c.length===d)throw new Error(`Circular allowedChildren among: ${c.map(g=>g.name).join(", ")}`)}const l=new Map([...s,...o]);return{schemas:[...l.values()],byName:l}}function aw(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 p=d;if(p.type==="array"&&p.items&&Object.keys(p.items).length===0&&i.has(n)&&(p.items={$ref:`#/definitions/${n}`}),p.type==="array"&&p.items&&typeof p.items=="object"&&"$ref"in p.items&&o(p.items.$ref)){const O=r(p.items.$ref);p.items=O?{$ref:O}:{}}if(o(p.$ref)){const O=r(p.$ref);O?p.$ref=O:delete p.$ref}if(l==="$id"&&o(d)&&g!==`definitions.${d}.$id`){delete s[l];continue}a(d,g)}}}a(e)}function sw(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(p,O=""){if(!(typeof p!="object"||p===null)){for(const[m,h]of Object.entries(p))if(h&&typeof h=="object"){const b=h;if(b.$id&&typeof b.$id=="string"){const L=b.$id;if(O!==`definitions.${L}`){const{$id:N,...I}=b;l[L]=I,p[m]={$ref:`#/definitions/${L}`},d(I,`definitions.${L}`);continue}}d(h,O?`${O}.${m}`:m)}}}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),aw(g),pS(g),Fl(g),g}function lw(e={}){return t.Union(pr.map(n=>cw(e,n,n!==cS)),{description:"Document definition, discriminated by the optional renderer field. Omitted renderer means docxjs."})}function cw(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=Bn(n),g=t.Recursive(O=>{const m=[];for(const I of o)if(I.versionedProps&&I.versionedProps.length>0){const w=I.versionedProps,D=kl(w.map(W=>W.version));for(const W of w){const A=W.description||I.description,R={name:t.Literal(I.name),id:t.Optional(t.String()),version:A?t.Literal(W.version,{description:A}):t.Literal(W.version),props:W.propsSchema};W.hasChildren&&(R.children=t.Optional(t.Array(O)));const J=W.description?`${I.name} v${W.version} — ${W.description}`:I.description?`${I.name} v${W.version} — ${I.description}`:`${I.name} v${W.version}`;m.push(t.Object(R,{additionalProperties:!1,description:J}))}const _=w.find(W=>W.version===D),T={name:t.Literal(I.name),id:t.Optional(t.String()),props:_.propsSchema};_.hasChildren&&(T.children=t.Optional(t.Array(O)));const k=_.description?`${I.name} (latest: v${D}) — ${_.description}`:I.description?`${I.name} (latest: v${D}) — ${I.description}`:`${I.name} (latest: v${D})`;m.push(t.Object(T,{additionalProperties:!1,description:k}))}else{const w=!!I.hasChildren,D={name:t.Literal(I.name),id:t.Optional(t.String()),props:I.propsSchema};w&&(D.children=t.Optional(t.Array(O))),m.push(t.Object(D,{additionalProperties:!1,...I.description?{description:I.description}:{}}))}const{schemas:h,byName:b}=r?Nc(O,m,{renderer:n,requireDiscriminator:i}):{schemas:[],byName:new Map},L=Ra("section");c=["section",...(L==null?void 0:L.allowedChildren)??[]].map(I=>b.get(I)).filter(I=>I!==void 0),l=m;const N=[...h,...m];if(N.length===0)return t.Any();if(N.length===1)return N[0];{const I=o.length>0?"Component definition with discriminated union including custom components":"Component definition with discriminated union";return t.Union(N,{discriminator:{propertyName:"name"},description:I})}},{$id:d}),p=Ra("docx");if(!p)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(ic(p.name,p.propsSchema,n)),children:t.Array(t.Union([...c,...l],{discriminator:{propertyName:"name"}}))},{additionalProperties:!1,title:a,description:s,definitions:{[d]:g}})}t.Union([...ow(t.Any())],{discriminator:{propertyName:"name"},description:"Standard component definition with discriminated union"});var dw=t.Recursive(e=>t.Union([...Nc(e).schemas],{discriminator:{propertyName:"name"},description:"Component definition with discriminated union"})),pw=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")]))}),uw=t.Object({name:t.Literal("text-space-after"),id:t.Optional(t.String()),props:pw}),mw=uw;Object.fromEntries([...ht.map(e=>[e.name,e.propsSchema]),["custom",mw]]);new Map(ht.filter(e=>{var n;return(((n=e.embeddedComponents)==null?void 0:n.length)??0)>0}).map(e=>[e.name,e.embeddedComponents]));new Set(ht.filter(e=>{var n;return!!((n=e.special)!=null&&n.hasSchemaField)}).map(e=>e.name));new Map(ht.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 Pe={};function fw(){return{includeEmojis:!Ac(),verbosity:"normal",includeSuggestions:!0,includePath:!0,maxMessageLength:0,includeDocLinks:!1,colorSupport:gw()}}fw();function Ac(){return typeof process>"u"||!Pe?!1:!!(Pe.CI||Pe.CONTINUOUS_INTEGRATION||Pe.GITHUB_ACTIONS||Pe.GITLAB_CI||Pe.CIRCLECI||Pe.TRAVIS||Pe.JENKINS_URL)}function gw(){var e;return typeof process>"u"||Pe!=null&&Pe.NO_COLOR?!1:Pe!=null&&Pe.FORCE_COLOR||(e=process.stdout)!=null&&e.isTTY?!0:!Ac()}t.Object({definition:dw,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"});Ns("uri",e=>{try{return new URL(e),!0}catch{return e.includes(".json")||e.includes("/")||e.includes("\\")?!0:/^https?:\/\/.+/.test(e)}});Ns("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 hw=["chart","columns","divider","heading","highcharts","image","list","paragraph","docx","section","statistic","table","text-box","toc","visual","block","group"];new Set(hw);const $r=t.Object({basePath:t.String({default:""})});function bw(e){const n=_y($r,e);if(n.basePath&&n.basePath!==""&&(!n.basePath.startsWith("/")||n.basePath.endsWith("/")))throw new Error("basePath must start with / and not end with /");if(!or($r,n)){const i=[...vy($r,n)];throw new Error(`Environment validation failed: ${i.map(r=>r.message).join(", ")}`)}return n}bw({basePath:""});const Ow=["docx","pptx"];function yw(){if(typeof window>"u")return"docx";const e=window.__JTO_FORMAT__;return Ow.includes(e)?e:"docx"}const Ce=yw(),M0=Ce==="docx"?"Document":"Presentation",B0=Ce==="docx"?".docx":".pptx";function xw(){var r;const e=lw({customComponents:[]}),n=sw(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 ea(i),i}function Sw(){var r;const e=Nx({customComponents:[]}),n=jx(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 ea(i),i}function ww(){return Ce==="docx"?xw():Sw()}function Lw(){const n=JSON.parse(JSON.stringify(Ce==="docx"?HS:zl));eo(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 Pw(e=Ce==="docx"?["*.docx.json"]:["*.pptx.json"]){return{uri:"https://json-to-office.dev/schema/report/v1.0.0",fileMatch:e,schema:ww()}}function vw(e=[`*.${Ce}.theme.json`]){return{uri:"https://json-to-office.dev/schemas/theme/v1.0.0",fileMatch:e,schema:Lw()}}function ea(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=$w(o)),(r=e.properties)!=null&&r.props&&Iw(o,e.properties.props)}Object.values(e).forEach(o=>{typeof o=="object"&&o!==null&&ea(o)})}}function $w(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 Iw(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 eo(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=>eo(i,n));return}Object.keys(e).forEach(i=>{typeof e[i]=="object"&&e[i]!==null&&eo(e[i],n)})}}const Ae="/api",Tt=`${Ae}/${Ce}`,E0={discovery:{all:`${Ae}/discovery/all`,plugins:`${Ae}/discovery/plugins`,documents:`${Ae}/discovery/documents`,themes:`${Ae}/discovery/themes`,schemas:{document:`${Ae}/discovery/schemas/document`,theme:`${Ae}/discovery/schemas/theme`}},generate:`${Tt}/generate`,validate:`${Tt}/validate`,diff:`${Tt}/diff`,fonts:{catalog:`${Ae}/fonts/catalog`,materialize:`${Ae}/fonts/materialize`},preview:{libreoffice:`${Tt}/preview/libreoffice`,libreofficeFromJson:`${Tt}/preview/libreoffice-from-json`},renderers:`${Tt}/renderers`,cacheStats:`${Tt}/cache-stats`};class Nw{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(`${Ae}/discovery/schemas/document`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...i?{plugins:i}:{},customComponents:r})});else{let l=`${Ae}/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(`${Ae}/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 Aw=new Nw,kw=new Set(["family","fontFace","titleFontFace","legendFontFace","dataLabelFontFace","catAxisLabelFontFace","valAxisLabelFontFace"]),Tw=new Set(["heading","body"]);function Fw(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 N=e[r+1];if(N==='"')b+='"';else if(N==="\\")b+="\\";else if(N==="/")b+="/";else if(N==="n")b+=`
6
- `;else if(N==="r")b+="\r";else if(N==="t")b+=" ";else if(N==="u"){const I=e.slice(r+2,r+6);/^[0-9a-fA-F]{4}$/.test(I)?(b+=String.fromCharCode(parseInt(I,16)),r+=6):(b+="\\u",r+=2);continue}else b+=N??"";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:kw.has(b)?!0:Tw.has(b)?o[o.length-1]==="fonts":!1},p=()=>{if(s(),r>=e.length)return;const h=e[r];if(h==='"'){const{value:b,start:L,end:N}=c();g()&&n.push({path:d(),value:b,valueStart:L,valueEnd:N});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}),O(),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}),m(),i.pop(),L!==void 0&&o.pop();return}l()},O=()=>{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),p(),b&&(b.key=void 0),s(),e[r]===","){r++;continue}if(e[r]==="}"){r++;return}return}},m=()=>{if(s(),e[r]==="]"){r++;return}for(;r<e.length;){if(p(),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(),p(),n}const jw=qa(e=>({open:!1,contextual:void 0,openFor:n=>e({open:!0,contextual:n}),close:()=>e({open:!1,contextual:void 0})})),Ua="jto.pickFont";let Ir=null,Nr=null;function Rw(e){Ir&&Ir.dispose(),Nr&&Nr.dispose(),Nr=e.editor.registerCommand(Ua,(n,i,r)=>{jw.getState().openFor({jsonPath:i,currentValue:r})}),Ir=e.languages.registerCodeLensProvider("json",{provideCodeLenses(n){const i=n.getValue();return{lenses:Fw(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:Ua,title:o.value?`Pick font… (current: ${o.value})`:"Pick font…",arguments:[o.path,o.value]}}}),dispose:()=>{}}},resolveCodeLens(n,i){return i}})}const kc="jto-light",Tc="jto-dark",Uw={surface:"#ffffff",popover:"#ffffff",foreground:"#1a1f2e",muted:"#546f9c",border:"#e2e6ed",fill:"#f8f9fc",lineHighlight:"#edeff3",selection:"#4f7ef833",inserted:"#16a34a26",removed:"#ef444426"},Mw={surface:"#282c3e",popover:"#32374e",foreground:"#fafafa",muted:"#a4b2cc",border:"#494e65",fill:"#3b4054",lineHighlight:"#3b405499",selection:"#85a6fa33",inserted:"#34d39926",removed:"#fca5a526"};function Ma(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 Ba=!1;function Bw(e){Ba||(e.editor.defineTheme(kc,{base:"vs",inherit:!0,rules:[],colors:Ma(Uw)}),e.editor.defineTheme(Tc,{base:"vs-dark",inherit:!0,rules:[],colors:Ma(Mw)}),Ba=!0)}function C0(e){return e==="dark"?Tc:kc}const Ew={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:[]}],pptx:[{id:"pptx/canvas",label:"Canvas",category:"composition",defaultSeverity:"info",description:"Slide dimensions: legacy 4:3, or a partially declared size.",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 the profile requires — a takeaway, a source — left empty. Off unless a profile 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 the profile 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."}]}]};function Cw(){return Ew[Ce]}const Dw="inmemory://jto/quality-policy.json",zw="https://json-to-office.dev/schema/quality-policy/v1",_w={enum:["error","warning","info"],description:"Overrides the severity this rule reports at."};function Ww(){const e=Cw(),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",..._w},...i.parameters.length>0&&{parameters:{type:"object",description:"Tuning for this rule.",properties:r,additionalProperties:!1}}},additionalProperties:!1}}return{uri:zw,fileMatch:[Dw,"*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 Hw=qa((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}})),Kw=3e4;let Ar=null;function Fc(){return Ar??(Ar=fetch(`${Ae}/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(()=>{Ar=null},Kw),[]))),Ar}function qw(e,n=!1){const i=e.length;let r=0,o="",a=0,s=16,c=0,l=0,d=0,g=0,p=0;function O(w,D){let _=0,T=0;for(;_<w;){let k=e.charCodeAt(r);if(k>=48&&k<=57)T=T*16+k-48;else if(k>=65&&k<=70)T=T*16+k-65+10;else if(k>=97&&k<=102)T=T*16+k-97+10;else break;r++,_++}return _<w&&(T=-1),T}function m(w){r=w,o="",a=0,s=16,p=0}function h(){let w=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&en(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&en(e.charCodeAt(r)))for(r++;r<e.length&&en(e.charCodeAt(r));)r++;else return p=3,e.substring(w,r);let D=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&&en(e.charCodeAt(r))){for(r++;r<e.length&&en(e.charCodeAt(r));)r++;D=r}else p=3;return e.substring(w,D)}function b(){let w="",D=r;for(;;){if(r>=i){w+=e.substring(D,r),p=2;break}const _=e.charCodeAt(r);if(_===34){w+=e.substring(D,r),r++;break}if(_===92){if(w+=e.substring(D,r),r++,r>=i){p=2;break}switch(e.charCodeAt(r++)){case 34:w+='"';break;case 92:w+="\\";break;case 47:w+="/";break;case 98:w+="\b";break;case 102:w+="\f";break;case 110:w+=`
7
- `;break;case 114:w+="\r";break;case 116:w+=" ";break;case 117:const k=O(4);k>=0?w+=String.fromCharCode(k):p=4;break;default:p=5}D=r;continue}if(_>=0&&_<=31)if(vn(_)){w+=e.substring(D,r),p=2;break}else p=6;r++}return w}function L(){if(o="",p=0,a=r,l=c,g=d,r>=i)return a=i,s=17;let w=e.charCodeAt(r);if(kr(w)){do r++,o+=String.fromCharCode(w),w=e.charCodeAt(r);while(kr(w));return s=15}if(vn(w))return r++,o+=String.fromCharCode(w),w===13&&e.charCodeAt(r)===10&&(r++,o+=`
8
- `),c++,d=r,s=14;switch(w){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 D=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<i&&!vn(e.charCodeAt(r));)r++;return o=e.substring(D,r),s=12}if(e.charCodeAt(r+1)===42){r+=2;const _=i-1;let T=!1;for(;r<_;){const k=e.charCodeAt(r);if(k===42&&e.charCodeAt(r+1)===47){r+=2,T=!0;break}r++,vn(k)&&(k===13&&e.charCodeAt(r)===10&&r++,c++,d=r)}return T||(r++,p=1),o=e.substring(D,r),s=13}return o+=String.fromCharCode(w),r++,s=16;case 45:if(o+=String.fromCharCode(w),r++,r===i||!en(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&&N(w);)r++,w=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(w),r++,s=16}}function N(w){if(kr(w)||vn(w))return!1;switch(w){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function I(){let w;do w=L();while(w>=12&&w<=15);return w}return{setPosition:m,getPosition:()=>r,scan:n?I:L,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>l,getTokenStartCharacter:()=>a-g,getTokenError:()=>p}}function kr(e){return e===32||e===9}function vn(e){return e===10||e===13}function en(e){return e>=48&&e<=57}var Ea;(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"})(Ea||(Ea={}));new Array(20).fill(0).map((e,n)=>" ".repeat(n));const tn=200;new Array(tn).fill(0).map((e,n)=>`
9
- `+" ".repeat(n)),new Array(tn).fill(0).map((e,n)=>"\r"+" ".repeat(n)),new Array(tn).fill(0).map((e,n)=>`\r
10
- `+" ".repeat(n)),new Array(tn).fill(0).map((e,n)=>`
11
- `+" ".repeat(n)),new Array(tn).fill(0).map((e,n)=>"\r"+" ".repeat(n)),new Array(tn).fill(0).map((e,n)=>`\r
12
- `+" ".repeat(n));var En;(function(e){e.DEFAULT={allowTrailingComma:!1}})(En||(En={}));function Gw(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,p){a.value=l,a.offset=d,a.length=g,a.type=p,a.colonOffset=void 0,o=a}try{ta(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,Rc(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 p=i[i.length-1];typeof p=="number"?i[i.length-1]=p+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 Vw(e,n=[],i=En.DEFAULT){let r=null,o=[];const a=[];function s(l){Array.isArray(o)?o.push(l):r!==null&&(o[r]=l)}return ta(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 Jw(e,n=[],i=En.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}ta(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:Rc(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 Xw(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 to(e){switch(e.type){case"array":return e.children.map(to);case"object":const n=Object.create(null);for(let i of e.children){const r=i.children[1];r&&(n[i.children[0].value]=to(r))}return n;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Yw(e,n,i=!1){return n>=e.offset&&n<e.offset+e.length||i&&n===e.offset+e.length}function jc(e,n,i=!1){if(Yw(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=jc(r[o],n,i);if(a)return a}return e}}function ta(e,n,i=En.DEFAULT){const r=qw(e,!1),o=[];let a=0;function s(y){return y?()=>a===0&&y(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(y){return y?F=>a===0&&y(F,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(y){return y?F=>a===0&&y(F,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function d(y){return y?()=>{a>0?a++:y(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())===!1&&(a=1)}:()=>!0}function g(y){return y?()=>{a>0&&a--,a===0&&y(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}const p=d(n.onObjectBegin),O=l(n.onObjectProperty),m=g(n.onObjectEnd),h=d(n.onArrayBegin),b=g(n.onArrayEnd),L=l(n.onLiteralValue),N=c(n.onSeparator),I=s(n.onComment),w=c(n.onError),D=i&&i.disallowComments,_=i&&i.allowTrailingComma;function T(){for(;;){const y=r.scan();switch(r.getTokenError()){case 4:k(14);break;case 5:k(15);break;case 3:k(13);break;case 1:D||k(11);break;case 2:k(12);break;case 6:k(16);break}switch(y){case 12:case 13:D?k(10):I();break;case 16:k(1);break;case 15:case 14:break;default:return y}}}function k(y,F=[],Y=[]){if(w(y),F.length+Y.length>0){let ce=r.getToken();for(;ce!==17;){if(F.indexOf(ce)!==-1){T();break}else if(Y.indexOf(ce)!==-1)break;ce=T()}}}function W(y){const F=r.getTokenValue();return y?L(F):(O(F),o.push(F)),T(),!0}function A(){switch(r.getToken()){case 11:const y=r.getTokenValue();let F=Number(y);isNaN(F)&&(k(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 T(),!0}function R(){return r.getToken()!==10?(k(3,[],[2,5]),!1):(W(!1),r.getToken()===6?(N(":"),T(),X()||k(4,[],[2,5])):k(5,[],[2,5]),o.pop(),!0)}function J(){p(),T();let y=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(y||k(4,[],[]),N(","),T(),r.getToken()===2&&_)break}else y&&k(6,[],[]);R()||k(4,[],[2,5]),y=!0}return m(),r.getToken()!==2?k(7,[2],[]):T(),!0}function Q(){h(),T();let y=!0,F=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(F||k(4,[],[]),N(","),T(),r.getToken()===4&&_)break}else F&&k(6,[],[]);y?(o.push(0),y=!1):o[o.length-1]++,X()||k(4,[],[4,5]),F=!0}return b(),y||o.pop(),r.getToken()!==4?k(8,[4],[]):T(),!0}function X(){switch(r.getToken()){case 3:return Q();case 1:return J();case 10:return W(!0);default:return A()}}return T(),r.getToken()===17?i.allowEmptyContent?!0:(k(4,[],[]),!1):X()?(r.getToken()!==17&&k(9,[],[]),!0):(k(4,[],[]),!1)}function Rc(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 Ca;(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"})(Ca||(Ca={}));var Da;(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"})(Da||(Da={}));const Zw=Gw,Qw=Vw,Uc=Jw,dn=Xw,e0=jc,t0=to;var za;(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"})(za||(za={}));const n0={pptx:["slide","group"],docx:["docx","section","group"]};function _a(e,n){const i=dn(e,[...n,"name"]);return(i==null?void 0:i.type)==="string"?i.value:void 0}function i0(e,n){return!e.slice(n.offset,n.offset+n.length).includes(`
13
- `)}function na(e){try{return Uc(e,[],{allowTrailingComma:!0})}catch{return}}function r0(e,n,i,r=na(e)){var O,m,h;if(!r)return null;const o=Zw(e,n),a=o.path,s=e0(r,n,!0);if(!o.isAtPropertyKey&&a.length>=2&&a[a.length-1]==="ref"&&a[a.length-2]==="props"&&_a(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=_a(r,a.slice(0,c-1));if(!l||!n0[i].includes(l))return null;const d=dn(r,a.slice(0,c+1));if(!d){const b=dn(r,a.slice(0,c));return(b==null?void 0:b.type)!=="array"||(((O=b.children)==null?void 0:O.length)??0)>0?null:{kind:"component",replace:{offset:n,length:0}}}if(d.type!=="object"||!i0(e,d))return null;const g=d.children??[];return!(g.length===0||g.length===1&&["","name"].includes(String(((h=(m=g[0].children)==null?void 0:m[0])==null?void 0:h.value)??"")))||a.length>c+2?null:{kind:"component",replace:{offset:d.offset,length:d.length}}}function o0(e){return e.replace(/[\\$}]/g,n=>`\\${n}`)}function Wa(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}:${o0(l)}}"`})}function Mc(e){var n;return((n=/\n([ \t]+)\S/.exec(e))==null?void 0:n[1])??" "}function a0(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 s0(e,n){return e.split(`
15
- `).map((i,r)=>r===0?i:n+i).join(`
16
- `)}function l0(e,n,i=na(e)){var L;if(!i||i.type!=="object")return[];const r=Mc(e),o=dn(i,["props","blocks"]),a=dn(i,["props"]),s=new Set((o==null?void 0:o.type)==="object"?(o.children??[]).map(N=>{var I,w;return String(((w=(I=N.children)==null?void 0:I[0])==null?void 0:w.value)??"")}):[]),c=Object.entries(n).filter(([N])=>!s.has(N));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=a0(e,l.offset),p=N=>g+r.repeat(N),O=c.map(([N,I])=>`${p(d)}${JSON.stringify(N)}: ${s0(JSON.stringify(I,null,r),p(d))}`).join(`,
17
- `),m=l===o?O:l===a?`${p(1)}"blocks": {
18
- ${O}
19
- ${p(1)}}`:`${p(1)}"props": {
20
- ${p(2)}"blocks": {
21
- ${O}
22
- ${p(2)}}
23
- ${p(1)}}`,b=(((L=l.children)==null?void 0:L.length)??0)>0?`
24
- ${m},`:`
25
- ${m}
26
- ${g}`;return[{offset:l.offset+1,length:0,content:b}]}function c0(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 d0(e,n,i){const r=na(e),o=r0(e,n,i.format,r);if(!o)return[];const a=e.slice(o.replace.offset,n).replace(/[\w-]*$/,""),s=(m,h,b,L,N,I)=>({kind:m,label:h,detail:b,documentation:L,insertText:N,filterText:a+h,replace:o.replace,additionalEdits:I}),c=i.references.filter(m=>m.format===i.format&&!(m.name in i.definitions)),l=m=>l0(e,c0(m,i.references,i.definitions),r);if(o.kind==="ref")return c.map(m=>s("ref",m.name,`block from ${m.template}`,m.description,JSON.stringify(m.name),l(m)));const d=Mc(e);let g=i.document;if(g===void 0)try{g=Qw(e,[],{allowTrailingComma:!0})}catch{g=void 0}const p=Object.entries(i.definitions).map(([m,h])=>s("component",m,"block defined in this document",h.description??"",Wa(gx(m,h,{document:g,format:i.format}),d),[])),O=c.map(m=>s("component",m.name,`block from ${m.template}`,m.description,Wa(m.example,d),l(m)));return[...p,...O]}function p0(e){if(!e.trim())return{};let n;try{n=Uc(e,[],{allowTrailingComma:!0})}catch{return{}}if(!n)return{};const i=dn(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=t0(s)}catch{continue}or(Rl,l)&&(r[c]=l)}return r}function Bc(e){return JSON.stringify(e)}let no=!1,ui=null,io=[],Tr=[],Fr=0,vi=null,ia={},Ha=Bc({});const $i="https://json-to-office.dev/schema/report/v1.0.0";async function ra(){if(!no)try{const e=await Qc.init();oa(e),no=!0,console.log("Monaco configured globally with JSON schemas")}catch(e){console.error("Failed to configure Monaco globally:",e)}}function Ec(e){return e.replace(/,(\s*[}\]])/g,"$1")}function oa(e){Bw(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=Ec(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}]}}}),b0(e),Fc(),Rw(e);const n=Pw();Ii(n.schema),vi=n.schema,aa(e),console.log("Monaco instance configured with schemas:",{reportSchema:{uri:$i,fileMatch:n.fileMatch,schemaKeys:Object.keys(n.schema)}})}function u0(e){return Ce==="pptx"?Fx(e):uS(e)}function aa(e){if(!vi)return;const n=JSON.parse(JSON.stringify(vi));io.length&&g0(n,io),fx(n,ia,u0(n));const i={uri:$i,fileMatch:["*.docx.json","*.pptx.json"],schema:n};e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,allowComments:!1,trailingCommas:"error",schemaValidation:"error",schemas:[i,vw(),Ww()],schemaRequest:"ignore"})}function m0(e,n){const i=Bc(n);return i===Ha?!1:(ia=n,Ha=i,aa(e),!0)}async function f0(){no=!1,await ra()}function Ii(e){if(!(typeof e!="object"||e===null)){if(Array.isArray(e)){e.forEach(n=>Ii(n));return}delete e.discriminator;for(const n of Object.values(e))Ii(n)}}function g0(e,n){var o,a,s,c,l,d,g,p,O;function i(m){if(!m||m.type!=="string")return;const h=Array.isArray(m.examples)?m.examples:[];m.examples=[...new Set([...h,...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=m=>{var h;return typeof(m==null?void 0:m.$ref)=="string"?(h=e==null?void 0:e.definitions)==null?void 0:h[m.$ref.replace("#/definitions/","")]:m};for(const m of Wr(e)){const h=r(m);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 Wr(h))i((O=(p=(g=b==null?void 0:b.properties)==null?void 0:g.props)==null?void 0:p.properties)==null?void 0:O.theme)}}function h0(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 b0(e){ui&&(ui.dispose(),ui=null),ui=e.languages.registerCompletionItemProvider("json",{triggerCharacters:['"',":"," "],async provideCompletionItems(n,i){var O;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(m=>{var w,D,_;let h="";m.documentation&&(typeof m.documentation=="string"?h=m.documentation:m.documentation.value&&(h=m.documentation.value)),!h&&m.detail&&(h=m.detail);let b;if(m.textEdit){const T=m.textEdit.range;b={startLineNumber:T.start.line+1,startColumn:T.start.character+1,endLineNumber:T.end.line+1,endColumn:T.end.character+1}}else{const T=n.getWordUntilPosition(i);b={startLineNumber:i.lineNumber,startColumn:T.startColumn,endLineNumber:i.lineNumber,endColumn:T.endColumn}}const L=((w=m.textEdit)==null?void 0:w.newText)??m.insertText??(typeof m.label=="string"?m.label:((D=m.label)==null?void 0:D.label)??"");let N;m.documentation&&(typeof m.documentation=="string"?N=m.documentation:m.documentation.kind==="markdown"?N={value:m.documentation.value}:N=m.documentation.value);const I={label:typeof m.label=="string"?m.label:((_=m.label)==null?void 0:_.label)??"",kind:h0(m.kind,e),detail:h,documentation:N,insertText:L,range:b,sortText:m.sortText,filterText:m.filterText,preselect:m.preselect};return m.insertTextFormat===2&&(I.insertTextRules=e.languages.CompletionItemInsertTextRule.InsertAsSnippet),I}),l=n.getValue(),d=((O=Hw.getState().getEditorForModel(n))==null?void 0:O.toStorageValue(l))??l;let g;try{g=JSON.parse(d)}catch{g=void 0}const p=m=>{const h=n.getPositionAt(m.offset),b=n.getPositionAt(m.offset+m.length);return{startLineNumber:h.lineNumber,startColumn:h.column,endLineNumber:b.lineNumber,endColumn:b.column}};for(const m of d0(l,n.getOffsetAt(i),{references:await Fc(),definitions:p0(d),format:Ce,document:g}))c.push({label:m.label,kind:m.kind==="ref"?e.languages.CompletionItemKind.Value:e.languages.CompletionItemKind.Snippet,detail:m.detail,documentation:m.documentation?{value:m.documentation}:void 0,insertText:m.insertText,filterText:m.filterText,insertTextRules:m.kind==="component"?e.languages.CompletionItemInsertTextRule.InsertAsSnippet:void 0,range:p(m.replace),additionalTextEdits:m.additionalEdits.map(h=>({range:p(h),text:h.content})),sortText:`0 ${m.label}`});return{suggestions:c}}})}async function O0(e,n,i,r){var a;const o=++Fr;try{r&&(Tr=r);const s=await Aw.fetchDocumentSchema(n,Tr,{bypassCache:!0});if(o!==Fr)return!0;const c=JSON.parse(JSON.stringify(s));if(!c||typeof c!="object")throw new Error("Invalid schema received from server");Ii(c),i&&(io=i),e.languages.registerDocumentFormattingEditProvider("json",{provideDocumentFormattingEdits(O){const m=O.getValue(),h=Ec(m);try{const b=JSON.parse(h),L=JSON.stringify(b,null,2);return[{range:O.getFullModelRange(),text:L}]}catch{return[{range:O.getFullModelRange(),text:h}]}}}),vi=c,aa(e),console.log("Monaco updated with plugin-aware schemas:",{plugins:n||[],browserPlugins:Tr.map(O=>O.name),blocks:Object.keys(ia),reportSchema:{uri:$i}});const l=e.editor.getModels();let d=!0;if(l.forEach(O=>{if(O.getLanguageId()==="json")try{e.editor.setModelLanguage(O,"json"),console.log("🔄 Re-validating model:",O.uri.toString())}catch(m){console.error("Failed to revalidate model:",O.uri.toString(),m),d=!1}}),!((a=e.languages.json.jsonDefaults.diagnosticsOptions.schemas)==null?void 0:a.some(O=>O.uri===$i)))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===Fr&&oa(e),s}}const D0=Object.freeze(Object.defineProperty({__proto__:null,configureMonaco:ra,configureMonacoInstance:oa,resetMonacoConfig:f0,updateMonacoDocumentBlocks:m0,updateMonacoWithPlugins:O0},Symbol.toStringTag,{value:"Module"}));ra().then(()=>{console.log("Monaco editor configured with JSON schemas for better autocomplete")}).catch(e=>{console.error("Failed to configure Monaco:",e)});const y0=document.getElementById("root"),x0=Hc.createRoot(y0);x0.render(j.jsx(lp,{}));export{Ae as A,m0 as B,or as C,p0 as D,vy as E,Ce as F,D0 as G,Mn as P,Dw as Q,tp as S,t as T,R0 as W,ro as _,E0 as a,U0 as b,bt as c,Kd as d,A0 as e,k0 as f,qd as g,Hw as h,N0 as i,M0 as j,j0 as k,F0 as l,T0 as m,B0 as n,jw as o,Uc as p,ht as q,O0 as r,Aw as s,Bw as t,Zd as u,C0 as v,Cw as w,dn as x,HS as y,zl as z};
27
- //# sourceMappingURL=index-B7DLwiJH.js.map