semiotic 3.13.0 → 3.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/README.md +53 -41
  2. package/ai/artifact-surface-inventory.json +1 -1
  3. package/ai/dist/mcp-server.js +132 -106
  4. package/ai/reference.md +12 -4
  5. package/ai/schema.json +16 -2
  6. package/ai/surface-manifest.json +1 -1
  7. package/ai/task-packets/compare-category-totals.json +5 -5
  8. package/ai/task-packets/compare-category-totals.md +2 -2
  9. package/ai/task-packets/correct-published-chart.json +5 -5
  10. package/ai/task-packets/correct-published-chart.md +2 -2
  11. package/ai/task-packets/index.json +6 -6
  12. package/ai/task-packets/update-live-chart.json +5 -5
  13. package/ai/task-packets/update-live-chart.md +2 -2
  14. package/dist/{c-CRKR5M42.min.js → c-2M2OPWVA.min.js} +37 -37
  15. package/dist/c-3GIPT46Z.min.js +1 -0
  16. package/dist/c-3UXQGCQT.min.js +1 -0
  17. package/dist/{c-MHNU6KYQ.min.js → c-4P2EM44G.min.js} +3 -3
  18. package/dist/c-4RVDKSMQ.min.js +1 -0
  19. package/dist/{c-6MEEA5VY.min.js → c-4YPPVFZH.min.js} +1 -1
  20. package/dist/{c-6MPP6QF5.min.js → c-62JIVHK5.min.js} +1 -1
  21. package/dist/{c-KYRH3XKJ.min.js → c-6QCSRJSC.min.js} +1 -1
  22. package/dist/c-6WJKNYIG.min.js +1 -0
  23. package/dist/c-7BVQDXFU.min.js +1 -0
  24. package/dist/c-7UN2WUMI.min.js +1 -0
  25. package/dist/c-AQUX6L2O.min.js +1 -0
  26. package/dist/c-BR5QDUCR.min.js +1 -0
  27. package/dist/c-C3YQVUB6.min.js +1 -0
  28. package/dist/{c-RQ2XZHWY.min.js → c-COP4OISO.min.js} +1 -1
  29. package/dist/c-ENRZPF5E.min.js +1 -0
  30. package/dist/c-HBLICBM6.min.js +1 -0
  31. package/dist/{c-EQVM754Z.min.js → c-HGWITEJI.min.js} +1 -1
  32. package/dist/{c-3K2FJDLE.min.js → c-I54V24WG.min.js} +1 -1
  33. package/dist/c-IDCFMBA4.min.js +2 -0
  34. package/dist/{c-TPL7X32J.min.js → c-ISHYKYII.min.js} +1 -1
  35. package/dist/c-KSSS3HSA.min.js +1 -0
  36. package/dist/c-LEICSI5V.min.js +1 -0
  37. package/dist/c-LJ4XY3Z3.min.js +1 -0
  38. package/dist/c-MBE6PPHN.min.js +1 -0
  39. package/dist/c-MOK4RWNO.min.js +1 -0
  40. package/dist/c-N2TVSOYL.min.js +2 -0
  41. package/dist/{c-EAAKQIUZ.min.js → c-NHZ2E3CI.min.js} +1 -1
  42. package/dist/{c-MDY3ULP6.min.js → c-OBA7XSLH.min.js} +1 -1
  43. package/dist/c-OIJL2WZH.min.js +1 -0
  44. package/dist/c-ONOWKUUZ.min.js +1 -0
  45. package/dist/{c-CPJR4LHF.min.js → c-OSLNYZ3Q.min.js} +17 -17
  46. package/dist/c-PBFRYNKM.min.js +1 -0
  47. package/dist/c-QUAEYF34.min.js +1 -0
  48. package/dist/c-RDFFLRKC.min.js +1 -0
  49. package/dist/c-SDGGMIYI.min.js +1 -0
  50. package/dist/c-SQQZPFVY.min.js +1 -0
  51. package/dist/c-SU6Z75M2.min.js +1 -0
  52. package/dist/{c-BWM7MU2Y.min.js → c-SX4TPG3Z.min.js} +1 -1
  53. package/dist/{c-DTYG34WG.min.js → c-VGHU2LTF.min.js} +2 -2
  54. package/dist/c-VLWWXOM5.min.js +1 -0
  55. package/dist/c-VZNIIKL6.min.js +1 -0
  56. package/dist/{c-GBO32OML.min.js → c-W5ATXREF.min.js} +1 -1
  57. package/dist/c-WSWMQDFZ.min.js +1 -0
  58. package/dist/{c-3SDC7AQQ.min.js → c-XM76UG3P.min.js} +1 -1
  59. package/dist/c-XORVM6C5.min.js +1 -0
  60. package/dist/{c-MYRI7NF2.min.js → c-XZJWL7UL.min.js} +1 -1
  61. package/dist/c-Y43GTKGR.min.js +1 -0
  62. package/dist/c-YGTMWEEF.min.js +1 -0
  63. package/dist/c-ZFIURPZA.min.js +1 -0
  64. package/dist/c-ZWJDTDEV.min.js +1 -0
  65. package/dist/c-ZYMXDR42.min.js +1 -0
  66. package/dist/components/ai/chartClinic.d.ts +4 -0
  67. package/dist/components/ai/evaluateChart.d.ts +3 -1
  68. package/dist/components/ai/generativeChart.d.ts +13 -0
  69. package/dist/components/ai/renderEvidenceMemoKey.d.ts +9 -0
  70. package/dist/components/ai/reportRenderError.d.ts +2 -0
  71. package/dist/components/charts/physics/eventDropSources.d.ts +1 -1
  72. package/dist/components/evidence/claimReferences.d.ts +9 -0
  73. package/dist/components/realtime/BinAccumulator.d.ts +5 -0
  74. package/dist/components/recipes/atlas/dependencyEvidence.d.ts +5 -0
  75. package/dist/components/recipes/atlas/support.d.ts +5 -0
  76. package/dist/components/server/staticXYAxisTicks.d.ts +1 -1
  77. package/dist/components/stream/MarginalGraphics.d.ts +4 -2
  78. package/dist/components/stream/PipelineStore.d.ts +6 -18
  79. package/dist/components/stream/axisTickUtils.d.ts +1 -1
  80. package/dist/components/stream/countNoun.d.ts +2 -0
  81. package/dist/components/stream/heatmapBandTicks.d.ts +68 -0
  82. package/dist/components/stream/pipelineDomainResolution.d.ts +52 -3
  83. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +8 -0
  84. package/dist/components/stream/uniqueRegionLabel.d.ts +6 -0
  85. package/dist/components/stream/xyAxisTicks.d.ts +8 -1
  86. package/dist/components/stream/xyFrameAxisTypes.d.ts +4 -2
  87. package/dist/components/stream/xySceneBuilders/types.d.ts +6 -0
  88. package/dist/geo.min.js +152 -152
  89. package/dist/geo.module.min.js +1 -1
  90. package/dist/network.module.min.js +1 -1
  91. package/dist/ordinal.module.min.js +1 -1
  92. package/dist/physics.module.min.js +1 -1
  93. package/dist/physicsWorker.js +1 -1
  94. package/dist/processSankeyLayoutWorker.js +1 -1
  95. package/dist/semiotic-access.module.min.js +2 -2
  96. package/dist/semiotic-ai-core.min.js +5 -5
  97. package/dist/semiotic-ai-core.module.min.js +4 -4
  98. package/dist/semiotic-ai.module.min.js +2 -2
  99. package/dist/semiotic-artifact.min.js +6 -6
  100. package/dist/semiotic-artifact.module.min.js +2 -2
  101. package/dist/semiotic-atlas-core.min.js +1 -1
  102. package/dist/semiotic-atlas-core.module.min.js +1 -1
  103. package/dist/semiotic-atlas-selection.module.min.js +1 -1
  104. package/dist/semiotic-client-cjs-shared.min.js +1023 -1023
  105. package/dist/semiotic-evidence.min.js +4 -4
  106. package/dist/semiotic-evidence.module.min.js +3 -3
  107. package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
  108. package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
  109. package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
  110. package/dist/semiotic-experimental-vacp.min.js +1 -1
  111. package/dist/semiotic-experimental-vacp.module.min.js +1 -1
  112. package/dist/semiotic-line.module.min.js +1 -1
  113. package/dist/semiotic-realtime-core.module.min.js +1 -1
  114. package/dist/semiotic-recipes-core-cjs-base.min.js +101 -101
  115. package/dist/semiotic-recipes-core.module.min.js +1 -1
  116. package/dist/semiotic-server-edge-node.module.min.js +3 -3
  117. package/dist/semiotic-server-edge.min.js +397 -397
  118. package/dist/semiotic-server-edge.module.min.js +3 -3
  119. package/dist/semiotic-server-node.min.js +397 -397
  120. package/dist/semiotic-utils-core.min.js +11 -11
  121. package/dist/semiotic-utils-core.module.min.js +3 -3
  122. package/dist/semiotic.module.min.js +1 -1
  123. package/dist/server.min.js +397 -397
  124. package/dist/server.module.min.js +3 -3
  125. package/dist/xy.module.min.js +1 -1
  126. package/package.json +2 -2
  127. package/dist/c-3OBJLOXI.min.js +0 -1
  128. package/dist/c-4VFGNUWG.min.js +0 -1
  129. package/dist/c-5BN7GWJH.min.js +0 -1
  130. package/dist/c-65GMYND6.min.js +0 -1
  131. package/dist/c-AGRMJIUH.min.js +0 -1
  132. package/dist/c-BJKGYOPX.min.js +0 -1
  133. package/dist/c-C332PFY6.min.js +0 -1
  134. package/dist/c-DDZ5TZ7P.min.js +0 -1
  135. package/dist/c-F4DZ3NMI.min.js +0 -1
  136. package/dist/c-GZJ2XEQ5.min.js +0 -1
  137. package/dist/c-HFQ3Z65X.min.js +0 -1
  138. package/dist/c-HNW73MXJ.min.js +0 -1
  139. package/dist/c-HWFZB7SD.min.js +0 -1
  140. package/dist/c-IIV4DB7T.min.js +0 -1
  141. package/dist/c-J2QH3PEI.min.js +0 -1
  142. package/dist/c-JZNWRFVJ.min.js +0 -2
  143. package/dist/c-KHLBCSIO.min.js +0 -1
  144. package/dist/c-L7FQHKGH.min.js +0 -1
  145. package/dist/c-LYPOBMKC.min.js +0 -1
  146. package/dist/c-NGMMPKNJ.min.js +0 -1
  147. package/dist/c-NOME4L5M.min.js +0 -1
  148. package/dist/c-OKIJBK5K.min.js +0 -2
  149. package/dist/c-OXV4W7YX.min.js +0 -1
  150. package/dist/c-P73SQZEP.min.js +0 -1
  151. package/dist/c-PD5EZI24.min.js +0 -1
  152. package/dist/c-RAL7HCTV.min.js +0 -1
  153. package/dist/c-S4OGXAVO.min.js +0 -1
  154. package/dist/c-UWE3VZEO.min.js +0 -1
  155. package/dist/c-VP7WX6QI.min.js +0 -1
  156. package/dist/c-VW7ZSLDC.min.js +0 -1
  157. package/dist/c-WDVYLMCM.min.js +0 -1
  158. package/dist/c-XEACLH4B.min.js +0 -1
  159. package/dist/c-YJDGSPNB.min.js +0 -1
  160. package/dist/c-ZYBEKQCT.min.js +0 -1
@@ -1 +1 @@
1
- import{a as e,d as t,g as i,h as r,i as n,j as a,k as o,l as s,q as l,r as c,t as d,u,v as p}from"./c-IIV4DB7T.min.js";import{a as f}from"./c-5H6IMPPV.min.js";var m=/*#__PURE__*/new Set(["data","nodes","edges","points","areas","lines","flows","atlas","forest","circuit","edition","reading"]);function h(e,t){return m.has(e)&&!("reading"===e&&"string"==typeof t)}function y(e,t){return"number"==typeof t?`${e}[${t}]`:`${e}.${t}`}function v(e,t){return`${e}[Symbol(${t.description??""})]`}function g(e,t){if(!/^(0|[1-9][0-9]*)$/.test(e))return!1;let i=Number(e);return Number.isSafeInteger(i)&&i>=0&&i<t}function $(e,t){try{return Object.getOwnPropertyDescriptor(e,t)}catch{return}}function b(e,t,i,r){let n=$(e,t);return n&&"value"in n&&n.enumerable?w(n.value,i,r):[i]}function w(e,t="$",i=/*#__PURE__*/new Set){if(null===e||"string"==typeof e||"boolean"==typeof e)return[];if("number"==typeof e)return Number.isFinite(e)&&!Object.is(e,-0)?[]:[t];if("object"!=typeof e)return[t];if(i.has(e))return[t];let r,n,a;try{a=Array.isArray(e),r=Object.getPrototypeOf(e),n=Reflect.ownKeys(e)}catch{return[t]}if(r!==(a?Array.prototype:Object.prototype)&&null!==r)return[t];i.add(e);let o=[];try{if(a){let r=$(e,"length")?.value;if(!Number.isSafeInteger(r)||r<0)return[y(t,"length")];for(let e of n)"length"===e||"string"==typeof e&&g(e,r)||o.push("symbol"==typeof e?v(t,e):y(t,e));for(let n=0;n<r;n+=1)o.push(...b(e,String(n),y(t,n),i))}else for(let r of n)"symbol"!=typeof r?o.push(...b(e,r,y(t,r),i)):o.push(v(t,r));return o}catch{return[t]}finally{i.delete(e)}}var A=(e,t)=>(e>>>t|e<<32-t)>>>0,x=e=>Math.floor(4294967296*(e-Math.floor(e)))>>>0,[j,S]=/*#__PURE__*/(()=>{let e=[],t=[];for(let i=2;t.length<64;i+=1){let r=!0;for(let e=2;e*e<=i;e+=1)if(i%e===0){r=!1;break}r&&(e.length<8&&e.push(x(Math.sqrt(i))),t.push(x(Math.cbrt(i))))}return[e,t]})();function I(e,t){return`${e}[Symbol(${t.description??""})]`}function P(e,t){if(!/^(0|[1-9][0-9]*)$/.test(e))return!1;let i=Number(e);return Number.isSafeInteger(i)&&i>=0&&i<t}function O(e,t){return"number"==typeof t?`${e}[${t}]`:e?`${e}.${t}`:t}function E(e){return e.sort((e,t)=>{let i=JSON.stringify(e),r=JSON.stringify(t);return i<r?-1:i>r?1:0})}function B(e,t,i){if(null===e)return null;if(e instanceof Date){let r=e.getTime();return Number.isFinite(r)?{$type:"date",value:e.toISOString()}:void i.excluded.push(t)}switch(typeof e){case"string":case"boolean":return e;case"number":return Number.isNaN(e)?{$type:"number",value:"NaN"}:e===1/0?{$type:"number",value:"Infinity"}:e===-1/0?{$type:"number",value:"-Infinity"}:Object.is(e,-0)?{$type:"number",value:"-0"}:e;case"bigint":return{$type:"bigint",value:e.toString()};case"undefined":case"function":case"symbol":return void i.excluded.push(t);case"object":{let r=e;if(i.ancestors.has(r))return void i.excluded.push(t);i.ancestors.add(r);try{if(Array.isArray(e)){for(let r of Reflect.ownKeys(e))"length"===r||"string"==typeof r&&P(r,e.length)||i.excluded.push("symbol"==typeof r?I(t,r):O(t,r));return Array.from({length:e.length},(r,n)=>{let a=O(t,n),o=Object.getOwnPropertyDescriptor(e,String(n));if(!o||!("value"in o)||!o.enumerable)return i.excluded.push(a),null;let s=B(o.value,a,i);return void 0===s?null:s})}let r={},n=Object.getPrototypeOf(e);if(n!==Object.prototype&&null!==n)return void i.excluded.push(t);let a=[];for(let r of Reflect.ownKeys(e)){if("symbol"==typeof r){i.excluded.push(I(t,r));continue}let n=Object.getOwnPropertyDescriptor(e,r);n&&"value"in n&&n.enumerable?a.push(r):i.excluded.push(O(t,r))}for(let n of a.sort()){let a=Object.getOwnPropertyDescriptor(e,n),o=B(a&&"value"in a?a.value:void 0,O(t,n),i);void 0!==o&&Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0})}return r}finally{i.ancestors.delete(r)}}default:return void i.excluded.push(t)}}function k(e,t=/*#__PURE__*/new Set){if(null===e)return["null"];if(e instanceof Date)return Number.isFinite(e.getTime())?["date",e.toISOString()]:["excluded"];switch(typeof e){case"string":return["string",e];case"boolean":return["boolean",e];case"number":return["number",Number.isNaN(e)?"NaN":e===1/0?"Infinity":e===-1/0?"-Infinity":Object.is(e,-0)?"-0":String(e)];case"bigint":return["bigint",e.toString()];case"undefined":case"function":case"symbol":return["excluded"];case"object":if(t.has(e))return["excluded"];t.add(e);try{let i=i=>{let r="symbol"==typeof i?["symbol-key",i.description??""]:["string-key",i],n=Object.getOwnPropertyDescriptor(e,i);return n?"value"in n?[r,"data",!!n.enumerable,k(n.value,t)]:[r,"accessor",!!n.enumerable,!!n.get,!!n.set]:[r,"missing"]};if(Array.isArray(e))return["array",Array.from({length:e.length},(t,r)=>{let n=String(r);return Object.prototype.hasOwnProperty.call(e,n)?i(n):["hole"]}),E(Reflect.ownKeys(e).filter(t=>"length"!==t&&!("string"==typeof t&&P(t,e.length))).map(i))];let r=Object.getPrototypeOf(e);return[r!==Object.prototype&&null!==r?"non-json-object":"object",E(Reflect.ownKeys(e).map(i))]}finally{t.delete(e)}default:return["excluded"]}}function C(e){let t={excluded:[],ancestors:new Set},i=B(e,"$",t)??null;return{value:i,text:JSON.stringify(i),excludedPaths:t.excluded}}function F(e){let t=C(e),i=function(e){let t=[...j],i=Array.from((new TextEncoder).encode(e)),r=8*i.length;for(i.push(128);i.length%64!=56;)i.push(0);let n=Math.floor(r/4294967296),a=r>>>0;i.push(n>>>24&255,n>>>16&255,n>>>8&255,255&n,a>>>24&255,a>>>16&255,a>>>8&255,255&a);let o=[];for(let e=0;e<i.length;e+=4)o.push((i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3])>>>0);for(let e=0;e<o.length;e+=16){let i=[...o.slice(e,e+16)];for(let e=16;e<64;e+=1){let t=A(i[e-15],7)^A(i[e-15],18)^i[e-15]>>>3,r=A(i[e-2],17)^A(i[e-2],19)^i[e-2]>>>10;i[e]=i[e-16]+t+i[e-7]+r>>>0}let[r,n,a,s,l,c,d,u]=t;for(let e=0;e<64;e+=1){let t=u+(A(l,6)^A(l,11)^A(l,25))+(l&c^~l&d)+S[e]+i[e]>>>0,o=r&n^r&a^n&a;u=d,d=c,c=l,l=s+t>>>0,s=a,a=n,n=r,r=t+((A(r,2)^A(r,13)^A(r,22))+o>>>0)>>>0}let p=[r,n,a,s,l,c,d,u];for(let e=0;e<8;e+=1)t[e]=t[e]+p[e]>>>0}return t.map(e=>e.toString(16).padStart(8,"0")).join("")}(JSON.stringify(["semiotic-value-fingerprint","v2",k(e)]));return{...t,algorithm:"sha256",digest:i,fingerprint:`sha256:${i}`}}function N(e,t,i,r){z(e,Object.keys(t),i,r);for(let[n,a]of Object.entries(t))a.values?(a.required||void 0!==e[n])&&J(e,n,i,a.values,r):a.required?V(e,n,i,r):H(e,n,i,r)}function R(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function D(e,t,i,r){void 0!==e[t]&&("number"!=typeof e[t]||!Number.isFinite(e[t]))&&r.push({path:`${i}.${t}`,message:"Expected a finite number."})}function M(e,t,i,r){void 0!==e[t]&&"boolean"!=typeof e[t]&&r.push({path:`${i}.${t}`,message:"Expected a boolean."})}function q(e){return null===e||"string"==typeof e||"boolean"==typeof e||("number"==typeof e?Number.isFinite(e):Array.isArray(e)?e.every(q):R(e)&&Object.values(e).every(q))}function T(e,t,i,r){void 0!==e[t]&&(!R(e[t])||!q(e[t]))&&r.push({path:`${i}.${t}`,message:"Expected a JSON object."})}function z(e,t,i,r){let n=new Set(t);for(let t of Object.keys(e))n.has(t)||r.push({path:`${i}.${t}`,message:"Unexpected property."})}function V(e,t,i,r){("string"!=typeof e[t]||!e[t])&&r.push({path:`${i}.${t}`,message:"Expected a non-empty string."})}function J(e,t,i,r,n){("string"!=typeof e[t]||!r.includes(e[t]))&&n.push({path:`${i}.${t}`,message:`Expected one of: ${r.join(", ")}.`})}function L(e,t,i,r){let n=e[t];if(void 0!==n)return R(n)?n:void r.push({path:`${i}.${t}`,message:"Expected an object."})}function K(e,t,i,r){let n=e[t];if(void 0!==n)return Array.isArray(n)?n:void r.push({path:`${i}.${t}`,message:"Expected an array."})}function U(e,t,i){e?.some(e=>"string"!=typeof e||!e)&&i.push({path:t,message:"Expected non-empty string values."})}function G(e,t,i,r,n){void 0!==e[t]&&J(e,t,i,r,n)}function H(e,t,i,r){void 0!==e[t]&&"string"!=typeof e[t]&&r.push({path:`${i}.${t}`,message:"Expected a string."})}function Z(e,t,i){R(e)?(z(e,["id","name","kind"],t,i),V(e,"kind",t,i),H(e,"id",t,i),H(e,"name",t,i)):i.push({path:t,message:"Expected an actor object."})}function _(e){for(let t of Object.values(e))Object.freeze(t.suppliedBy),Object.freeze(t);return Object.freeze(e)}var W=/*#__PURE__*/_({"artifact.id":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"never"},"artifact.createdAt":{suppliedBy:["author","system","import"],derivable:!1,modelMayPropose:!1,humanReview:"never"},"artifact.configFingerprint":{suppliedBy:["system"],derivable:!0,modelMayPropose:!1,humanReview:"never"},"artifact.dataFingerprint":{suppliedBy:["system"],derivable:!0,modelMayPropose:!1,humanReview:"never"},"purpose.intents":{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},"purpose.communicativeAct":{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},"purpose.stakes":{suppliedBy:["author","import"],derivable:!1,modelMayPropose:!0,humanReview:"required"},claims:{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},"claims.status":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},evidence:{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},"evidence.source":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},"evidence.fingerprint":{suppliedBy:["system"],derivable:!0,modelMayPropose:!1,humanReview:"never"},time:{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},"time.completeness":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},reception:{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},form:{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},contestability:{suppliedBy:["author","system","import"],derivable:!1,modelMayPropose:!1,humanReview:"required"},accountability:{suppliedBy:["author","system","import"],derivable:!1,modelMayPropose:!1,humanReview:"policy-dependent"},inheritance:{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"}}),X=["fresh","stale","unknown"],Q=["partial","provisional","settled","unknown"],Y=["observedAt","ingestedAt","processedAt","publishedAt","snapshotAt"],ee={eventTime:{field:{},value:{},timezone:{},granularity:{}},presentation:{state:{values:["live","historical","mixed"]},label:{}},freshness:{status:{required:!0,values:X},checkedAt:{},heartbeatAt:{},expiresAt:{},basis:{}},watermark:{value:{required:!0},policy:{},allowedLateness:{}},window:{start:{required:!0},end:{required:!0},status:{required:!0,values:["open","provisional","settled","reopened","corrected"]}},completeness:{status:{required:!0,values:Q},basis:{}},revision:{status:{required:!0,values:["original","backfilled","corrected","superseded"]},previousArtifactId:{},correctionId:{},reason:{}},snapshot:{id:{},format:{values:["iceberg","delta","other"]},schemaVersion:{},catalogRef:{}}},te={id:{required:!0},kind:{required:!0,values:["stream","processing-job","quality-check","snapshot","publication"]},label:{},observedAt:{},version:{},timezone:{},granularity:{},freshness:{values:X},completeness:{values:Q}};function ie(e){try{return function(e){let t=[],i=[];if(!R(e))return{valid:!1,errors:[{path:"$",message:"Expected an object."}],warnings:i};let r=w(e);if(r.length>0)return{valid:!1,errors:r.map(e=>({path:e,message:"Expected a JSON-compatible value that survives serialization unchanged."})),warnings:i};if(z(e,["contractVersion","artifact","purpose","claims","evidence","time","reception","form","contestability","accountability","inheritance","fieldStatus","extensions"],"$",t),"0.1"!==e.contractVersion&&t.push({path:"$.contractVersion",message:"Expected contract version 0.1."}),R(e.artifact)){z(e.artifact,["id","kind","component","title","createdAt","configFingerprint","dataFingerprint","revision"],"$.artifact",t),V(e.artifact,"id","$.artifact",t),J(e.artifact,"kind","$.artifact",["chart","dashboard","story","alert","agent-answer"],t);for(let i of["component","title","createdAt","configFingerprint","dataFingerprint","revision"])H(e.artifact,i,"$.artifact",t)}else t.push({path:"$.artifact",message:"Expected an artifact identity object."});if(R(e.purpose))if(Array.isArray(e.purpose.intents)){z(e.purpose,["intents","communicativeAct","decisionContext","stakes","allowedUses","prohibitedUses"],"$.purpose",t),e.purpose.intents.forEach((e,i)=>{(!R(e)||"string"!=typeof e.id||!e.id)&&t.push({path:`$.purpose.intents[${i}].id`,message:"Expected a non-empty intent identifier."}),R(e)&&z(e,["id","strength","source","rationale"],`$.purpose.intents[${i}]`,t),R(e)&&void 0!==e.strength&&J(e,"strength",`$.purpose.intents[${i}]`,["primary","secondary"],t),R(e)&&(G(e,"source",`$.purpose.intents[${i}]`,["author","derived","model-proposal","import"],t),H(e,"rationale",`$.purpose.intents[${i}]`,t))});for(let i of["allowedUses","prohibitedUses"])U(K(e.purpose,i,"$.purpose",t),`$.purpose.${i}`,t);G(e.purpose,"stakes","$.purpose",["exploratory","informational","operational","high"],t),H(e.purpose,"communicativeAct","$.purpose",t),H(e.purpose,"decisionContext","$.purpose",t)}else t.push({path:"$.purpose.intents",message:"Expected an intent array."});else t.push({path:"$.purpose",message:"Expected a purpose object."});Array.isArray(e.claims)?e.claims.forEach((e,i)=>{if(!R(e))return void t.push({path:`$.claims[${i}]`,message:"Expected a claim object."});z(e,["id","text","kind","status","evidenceIds","scope","uncertainty","asOf","supersedes","authoredBy","review","tags"],`$.claims[${i}]`,t),V(e,"id",`$.claims[${i}]`,t),J(e,"kind",`$.claims[${i}]`,["description","observation","aggregation","inference","forecast","simulation","alert","recommendation","normative"],t),J(e,"status",`$.claims[${i}]`,["supported","provisional","disputed","superseded","retracted","unsupported","unknown"],t),Array.isArray(e.evidenceIds)?e.evidenceIds.some(e=>"string"!=typeof e||!e)&&t.push({path:`$.claims[${i}].evidenceIds`,message:"Expected non-empty string evidence identifiers."}):t.push({path:`$.claims[${i}].evidenceIds`,message:"Expected an evidence identifier array."}),U(K(e,"supersedes",`$.claims[${i}]`,t),`$.claims[${i}].supersedes`,t),H(e,"text",`$.claims[${i}]`,t),H(e,"asOf",`$.claims[${i}]`,t),T(e,"scope",`$.claims[${i}]`,t),U(K(e,"tags",`$.claims[${i}]`,t),`$.claims[${i}].tags`,t),void 0!==e.authoredBy&&Z(e.authoredBy,`$.claims[${i}].authoredBy`,t);let r=L(e,"review",`$.claims[${i}]`,t);r&&(z(r,["status","reviewer","reviewedAt","rationale"],`$.claims[${i}].review`,t),J(r,"status",`$.claims[${i}].review`,["proposed","reviewed","approved","rejected"],t),void 0!==r.reviewer&&Z(r.reviewer,`$.claims[${i}].review.reviewer`,t),H(r,"reviewedAt",`$.claims[${i}].review`,t),H(r,"rationale",`$.claims[${i}].review`,t));let n=L(e,"uncertainty",`$.claims[${i}]`,t);if(n){z(n,["kind","lower","upper","confidence","unit","description"],`$.claims[${i}].uncertainty`,t),J(n,"kind",`$.claims[${i}].uncertainty`,["interval","distribution","qualitative","unknown"],t);for(let e of["lower","upper","confidence"])D(n,e,`$.claims[${i}].uncertainty`,t);H(n,"unit",`$.claims[${i}].uncertainty`,t),H(n,"description",`$.claims[${i}].uncertainty`,t)}}):t.push({path:"$.claims",message:"Expected a claim array."}),Array.isArray(e.evidence)?e.evidence.forEach((e,i)=>{if(!R(e))return void t.push({path:`$.evidence[${i}]`,message:"Expected an evidence object."});z(e,["id","role","label","source","fingerprint","dataVersion","observedAt","scope","sample","transformation","generatedClaimId","relationship"],`$.evidence[${i}]`,t),V(e,"id",`$.evidence[${i}]`,t),J(e,"role",`$.evidence[${i}]`,["source-data","external-source","transformation","statistical-test","model-output","human-observation","policy-rule","quality-check"],t);for(let r of["label","fingerprint","dataVersion","observedAt","generatedClaimId"])H(e,r,`$.evidence[${i}]`,t);T(e,"scope",`$.evidence[${i}]`,t);let r=L(e,"source",`$.evidence[${i}]`,t);if(r){z(r,["name","uri","version","retrievedAt","publisher"],`$.evidence[${i}].source`,t);for(let e of["name","uri","version","retrievedAt","publisher"])H(r,e,`$.evidence[${i}].source`,t)}let n=L(e,"transformation",`$.evidence[${i}]`,t);if(n){z(n,["id","kind","description","inputEvidenceIds","parameters","assumptions","implementation","performedAt","performedBy"],`$.evidence[${i}].transformation`,t),V(n,"id",`$.evidence[${i}].transformation`,t),J(n,"kind",`$.evidence[${i}].transformation`,["aggregation","filter","normalization","binning","join","smoothing","forecasting","simulation","other"],t);let e=K(n,"inputEvidenceIds",`$.evidence[${i}].transformation`,t);e?U(e,`$.evidence[${i}].transformation.inputEvidenceIds`,t):t.push({path:`$.evidence[${i}].transformation.inputEvidenceIds`,message:"Expected an evidence identifier array."}),U(K(n,"assumptions",`$.evidence[${i}].transformation`,t),`$.evidence[${i}].transformation.assumptions`,t),H(n,"description",`$.evidence[${i}].transformation`,t),H(n,"implementation",`$.evidence[${i}].transformation`,t),H(n,"performedAt",`$.evidence[${i}].transformation`,t),T(n,"parameters",`$.evidence[${i}].transformation`,t),void 0!==n.performedBy&&Z(n.performedBy,`$.evidence[${i}].transformation.performedBy`,t)}let a=L(e,"sample",`$.evidence[${i}]`,t);if(a){z(a,["rowCount","fields","values","truncated"],`$.evidence[${i}].sample`,t),U(K(a,"fields",`$.evidence[${i}].sample`,t),`$.evidence[${i}].sample.fields`,t);let e=K(a,"values",`$.evidence[${i}].sample`,t);e&&!function(e){return e.every(q)}(e)&&t.push({path:`$.evidence[${i}].sample.values`,message:"Expected JSON values."}),D(a,"rowCount",`$.evidence[${i}].sample`,t),M(a,"truncated",`$.evidence[${i}].sample`,t)}G(e,"relationship",`$.evidence[${i}]`,["descriptive","correlational","causal","unknown"],t)}):t.push({path:"$.evidence",message:"Expected an evidence array."}),function(e,t){if(void 0===e||R(e)){if(R(e))for(let[i,r]of Object.entries(e)){let e=`$.fieldStatus.${i}`;if(!R(r)||"string"!=typeof r.status){t.push({path:e,message:"Expected a field state with a status."});continue}z(r,["status","reason","suppliedBy","derived","reviewedBy"],e,t),["known","unknown","manual","not-applicable"].includes(r.status)||t.push({path:`${e}.status`,message:"Expected one of: known, unknown, manual, not-applicable."}),void 0!==r.suppliedBy&&("string"!=typeof r.suppliedBy||!["author","system","model-proposal","import"].includes(r.suppliedBy))&&t.push({path:`${e}.suppliedBy`,message:"Expected one of: author, system, model-proposal, import."}),H(r,"reason",e,t),H(r,"reviewedBy",e,t),M(r,"derived",e,t);let n=Object.prototype.hasOwnProperty.call(W,i)?W[i]:void 0,a="model-proposal"===r.suppliedBy,o=a&&!0===n?.modelMayPropose&&"known"!==r.status;n&&"known"===r.status&&"string"!=typeof r.suppliedBy&&t.push({path:`${e}.suppliedBy`,message:`Known field "${i}" must identify an allowed supplier.`}),n&&"string"==typeof r.suppliedBy&&!o&&!n.suppliedBy.includes(r.suppliedBy)&&t.push({path:`${e}.suppliedBy`,message:`Field "${i}" cannot be supplied by ${r.suppliedBy}.`}),n&&!0===r.derived&&!n.derivable&&t.push({path:`${e}.derived`,message:`Field "${i}" cannot be marked as derived.`}),n&&a&&(!n.modelMayPropose||"known"===r.status)&&t.push({path:`${e}.suppliedBy`,message:"known"===r.status?`A model proposal cannot finalize field "${i}" as known.`:`Field "${i}" does not accept model proposals.`}),"required"===n?.humanReview&&"known"===r.status&&("string"!=typeof r.reviewedBy||!r.reviewedBy.trim())&&t.push({path:`${e}.reviewedBy`,message:`Known field "${i}" requires an attributable human review.`})}}else t.push({path:"$.fieldStatus",message:"Expected a field-state object."})}(e.fieldStatus,t);let n=L(e,"time","$",t);return n&&function(e,t){let i="$.time";z(e,[...Y,...Object.keys(ee),"sources"],i,t);for(let r of Y)H(e,r,i,t);for(let[r,n]of Object.entries(ee)){let a=L(e,r,i,t);a&&N(a,n,`${i}.${r}`,t)}K(e,"sources",i,t)?.forEach((e,r)=>{let n=`${i}.sources[${r}]`;R(e)?N(e,te,n,t):t.push({path:n,message:"Expected a source object."})})}(n,t),function(e,t){(function(e,t){let i=L(e,"reception","$",t);if(!i)return;z(i,["channels","audience","strengths","risks","scaffolds","description","dataFallback","manualChecks"],"$.reception",t);let r=K(i,"channels","$.reception",t);r||t.push({path:"$.reception.channels",message:"Expected a reception-channel array."}),r?.forEach((e,i)=>{let r=`$.reception.channels[${i}]`;R(e)?(z(e,["channel","disclosure","navigation","interactionInstructions","rawData","tokenBudget","privacyNotes"],r,t),J(e,"channel",r,["visual","screen-reader","sonified","agent","print","low-bandwidth"],t),G(e,"disclosure",r,["summary","standard","detailed"],t),G(e,"rawData",r,["deny","bounded","allow"],t),M(e,"navigation",r,t),M(e,"interactionInstructions",r,t),D(e,"tokenBudget",r,t),U(K(e,"privacyNotes",r,t),`${r}.privacyNotes`,t)):t.push({path:r,message:"Expected a channel object."})});for(let e of["strengths","risks","scaffolds","manualChecks"])U(K(i,e,"$.reception",t),`$.reception.${e}`,t);H(i,"audience","$.reception",t),H(i,"description","$.reception",t),M(i,"dataFallback","$.reception",t)})(e,t),function(e,t){let i=L(e,"form","$",t);i&&(z(i,["chartFamily","whyThisForm","rejectedAlternatives","risks","misuse"],"$.form",t),H(i,"chartFamily","$.form",t),H(i,"whyThisForm","$.form",t),U(K(i,"risks","$.form",t),"$.form.risks",t),U(K(i,"misuse","$.form",t),"$.form.misuse",t),K(i,"rejectedAlternatives","$.form",t)?.forEach((e,i)=>{let r=`$.form.rejectedAlternatives[${i}]`;R(e)?(z(e,["representation","reason"],r,t),V(e,"representation",r,t),V(e,"reason",r,t)):t.push({path:r,message:"Expected an alternative object."})}))}(e,t),function(e,t){let i=L(e,"contestability","$",t);i&&(z(i,["sourceRequestsAllowed","alternativeViews","challenges","corrections","editorialExceptions"],"$.contestability",t),M(i,"sourceRequestsAllowed","$.contestability",t),K(i,"challenges","$.contestability",t)?.forEach((e,i)=>{let r=`$.contestability.challenges[${i}]`;if(R(e)){z(e,["id","claimId","status","reason","raisedBy","raisedAt","counterclaimId","resolution"],r,t),V(e,"id",r,t),V(e,"claimId",r,t),V(e,"reason",r,t),J(e,"status",r,["open","accepted","declined","resolved"],t),void 0!==e.raisedBy&&Z(e.raisedBy,`${r}.raisedBy`,t);for(let i of["raisedAt","counterclaimId","resolution"])H(e,i,r,t)}else t.push({path:r,message:"Expected a challenge object."})}),K(i,"corrections","$.contestability",t)?.forEach((e,i)=>{let r=`$.contestability.corrections[${i}]`;if(!R(e))return void t.push({path:r,message:"Expected a correction object."});z(e,["id","affectedClaimIds","replacementClaimIds","reason","createdAt","createdBy"],r,t),V(e,"id",r,t),V(e,"reason",r,t);let n=K(e,"affectedClaimIds",r,t);n||t.push({path:`${r}.affectedClaimIds`,message:"Expected an affected-claim array."}),U(n,`${r}.affectedClaimIds`,t),U(K(e,"replacementClaimIds",r,t),`${r}.replacementClaimIds`,t),H(e,"createdAt",r,t),void 0!==e.createdBy&&Z(e.createdBy,`${r}.createdBy`,t)}),K(i,"alternativeViews","$.contestability",t)?.forEach((e,i)=>{let r=`$.contestability.alternativeViews[${i}]`;R(e)?(z(e,["id","label","rationale"],r,t),V(e,"id",r,t),V(e,"label",r,t),H(e,"rationale",r,t)):t.push({path:r,message:"Expected an alternative-view object."})}),K(i,"editorialExceptions","$.contestability",t)?.forEach((e,i)=>{let r=`$.contestability.editorialExceptions[${i}]`;R(e)?(z(e,["ruleId","rationale","owner","reviewAt"],r,t),V(e,"ruleId",r,t),V(e,"rationale",r,t),H(e,"owner",r,t),H(e,"reviewAt",r,t)):t.push({path:r,message:"Expected an editorial-exception object."})}))}(e,t),function(e,t){let i=L(e,"accountability","$",t);i&&(z(i,["authors","generatedBy","dataSources","codeRef","reviews","actions"],"$.accountability",t),K(i,"authors","$.accountability",t)?.forEach((e,i)=>Z(e,`$.accountability.authors[${i}]`,t)),U(K(i,"dataSources","$.accountability",t),"$.accountability.dataSources",t),H(i,"generatedBy","$.accountability",t),H(i,"codeRef","$.accountability",t),K(i,"reviews","$.accountability",t)?.forEach((e,i)=>{let r=`$.accountability.reviews[${i}]`;if(R(e)){z(e,["id","status","reviewer","reviewedAt","rationale","policyId"],r,t),V(e,"id",r,t),J(e,"status",r,["pending","approved","changes-requested","rejected"],t),void 0!==e.reviewer&&Z(e.reviewer,`${r}.reviewer`,t);for(let i of["reviewedAt","rationale","policyId"])H(e,i,r,t)}else t.push({path:r,message:"Expected a review object."})}),K(i,"actions","$.accountability",t)?.forEach((e,i)=>{let r=`$.accountability.actions[${i}]`;if(!R(e))return void t.push({path:r,message:"Expected an action object."});z(e,["id","action","actor","actedAt","claimIds","artifactId","artifactRevision","policyId","status","invalidatedByClaimId"],r,t),V(e,"id",r,t),V(e,"action",r,t);let n=K(e,"claimIds",r,t);n||t.push({path:`${r}.claimIds`,message:"Expected a claim identifier array."}),U(n,`${r}.claimIds`,t),void 0!==e.actor&&Z(e.actor,`${r}.actor`,t);for(let i of["actedAt","artifactId","artifactRevision","policyId","invalidatedByClaimId"])H(e,i,r,t);G(e,"status",r,["proposed","taken","reversed","invalidated"],t)}))}(e,t),function(e,t){let i=L(e,"inheritance","$",t);if(i){z(i,["requiredPaths","prohibitedExports","privacy","rawDataDefault","preservation","sourceArtifactIds"],"$.inheritance",t);for(let e of["requiredPaths","prohibitedExports","sourceArtifactIds"])U(K(i,e,"$.inheritance",t),`$.inheritance.${e}`,t);G(i,"privacy","$.inheritance",["public","restricted","confidential","unknown"],t),G(i,"rawDataDefault","$.inheritance",["exclude","bounded","include"],t),G(i,"preservation","$.inheritance",["full-fidelity","claim-evidence-preserved","visual-only","lossy","unknown"],t)}}(e,t)}(e,t),T(e,"extensions","$",t),Array.isArray(e.claims)&&0===e.claims.length&&i.push({path:"$.claims",message:"The contract declares no claims."}),Array.isArray(e.evidence)&&0===e.evidence.length&&i.push({path:"$.evidence",message:"The contract declares no evidence."}),{valid:0===t.length,errors:t,warnings:i}}(e)}catch{return{valid:!1,errors:[{path:"$",message:"Artifact contract could not be inspected safely."}],warnings:[]}}}function re(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function ne(e){let t=Object.entries(e).filter(([e,t])=>h(e,t)&&void 0!==t);if(0!==t.length)return 1===t.length&&"data"===t[0][0]?t[0][1]:Object.fromEntries(t)}function ae(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>!h(e,t)&&"recipeId"!==e))}function oe(e,t,i){let r=function(e,t,i,r=ne(t)){let n=ae(t),a=0===w(n).length?F(n).fingerprint:void 0,o=void 0!==r&&0===w(r).length?function(e,t=[]){if(void 0===e)return;let i=t.filter(e=>!!e.transformation).map(({id:e,transformation:t})=>({evidenceId:e,transformation:t})).sort(({evidenceId:e},{evidenceId:t})=>e<t?-1:e>t?1:0);return F(i.length>0?{data:e,transformations:i}:e).fingerprint}(r,e.evidence):void 0,s="ChartRecipe"===i&&"string"==typeof t.recipeId?t.recipeId:i,l=[],c=[];return void 0!==s&&(void 0===e.artifact.component?c.push("artifact.component"):e.artifact.component!==s&&l.push("artifact.component")),void 0===e.artifact.configFingerprint||void 0===a?c.push("artifact.configFingerprint"):e.artifact.configFingerprint!==a&&l.push("artifact.configFingerprint"),void 0!==e.artifact.dataFingerprint&&o?e.artifact.dataFingerprint!==o&&l.push("artifact.dataFingerprint"):c.push("artifact.dataFingerprint"),{status:l.length>0?"mismatch":c.length>0?"unknown":"match",mismatchPaths:l,unknownPaths:c}}(e,t,i);return{mismatchPaths:[...r.mismatchPaths,...void 0!==i&&r.unknownPaths.includes("artifact.component")?["artifact.component"]:[]]}}function se(e,t,i,r){return F({component:t,version:r.version,createdAt:r.createdAt,...void 0!==r.recipeId?{recipeId:r.recipeId}:{},...void 0!==r.portable?{portable:r.portable}:{},...void 0!==r.manifest?{manifest:r.manifest}:{},...void 0!==r.reason?{reason:r.reason}:{},...void 0!==r.warnings?{warnings:r.warnings}:{},...void 0!==r.selections?{selections:r.selections}:{},artifactContract:i,status:e.status,omittedPaths:e.omittedPaths,warnings:e.warnings,...void 0!==e.serializedConfigFingerprint?{serializedConfigFingerprint:e.serializedConfigFingerprint}:{},...Object.prototype.hasOwnProperty.call(e,"serializedDataFingerprint")?{serializedDataFingerprint:e.serializedDataFingerprint}:{}}).fingerprint}function le(e,t,i,r,n){let a=ne(i),o={...e,serializedConfigFingerprint:F(ae(i)).fingerprint,serializedDataFingerprint:void 0===a?null:F(a).fingerprint};return{...o,transferFingerprint:se(o,t,r,n)}}function ce(e,t,i,r,n){if(!t)return{};let a=function(e){let t=function(e,t={}){try{return function(e,t){if(!re(e))return{transfer:{status:"invalid",omittedPaths:["artifactContract"],warnings:["Artifact contract must be a JSON object."]}};let i=C(e),r=[...new Set([...i.excludedPaths,...w(e)])].sort(),n=i.value,a=function(e,t){if(!t||!re(e)||!Array.isArray(e.evidence))return[];let i=[];return e.evidence.forEach((e,t)=>{re(e)&&Object.prototype.hasOwnProperty.call(e,"sample")&&(delete e.sample,i.push(`$.evidence[${t}].sample`))}),i}(n,t.excludeEvidenceSamples),o=a.length?["Bounded evidence samples were excluded by the transfer policy."]:[],s=n?.contractVersion;if("string"!=typeof s||!s)return{contract:n,transfer:{status:"invalid",omittedPaths:[...r,...a],warnings:["Artifact contract is missing a string contractVersion.",...o]}};if("0.1"!==s)return{contract:n,transfer:{status:r.length>0?"invalid":"unsupported-version",omittedPaths:[...r,...a],warnings:[`Contract version ${s} is not interpreted by this runtime.`,...r.length>0?[`Non-JSON values could not be preserved at: ${r.join(", ")}.`]:[],...o]}};let l=ie(n),c=[...l.errors.map(({path:e,message:t})=>`${e}: ${t}`),...l.warnings.map(({path:e,message:t})=>`${e}: ${t}`),...r.length?[`Non-JSON values could not be preserved at: ${r.join(", ")}.`]:[],...o];return{contract:n,transfer:{status:!l.valid||r.length>0?"invalid":a.length>0?"excluded":"preserved",omittedPaths:[...r,...a],warnings:c}}}(e,t)}catch{let t=w(e);return{transfer:{status:"invalid",omittedPaths:t.length?t:["$"],warnings:["Artifact contract could not be inspected safely."]}}}}(e);if(!t.contract||"preserved"!==t.transfer.status)throw new TypeError(t.transfer.warnings.join(" ")||"Artifact contract could not be serialized without loss.");return t}(t),o=n.recipeId??e,s=oe(t,i,o),l=function(e,t){return[...new Set([...Object.keys(e),...Object.keys(t)])].filter(i=>{if(Object.prototype.hasOwnProperty.call(e,i)!==Object.prototype.hasOwnProperty.call(t,i))return!0;let r=F(e[i]),n=F(t[i]);return r.excludedPaths.length>0||r.fingerprint!==n.fingerprint}).map(e=>`props.${e}`).sort()}(i,r),c=oe(t,r,o);return s.mismatchPaths.length>0?{artifactContract:a.contract,artifactTransfer:le({status:"invalid",omittedPaths:s.mismatchPaths,warnings:["The artifact contract fingerprints do not match the supplied chart props or data."]},e,r,a.contract,n)}:l.length>0?{artifactContract:a.contract,artifactTransfer:le({status:"excluded",omittedPaths:l,warnings:["Chart props or data were excluded from the serialized configuration."]},e,r,a.contract,n)}:c.mismatchPaths.length>0?{artifactContract:a.contract,artifactTransfer:le({status:"invalid",omittedPaths:c.mismatchPaths,warnings:["Serialized chart props or data differ from the values bound to the artifact contract."]},e,r,a.contract,n)}:{artifactContract:a.contract,artifactTransfer:le(a.transfer,e,r,a.contract,n)}}var de="1",ue=/*#__PURE__*/new Set(["tooltip","onObservation","xFormat","yFormat","valueFormat","svgAnnotationRules","tooltipContent","onHover","tickFormatTime","tickFormatValue","edgeSort","sortGroups","centerContent","frameProps","controls","oFormat","rFormat","oSort","pieceStyle","summaryStyle","nodeStyle","edgeStyle","customHoverBehavior","customClickBehavior","customDoubleClickBehavior","onBrush","onTopologyChange","backgroundGraphics","foregroundGraphics","interactiveGraphics","legend","recipe","layout"]);function pe(e,t,i){Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0})}function fe(e,t){return!(!h(e,t)||"areas"===e&&"string"==typeof t)}var me="function"==typeof structuredClone?structuredClone:e=>JSON.parse(JSON.stringify(e));function he(e,t,i){if(i?.selections&&w(i.selections).length>0)throw new TypeError("Serialized selection state must contain only values that survive JSON serialization unchanged.");let r=n(e)??o(t.recipe)??o(t.recipeId);if(r)return function(e,t,i){let r=!1!==i?.includeData,n=w(e);if("portable"===e.portability&&n.length>0)throw new Error(`Portable recipe "${e.id}" has non-JSON definition values at: ${n.join(", ")}.`);let o=function(e,t,i){let r={};for(let[n,a]of Object.entries(e))if(null!=a&&!ue.has(n)&&"recipeId"!==n&&(t||!fe(n,a))){if("function"==typeof a){if(i)throw new Error(`Portable recipe prop "${n}" is not JSON-safe.`);continue}if(w(a).length>0){if(i)throw new Error(`Portable recipe prop "${n}" is not JSON-safe.`);continue}pe(r,n,me(a))}return r}(t,r,"portable"===e.portability),l=e.intents.map(s).filter(e=>!!e),c=e.layout&&"object"==typeof e.layout&&"string"==typeof e.layout.id?e.layout.id:void 0,d=c?a(c):void 0,u=e.layout&&"object"==typeof e.layout&&"string"==typeof e.layout.version&&e.layout.version?{version:e.layout.version,...e.layout.fingerprint?{fingerprint:e.layout.fingerprint}:{}}:void 0;if(d&&u&&(d.version!==u.version||d.fingerprint!==u.fingerprint))throw new Error(`Recipe layout "${c}" registry identity does not match its portable declaration.`);let p=d??u;if("portable"===e.portability&&c&&!p)throw new Error(`Portable recipe layout "${c}" must be registered with an explicit version identity.`);let f={name:e.name,intents:l,...e.audience?.primary?{audience:[e.audience.primary]}:{},frameFamily:e.frameFamily,...e.version?{recipeVersion:e.version}:{},...0===n.length?{definitionFingerprint:F(e).fingerprint}:{},...c?{layoutId:c}:{},...p?{layoutVersion:p.version}:{},...p?.fingerprint?{layoutFingerprint:p.fingerprint}:{}},m=(new Date).toISOString();if("portable"===e.portability){if(w(o).length>0)throw new Error(`Portable recipe "${e.id}" contains non-JSON-safe props or layoutConfig.`);let r={version:de,createdAt:m,recipeId:e.id,portable:!0,manifest:f,...i?.selections?{selections:i.selections}:{}};return{component:"ChartRecipe",recipeId:e.id,portable:!0,props:o,manifest:f,version:de,createdAt:m,...ce("ChartRecipe",i?.artifactContract,t,o,r),...i?.selections?{selections:i.selections}:{}}}let h="Recipe contains or may depend on non-serializable local layout callbacks.",y=["This config is inspectable but cannot be rendered remotely by CLI or MCP."],v={version:de,createdAt:m,recipeId:e.id,portable:!1,manifest:f,reason:h,warnings:y,...i?.selections?{selections:i.selections}:{}};return{component:"ChartRecipe",recipeId:e.id,portable:!1,reason:h,warnings:y,props:o,manifest:f,version:de,createdAt:m,...ce("ChartRecipe",i?.artifactContract,t,o,v),...i?.selections?{selections:i.selections}:{}}}(r,t,i);if(!p(e))throw new Error(`Unknown component "${e}". Known components: ${u.join(", ")}`);let l=!1!==i?.includeData,c={};for(let[e,i]of Object.entries(t))if(null!=i&&!ue.has(e)&&(l||!fe(e,i))&&"function"!=typeof i&&!(w(i).length>0))try{pe(c,e,me(i))}catch{}let d=(new Date).toISOString(),f={version:de,createdAt:d,...i?.selections?{selections:i.selections}:{}};return{component:e,props:c,version:de,createdAt:d,...ce(e,i?.artifactContract,t,c,f),...i?.selections?{selections:i.selections}:{}}}function ye(e){try{if(!e||"object"!=typeof e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}catch{return!1}}function ve(e){!function(e){if(!ye(e))throw new Error("Invalid chart config: expected a plain object");let t=w(e);if(t.length>0)throw new TypeError(`Chart config contains values that cannot survive JSON serialization at: ${t.join(", ")}.`);if(e.version!==de)throw new Error(`Unsupported chart config version ${String(e.version)}; expected ${de}.`);if("string"!=typeof e.component||!e.component.trim())throw new Error("Invalid chart config: missing component");if(!ye(e.props))throw new Error("Invalid chart config: props must be a plain object");if("string"!=typeof e.createdAt||!Number.isFinite(Date.parse(e.createdAt)))throw new Error("Invalid chart config: createdAt must be a valid timestamp");if(void 0!==e.recipeId&&("string"!=typeof e.recipeId||!e.recipeId.trim()))throw new Error("Invalid chart config: recipeId must be a non-empty string");if(void 0!==e.portable&&"boolean"!=typeof e.portable)throw new Error("Invalid chart config: portable must be a boolean");if(void 0!==e.selections&&!ye(e.selections))throw new Error("Invalid chart config: selections must be a plain object");if(void 0!==e.manifest){if(!ye(e.manifest))throw new Error("Invalid chart config: manifest must be a plain object");if("string"!=typeof e.manifest.name||!e.manifest.name.trim()||"string"!=typeof e.manifest.frameFamily||!e.manifest.frameFamily.trim()||!Array.isArray(e.manifest.intents)||e.manifest.intents.some(e=>"string"!=typeof e||!e.trim())||void 0!==e.manifest.audience&&(!Array.isArray(e.manifest.audience)||e.manifest.audience.some(e=>"string"!=typeof e||!e.trim()))||void 0!==e.manifest.recipeVersion&&("string"!=typeof e.manifest.recipeVersion||!e.manifest.recipeVersion.trim())||void 0!==e.manifest.definitionFingerprint&&("string"!=typeof e.manifest.definitionFingerprint||!e.manifest.definitionFingerprint.trim())||void 0!==e.manifest.layoutId&&("string"!=typeof e.manifest.layoutId||!e.manifest.layoutId.trim())||void 0!==e.manifest.layoutVersion&&("string"!=typeof e.manifest.layoutVersion||!e.manifest.layoutVersion.trim())||void 0!==e.manifest.layoutFingerprint&&("string"!=typeof e.manifest.layoutFingerprint||!e.manifest.layoutFingerprint.trim())||void 0!==e.manifest.layoutVersion&&void 0===e.manifest.layoutId||void 0!==e.manifest.layoutFingerprint&&void 0===e.manifest.layoutVersion)throw new Error("Invalid chart config: malformed recipe manifest")}}(e);let{props:t}=e,i="LocalChartRecipe"===e.component?"ChartRecipe":e.component;if("ChartRecipe"!==i&&!p(i))throw new Error(`Cannot project unknown component "${i}" to JSX.`);let r=[`<${i}`];e.recipeId&&r.push(` recipeId={${$e(e.recipeId)}}`);for(let[e,i]of Object.entries(t)){if(!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e)){let t={};Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),r.push(` {...${$e(t)}}`);continue}if("string"==typeof i)r.push(ge(i)?` ${e}="${i}"`:` ${e}={${$e(i)}}`);else if("boolean"==typeof i&&!0===i)r.push(` ${e}`);else if("boolean"==typeof i&&!1===i)r.push(` ${e}={false}`);else if("number"==typeof i)r.push(` ${e}={${i}}`);else{let t=$e(i);t.length<80?r.push(` ${e}={${t}}`):r.push(` ${e}={${$e(i,2)}}`)}}return r.push("/>"),r.join("\n")}function ge(e){return!/["&<>{}\r\n\u2028\u2029]/.test(e)}function $e(e,t){return JSON.stringify(e,null,t).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}var be=/*#__PURE__*/new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","PhysicsCustomChart"]);function we(t){return e(t)?t:void 0}function Ae(e){let t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function xe(e){let t=Ae(e);return null==t?void 0:Math.max(0,Math.floor(t))}function je(...e){return e.map(we).find(Boolean)}function Se(...e){return e.find(Array.isArray)}function Ie(e){let t={};for(let[i,r]of Object.entries(e))void 0!==r&&(t[i]=r);return t}function Pe(e,t,i){return e["string"==typeof t&&t?t:i]}function Oe(e){return"number"==typeof e?Number.isInteger(e)?String(e):String(Math.round(1e3*e)/1e3):i(e)}function Ee(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:`${t}s`}function Be(e){return Number.isInteger(e)?String(e):String(Math.round(1e3*e)/1e3)}function ke(e,t,i){let r=e?.filter(e=>!0===we(e)?.sensor).length,n=we(t?.observation),a=we(n?.sensors),o=Se(i?.activeSensors);return Math.max(r??0,a?Object.keys(a).length:0,o?.length??0)||void 0}function Ce(n,a,o={}){a=t(a);let s,{capability:u,audience:p,locale:m}=o,h=o.levels??["l1","l2","l3"],y=!1!==o.includeStructure,v=l(n,u),g=v?[...h,"l4"]:h,$=c(n,a,{levels:g,locale:m,capability:u,audience:p}),{l4:b,...w}=$.levels,A=["l1","l2","l3"].map(e=>$.levels[e]).filter(Boolean).join(" "),x={levels:w,text:$.annotations?`${$.annotations} ${A}`.trim():A,...$.annotations?{annotations:$.annotations}:{}};if(v&&b){let e=function(e){if(!e)return{};if("fits"in e||"buildProps"in e)return{family:e.family};let t=e;return{family:t.family,intentScores:t.intentScores}}(u);s={act:v,sentence:b,family:e.family,intentScores:e.intentScores}}let j=y?d(n,a,{maxLeaves:o.maxLeaves,locale:m}):void 0,S=function(t,r,n){if(!1===n)return;let a=we(n),o=we(r.physics),s=je(a?.snapshot,o?.snapshot,r.physicsSnapshot,function(t){let i=we(t);return!!i&&(e(i.world)||"simulationState"in i||"liveBodyOrder"in i)}(r.snapshot)?r.snapshot:void 0),l=je(a?.evidence,o?.evidence,r.physicsEvidence,r.settledEvidence),c=je(a?.config,o?.config,s?.config,r.config),d=je(we(s?.world),we(o?.world)),u=je(we(c?.kernel),we(d?.options)),p=Se(d?.bodies),f=Se(d?.colliders,c?.colliders),m=Se(s?.queue,o?.queue),h=Se(s?.liveBodyOrder),y=Se(d?.springs),v=Se(s?.activeSensorPairs),g=function(e){if(!e||0===e.length)return;let t=e.map((e,t)=>{let r=we(e);if(!r)return;let n=Ae(r.count??r.value??r.total??r.bodies??r.events);if(null==n)return;let a=i(r.label??r.id??r.name,`container ${t+1}`),o=null==r.id?void 0:i(r.id),s=Ae(r.secondary??r.secondaryCount),l=Ae(r.observed??r.observedCount);return Ie({id:o,label:a,count:n,secondary:s,secondaryLabel:"string"==typeof r.secondaryLabel?r.secondaryLabel:void 0,observed:l})}).filter(e=>null!=e);if(0===t.length)return;let r=t.reduce((e,t)=>e+t.count,0),n=t.filter(e=>e.count>0).length,a=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:r,populatedCount:n,...a?{leader:a}:{}}}(function(e,t,i,r){let n=we(e.settledProjection),a=we(t?.settledProjection);return Se(i?.projectionRows,i?.aggregates,e.settledProjectionRows,e.projectionRows,n?.rows,t?.settledProjectionRows,t?.projectionRows,a?.rows,r?.binCounts)}(r,o,a,l)),$=function(e,t){let r=e?.map((e,t)=>{let r=we(e);if(!r)return;let n=Ae(r.count)??0,a=Ae(r.total),o={label:i(r.label??r.id,`sediment ${t+1}`),count:n};return null!=r.id&&(o.id=i(r.id)),null!=a&&(o.total=a),o}).filter(e=>null!=e),n=xe(t?.bins)??r?.length??0,a=Ae(t?.count)??r?.reduce((e,t)=>e+t.count,0)??0,o=Ae(t?.total)??r?.reduce((e,t)=>e+(t.total??0),0),s=r?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==n||0!==a||o)return{bins:n,count:a,...null!=o&&o>0?{total:o}:{},...s?{leader:s}:{}}}(Se(a?.sediment,o?.sediment,s?.sediment),je(a?.sedimentTotals,o?.sedimentTotals)),b=h?.length??p?.length??xe(l?.bodyCount),w=function(e){if(e)return e.filter(e=>!0===we(e)?.sleeping).length}(p)??xe(l?.sleepingCount),A=m?.length,x="string"==typeof s?.simulationState?s.simulationState:void 0,j="boolean"==typeof l?.settled?l.settled:x?"settled"===x:null!=b||null!=w||null!=A?null!=b&&w===b&&0===(A??0):void 0,S=we(u?.gravity),I=Ae(S?.x),P=Ae(S?.y),O=Ie({state:x,settled:j,elapsedSeconds:Ae(s?.elapsedSeconds),paused:"boolean"==typeof s?.paused?s.paused:void 0,visible:"boolean"==typeof s?.visible?s.visible:void 0,seed:Ae(u?.seed),gravity:null!=I&&null!=P?{x:I,y:P}:void 0,fixedDt:Ae(c?.fixedDt??u?.fixedDt),timeScale:Ae(c?.timeScale),maxSubsteps:xe(c?.maxSubsteps),liveBodies:b,sleepingBodies:w,queued:A,bodyLimit:Ae(c?.bodyLimit),eviction:"string"==typeof c?.eviction?c.eviction:void 0}),E=Ie({colliders:f?.length,sensors:ke(f,c,d),springs:y?.length,activeSensorPairs:v?.length}),B=Object.keys(E).length>0,k=be.has(t);if(!(Object.keys(O).length>0||B||g||$)||!k&&null==n)return;let C={simulation:O,...B?{geometry:E}:{},...g?{aggregates:g}:{},...$?{sediment:$}:{}},F=function(e){let t=[],i=e.simulation,r=[i.state??(i.settled?"settled":void 0),null!=i.liveBodies?`${i.liveBodies} live ${Ee(i.liveBodies,"body")}`:void 0,null!=i.sleepingBodies?`${i.sleepingBodies} sleeping`:void 0,null!=i.queued?`${i.queued} queued`:void 0,null!=i.seed?`seed ${Be(i.seed)}`:void 0,i.gravity?`gravity (${Be(i.gravity.x)}, ${Be(i.gravity.y)})`:void 0,null!=i.fixedDt?`fixed step ${Be(i.fixedDt)}s`:void 0,null!=i.timeScale?`${Be(i.timeScale)}x time`:void 0].filter(Boolean);r.length>0&&t.push(`Physics simulation: ${r.join("; ")}.`);let n=e.geometry;if(n){let e=[null!=n.colliders?`${n.colliders} ${Ee(n.colliders,"collider")}`:void 0,null!=n.sensors?`${n.sensors} ${Ee(n.sensors,"sensor")}`:void 0,null!=n.springs?`${n.springs} ${Ee(n.springs,"spring")}`:void 0,null!=n.activeSensorPairs?`${n.activeSensorPairs} active sensor ${Ee(n.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}let a=e.aggregates;if(a){let e=a.leader,i=e?` Largest is ${e.label} with ${Be(e.count)}.`:"";t.push(`Physics aggregates: ${Be(a.totalCount)} settled ${Ee(a.totalCount,"body")} across ${a.rows.length} ${Ee(a.rows.length,"container")}; ${a.populatedCount} populated.${i}`)}let o=e.sediment;if(o){let e=null!=o.total?`, value total ${Be(o.total)}`:"",i=o.leader?`; largest sediment bin is ${o.leader.label} with ${Be(o.leader.count)}`:"";t.push(`Physics sediment: ${o.count} retained ${Ee(o.count,"body")} in ${o.bins} ${Ee(o.bins,"bin")}${e}${i}.`)}return t.join(" ")}(C);return{...C,text:F}}(n,a,o.physics),I=function(t,i,n){let a=[];if("GaugeChart"===t){"number"==typeof i.value&&Number.isFinite(i.value)&&a.push(`Current value is ${Oe(i.value)}.`);let e="number"==typeof i.min&&Number.isFinite(i.min)?i.min:0,t="number"==typeof i.max&&Number.isFinite(i.max)?i.max:100;a.push(`The gauge scale runs from ${Oe(e)} to ${Oe(t)}.`)}if("SankeyDiagram"===t||"ProcessSankey"===t){let e=Array.isArray(i.edges)?i.edges:[];if("ProcessSankey"===t&&Array.isArray(i.domain)&&2===i.domain.length&&a.push(`The ProcessSankey time domain runs from ${Oe(i.domain[0])} to ${Oe(i.domain[1])}.`),e.length>0){a.push(`${e.length} source flow${1===e.length?"":"s"} are supplied.`);for(let r of e.slice(0,n)){let e=Pe(r,i.sourceAccessor,"source"),n=Pe(r,i.targetAccessor,"target"),o=Pe(r,i.valueAccessor,"value"),s="ProcessSankey"===t&&(null!=r.startTime||null!=r.endTime);a.push(s?`${Oe(e)} to ${Oe(n)} has value ${Oe(o)} over ${Oe(r.startTime)}–${Oe(r.endTime)}.`:`${Oe(e)} to ${Oe(n)} has value ${Oe(o)}.`)}}}if("Treemap"===t||"CirclePack"===t||"TreeDiagram"===t||"OrbitDiagram"===t){let t=e(i.data)?i.data:void 0,o="string"==typeof i.valueAccessor&&i.valueAccessor?i.valueAccessor:"value",s="string"==typeof i.nodeIdAccessor&&i.nodeIdAccessor?i.nodeIdAccessor:"string"==typeof i.nodeIDAccessor&&i.nodeIDAccessor?i.nodeIDAccessor:"name",l=[],c=new WeakSet,d=e=>{if(c.has(e))return;let t=r(e,i.childrenAccessor);if(0!==t.length){c.add(e);for(let e of t)d(e);c.delete(e)}else l.push(e)};if(t&&d(t),l.length>0){a.push(`${l.length} hierarchy leaves are supplied.`);for(let e of l.slice(0,n))a.push(`${Oe(e[s])} has value ${Oe(e[o])}.`)}}if(be.has(t)&&Array.isArray(i.data)){let e=i.data;a.push(`${e.length} observed source row${1===e.length?"":"s"} are supplied.`);let r="CollisionSwarmChart"===t?i.xAccessor:i.valueAccessor,n="CollisionSwarmChart"===t?"x":"value",o=e.map(e=>Ae(Pe(e,r,n))).filter(e=>null!=e);if(o.length>0){let[e,t]=f(o);a.push(`Observed ${"string"==typeof r?r:n} ranges from ${Oe(e)} to ${Oe(t)}.`)}}if(0!==a.length)return{source:"chart-props",statements:a,text:`Exact chart-prop facts: ${a.join(" ")}`}}(n,a,Math.max(1,o.maxLeaves??200)),P=[x.text,s?.sentence,S?.text,I?.text].filter(Boolean).join(" ");return{component:n,description:x,intent:s,structure:j,physics:S,facts:I,text:P}}export{he as a,ve as b,Ce as c};
1
+ import{a as e,d as t,g as i,h as r,i as n,j as a,k as o,l as s,q as l,r as c,t as d,u,v as p}from"./c-PBFRYNKM.min.js";import{a as f}from"./c-5H6IMPPV.min.js";var m=/*#__PURE__*/new Set(["data","nodes","edges","points","areas","lines","flows","atlas","forest","circuit","edition","reading"]);function h(e,t){return m.has(e)&&!("reading"===e&&"string"==typeof t)}function y(e,t){return"number"==typeof t?`${e}[${t}]`:`${e}.${t}`}function v(e,t){return`${e}[Symbol(${t.description??""})]`}function g(e,t){if(!/^(0|[1-9][0-9]*)$/.test(e))return!1;let i=Number(e);return Number.isSafeInteger(i)&&i>=0&&i<t}function $(e,t){try{return Object.getOwnPropertyDescriptor(e,t)}catch{return}}function b(e,t,i,r){let n=$(e,t);return n&&"value"in n&&n.enumerable?w(n.value,i,r):[i]}function w(e,t="$",i=/*#__PURE__*/new Set){if(null===e||"string"==typeof e||"boolean"==typeof e)return[];if("number"==typeof e)return Number.isFinite(e)&&!Object.is(e,-0)?[]:[t];if("object"!=typeof e)return[t];if(i.has(e))return[t];let r,n,a;try{a=Array.isArray(e),r=Object.getPrototypeOf(e),n=Reflect.ownKeys(e)}catch{return[t]}if(r!==(a?Array.prototype:Object.prototype)&&null!==r)return[t];i.add(e);let o=[];try{if(a){let r=$(e,"length")?.value;if(!Number.isSafeInteger(r)||r<0)return[y(t,"length")];for(let e of n)"length"===e||"string"==typeof e&&g(e,r)||o.push("symbol"==typeof e?v(t,e):y(t,e));for(let n=0;n<r;n+=1)o.push(...b(e,String(n),y(t,n),i))}else for(let r of n)"symbol"!=typeof r?o.push(...b(e,r,y(t,r),i)):o.push(v(t,r));return o}catch{return[t]}finally{i.delete(e)}}var A=(e,t)=>(e>>>t|e<<32-t)>>>0,x=e=>Math.floor(4294967296*(e-Math.floor(e)))>>>0,[j,S]=/*#__PURE__*/(()=>{let e=[],t=[];for(let i=2;t.length<64;i+=1){let r=!0;for(let e=2;e*e<=i;e+=1)if(i%e===0){r=!1;break}r&&(e.length<8&&e.push(x(Math.sqrt(i))),t.push(x(Math.cbrt(i))))}return[e,t]})();function I(e,t){return`${e}[Symbol(${t.description??""})]`}function P(e,t){if(!/^(0|[1-9][0-9]*)$/.test(e))return!1;let i=Number(e);return Number.isSafeInteger(i)&&i>=0&&i<t}function O(e,t){return"number"==typeof t?`${e}[${t}]`:e?`${e}.${t}`:t}function E(e){return e.sort((e,t)=>{let i=JSON.stringify(e),r=JSON.stringify(t);return i<r?-1:i>r?1:0})}function B(e,t,i){if(null===e)return null;if(e instanceof Date){let r=e.getTime();return Number.isFinite(r)?{$type:"date",value:e.toISOString()}:void i.excluded.push(t)}switch(typeof e){case"string":case"boolean":return e;case"number":return Number.isNaN(e)?{$type:"number",value:"NaN"}:e===1/0?{$type:"number",value:"Infinity"}:e===-1/0?{$type:"number",value:"-Infinity"}:Object.is(e,-0)?{$type:"number",value:"-0"}:e;case"bigint":return{$type:"bigint",value:e.toString()};case"undefined":case"function":case"symbol":return void i.excluded.push(t);case"object":{let r=e;if(i.ancestors.has(r))return void i.excluded.push(t);i.ancestors.add(r);try{if(Array.isArray(e)){for(let r of Reflect.ownKeys(e))"length"===r||"string"==typeof r&&P(r,e.length)||i.excluded.push("symbol"==typeof r?I(t,r):O(t,r));return Array.from({length:e.length},(r,n)=>{let a=O(t,n),o=Object.getOwnPropertyDescriptor(e,String(n));if(!o||!("value"in o)||!o.enumerable)return i.excluded.push(a),null;let s=B(o.value,a,i);return void 0===s?null:s})}let r={},n=Object.getPrototypeOf(e);if(n!==Object.prototype&&null!==n)return void i.excluded.push(t);let a=[];for(let r of Reflect.ownKeys(e)){if("symbol"==typeof r){i.excluded.push(I(t,r));continue}let n=Object.getOwnPropertyDescriptor(e,r);n&&"value"in n&&n.enumerable?a.push(r):i.excluded.push(O(t,r))}for(let n of a.sort()){let a=Object.getOwnPropertyDescriptor(e,n),o=B(a&&"value"in a?a.value:void 0,O(t,n),i);void 0!==o&&Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0})}return r}finally{i.ancestors.delete(r)}}default:return void i.excluded.push(t)}}function k(e,t=/*#__PURE__*/new Set){if(null===e)return["null"];if(e instanceof Date)return Number.isFinite(e.getTime())?["date",e.toISOString()]:["excluded"];switch(typeof e){case"string":return["string",e];case"boolean":return["boolean",e];case"number":return["number",Number.isNaN(e)?"NaN":e===1/0?"Infinity":e===-1/0?"-Infinity":Object.is(e,-0)?"-0":String(e)];case"bigint":return["bigint",e.toString()];case"undefined":case"function":case"symbol":return["excluded"];case"object":if(t.has(e))return["excluded"];t.add(e);try{let i=i=>{let r="symbol"==typeof i?["symbol-key",i.description??""]:["string-key",i],n=Object.getOwnPropertyDescriptor(e,i);return n?"value"in n?[r,"data",!!n.enumerable,k(n.value,t)]:[r,"accessor",!!n.enumerable,!!n.get,!!n.set]:[r,"missing"]};if(Array.isArray(e))return["array",Array.from({length:e.length},(t,r)=>{let n=String(r);return Object.prototype.hasOwnProperty.call(e,n)?i(n):["hole"]}),E(Reflect.ownKeys(e).filter(t=>"length"!==t&&!("string"==typeof t&&P(t,e.length))).map(i))];let r=Object.getPrototypeOf(e);return[r!==Object.prototype&&null!==r?"non-json-object":"object",E(Reflect.ownKeys(e).map(i))]}finally{t.delete(e)}default:return["excluded"]}}function C(e){let t={excluded:[],ancestors:new Set},i=B(e,"$",t)??null;return{value:i,text:JSON.stringify(i),excludedPaths:t.excluded}}function F(e){let t=C(e),i=function(e){let t=[...j],i=Array.from((new TextEncoder).encode(e)),r=8*i.length;for(i.push(128);i.length%64!=56;)i.push(0);let n=Math.floor(r/4294967296),a=r>>>0;i.push(n>>>24&255,n>>>16&255,n>>>8&255,255&n,a>>>24&255,a>>>16&255,a>>>8&255,255&a);let o=[];for(let e=0;e<i.length;e+=4)o.push((i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3])>>>0);for(let e=0;e<o.length;e+=16){let i=[...o.slice(e,e+16)];for(let e=16;e<64;e+=1){let t=A(i[e-15],7)^A(i[e-15],18)^i[e-15]>>>3,r=A(i[e-2],17)^A(i[e-2],19)^i[e-2]>>>10;i[e]=i[e-16]+t+i[e-7]+r>>>0}let[r,n,a,s,l,c,d,u]=t;for(let e=0;e<64;e+=1){let t=u+(A(l,6)^A(l,11)^A(l,25))+(l&c^~l&d)+S[e]+i[e]>>>0,o=r&n^r&a^n&a;u=d,d=c,c=l,l=s+t>>>0,s=a,a=n,n=r,r=t+((A(r,2)^A(r,13)^A(r,22))+o>>>0)>>>0}let p=[r,n,a,s,l,c,d,u];for(let e=0;e<8;e+=1)t[e]=t[e]+p[e]>>>0}return t.map(e=>e.toString(16).padStart(8,"0")).join("")}(JSON.stringify(["semiotic-value-fingerprint","v2",k(e)]));return{...t,algorithm:"sha256",digest:i,fingerprint:`sha256:${i}`}}function N(e,t,i,r){z(e,Object.keys(t),i,r);for(let[n,a]of Object.entries(t))a.values?(a.required||void 0!==e[n])&&J(e,n,i,a.values,r):a.required?V(e,n,i,r):H(e,n,i,r)}function R(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function D(e,t,i,r){void 0!==e[t]&&("number"!=typeof e[t]||!Number.isFinite(e[t]))&&r.push({path:`${i}.${t}`,message:"Expected a finite number."})}function M(e,t,i,r){void 0!==e[t]&&"boolean"!=typeof e[t]&&r.push({path:`${i}.${t}`,message:"Expected a boolean."})}function q(e){return null===e||"string"==typeof e||"boolean"==typeof e||("number"==typeof e?Number.isFinite(e):Array.isArray(e)?e.every(q):R(e)&&Object.values(e).every(q))}function T(e,t,i,r){void 0!==e[t]&&(!R(e[t])||!q(e[t]))&&r.push({path:`${i}.${t}`,message:"Expected a JSON object."})}function z(e,t,i,r){let n=new Set(t);for(let t of Object.keys(e))n.has(t)||r.push({path:`${i}.${t}`,message:"Unexpected property."})}function V(e,t,i,r){("string"!=typeof e[t]||!e[t])&&r.push({path:`${i}.${t}`,message:"Expected a non-empty string."})}function J(e,t,i,r,n){("string"!=typeof e[t]||!r.includes(e[t]))&&n.push({path:`${i}.${t}`,message:`Expected one of: ${r.join(", ")}.`})}function L(e,t,i,r){let n=e[t];if(void 0!==n)return R(n)?n:void r.push({path:`${i}.${t}`,message:"Expected an object."})}function K(e,t,i,r){let n=e[t];if(void 0!==n)return Array.isArray(n)?n:void r.push({path:`${i}.${t}`,message:"Expected an array."})}function U(e,t,i){e?.some(e=>"string"!=typeof e||!e)&&i.push({path:t,message:"Expected non-empty string values."})}function G(e,t,i,r,n){void 0!==e[t]&&J(e,t,i,r,n)}function H(e,t,i,r){void 0!==e[t]&&"string"!=typeof e[t]&&r.push({path:`${i}.${t}`,message:"Expected a string."})}function Z(e,t,i){R(e)?(z(e,["id","name","kind"],t,i),V(e,"kind",t,i),H(e,"id",t,i),H(e,"name",t,i)):i.push({path:t,message:"Expected an actor object."})}function _(e){for(let t of Object.values(e))Object.freeze(t.suppliedBy),Object.freeze(t);return Object.freeze(e)}var W=/*#__PURE__*/_({"artifact.id":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"never"},"artifact.createdAt":{suppliedBy:["author","system","import"],derivable:!1,modelMayPropose:!1,humanReview:"never"},"artifact.configFingerprint":{suppliedBy:["system"],derivable:!0,modelMayPropose:!1,humanReview:"never"},"artifact.dataFingerprint":{suppliedBy:["system"],derivable:!0,modelMayPropose:!1,humanReview:"never"},"purpose.intents":{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},"purpose.communicativeAct":{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},"purpose.stakes":{suppliedBy:["author","import"],derivable:!1,modelMayPropose:!0,humanReview:"required"},claims:{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},"claims.status":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},evidence:{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},"evidence.source":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},"evidence.fingerprint":{suppliedBy:["system"],derivable:!0,modelMayPropose:!1,humanReview:"never"},time:{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},"time.completeness":{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"},reception:{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},form:{suppliedBy:["author","system","model-proposal","import"],derivable:!0,modelMayPropose:!0,humanReview:"policy-dependent"},contestability:{suppliedBy:["author","system","import"],derivable:!1,modelMayPropose:!1,humanReview:"required"},accountability:{suppliedBy:["author","system","import"],derivable:!1,modelMayPropose:!1,humanReview:"policy-dependent"},inheritance:{suppliedBy:["author","system","import"],derivable:!0,modelMayPropose:!1,humanReview:"policy-dependent"}}),X=["fresh","stale","unknown"],Y=["partial","provisional","settled","unknown"],Q=["observedAt","ingestedAt","processedAt","publishedAt","snapshotAt"],ee={eventTime:{field:{},value:{},timezone:{},granularity:{}},presentation:{state:{values:["live","historical","mixed"]},label:{}},freshness:{status:{required:!0,values:X},checkedAt:{},heartbeatAt:{},expiresAt:{},basis:{}},watermark:{value:{required:!0},policy:{},allowedLateness:{}},window:{start:{required:!0},end:{required:!0},status:{required:!0,values:["open","provisional","settled","reopened","corrected"]}},completeness:{status:{required:!0,values:Y},basis:{}},revision:{status:{required:!0,values:["original","backfilled","corrected","superseded"]},previousArtifactId:{},correctionId:{},reason:{}},snapshot:{id:{},format:{values:["iceberg","delta","other"]},schemaVersion:{},catalogRef:{}}},te={id:{required:!0},kind:{required:!0,values:["stream","processing-job","quality-check","snapshot","publication"]},label:{},observedAt:{},version:{},timezone:{},granularity:{},freshness:{values:X},completeness:{values:Y}};function ie(e){try{return function(e){let t=[],i=[];if(!R(e))return{valid:!1,errors:[{path:"$",message:"Expected an object."}],warnings:i};let r=w(e);if(r.length>0)return{valid:!1,errors:r.map(e=>({path:e,message:"Expected a JSON-compatible value that survives serialization unchanged."})),warnings:i};if(z(e,["contractVersion","artifact","purpose","claims","evidence","time","reception","form","contestability","accountability","inheritance","fieldStatus","extensions"],"$",t),"0.1"!==e.contractVersion&&t.push({path:"$.contractVersion",message:"Expected contract version 0.1."}),R(e.artifact)){z(e.artifact,["id","kind","component","title","createdAt","configFingerprint","dataFingerprint","revision"],"$.artifact",t),V(e.artifact,"id","$.artifact",t),J(e.artifact,"kind","$.artifact",["chart","dashboard","story","alert","agent-answer"],t);for(let i of["component","title","createdAt","configFingerprint","dataFingerprint","revision"])H(e.artifact,i,"$.artifact",t)}else t.push({path:"$.artifact",message:"Expected an artifact identity object."});if(R(e.purpose))if(Array.isArray(e.purpose.intents)){z(e.purpose,["intents","communicativeAct","decisionContext","stakes","allowedUses","prohibitedUses"],"$.purpose",t),e.purpose.intents.forEach((e,i)=>{(!R(e)||"string"!=typeof e.id||!e.id)&&t.push({path:`$.purpose.intents[${i}].id`,message:"Expected a non-empty intent identifier."}),R(e)&&z(e,["id","strength","source","rationale"],`$.purpose.intents[${i}]`,t),R(e)&&void 0!==e.strength&&J(e,"strength",`$.purpose.intents[${i}]`,["primary","secondary"],t),R(e)&&(G(e,"source",`$.purpose.intents[${i}]`,["author","derived","model-proposal","import"],t),H(e,"rationale",`$.purpose.intents[${i}]`,t))});for(let i of["allowedUses","prohibitedUses"])U(K(e.purpose,i,"$.purpose",t),`$.purpose.${i}`,t);G(e.purpose,"stakes","$.purpose",["exploratory","informational","operational","high"],t),H(e.purpose,"communicativeAct","$.purpose",t),H(e.purpose,"decisionContext","$.purpose",t)}else t.push({path:"$.purpose.intents",message:"Expected an intent array."});else t.push({path:"$.purpose",message:"Expected a purpose object."});Array.isArray(e.claims)?e.claims.forEach((e,i)=>{if(!R(e))return void t.push({path:`$.claims[${i}]`,message:"Expected a claim object."});z(e,["id","text","kind","status","evidenceIds","scope","uncertainty","asOf","supersedes","authoredBy","review","tags"],`$.claims[${i}]`,t),V(e,"id",`$.claims[${i}]`,t),J(e,"kind",`$.claims[${i}]`,["description","observation","aggregation","inference","forecast","simulation","alert","recommendation","normative"],t),J(e,"status",`$.claims[${i}]`,["supported","provisional","disputed","superseded","retracted","unsupported","unknown"],t),Array.isArray(e.evidenceIds)?e.evidenceIds.some(e=>"string"!=typeof e||!e)&&t.push({path:`$.claims[${i}].evidenceIds`,message:"Expected non-empty string evidence identifiers."}):t.push({path:`$.claims[${i}].evidenceIds`,message:"Expected an evidence identifier array."}),U(K(e,"supersedes",`$.claims[${i}]`,t),`$.claims[${i}].supersedes`,t),H(e,"text",`$.claims[${i}]`,t),H(e,"asOf",`$.claims[${i}]`,t),T(e,"scope",`$.claims[${i}]`,t),U(K(e,"tags",`$.claims[${i}]`,t),`$.claims[${i}].tags`,t),void 0!==e.authoredBy&&Z(e.authoredBy,`$.claims[${i}].authoredBy`,t);let r=L(e,"review",`$.claims[${i}]`,t);r&&(z(r,["status","reviewer","reviewedAt","rationale"],`$.claims[${i}].review`,t),J(r,"status",`$.claims[${i}].review`,["proposed","reviewed","approved","rejected"],t),void 0!==r.reviewer&&Z(r.reviewer,`$.claims[${i}].review.reviewer`,t),H(r,"reviewedAt",`$.claims[${i}].review`,t),H(r,"rationale",`$.claims[${i}].review`,t));let n=L(e,"uncertainty",`$.claims[${i}]`,t);if(n){z(n,["kind","lower","upper","confidence","unit","description"],`$.claims[${i}].uncertainty`,t),J(n,"kind",`$.claims[${i}].uncertainty`,["interval","distribution","qualitative","unknown"],t);for(let e of["lower","upper","confidence"])D(n,e,`$.claims[${i}].uncertainty`,t);H(n,"unit",`$.claims[${i}].uncertainty`,t),H(n,"description",`$.claims[${i}].uncertainty`,t)}}):t.push({path:"$.claims",message:"Expected a claim array."}),Array.isArray(e.evidence)?e.evidence.forEach((e,i)=>{if(!R(e))return void t.push({path:`$.evidence[${i}]`,message:"Expected an evidence object."});z(e,["id","role","label","source","fingerprint","dataVersion","observedAt","scope","sample","transformation","generatedClaimId","relationship"],`$.evidence[${i}]`,t),V(e,"id",`$.evidence[${i}]`,t),J(e,"role",`$.evidence[${i}]`,["source-data","external-source","transformation","statistical-test","model-output","human-observation","policy-rule","quality-check"],t);for(let r of["label","fingerprint","dataVersion","observedAt","generatedClaimId"])H(e,r,`$.evidence[${i}]`,t);T(e,"scope",`$.evidence[${i}]`,t);let r=L(e,"source",`$.evidence[${i}]`,t);if(r){z(r,["name","uri","version","retrievedAt","publisher"],`$.evidence[${i}].source`,t);for(let e of["name","uri","version","retrievedAt","publisher"])H(r,e,`$.evidence[${i}].source`,t)}let n=L(e,"transformation",`$.evidence[${i}]`,t);if(n){z(n,["id","kind","description","inputEvidenceIds","parameters","assumptions","implementation","performedAt","performedBy"],`$.evidence[${i}].transformation`,t),V(n,"id",`$.evidence[${i}].transformation`,t),J(n,"kind",`$.evidence[${i}].transformation`,["aggregation","filter","normalization","binning","join","smoothing","forecasting","simulation","other"],t);let e=K(n,"inputEvidenceIds",`$.evidence[${i}].transformation`,t);e?U(e,`$.evidence[${i}].transformation.inputEvidenceIds`,t):t.push({path:`$.evidence[${i}].transformation.inputEvidenceIds`,message:"Expected an evidence identifier array."}),U(K(n,"assumptions",`$.evidence[${i}].transformation`,t),`$.evidence[${i}].transformation.assumptions`,t),H(n,"description",`$.evidence[${i}].transformation`,t),H(n,"implementation",`$.evidence[${i}].transformation`,t),H(n,"performedAt",`$.evidence[${i}].transformation`,t),T(n,"parameters",`$.evidence[${i}].transformation`,t),void 0!==n.performedBy&&Z(n.performedBy,`$.evidence[${i}].transformation.performedBy`,t)}let a=L(e,"sample",`$.evidence[${i}]`,t);if(a){z(a,["rowCount","fields","values","truncated"],`$.evidence[${i}].sample`,t),U(K(a,"fields",`$.evidence[${i}].sample`,t),`$.evidence[${i}].sample.fields`,t);let e=K(a,"values",`$.evidence[${i}].sample`,t);e&&!function(e){return e.every(q)}(e)&&t.push({path:`$.evidence[${i}].sample.values`,message:"Expected JSON values."}),D(a,"rowCount",`$.evidence[${i}].sample`,t),M(a,"truncated",`$.evidence[${i}].sample`,t)}G(e,"relationship",`$.evidence[${i}]`,["descriptive","correlational","causal","unknown"],t)}):t.push({path:"$.evidence",message:"Expected an evidence array."}),function(e,t){if(void 0===e||R(e)){if(R(e))for(let[i,r]of Object.entries(e)){let e=`$.fieldStatus.${i}`;if(!R(r)||"string"!=typeof r.status){t.push({path:e,message:"Expected a field state with a status."});continue}z(r,["status","reason","suppliedBy","derived","reviewedBy"],e,t),["known","unknown","manual","not-applicable"].includes(r.status)||t.push({path:`${e}.status`,message:"Expected one of: known, unknown, manual, not-applicable."}),void 0!==r.suppliedBy&&("string"!=typeof r.suppliedBy||!["author","system","model-proposal","import"].includes(r.suppliedBy))&&t.push({path:`${e}.suppliedBy`,message:"Expected one of: author, system, model-proposal, import."}),H(r,"reason",e,t),H(r,"reviewedBy",e,t),M(r,"derived",e,t);let n=Object.prototype.hasOwnProperty.call(W,i)?W[i]:void 0,a="model-proposal"===r.suppliedBy,o=a&&!0===n?.modelMayPropose&&"known"!==r.status;n&&"known"===r.status&&"string"!=typeof r.suppliedBy&&t.push({path:`${e}.suppliedBy`,message:`Known field "${i}" must identify an allowed supplier.`}),n&&"string"==typeof r.suppliedBy&&!o&&!n.suppliedBy.includes(r.suppliedBy)&&t.push({path:`${e}.suppliedBy`,message:`Field "${i}" cannot be supplied by ${r.suppliedBy}.`}),n&&!0===r.derived&&!n.derivable&&t.push({path:`${e}.derived`,message:`Field "${i}" cannot be marked as derived.`}),n&&a&&(!n.modelMayPropose||"known"===r.status)&&t.push({path:`${e}.suppliedBy`,message:"known"===r.status?`A model proposal cannot finalize field "${i}" as known.`:`Field "${i}" does not accept model proposals.`}),"required"===n?.humanReview&&"known"===r.status&&("string"!=typeof r.reviewedBy||!r.reviewedBy.trim())&&t.push({path:`${e}.reviewedBy`,message:`Known field "${i}" requires an attributable human review.`})}}else t.push({path:"$.fieldStatus",message:"Expected a field-state object."})}(e.fieldStatus,t);let n=L(e,"time","$",t);return n&&function(e,t){let i="$.time";z(e,[...Q,...Object.keys(ee),"sources"],i,t);for(let r of Q)H(e,r,i,t);for(let[r,n]of Object.entries(ee)){let a=L(e,r,i,t);a&&N(a,n,`${i}.${r}`,t)}K(e,"sources",i,t)?.forEach((e,r)=>{let n=`${i}.sources[${r}]`;R(e)?N(e,te,n,t):t.push({path:n,message:"Expected a source object."})})}(n,t),function(e,t){(function(e,t){let i=L(e,"reception","$",t);if(!i)return;z(i,["channels","audience","strengths","risks","scaffolds","description","dataFallback","manualChecks"],"$.reception",t);let r=K(i,"channels","$.reception",t);r||t.push({path:"$.reception.channels",message:"Expected a reception-channel array."}),r?.forEach((e,i)=>{let r=`$.reception.channels[${i}]`;R(e)?(z(e,["channel","disclosure","navigation","interactionInstructions","rawData","tokenBudget","privacyNotes"],r,t),J(e,"channel",r,["visual","screen-reader","sonified","agent","print","low-bandwidth"],t),G(e,"disclosure",r,["summary","standard","detailed"],t),G(e,"rawData",r,["deny","bounded","allow"],t),M(e,"navigation",r,t),M(e,"interactionInstructions",r,t),D(e,"tokenBudget",r,t),U(K(e,"privacyNotes",r,t),`${r}.privacyNotes`,t)):t.push({path:r,message:"Expected a channel object."})});for(let e of["strengths","risks","scaffolds","manualChecks"])U(K(i,e,"$.reception",t),`$.reception.${e}`,t);H(i,"audience","$.reception",t),H(i,"description","$.reception",t),M(i,"dataFallback","$.reception",t)})(e,t),function(e,t){let i=L(e,"form","$",t);i&&(z(i,["chartFamily","whyThisForm","rejectedAlternatives","risks","misuse"],"$.form",t),H(i,"chartFamily","$.form",t),H(i,"whyThisForm","$.form",t),U(K(i,"risks","$.form",t),"$.form.risks",t),U(K(i,"misuse","$.form",t),"$.form.misuse",t),K(i,"rejectedAlternatives","$.form",t)?.forEach((e,i)=>{let r=`$.form.rejectedAlternatives[${i}]`;R(e)?(z(e,["representation","reason"],r,t),V(e,"representation",r,t),V(e,"reason",r,t)):t.push({path:r,message:"Expected an alternative object."})}))}(e,t),function(e,t){let i=L(e,"contestability","$",t);i&&(z(i,["sourceRequestsAllowed","alternativeViews","challenges","corrections","editorialExceptions"],"$.contestability",t),M(i,"sourceRequestsAllowed","$.contestability",t),K(i,"challenges","$.contestability",t)?.forEach((e,i)=>{let r=`$.contestability.challenges[${i}]`;if(R(e)){z(e,["id","claimId","status","reason","raisedBy","raisedAt","counterclaimId","resolution"],r,t),V(e,"id",r,t),V(e,"claimId",r,t),V(e,"reason",r,t),J(e,"status",r,["open","accepted","declined","resolved"],t),void 0!==e.raisedBy&&Z(e.raisedBy,`${r}.raisedBy`,t);for(let i of["raisedAt","counterclaimId","resolution"])H(e,i,r,t)}else t.push({path:r,message:"Expected a challenge object."})}),K(i,"corrections","$.contestability",t)?.forEach((e,i)=>{let r=`$.contestability.corrections[${i}]`;if(!R(e))return void t.push({path:r,message:"Expected a correction object."});z(e,["id","affectedClaimIds","replacementClaimIds","reason","createdAt","createdBy"],r,t),V(e,"id",r,t),V(e,"reason",r,t);let n=K(e,"affectedClaimIds",r,t);n||t.push({path:`${r}.affectedClaimIds`,message:"Expected an affected-claim array."}),U(n,`${r}.affectedClaimIds`,t),U(K(e,"replacementClaimIds",r,t),`${r}.replacementClaimIds`,t),H(e,"createdAt",r,t),void 0!==e.createdBy&&Z(e.createdBy,`${r}.createdBy`,t)}),K(i,"alternativeViews","$.contestability",t)?.forEach((e,i)=>{let r=`$.contestability.alternativeViews[${i}]`;R(e)?(z(e,["id","label","rationale"],r,t),V(e,"id",r,t),V(e,"label",r,t),H(e,"rationale",r,t)):t.push({path:r,message:"Expected an alternative-view object."})}),K(i,"editorialExceptions","$.contestability",t)?.forEach((e,i)=>{let r=`$.contestability.editorialExceptions[${i}]`;R(e)?(z(e,["ruleId","rationale","owner","reviewAt"],r,t),V(e,"ruleId",r,t),V(e,"rationale",r,t),H(e,"owner",r,t),H(e,"reviewAt",r,t)):t.push({path:r,message:"Expected an editorial-exception object."})}))}(e,t),function(e,t){let i=L(e,"accountability","$",t);i&&(z(i,["authors","generatedBy","dataSources","codeRef","reviews","actions"],"$.accountability",t),K(i,"authors","$.accountability",t)?.forEach((e,i)=>Z(e,`$.accountability.authors[${i}]`,t)),U(K(i,"dataSources","$.accountability",t),"$.accountability.dataSources",t),H(i,"generatedBy","$.accountability",t),H(i,"codeRef","$.accountability",t),K(i,"reviews","$.accountability",t)?.forEach((e,i)=>{let r=`$.accountability.reviews[${i}]`;if(R(e)){z(e,["id","status","reviewer","reviewedAt","rationale","policyId"],r,t),V(e,"id",r,t),J(e,"status",r,["pending","approved","changes-requested","rejected"],t),void 0!==e.reviewer&&Z(e.reviewer,`${r}.reviewer`,t);for(let i of["reviewedAt","rationale","policyId"])H(e,i,r,t)}else t.push({path:r,message:"Expected a review object."})}),K(i,"actions","$.accountability",t)?.forEach((e,i)=>{let r=`$.accountability.actions[${i}]`;if(!R(e))return void t.push({path:r,message:"Expected an action object."});z(e,["id","action","actor","actedAt","claimIds","artifactId","artifactRevision","policyId","status","invalidatedByClaimId"],r,t),V(e,"id",r,t),V(e,"action",r,t);let n=K(e,"claimIds",r,t);n||t.push({path:`${r}.claimIds`,message:"Expected a claim identifier array."}),U(n,`${r}.claimIds`,t),void 0!==e.actor&&Z(e.actor,`${r}.actor`,t);for(let i of["actedAt","artifactId","artifactRevision","policyId","invalidatedByClaimId"])H(e,i,r,t);G(e,"status",r,["proposed","taken","reversed","invalidated"],t)}))}(e,t),function(e,t){let i=L(e,"inheritance","$",t);if(i){z(i,["requiredPaths","prohibitedExports","privacy","rawDataDefault","preservation","sourceArtifactIds"],"$.inheritance",t);for(let e of["requiredPaths","prohibitedExports","sourceArtifactIds"])U(K(i,e,"$.inheritance",t),`$.inheritance.${e}`,t);G(i,"privacy","$.inheritance",["public","restricted","confidential","unknown"],t),G(i,"rawDataDefault","$.inheritance",["exclude","bounded","include"],t),G(i,"preservation","$.inheritance",["full-fidelity","claim-evidence-preserved","visual-only","lossy","unknown"],t)}}(e,t)}(e,t),T(e,"extensions","$",t),Array.isArray(e.claims)&&0===e.claims.length&&i.push({path:"$.claims",message:"The contract declares no claims."}),Array.isArray(e.evidence)&&0===e.evidence.length&&i.push({path:"$.evidence",message:"The contract declares no evidence."}),{valid:0===t.length,errors:t,warnings:i}}(e)}catch{return{valid:!1,errors:[{path:"$",message:"Artifact contract could not be inspected safely."}],warnings:[]}}}function re(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function ne(e){let t=Object.entries(e).filter(([e,t])=>h(e,t)&&void 0!==t);if(0!==t.length)return 1===t.length&&"data"===t[0][0]?t[0][1]:Object.fromEntries(t)}function ae(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>!h(e,t)&&"recipeId"!==e))}function oe(e,t,i){let r=function(e,t,i,r=ne(t)){let n=ae(t),a=0===w(n).length?F(n).fingerprint:void 0,o=void 0!==r&&0===w(r).length?function(e,t=[]){if(void 0===e)return;let i=t.filter(e=>!!e.transformation).map(({id:e,transformation:t})=>({evidenceId:e,transformation:t})).sort(({evidenceId:e},{evidenceId:t})=>e<t?-1:e>t?1:0);return F(i.length>0?{data:e,transformations:i}:e).fingerprint}(r,e.evidence):void 0,s="ChartRecipe"===i&&"string"==typeof t.recipeId?t.recipeId:i,l=[],c=[];return void 0!==s&&(void 0===e.artifact.component?c.push("artifact.component"):e.artifact.component!==s&&l.push("artifact.component")),void 0===e.artifact.configFingerprint||void 0===a?c.push("artifact.configFingerprint"):e.artifact.configFingerprint!==a&&l.push("artifact.configFingerprint"),void 0!==e.artifact.dataFingerprint&&o?e.artifact.dataFingerprint!==o&&l.push("artifact.dataFingerprint"):c.push("artifact.dataFingerprint"),{status:l.length>0?"mismatch":c.length>0?"unknown":"match",mismatchPaths:l,unknownPaths:c}}(e,t,i);return{mismatchPaths:[...r.mismatchPaths,...void 0!==i&&r.unknownPaths.includes("artifact.component")?["artifact.component"]:[]]}}function se(e,t,i,r){return F({component:t,version:r.version,createdAt:r.createdAt,...void 0!==r.recipeId?{recipeId:r.recipeId}:{},...void 0!==r.portable?{portable:r.portable}:{},...void 0!==r.manifest?{manifest:r.manifest}:{},...void 0!==r.reason?{reason:r.reason}:{},...void 0!==r.warnings?{warnings:r.warnings}:{},...void 0!==r.selections?{selections:r.selections}:{},artifactContract:i,status:e.status,omittedPaths:e.omittedPaths,warnings:e.warnings,...void 0!==e.serializedConfigFingerprint?{serializedConfigFingerprint:e.serializedConfigFingerprint}:{},...Object.prototype.hasOwnProperty.call(e,"serializedDataFingerprint")?{serializedDataFingerprint:e.serializedDataFingerprint}:{}}).fingerprint}function le(e,t,i,r,n){let a=ne(i),o={...e,serializedConfigFingerprint:F(ae(i)).fingerprint,serializedDataFingerprint:void 0===a?null:F(a).fingerprint};return{...o,transferFingerprint:se(o,t,r,n)}}function ce(e,t,i,r,n){if(!t)return{};let a=function(e){let t=function(e,t={}){try{return function(e,t){if(!re(e))return{transfer:{status:"invalid",omittedPaths:["artifactContract"],warnings:["Artifact contract must be a JSON object."]}};let i=C(e),r=[...new Set([...i.excludedPaths,...w(e)])].sort(),n=i.value,a=function(e,t){if(!t||!re(e)||!Array.isArray(e.evidence))return[];let i=[];return e.evidence.forEach((e,t)=>{re(e)&&Object.prototype.hasOwnProperty.call(e,"sample")&&(delete e.sample,i.push(`$.evidence[${t}].sample`))}),i}(n,t.excludeEvidenceSamples),o=a.length?["Bounded evidence samples were excluded by the transfer policy."]:[],s=n?.contractVersion;if("string"!=typeof s||!s)return{contract:n,transfer:{status:"invalid",omittedPaths:[...r,...a],warnings:["Artifact contract is missing a string contractVersion.",...o]}};if("0.1"!==s)return{contract:n,transfer:{status:r.length>0?"invalid":"unsupported-version",omittedPaths:[...r,...a],warnings:[`Contract version ${s} is not interpreted by this runtime.`,...r.length>0?[`Non-JSON values could not be preserved at: ${r.join(", ")}.`]:[],...o]}};let l=ie(n),c=[...l.errors.map(({path:e,message:t})=>`${e}: ${t}`),...l.warnings.map(({path:e,message:t})=>`${e}: ${t}`),...r.length?[`Non-JSON values could not be preserved at: ${r.join(", ")}.`]:[],...o];return{contract:n,transfer:{status:!l.valid||r.length>0?"invalid":a.length>0?"excluded":"preserved",omittedPaths:[...r,...a],warnings:c}}}(e,t)}catch{let t=w(e);return{transfer:{status:"invalid",omittedPaths:t.length?t:["$"],warnings:["Artifact contract could not be inspected safely."]}}}}(e);if(!t.contract||"preserved"!==t.transfer.status)throw new TypeError(t.transfer.warnings.join(" ")||"Artifact contract could not be serialized without loss.");return t}(t),o=n.recipeId??e,s=oe(t,i,o),l=function(e,t){return[...new Set([...Object.keys(e),...Object.keys(t)])].filter(i=>{if(Object.prototype.hasOwnProperty.call(e,i)!==Object.prototype.hasOwnProperty.call(t,i))return!0;let r=F(e[i]),n=F(t[i]);return r.excludedPaths.length>0||r.fingerprint!==n.fingerprint}).map(e=>`props.${e}`).sort()}(i,r),c=oe(t,r,o);return s.mismatchPaths.length>0?{artifactContract:a.contract,artifactTransfer:le({status:"invalid",omittedPaths:s.mismatchPaths,warnings:["The artifact contract fingerprints do not match the supplied chart props or data."]},e,r,a.contract,n)}:l.length>0?{artifactContract:a.contract,artifactTransfer:le({status:"excluded",omittedPaths:l,warnings:["Chart props or data were excluded from the serialized configuration."]},e,r,a.contract,n)}:c.mismatchPaths.length>0?{artifactContract:a.contract,artifactTransfer:le({status:"invalid",omittedPaths:c.mismatchPaths,warnings:["Serialized chart props or data differ from the values bound to the artifact contract."]},e,r,a.contract,n)}:{artifactContract:a.contract,artifactTransfer:le(a.transfer,e,r,a.contract,n)}}var de="1",ue=/*#__PURE__*/new Set(["tooltip","onObservation","xFormat","yFormat","valueFormat","svgAnnotationRules","tooltipContent","onHover","tickFormatTime","tickFormatValue","edgeSort","sortGroups","centerContent","frameProps","controls","oFormat","rFormat","oSort","pieceStyle","summaryStyle","nodeStyle","edgeStyle","customHoverBehavior","customClickBehavior","customDoubleClickBehavior","onBrush","onTopologyChange","backgroundGraphics","foregroundGraphics","interactiveGraphics","legend","recipe","layout"]);function pe(e,t,i){Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0})}function fe(e,t){return!(!h(e,t)||"areas"===e&&"string"==typeof t)}var me="function"==typeof structuredClone?structuredClone:e=>JSON.parse(JSON.stringify(e));function he(e,t,i){if(i?.selections&&w(i.selections).length>0)throw new TypeError("Serialized selection state must contain only values that survive JSON serialization unchanged.");let r=n(e)??o(t.recipe)??o(t.recipeId);if(r)return function(e,t,i){let r=!1!==i?.includeData,n=w(e);if("portable"===e.portability&&n.length>0)throw new Error(`Portable recipe "${e.id}" has non-JSON definition values at: ${n.join(", ")}.`);let o=function(e,t,i){let r={};for(let[n,a]of Object.entries(e))if(null!=a&&!ue.has(n)&&"recipeId"!==n&&(t||!fe(n,a))){if("function"==typeof a){if(i)throw new Error(`Portable recipe prop "${n}" is not JSON-safe.`);continue}if(w(a).length>0){if(i)throw new Error(`Portable recipe prop "${n}" is not JSON-safe.`);continue}pe(r,n,me(a))}return r}(t,r,"portable"===e.portability),l=e.intents.map(s).filter(e=>!!e),c=e.layout&&"object"==typeof e.layout&&"string"==typeof e.layout.id?e.layout.id:void 0,d=c?a(c):void 0,u=e.layout&&"object"==typeof e.layout&&"string"==typeof e.layout.version&&e.layout.version?{version:e.layout.version,...e.layout.fingerprint?{fingerprint:e.layout.fingerprint}:{}}:void 0;if(d&&u&&(d.version!==u.version||d.fingerprint!==u.fingerprint))throw new Error(`Recipe layout "${c}" registry identity does not match its portable declaration.`);let p=d??u;if("portable"===e.portability&&c&&!p)throw new Error(`Portable recipe layout "${c}" must be registered with an explicit version identity.`);let f={name:e.name,intents:l,...e.audience?.primary?{audience:[e.audience.primary]}:{},frameFamily:e.frameFamily,...e.version?{recipeVersion:e.version}:{},...0===n.length?{definitionFingerprint:F(e).fingerprint}:{},...c?{layoutId:c}:{},...p?{layoutVersion:p.version}:{},...p?.fingerprint?{layoutFingerprint:p.fingerprint}:{}},m=(new Date).toISOString();if("portable"===e.portability){if(w(o).length>0)throw new Error(`Portable recipe "${e.id}" contains non-JSON-safe props or layoutConfig.`);let r={version:de,createdAt:m,recipeId:e.id,portable:!0,manifest:f,...i?.selections?{selections:i.selections}:{}};return{component:"ChartRecipe",recipeId:e.id,portable:!0,props:o,manifest:f,version:de,createdAt:m,...ce("ChartRecipe",i?.artifactContract,t,o,r),...i?.selections?{selections:i.selections}:{}}}let h="Recipe contains or may depend on non-serializable local layout callbacks.",y=["This config is inspectable but cannot be rendered remotely by CLI or MCP."],v={version:de,createdAt:m,recipeId:e.id,portable:!1,manifest:f,reason:h,warnings:y,...i?.selections?{selections:i.selections}:{}};return{component:"ChartRecipe",recipeId:e.id,portable:!1,reason:h,warnings:y,props:o,manifest:f,version:de,createdAt:m,...ce("ChartRecipe",i?.artifactContract,t,o,v),...i?.selections?{selections:i.selections}:{}}}(r,t,i);if(!p(e))throw new Error(`Unknown component "${e}". Known components: ${u.join(", ")}`);let l=!1!==i?.includeData,c={};for(let[e,i]of Object.entries(t))if(null!=i&&!ue.has(e)&&(l||!fe(e,i))&&"function"!=typeof i&&!(w(i).length>0))try{pe(c,e,me(i))}catch{}let d=(new Date).toISOString(),f={version:de,createdAt:d,...i?.selections?{selections:i.selections}:{}};return{component:e,props:c,version:de,createdAt:d,...ce(e,i?.artifactContract,t,c,f),...i?.selections?{selections:i.selections}:{}}}function ye(e){try{if(!e||"object"!=typeof e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}catch{return!1}}function ve(e){!function(e){if(!ye(e))throw new Error("Invalid chart config: expected a plain object");let t=w(e);if(t.length>0)throw new TypeError(`Chart config contains values that cannot survive JSON serialization at: ${t.join(", ")}.`);if(e.version!==de)throw new Error(`Unsupported chart config version ${String(e.version)}; expected ${de}.`);if("string"!=typeof e.component||!e.component.trim())throw new Error("Invalid chart config: missing component");if(!ye(e.props))throw new Error("Invalid chart config: props must be a plain object");if("string"!=typeof e.createdAt||!Number.isFinite(Date.parse(e.createdAt)))throw new Error("Invalid chart config: createdAt must be a valid timestamp");if(void 0!==e.recipeId&&("string"!=typeof e.recipeId||!e.recipeId.trim()))throw new Error("Invalid chart config: recipeId must be a non-empty string");if(void 0!==e.portable&&"boolean"!=typeof e.portable)throw new Error("Invalid chart config: portable must be a boolean");if(void 0!==e.selections&&!ye(e.selections))throw new Error("Invalid chart config: selections must be a plain object");if(void 0!==e.manifest){if(!ye(e.manifest))throw new Error("Invalid chart config: manifest must be a plain object");if("string"!=typeof e.manifest.name||!e.manifest.name.trim()||"string"!=typeof e.manifest.frameFamily||!e.manifest.frameFamily.trim()||!Array.isArray(e.manifest.intents)||e.manifest.intents.some(e=>"string"!=typeof e||!e.trim())||void 0!==e.manifest.audience&&(!Array.isArray(e.manifest.audience)||e.manifest.audience.some(e=>"string"!=typeof e||!e.trim()))||void 0!==e.manifest.recipeVersion&&("string"!=typeof e.manifest.recipeVersion||!e.manifest.recipeVersion.trim())||void 0!==e.manifest.definitionFingerprint&&("string"!=typeof e.manifest.definitionFingerprint||!e.manifest.definitionFingerprint.trim())||void 0!==e.manifest.layoutId&&("string"!=typeof e.manifest.layoutId||!e.manifest.layoutId.trim())||void 0!==e.manifest.layoutVersion&&("string"!=typeof e.manifest.layoutVersion||!e.manifest.layoutVersion.trim())||void 0!==e.manifest.layoutFingerprint&&("string"!=typeof e.manifest.layoutFingerprint||!e.manifest.layoutFingerprint.trim())||void 0!==e.manifest.layoutVersion&&void 0===e.manifest.layoutId||void 0!==e.manifest.layoutFingerprint&&void 0===e.manifest.layoutVersion)throw new Error("Invalid chart config: malformed recipe manifest")}}(e);let{props:t}=e,i="LocalChartRecipe"===e.component?"ChartRecipe":e.component;if("ChartRecipe"!==i&&!p(i))throw new Error(`Cannot project unknown component "${i}" to JSX.`);let r=[`<${i}`];e.recipeId&&r.push(` recipeId={${$e(e.recipeId)}}`);for(let[e,i]of Object.entries(t)){if(!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e)){let t={};Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),r.push(` {...${$e(t)}}`);continue}if("string"==typeof i)r.push(ge(i)?` ${e}="${i}"`:` ${e}={${$e(i)}}`);else if("boolean"==typeof i&&!0===i)r.push(` ${e}`);else if("boolean"==typeof i&&!1===i)r.push(` ${e}={false}`);else if("number"==typeof i)r.push(` ${e}={${i}}`);else{let t=$e(i);t.length<80?r.push(` ${e}={${t}}`):r.push(` ${e}={${$e(i,2)}}`)}}return r.push("/>"),r.join("\n")}function ge(e){return!/["&<>{}\r\n\u2028\u2029]/.test(e)}function $e(e,t){return JSON.stringify(e,null,t).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}var be=/*#__PURE__*/new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","PhysicsCustomChart"]);function we(t){return e(t)?t:void 0}function Ae(e){let t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function xe(e){let t=Ae(e);return null==t?void 0:Math.max(0,Math.floor(t))}function je(...e){return e.map(we).find(Boolean)}function Se(...e){return e.find(Array.isArray)}function Ie(e){let t={};for(let[i,r]of Object.entries(e))void 0!==r&&(t[i]=r);return t}function Pe(e,t,i){return e["string"==typeof t&&t?t:i]}function Oe(e){return"number"==typeof e?Number.isInteger(e)?String(e):String(Math.round(1e3*e)/1e3):i(e)}function Ee(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:`${t}s`}function Be(e){return Number.isInteger(e)?String(e):String(Math.round(1e3*e)/1e3)}function ke(e,t,i){let r=e?.filter(e=>!0===we(e)?.sensor).length,n=we(t?.observation),a=we(n?.sensors),o=Se(i?.activeSensors);return Math.max(r??0,a?Object.keys(a).length:0,o?.length??0)||void 0}function Ce(n,a,o={}){a=t(a);let s,{capability:u,audience:p,locale:m}=o,h=o.levels??["l1","l2","l3"],y=!1!==o.includeStructure,v=l(n,u),g=v?[...h,"l4"]:h,$=c(n,a,{levels:g,locale:m,capability:u,audience:p}),{l4:b,...w}=$.levels,A=["l1","l2","l3"].map(e=>$.levels[e]).filter(Boolean).join(" "),x={levels:w,text:$.annotations?`${$.annotations} ${A}`.trim():A,...$.annotations?{annotations:$.annotations}:{}};if(v&&b){let e=function(e){if(!e)return{};if("fits"in e||"buildProps"in e)return{family:e.family};let t=e;return{family:t.family,intentScores:t.intentScores}}(u);s={act:v,sentence:b,family:e.family,intentScores:e.intentScores}}let j=y?d(n,a,{maxLeaves:o.maxLeaves,locale:m}):void 0,S=function(t,r,n){if(!1===n)return;let a=we(n),o=we(r.physics),s=je(a?.snapshot,o?.snapshot,r.physicsSnapshot,function(t){let i=we(t);return!!i&&(e(i.world)||"simulationState"in i||"liveBodyOrder"in i)}(r.snapshot)?r.snapshot:void 0),l=je(a?.evidence,o?.evidence,r.physicsEvidence,r.settledEvidence),c=je(a?.config,o?.config,s?.config,r.config),d=je(we(s?.world),we(o?.world)),u=je(we(c?.kernel),we(d?.options)),p=Se(d?.bodies),f=Se(d?.colliders,c?.colliders),m=Se(s?.queue,o?.queue),h=Se(s?.liveBodyOrder),y=Se(d?.springs),v=Se(s?.activeSensorPairs),g=function(e){if(!e||0===e.length)return;let t=e.map((e,t)=>{let r=we(e);if(!r)return;let n=Ae(r.count??r.value??r.total??r.bodies??r.events);if(null==n)return;let a=i(r.label??r.id??r.name,`container ${t+1}`),o=null==r.id?void 0:i(r.id),s=Ae(r.secondary??r.secondaryCount),l=Ae(r.observed??r.observedCount);return Ie({id:o,label:a,count:n,secondary:s,secondaryLabel:"string"==typeof r.secondaryLabel?r.secondaryLabel:void 0,observed:l})}).filter(e=>null!=e);if(0===t.length)return;let r=t.reduce((e,t)=>e+t.count,0),n=t.filter(e=>e.count>0).length,a=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:r,populatedCount:n,...a?{leader:a}:{}}}(function(e,t,i,r){let n=we(e.settledProjection),a=we(t?.settledProjection);return Se(i?.projectionRows,i?.aggregates,e.settledProjectionRows,e.projectionRows,n?.rows,t?.settledProjectionRows,t?.projectionRows,a?.rows,r?.binCounts)}(r,o,a,l)),$=function(e,t){let r=e?.map((e,t)=>{let r=we(e);if(!r)return;let n=Ae(r.count)??0,a=Ae(r.total),o={label:i(r.label??r.id,`sediment ${t+1}`),count:n};return null!=r.id&&(o.id=i(r.id)),null!=a&&(o.total=a),o}).filter(e=>null!=e),n=xe(t?.bins)??r?.length??0,a=Ae(t?.count)??r?.reduce((e,t)=>e+t.count,0)??0,o=Ae(t?.total)??r?.reduce((e,t)=>e+(t.total??0),0),s=r?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==n||0!==a||o)return{bins:n,count:a,...null!=o&&o>0?{total:o}:{},...s?{leader:s}:{}}}(Se(a?.sediment,o?.sediment,s?.sediment),je(a?.sedimentTotals,o?.sedimentTotals)),b=h?.length??p?.length??xe(l?.bodyCount),w=function(e){if(e)return e.filter(e=>!0===we(e)?.sleeping).length}(p)??xe(l?.sleepingCount),A=m?.length,x="string"==typeof s?.simulationState?s.simulationState:void 0,j="boolean"==typeof l?.settled?l.settled:x?"settled"===x:null!=b||null!=w||null!=A?null!=b&&w===b&&0===(A??0):void 0,S=we(u?.gravity),I=Ae(S?.x),P=Ae(S?.y),O=Ie({state:x,settled:j,elapsedSeconds:Ae(s?.elapsedSeconds),paused:"boolean"==typeof s?.paused?s.paused:void 0,visible:"boolean"==typeof s?.visible?s.visible:void 0,seed:Ae(u?.seed),gravity:null!=I&&null!=P?{x:I,y:P}:void 0,fixedDt:Ae(c?.fixedDt??u?.fixedDt),timeScale:Ae(c?.timeScale),maxSubsteps:xe(c?.maxSubsteps),liveBodies:b,sleepingBodies:w,queued:A,bodyLimit:Ae(c?.bodyLimit),eviction:"string"==typeof c?.eviction?c.eviction:void 0}),E=Ie({colliders:f?.length,sensors:ke(f,c,d),springs:y?.length,activeSensorPairs:v?.length}),B=Object.keys(E).length>0,k=be.has(t);if(!(Object.keys(O).length>0||B||g||$)||!k&&null==n)return;let C={simulation:O,...B?{geometry:E}:{},...g?{aggregates:g}:{},...$?{sediment:$}:{}},F=function(e){let t=[],i=e.simulation,r=[i.state??(i.settled?"settled":void 0),null!=i.liveBodies?`${i.liveBodies} live ${Ee(i.liveBodies,"body")}`:void 0,null!=i.sleepingBodies?`${i.sleepingBodies} sleeping`:void 0,null!=i.queued?`${i.queued} queued`:void 0,null!=i.seed?`seed ${Be(i.seed)}`:void 0,i.gravity?`gravity (${Be(i.gravity.x)}, ${Be(i.gravity.y)})`:void 0,null!=i.fixedDt?`fixed step ${Be(i.fixedDt)}s`:void 0,null!=i.timeScale?`${Be(i.timeScale)}x time`:void 0].filter(Boolean);r.length>0&&t.push(`Physics simulation: ${r.join("; ")}.`);let n=e.geometry;if(n){let e=[null!=n.colliders?`${n.colliders} ${Ee(n.colliders,"collider")}`:void 0,null!=n.sensors?`${n.sensors} ${Ee(n.sensors,"sensor")}`:void 0,null!=n.springs?`${n.springs} ${Ee(n.springs,"spring")}`:void 0,null!=n.activeSensorPairs?`${n.activeSensorPairs} active sensor ${Ee(n.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}let a=e.aggregates;if(a){let e=a.leader,i=e?` Largest is ${e.label} with ${Be(e.count)}.`:"";t.push(`Physics aggregates: ${Be(a.totalCount)} settled ${Ee(a.totalCount,"body")} across ${a.rows.length} ${Ee(a.rows.length,"container")}; ${a.populatedCount} populated.${i}`)}let o=e.sediment;if(o){let e=null!=o.total?`, value total ${Be(o.total)}`:"",i=o.leader?`; largest sediment bin is ${o.leader.label} with ${Be(o.leader.count)}`:"";t.push(`Physics sediment: ${o.count} retained ${Ee(o.count,"body")} in ${o.bins} ${Ee(o.bins,"bin")}${e}${i}.`)}return t.join(" ")}(C);return{...C,text:F}}(n,a,o.physics),I=function(t,i,n){let a=[];if("GaugeChart"===t){"number"==typeof i.value&&Number.isFinite(i.value)&&a.push(`Current value is ${Oe(i.value)}.`);let e="number"==typeof i.min&&Number.isFinite(i.min)?i.min:0,t="number"==typeof i.max&&Number.isFinite(i.max)?i.max:100;a.push(`The gauge scale runs from ${Oe(e)} to ${Oe(t)}.`)}if("SankeyDiagram"===t||"ProcessSankey"===t){let e=Array.isArray(i.edges)?i.edges:[];if("ProcessSankey"===t&&Array.isArray(i.domain)&&2===i.domain.length&&a.push(`The ProcessSankey time domain runs from ${Oe(i.domain[0])} to ${Oe(i.domain[1])}.`),e.length>0){a.push(`${e.length} source flow${1===e.length?"":"s"} are supplied.`);for(let r of e.slice(0,n)){let e=Pe(r,i.sourceAccessor,"source"),n=Pe(r,i.targetAccessor,"target"),o=Pe(r,i.valueAccessor,"value"),s="ProcessSankey"===t&&(null!=r.startTime||null!=r.endTime);a.push(s?`${Oe(e)} to ${Oe(n)} has value ${Oe(o)} over ${Oe(r.startTime)}–${Oe(r.endTime)}.`:`${Oe(e)} to ${Oe(n)} has value ${Oe(o)}.`)}}}if("Treemap"===t||"CirclePack"===t||"TreeDiagram"===t||"OrbitDiagram"===t){let t=e(i.data)?i.data:void 0,o="string"==typeof i.valueAccessor&&i.valueAccessor?i.valueAccessor:"value",s="string"==typeof i.nodeIdAccessor&&i.nodeIdAccessor?i.nodeIdAccessor:"string"==typeof i.nodeIDAccessor&&i.nodeIDAccessor?i.nodeIDAccessor:"name",l=[],c=new WeakSet,d=e=>{if(c.has(e))return;let t=r(e,i.childrenAccessor);if(0!==t.length){c.add(e);for(let e of t)d(e);c.delete(e)}else l.push(e)};if(t&&d(t),l.length>0){a.push(`${l.length} hierarchy leaves are supplied.`);for(let e of l.slice(0,n))a.push(`${Oe(e[s])} has value ${Oe(e[o])}.`)}}if(be.has(t)&&Array.isArray(i.data)){let e=i.data;a.push(`${e.length} observed source row${1===e.length?"":"s"} are supplied.`);let r="CollisionSwarmChart"===t?i.xAccessor:i.valueAccessor,n="CollisionSwarmChart"===t?"x":"value",o=e.map(e=>Ae(Pe(e,r,n))).filter(e=>null!=e);if(o.length>0){let[e,t]=f(o);a.push(`Observed ${"string"==typeof r?r:n} ranges from ${Oe(e)} to ${Oe(t)}.`)}}if(0!==a.length)return{source:"chart-props",statements:a,text:`Exact chart-prop facts: ${a.join(" ")}`}}(n,a,Math.max(1,o.maxLeaves??200)),P=[x.text,s?.sentence,S?.text,I?.text].filter(Boolean).join(" ");return{component:n,description:x,intent:s,structure:j,physics:S,facts:I,text:P}}export{he as a,ve as b,Ce as c};
@@ -1,2 +1,2 @@
1
- function e(e){return!!Array.isArray(e.styleRules)&&e.styleRules.some(e=>{if("object"!=typeof e||null===e)return!1;let t=e.style;if("object"!=typeof t||null===t||Array.isArray(t))return!1;let a=t.fill;return"object"==typeof a&&null!==a&&"hatch"===a.type})}function t(e){return"string"==typeof e&&e.trim().length>0}function a(e){let t=e.replace(/^#/,"");/^[a-f\d]{3}$/i.test(t)&&(t=t.split("").map(e=>e+e).join(""));let a=t.match(/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);if(!a)return null;let[s,i,r]=[parseInt(a[1],16)/255,parseInt(a[2],16)/255,parseInt(a[3],16)/255],n=e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4);return.2126*n(s)+.7152*n(i)+.0722*n(r)}function s(e,t){let s=a(e),i=a(t);return null===s||null===i?null:(Math.max(s,i)+.05)/(Math.min(s,i)+.05)}function i(e){return"string"==typeof e?.type?e.type:""}function r(e){return!!e&&"object"==typeof e&&z.has(i(e))}function n(e){return H.has(i(e))&&!function(e){return Array.isArray(e?.disable)&&e.disable.includes("connector")}(e)}function o(e){return"primary"===e?.emphasis||"secondary"===e?.emphasis||null!=function(e){let t=e?.provenance?.confidence;return"number"==typeof t&&Number.isFinite(t)?t:null}(e)}function l(e){let t=e.toLowerCase().replace(/[^a-z]/g,"");if(!t)return 0;if(t.length<=3)return 1;let a=t.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/,"").replace(/^y/,"").match(/[aeiouy]{1,2}/g);return a?a.length:1}function c(e){return e.physics&&"object"==typeof e.physics?e.physics:{}}function u(a,u,h={}){let g=[],y=d(a),v=P.has(a),C=p(a)||!!y||v,w=!0===h.inChartContainer,x=!0===h.describe,S=!0===h.navigable,A=$.has(a),j=b.has(a),{hasTitle:E,hasDescription:z,hasSummary:H,unsupportedFinding:O}=function(e,a,s){let i=V.has(e)||void 0!==s&&M.has(s),r=t=>m(e,t)||i,n=N.filter(e=>t(a[e])&&!r(e));return{hasTitle:r("title")&&t(a.title),hasDescription:r("description")&&t(a.description),hasSummary:r("summary")&&t(a.summary),unsupportedFinding:n.length>0?{id:"understandable.unsupported-description-prop",principle:"understandable",heuristic:"Descriptive text is connected to the rendered chart",critical:!0,status:"warn",message:`Useful ${n.join(" and ")} text was supplied, but ${1===n.length?"that prop is":"those props are"} not supported by ${e}'s declared chart API and cannot be credited as rendered accessibility text.`,fix:"Use the component's declared title, description, and summary props when available; for richer generated description or navigation, use ChartContainer with chartConfig plus describe and/or navigable."}:void 0}}(a,u,y?.frameFamily),G=!1!==u.accessibleTable&&!A,U=E||z||H,W=function(e){return!1!==e.tooltip||null!=e.onClick||null!=e.brush||null!=e.onBrush||null!=e.selection||null!=e.linkedHover||null!=e.linkedBrush}(u),q=function(e){let t=c(e),a=e.controls&&"object"==typeof e.controls?e.controls:{};return!0===e.pauseControl||!0===t.pauseControl||!0===a.pause||"function"==typeof a.pause}(u),_=v,K=function(e){let t=c(e);return!0===e.settledProjection||!0===t.settledProjection}(u)||R.has(a)&&G,J=function(e){let t=c(e);return!0===e.reducedMotionSettle||"settle"===e.reducedMotion||!0===t.reducedMotionSettle||"settle"===t.reducedMotion}(u)||_,Q=Array.isArray(u.annotations)?u.annotations.filter(e=>!!e&&"object"==typeof e):[],X=C?"pass":"manual",Y=C?"":` (unrecognized component "${a}" — verify manually that the built-in applies)`,Z={component:a,props:u,isValue:A,tableEnabled:G,hasDescription:z,hasSummary:H,known:C,builtIn:X,builtInNote:Y,navigable:S,isHierarchy:j};if(O&&g.push(O),g.push(function(e){let t={id:"perceivable.low-contrast",principle:"perceivable",heuristic:"Low contrast",critical:!0},a=e.colorScheme,i="string"==typeof e.background?e.background:null;if(i&&!i.startsWith("#"))return{...t,status:"manual",message:`Background "${i}" isn't a hex literal (theme/CSS variable) — contrast can't be verified statically.`,fix:'Pass a hex `background` (e.g. "#ffffff"/"#000000"), or verify contrast manually once the theme resolves.'};let r=i??"#ffffff";if(!Array.isArray(a))return{...t,status:"manual",message:"Mark colors come from the theme/CSS variables — contrast can't be verified statically.",fix:"Confirm geometries/large text have ≥ 3:1 and regular text ≥ 4.5:1 contrast against the background."};let n=[],o=0;for(let e of a){if("string"!=typeof e||!e.startsWith("#"))continue;let t=s(e,r);null!=t&&(o++,t<3&&n.push(`${e} (${t.toFixed(1)}:1)`))}return 0===o?{...t,status:"manual",message:"colorScheme has no parseable hex colors to check.",fix:"Verify contrast manually for non-hex colors."}:n.length>0?{...t,status:"fail",message:`${n.length} color(s) fall below 3:1 contrast vs ${r}: ${n.join(", ")}.`,fix:"Darken (light background) or lighten (dark background) those colors, or use COLOR_BLIND_SAFE_CATEGORICAL."}:{...t,status:"pass",message:`All ${o} checked colorScheme color(s) meet ≥ 3:1 contrast vs ${r}.`}}(u)),function(e,{isValue:t,tableEnabled:a,hasDescription:s,hasSummary:i}){e.push({id:"perceivable.content-only-visual",principle:"perceivable",heuristic:"Content is only visual",critical:!0,...t?{status:"pass",message:"BigNumber renders its value as real text with an ARIA label — available without vision."}:a?{status:"pass",message:"A screen-reader data table + live region expose the data non-visually (accessibleTable is on)."}:s&&i?{status:"manual",message:"accessibleTable is off; a description + summary are present. Verify they convey everything the chart shows.",fix:"Re-enable accessibleTable, or confirm via screen reader that the text alternative is complete."}:{status:"fail",message:"accessibleTable is disabled and there's no full text alternative — the data is only available visually.",fix:"Remove accessibleTable={false}, or provide a complete description/summary plus a data table."}})}(g,Z),g.push({id:"perceivable.small-text",principle:"perceivable",heuristic:"Small text size",critical:!0,status:"pass",message:"Semiotic's default tick and axis-label fonts are 12px, meeting Chartability's 9pt/12px floor.",fix:"If a theme or override lowers --semiotic-tick-font-size below 12px, raise it back for low-vision audiences."}),g.push({id:"perceivable.seizure-risk",principle:"perceivable",heuristic:"Visual presents seizure risk",critical:!0,...null!=u.pulse||D.has(a)?{status:"manual",message:"Pulse/continuous animation is in use. Confirm nothing flashes more than 3×/sec, especially saturated red.",fix:"Avoid red flashes and rapid (>3 Hz) flicker; reduced-motion is auto-honored, but verify the default presentation."}:{status:"manual",message:"No flashing detected statically. Confirm no element flashes more than 3×/sec.",fix:"Manual check — most static charts pass trivially."}}),function(t,{props:a}){if(null!=a.colorBy){let s=!0===a.directLabel||!0===a.showLabels,i=e(a);t.push({id:"perceivable.color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...s?{status:"pass",message:"Categories are encoded by color (colorBy) and also directly labeled, so color isn't the only channel."}:{status:"warn",message:i?"Categories use colorBy and this config authors a HatchFill through styleRules, but a static audit cannot prove those rules give every category a distinct non-color cue. Semiotic does not automatically assign per-category textures.":"Categories are encoded by color (colorBy) with no declared redundant channel. Semiotic supports author-supplied HatchFill patterns through styleRules, but this config has no statically visible HatchFill descriptor and there is no automatic per-category texture assignment.",fix:i?"Verify every category remains distinguishable with color removed; add direct labels where hatching is incomplete, keep categories ≤ ~7, and use a CVD-safe palette.":"Add direct labels (directLabel on LineChart/AreaChart, showLabels on network/hierarchy) or category-targeted styleRules with distinct HatchFill descriptors; keep categories ≤ ~7 and use a CVD-safe palette."}})}}(g,Z),null!=u.colorBy){let t=e(u),a=function(e){if(!Array.isArray(e))return!1;let t=e.filter(e=>"string"==typeof e&&e.startsWith("#")).map(e=>e.toLowerCase());return t.length>0&&t.every(e=>f.has(e))}(u.colorScheme);g.push({id:"perceivable.cvd-safe",principle:"perceivable",heuristic:"Not CVD-friendly",critical:!1,...a?{status:"pass",message:"colorScheme uses Semiotic's Wong colorblind-safe palette."}:{status:"manual",message:"Color encodes meaning; statically we can't confirm the palette is colorblind-safe.",fix:'Use COLOR_BLIND_SAFE_CATEGORICAL from "semiotic", or test your scheme with Viz Palette / Chroma.'}}),g.push({id:"flexible.textures-adjustable",principle:"flexible",heuristic:"Contrast and textures cannot be adjusted",critical:!1,status:"warn",message:t?"This config uses an author-supplied HatchFill through styleRules, but Semiotic has no automatic, theme-aware per-category texture channel or user-facing texture toggle.":"Semiotic supports author-supplied HatchFill patterns through styleRules, but this config has no statically visible HatchFill descriptor; there is no automatic, theme-aware per-category texture channel or user-facing texture toggle.",fix:t?"Verify the authored hatches cover every meaningful category and remain legible in the active theme; pair them with direct labels and a CVD-safe palette.":"Use category-targeted styleRules with distinct HatchFill descriptors or direct labels so the encoding survives color removal. Contrast itself is themeable via CSS variables."})}{let e=Q.filter(r);if(e.length>0){let t=u.autoPlaceAnnotations,a="object"==typeof t&&null!==t&&!0===t.redundantCues,s=e.filter(e=>{if("string"!=typeof e.color)return!1;let t=i(e),s=a&&"text"===t;return!(n(e)||s)});g.push({id:"perceivable.annotation-association",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...0===s.length?{status:"pass",message:"No annotation relies on color alone to indicate its target — wherever color is used, a connector, enclosure, or reference-line cue is present too."}:{status:"warn",message:`${s.length} of ${e.length} annotation(s) carry a color but no connector, enclosure, or reference-line cue, so a color-blind or non-visual reader can't tie them to their target (the correspondence problem).`,fix:"Add a connector (the label/callout default), place the note adjacent to its target, enclose the target, or enable autoPlaceAnnotations: { redundantCues: true } to give colored text notes a leader line — don't rely on color matching alone."}})}}g.push({id:"operable.single-input-modality",principle:"operable",heuristic:"Interaction modality only has one input type",critical:!0,...C?{status:"pass",message:"Built-in keyboard navigation (arrows/Home/End/PageUp-Down/Enter) mirrors mouse hover."}:{status:"manual",message:`Can't confirm keyboard support for "${a}".`,fix:"Verify Tab + arrow-key operation."}});{let e=[];(null!=u.brush||null!=u.onBrush)&&e.push("brushing"),!0===u.zoomable&&e.push("zoom/pan"),("isolate"===u.legendInteraction||"highlight"===u.legendInteraction)&&e.push("legend filtering"),e.length>0&&g.push({id:"operable.complex-action-alternatives",principle:"operable",heuristic:"Complex actions have no alternatives",critical:!1,status:"warn",message:`Mouse-driven ${e.join(", ")} ${e.length>1?"have":"has"} no built-in keyboard/standard-UI equivalent.`,fix:"Pair the complex interaction with a standard control (range inputs for a brush, buttons for zoom, a checkbox list for legend filtering) operable by keyboard and screen reader."})}{let e=I[a];if(e&&W){let t=u[e];"number"==typeof t&&t>0&&2*t<24&&g.push({id:"operable.target-size",principle:"operable",heuristic:"Target pointer interaction size is too small",critical:!1,status:"warn",message:`${e}=${t} gives a ~${2*t}px hit target, below the 24×24px minimum for pointer interaction.`,fix:"Increase the radius, or rely on the chart's hoverRadius / keyboard navigation as the alternative for precise selection."})}}g.push({id:"operable.tab-stops",principle:"operable",heuristic:"Inappropriate tab stops",critical:!1,status:X,message:`The chart takes a single tab stop and navigates data with arrow keys${Y} — the recommended pattern for dense charts (no per-datum tab stops to wade through).`}),g.push({id:"operable.interaction-cues",principle:"operable",heuristic:"No interaction cues or instructions",critical:!0,...W?H||z?{status:"manual",message:"Chart is interactive and has descriptive text. Confirm that text explains how to interact (keyboard + pointer).",fix:'State the interaction model in summary, e.g. "Use arrow keys to move between points."'}:{status:"warn",message:"Chart is interactive but nothing explains how to use it.",fix:"Describe the interaction in a summary or nearby text (keyboard navigation, what hover/click reveals)."}:{status:"not-applicable",message:"No interactive behavior detected."}}),g.push({id:"operable.controls-override-at",principle:"operable",heuristic:"Controls override AT controls",critical:!0,status:X,message:`Keyboard handlers fire only while the chart has focus, so they don't hijack page/app screen-reader shortcuts${Y}.`}),g.push({id:"operable.focus-indicator",principle:"operable",heuristic:"Keyboard focus indicator missing, obscured, or low contrast",critical:!1,status:X,message:`A shape-adaptive focus ring (var(--semiotic-focus)) marks the focused element${Y}.`,fix:C?"Ensure --semiotic-focus keeps ≥ 3:1 contrast against your background.":void 0}),g.push({id:"understandable.title-summary-caption",principle:"understandable",heuristic:"No title, summary, or caption",critical:!0,...U?{status:"pass",message:`Provided: ${[E&&"title",z&&"description",H&&"summary"].filter(Boolean).join(", ")}.`}:w?{status:"manual",message:"No title/description/summary on the chart. If the wrapping ChartContainer supplies a title/subtitle, this is covered at that layer — verify it does.",fix:"Give the ChartContainer a title (and optionally enable describe), or set title/description/summary on the chart."}:{status:"fail",message:"No title, description, or summary — the screen reader falls back to a generic label.",fix:"Add title/description/summary on the chart, or wrap it in a ChartContainer (the opt-in layer for title/caption/description chrome)."}}),g.push({id:"understandable.explain-purpose",principle:"understandable",heuristic:"No explanation for purpose or for how to read",critical:!0,...z||H?{status:"pass",message:"A description/summary is available to explain purpose and how to read the chart."}:x?{status:"manual",message:"ChartContainer's describe option explains how to read the chart (type, stats, trend). Confirm the domain purpose — why this chart exists — is also conveyed (title/subtitle).",fix:"Give the ChartContainer a title/subtitle stating the purpose; describe() covers the how-to-read half."}:E?{status:"warn",message:"Only a title is set — a label, not an explanation of purpose or how to read the chart.",fix:"Add a summary, or enable ChartContainer's describe option for an auto-generated how-to-read description."}:{status:"fail",message:"Nothing explains the chart's purpose or how to read it.",fix:"Add a summary/description, or wrap in a ChartContainer with a title and the describe option (the opt-in full-accessibility layer)."}});{let e=[u.description,u.summary].filter(t).join(". "),a=e?function(e){let t=e.split(/[.!?]+/).map(e=>e.trim()).filter(Boolean),a=e.trim().split(/\s+/).filter(Boolean);if(0===a.length||0===t.length)return null;let s=0;for(let e of a)s+=l(e);return a.length/t.length*.39+s/a.length*11.8-15.59}(e):null;g.push({id:"understandable.reading-level",principle:"understandable",heuristic:"Reading level inappropriate",critical:!0,...null==a?{status:"not-applicable",message:"No description/summary text to grade."}:a>9?{status:"warn",message:`Description/summary reads at ~grade ${a.toFixed(0)}; Chartability targets grade 9 or lower.`,fix:"Shorten sentences and prefer common words."}:{status:"pass",message:`Description/summary reads at ~grade ${Math.max(0,Math.round(a))} (≤ 9).`}})}if(F.has(a)){let e=t(u.xLabel),a=t(u.yLabel);g.push({id:"understandable.axis-labels",principle:"understandable",heuristic:"Axis labels are unclear or missing",critical:!1,...e&&a?{status:"pass",message:"Both axes are labeled (xLabel, yLabel)."}:{status:"warn",message:`Missing axis label: ${[!e&&"xLabel",!a&&"yLabel"].filter(Boolean).join(", ")}. Ticks alone may not name the variable.`,fix:"Set xLabel and yLabel to name each axis's variable and units."}})}if(B.has(a)&&g.push({id:"understandable.information-complexity",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,status:"warn",message:"Dual-axis chart: two y-scales are hard to read accurately and notoriously easy to misinterpret (the crossover point is arbitrary).",fix:"Confirm the second axis is necessary; consider two aligned charts (small multiples) or indexing both series to a common baseline. Label each axis and its series unambiguously."}),Q.length>1){let e=Q.filter(o).length,t=Q.length-e;g.push({id:"understandable.annotation-hierarchy",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,...e===Q.length?{status:"pass",message:`All ${Q.length} annotation(s) declare hierarchy through emphasis or provenance confidence, so the renderer can resolve reading order and visual priority.`}:0===e?{status:"warn",message:`${Q.length} annotations are present with no emphasis or provenance confidence; readers may not know which note is primary.`,fix:'Mark the main annotation with emphasis="primary", set supporting notes to emphasis="secondary", or provide provenance.confidence so Semiotic can infer order.'}:{status:"warn",message:`${t} of ${Q.length} annotation(s) have no emphasis or provenance confidence; readers may not know which note is primary among the unordered notes.`,fix:"Set emphasis on each annotation (primary/secondary), or provide provenance.confidence on all annotations so Semiotic can infer order."}})}(null!=u.forecast||null!=u.anomaly||null!=u.band||null!=u.regression)&&g.push({id:"understandable.uncertainty",principle:"understandable",heuristic:"Statistical uncertainty isn't clearly communicated",critical:!1,status:"manual",message:"The chart shows a forecast/regression/band/anomaly overlay. Confirm the uncertainty it represents is explained in text, not just drawn.",fix:"State the confidence interval / method in the summary, and label the band so it isn't mistaken for data."}),null!=u.animate&&!1!==u.animate&&g.push({id:"understandable.changes-followable",principle:"understandable",heuristic:"Changes are not easy to follow",critical:!1,status:X,message:`Transitions animate with object constancy and data changes are mirrored to the live region${Y}.`,fix:C?"Keep transition durations in the 250ms–2s range so changes are followable but not slow.":void 0}),g.push({id:"robust.conforms-to-standards",principle:"robust",heuristic:"Does not conform to standards",critical:!1,status:"manual",message:"WCAG 2.1 / Section 508 conformance can't be settled from config alone.",fix:"Run an automated checker (axe) on the rendered output and test with real assistive tech."}),g.push({id:"robust.semantically-valid",principle:"robust",heuristic:"Semantically invalid",critical:!1,status:"manual",message:"Whether interactive elements expose correct roles/names is a render-time, screen-reader question.",fix:"Verify with a screen reader that buttons read as buttons, the chart as an image/group, etc."}),g.push({id:"robust.fragile-technology-support",principle:"robust",heuristic:"Fragile technology support",critical:!1,status:X,message:`Charts render on canvas with an SVG overlay and render to SVG in SSR, so access isn't tied to one rendering path${Y}.`,fix:C?"Still test across NVDA+Firefox, JAWS+Chrome, and VoiceOver+Safari — AT support varies.":void 0}),function(e,{isValue:t,tableEnabled:a}){e.push({id:"compromising.table",principle:"compromising",heuristic:"No table",critical:!0,...t?{status:"not-applicable",message:"Single-value display — a table isn't meaningful."}:a?{status:"pass",message:"A human-readable data table is provided (accessibleTable)."}:{status:"fail",message:"accessibleTable is disabled — no human-readable table of the underlying data.",fix:"Remove accessibleTable={false} (unless title/summary/annotations already convey all the data)."}})}(g,Z),A||g.push({id:"compromising.table-static",principle:"compromising",heuristic:"Table/data is static",critical:!1,...w?{status:"manual",message:"Rendered in a ChartContainer. If a data-download action is enabled, the data is exportable.",fix:"Enable the ChartContainer data-download action so users can save the underlying data (keep it opt-in)."}:{status:"warn",message:"The data table is read-only — not downloadable, sortable, or filterable.",fix:"Wrap the chart in a ChartContainer and enable its data-download action (opt-in, so deployments can withhold it where export isn't allowed)."}}),g.push({id:"compromising.shareable-state",principle:"compromising",heuristic:"State is not easy to share and reproduce",critical:!1,status:C?"pass":"manual",message:`Chart state serializes via toConfig/toURL/copyConfig${C?"":Y}.`,fix:C?"Expose it to users via the ChartContainer copyConfig action or a shareable URL.":void 0}),function(e,{navigable:t,isHierarchy:a,builtIn:s,builtInNote:i,known:r}){e.push({id:"compromising.navigable-structure",principle:"compromising",heuristic:"Information cannot be navigated according to narrative or structure",critical:!1,...t?a?{status:"pass",message:"ChartContainer's navigable option mounts a structured navigation tree, including hierarchy/network branches and their data items."}:{status:"pass",message:"ChartContainer's navigable option mounts a structured tree (chart → axes/series → data points) that screen readers can traverse."}:a?{status:"warn",message:"Hierarchical chart: built-in keyboard navigation is largely flat — it doesn't descend the tree structure.",fix:"Enable ChartContainer's navigable option for a structured navigation tree, or lean on the data table and a summary that conveys the hierarchy."}:{status:s,message:`Keyboard navigation steps through points and switches series/groups${i}.`,fix:r?"For deeper structure (axis → series → datum), enable ChartContainer's navigable option.":void 0}})}(g,Z),function(e,{component:t,props:a}){{let s,i=Array.isArray(a.data)?a.data:null,r=Array.isArray(a.nodes)?a.nodes:null,n={id:"assistive.data-density",principle:"assistive",heuristic:"Data density is inappropriate",critical:!0};s=k.has(t)&&i&&i.length>7?{...n,status:"warn",message:`${i.length} slices in a part-to-whole chart. Chartability suggests ≤ 5 categories; many thin slices are hard to perceive and to describe.`,fix:'Group small slices into an "Other" category, or switch to a ranked bar chart.'}:r&&r.length>200?{...n,status:"warn",message:`${r.length} nodes. A network this size is hard to navigate non-visually node by node.`,fix:"Provide a summary of structure (clusters, hubs, components) and consider filtering or aggregating the graph."}:i&&i.length>5e3?{...n,status:"warn",message:`${i.length} data points. Canvas renders this fine, but the non-visual table/navigation become unwieldy.`,fix:"Aggregate or bin for the accessible representation, or expose summary statistics rather than every row."}:i?{...n,status:"pass",message:`${i.length} data points — a reasonable density for non-visual consumption.`}:r?{...n,status:"pass",message:`${r.length} nodes — a reasonable density for non-visual consumption.`}:{...n,status:"manual",message:"Data not provided inline (push mode); verify density at runtime."},e.push(s)}}(g,Z),function(e,{props:t}){{let a=Array.isArray(t.data)?t.data:null,s=["valueFormat","yFormat","xFormat","tickFormat","format"].some(e=>"function"==typeof t[e]||"string"==typeof t[e]),i=!1;if(a&&!s)for(let e of a.slice(0,50))if(e&&"object"==typeof e){for(let t of Object.values(e))if("number"==typeof t&&Number.isFinite(t)&&Math.abs(t)>=1e5){i=!0;break}if(i)break}i&&e.push({id:"assistive.human-readable-numbers",principle:"assistive",heuristic:"Data in text is not human-readable",critical:!1,status:"warn",message:'Data includes large numbers (≥ 100,000) and no value/tick formatter — screen readers will read every digit (e.g. "six hundred fifty thousand…").',fix:'Pass valueFormat / yFormat (e.g. a compact formatter so 6,500,000 reads as "6.5M"); the formatter flows to ticks, tooltips, and the data table.'})}}(g,Z),g.push({id:"assistive.features-described",principle:"assistive",heuristic:"Visually apparent features and relationships are not described",critical:!1,...x?{status:"pass",message:"ChartContainer's describe option auto-generates an L1–L3 description (chart type, statistics, and trend) via describeChart()."}:H?{status:"manual",message:"A summary is present. Confirm it describes trends, extrema, clusters, and outliers — not just what the chart is.",fix:"Cover the L2/L3 content blind readers value most: direction of trend, peak/trough, notable outliers."}:{status:"warn",message:"No text describes the visually apparent trends, extrema, or outliers.",fix:"Enable ChartContainer's describe option (auto-generates via describeChart()), or write a summary covering the key trend and notable points."}}),function(e,{isValue:t,tableEnabled:a}){e.push({id:"assistive.skippable-navigation",principle:"assistive",heuristic:"Navigation and interaction is tedious",critical:!0,...t?{status:"not-applicable",message:"Single value — nothing to skip."}:a?{status:"pass",message:'A "Skip to data table" link lets screen-reader users bypass point-by-point navigation.'}:{status:"warn",message:"accessibleTable is off, removing the skip-to-table affordance.",fix:"Keep accessibleTable enabled so users can skip past dense point navigation."}})}(g,Z),g.push({id:"flexible.user-style-respected",principle:"flexible",heuristic:"User style change not respected",critical:!0,status:X,message:`Styling flows through CSS custom properties and honors forced-colors mode, so user/user-agent style changes cascade in${Y}.`,fix:C?"Avoid hardcoding colors via frameProps style fns that bypass theme variables.":void 0}),g.push({id:"flexible.reduced-motion",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...D.has(a)||L.has(a)?q?{status:"pass",message:`${a} animates continuously and declares an in-chart pause/stop control.`}:{status:"warn",message:`${a} animates continuously. prefers-reduced-motion is auto-honored, but there's no in-chart pause/stop control for users who don't set that preference.`,fix:"Offer a pause/stop control for looping/streaming motion (Chartability requires it for animation > 2s)."}:{status:X,message:`prefers-reduced-motion is auto-detected; transitions fast-forward and looping animation stops${Y}.`}}),v&&(g.push({id:"flexible.sim-pause-control",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...q?{status:"pass",message:"Physics simulation exposes a pause/stop control for users who need to stop motion."}:{status:"warn",message:"Physics simulation has no declared pause/stop control.",fix:"Provide a visible pause control and set physics.pauseControl=true (or pauseControl=true) so the contract is auditable."}}),g.push({id:"flexible.settled-projection",principle:"flexible",heuristic:"User style change not respected",critical:!1,...K?{status:"pass",message:"A settled-projection table is declared, so non-visual readers get aggregate chart semantics instead of trajectories."}:{status:"warn",message:"Physics chart does not declare a settled projection for its accessible table.",fix:"Provide aggregate rows from the settled projection and set physics.settledProjection=true."}}),g.push({id:"flexible.reduced-motion-settle",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...J?{status:"pass",message:"Reduced-motion mode settles the simulation to a static chart state instead of freezing bodies mid-flight."}:{status:"warn",message:"Physics chart does not declare reduced-motion synchronous settle behavior.",fix:"In reduced motion, run the world to its settled projection and paint once; set physics.reducedMotionSettle=true."}}));{let e=!0===u.responsiveWidth||!0===u.responsiveHeight,t=T.has(a)&&!0===u.zoomable;g.push({id:"flexible.zoom-reflow",principle:"flexible",heuristic:"Zoom and reflow are not supported",critical:!1,...e?{status:"pass",message:`Chart reflows to its container (${[!0===u.responsiveWidth&&"responsiveWidth",!0===u.responsiveHeight&&"responsiveHeight"].filter(Boolean).join(", ")}), so page zoom doesn't clip it.`}:t?{status:"pass",message:"Geo chart is zoomable/pannable."}:{status:"manual",message:"Fixed width/height — verify the chart survives browser zoom and reflow without clipping or loss of function.",fix:"Use responsiveWidth/responsiveHeight so the chart reflows to its container."}})}y&&(y.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length))&&g.push({id:"perceivable.recipe-color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,status:"warn",message:`${y.name} declares a color encoding without a redundant cue.`,fix:"Add shape, label, position, texture, or a textual category summary to the recipe encoding."}),"required"===y.accessibility.description&&!z&&g.push({id:"understandable.recipe-description",principle:"understandable",heuristic:"Features are not described",critical:!1,status:"fail",message:`${y.name} requires a recipe-aware description, but none is attached.`,fix:"Call describeChart with recipeId/recipe metadata and attach the returned text as description."}),y.accessibility.fallbackTable&&!1===u.accessibleTable&&g.push({id:"compromising.recipe-fallback",principle:"compromising",heuristic:"No data table is provided",critical:!0,status:"fail",message:`${y.name} requires a fallback table, but accessibleTable is disabled.`,fix:"Enable accessibleTable and preserve recipe-declared table fields on scene nodes."}));let ee=g.filter(e=>"not-applicable"!==e.status).filter(e=>e.critical),te={criticalsPassed:ee.filter(e=>"pass"===e.status).length,criticalsEvaluated:ee.length,fails:g.filter(e=>"fail"===e.status).length,warnings:g.filter(e=>"warn"===e.status).length,manual:g.filter(e=>"manual"===e.status).length,passes:g.filter(e=>"pass"===e.status).length};return{component:a,ok:!ee.some(e=>"fail"===e.status),summary:te,findings:g,reference:"Chartability (POUR-CAF) — https://chartability.github.io/POUR-CAF/. Not a pass/fail cert; pair with manual screen-reader testing (NVDA+Firefox, JAWS+Chrome, VoiceOver+Safari)."}}function h(e){let t=[],a=e.summary,s=e.ok?`${a.criticalsPassed}/${a.criticalsEvaluated} critical heuristics pass`:`${a.fails} blocking failure(s) — ${a.criticalsPassed}/${a.criticalsEvaluated} critical heuristics pass`;t.push(`${e.ok?"✓":"✗"} ${e.component}: accessibility audit (Chartability POUR-CAF)`),t.push(` ${s} · ${a.warnings} warning(s) · ${a.manual} to verify manually`);for(let a of G){let s=e.findings.filter(e=>e.principle===a&&"not-applicable"!==e.status);if(0!==s.length){t.push(""),t.push(` ${a.toUpperCase()}`);for(let e of s){let a=e.critical?" [critical]":"";t.push(` ${O[e.status]} ${e.id}${a}: ${e.message}`),e.fix&&("fail"===e.status||"warn"===e.status||"manual"===e.status)&&t.push(` → ${e.fix}`)}}}return t.push(""),t.push(` Ref: ${e.reference}`),t.join("\n")}import{i as d,v as p,w as m}from"./c-IIV4DB7T.min.js";var f=/*#__PURE__*/new Set(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#f0e442","#000000"]),b=/*#__PURE__*/new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),g=/*#__PURE__*/new Set(["ForceDirectedGraph","SankeyDiagram","ChordDiagram"]),y=/*#__PURE__*/new Set(["BarChart","StackedBarChart","GroupedBarChart","AreaChart","StackedAreaChart"]),v=/*#__PURE__*/new Set(["LineChart","AreaChart","StackedAreaChart"]),C=/*#__PURE__*/new Set(["BarChart","StackedBarChart","GroupedBarChart","FunnelChart"]),w=/*#__PURE__*/new Set(["LineChart","AreaChart","StackedAreaChart","ConnectedScatterplot"]),x=/*#__PURE__*/new Set(["PieChart","DonutChart"]),S={PieChart:"valueAccessor",DonutChart:"valueAccessor",FunnelChart:"valueAccessor"},k=/*#__PURE__*/new Set(
2
- /*#__PURE__*/Object.keys(S)),A={StackedBarChart:"valueAccessor",StackedAreaChart:"yAccessor"},$=/*#__PURE__*/new Set(["BigNumber"]),F=/*#__PURE__*/new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart"]),P=/*#__PURE__*/new Set(["StreamPhysicsFrame","GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","PhysicsCustomChart"]),D=/*#__PURE__*/new Set(["OrbitDiagram",...P]),R=/*#__PURE__*/new Set(["GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart"]),j=/*#__PURE__*/new Set(["GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart","PhysicsCustomChart"]),L=/*#__PURE__*/new Set(["RealtimeLineChart","RealtimeHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","ProcessSankey"]),B=/*#__PURE__*/new Set(["MultiAxisLineChart"]),T=/*#__PURE__*/new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),I={Scatterplot:"pointRadius",BubbleChart:"pointRadius",ConnectedScatterplot:"pointRadius",QuadrantChart:"pointRadius",SwarmPlot:"pointRadius",DotPlot:"dotRadius"},N=["title","description","summary"],V=/*#__PURE__*/new Set(["XYCustomChart","OrdinalCustomChart","NetworkCustomChart","GeoCustomChart","PhysicsCustomChart"]),M=/*#__PURE__*/new Set([...V,"XYFrame","OrdinalFrame","NetworkFrame","GeoFrame"]),E=["label","callout","callout-circle","callout-rect"],z=/*#__PURE__*/new Set(["label","callout","callout-circle","callout-rect","text","widget"]),H=/*#__PURE__*/new Set(E),O={pass:"✓",fail:"✗",warn:"⚠",manual:"○","not-applicable":"·"},G=["perceivable","operable","understandable","robust","compromising","assistive","flexible"];export{b as a,g as b,y as c,v as d,C as e,w as f,x as g,S as h,A as i,j,s as k,i as l,r as m,n,u as o,h as p};
1
+ function e(e){return!!Array.isArray(e.styleRules)&&e.styleRules.some(e=>{if("object"!=typeof e||null===e)return!1;let t=e.style;if("object"!=typeof t||null===t||Array.isArray(t))return!1;let a=t.fill;return"object"==typeof a&&null!==a&&"hatch"===a.type})}function t(e){return"string"==typeof e&&e.trim().length>0}function a(e){let t=e.replace(/^#/,"");/^[a-f\d]{3}$/i.test(t)&&(t=t.split("").map(e=>e+e).join(""));let a=t.match(/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);if(!a)return null;let[s,i,r]=[parseInt(a[1],16)/255,parseInt(a[2],16)/255,parseInt(a[3],16)/255],n=e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4);return.2126*n(s)+.7152*n(i)+.0722*n(r)}function s(e,t){let s=a(e),i=a(t);return null===s||null===i?null:(Math.max(s,i)+.05)/(Math.min(s,i)+.05)}function i(e){return"string"==typeof e?.type?e.type:""}function r(e){return!!e&&"object"==typeof e&&z.has(i(e))}function n(e){return H.has(i(e))&&!function(e){return Array.isArray(e?.disable)&&e.disable.includes("connector")}(e)}function o(e){return"primary"===e?.emphasis||"secondary"===e?.emphasis||null!=function(e){let t=e?.provenance?.confidence;return"number"==typeof t&&Number.isFinite(t)?t:null}(e)}function l(e){let t=e.toLowerCase().replace(/[^a-z]/g,"");if(!t)return 0;if(t.length<=3)return 1;let a=t.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/,"").replace(/^y/,"").match(/[aeiouy]{1,2}/g);return a?a.length:1}function c(e){return e.physics&&"object"==typeof e.physics?e.physics:{}}function u(a,u,h={}){let g=[],y=d(a),v=P.has(a),C=p(a)||!!y||v,w=!0===h.inChartContainer,x=!0===h.describe,S=!0===h.navigable,A=$.has(a),D=b.has(a),{hasTitle:E,hasDescription:z,hasSummary:H,unsupportedFinding:O}=function(e,a,s){let i=M.has(e)||void 0!==s&&V.has(s),r=t=>m(e,t)||i,n=I.filter(e=>t(a[e])&&!r(e));return{hasTitle:r("title")&&t(a.title),hasDescription:r("description")&&t(a.description),hasSummary:r("summary")&&t(a.summary),unsupportedFinding:n.length>0?{id:"understandable.unsupported-description-prop",principle:"understandable",heuristic:"Descriptive text is connected to the rendered chart",critical:!0,status:"warn",message:`Useful ${n.join(" and ")} text was supplied, but ${1===n.length?"that prop is":"those props are"} not supported by ${e}'s declared chart API and cannot be credited as rendered accessibility text.`,fix:"Use the component's declared title, description, and summary props when available; for richer generated description or navigation, use ChartContainer with chartConfig plus describe and/or navigable."}:void 0}}(a,u,y?.frameFamily),G=!1!==u.accessibleTable&&!A,U=E||z||H,W=function(e){return!1!==e.tooltip||null!=e.onClick||null!=e.brush||null!=e.onBrush||null!=e.selection||null!=e.linkedHover||null!=e.linkedBrush}(u),q=function(e){let t=c(e),a=e.controls&&"object"==typeof e.controls?e.controls:{};return!0===e.pauseControl||!0===t.pauseControl||!0===a.pause||"function"==typeof a.pause}(u),K=v,_=function(e){let t=c(e);return!0===e.settledProjection||!0===t.settledProjection}(u)||j.has(a)&&G,Y=function(e){let t=c(e);return!0===e.reducedMotionSettle||"settle"===e.reducedMotion||!0===t.reducedMotionSettle||"settle"===t.reducedMotion}(u)||K,J=Array.isArray(u.annotations)?u.annotations.filter(e=>!!e&&"object"==typeof e):[],Q=C?"pass":"manual",X=C?"":` (unrecognized component "${a}" — verify manually that the built-in applies)`,Z={component:a,props:u,isValue:A,tableEnabled:G,hasDescription:z,hasSummary:H,known:C,builtIn:Q,builtInNote:X,navigable:S,isHierarchy:D};if(O&&g.push(O),g.push(function(e){let t={id:"perceivable.low-contrast",principle:"perceivable",heuristic:"Low contrast",critical:!0},a=e.colorScheme,i="string"==typeof e.background?e.background:null;if(i&&!i.startsWith("#"))return{...t,status:"manual",message:`Background "${i}" isn't a hex literal (theme/CSS variable) — contrast can't be verified statically.`,fix:'Pass a hex `background` (e.g. "#ffffff"/"#000000"), or verify contrast manually once the theme resolves.'};let r=i??"#ffffff";if(!Array.isArray(a))return{...t,status:"manual",message:"Mark colors come from the theme/CSS variables — contrast can't be verified statically.",fix:"Confirm geometries/large text have ≥ 3:1 and regular text ≥ 4.5:1 contrast against the background."};let n=[],o=0;for(let e of a){if("string"!=typeof e||!e.startsWith("#"))continue;let t=s(e,r);null!=t&&(o++,t<3&&n.push(`${e} (${t.toFixed(1)}:1)`))}return 0===o?{...t,status:"manual",message:"colorScheme has no parseable hex colors to check.",fix:"Verify contrast manually for non-hex colors."}:n.length>0?{...t,status:"fail",message:`${n.length} color(s) fall below 3:1 contrast vs ${r}: ${n.join(", ")}.`,fix:"Darken (light background) or lighten (dark background) those colors, or use COLOR_BLIND_SAFE_CATEGORICAL."}:{...t,status:"pass",message:`All ${o} checked colorScheme color(s) meet ≥ 3:1 contrast vs ${r}.`}}(u)),function(e,{isValue:t,tableEnabled:a,hasDescription:s,hasSummary:i}){e.push({id:"perceivable.content-only-visual",principle:"perceivable",heuristic:"Content is only visual",critical:!0,...t?{status:"pass",message:"BigNumber renders its value as real text with an ARIA label — available without vision."}:a?{status:"pass",message:"A screen-reader data table + live region expose the data non-visually (accessibleTable is on)."}:s&&i?{status:"manual",message:"accessibleTable is off; a description + summary are present. Verify they convey everything the chart shows.",fix:"Re-enable accessibleTable, or confirm via screen reader that the text alternative is complete."}:{status:"fail",message:"accessibleTable is disabled and there's no full text alternative — the data is only available visually.",fix:"Remove accessibleTable={false}, or provide a complete description/summary plus a data table."}})}(g,Z),g.push({id:"perceivable.small-text",principle:"perceivable",heuristic:"Small text size",critical:!0,status:"pass",message:"Semiotic's default tick and axis-label fonts are 12px, meeting Chartability's 9pt/12px floor.",fix:"If a theme or override lowers --semiotic-tick-font-size below 12px, raise it back for low-vision audiences."}),g.push({id:"perceivable.seizure-risk",principle:"perceivable",heuristic:"Visual presents seizure risk",critical:!0,...null!=u.pulse||R.has(a)?{status:"manual",message:"Pulse/continuous animation is in use. Confirm nothing flashes more than 3×/sec, especially saturated red.",fix:"Avoid red flashes and rapid (>3 Hz) flicker; reduced-motion is auto-honored, but verify the default presentation."}:{status:"manual",message:"No flashing detected statically. Confirm no element flashes more than 3×/sec.",fix:"Manual check — most static charts pass trivially."}}),function(t,{props:a}){if(null!=a.colorBy){let s=!0===a.directLabel||!0===a.showLabels,i=e(a);t.push({id:"perceivable.color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...s?{status:"pass",message:"Categories are encoded by color (colorBy) and also directly labeled, so color isn't the only channel."}:{status:"warn",message:i?"Categories use colorBy and this config authors a HatchFill through styleRules, but a static audit cannot prove those rules give every category a distinct non-color cue. Semiotic does not automatically assign per-category textures.":"Categories are encoded by color (colorBy) with no declared redundant channel. Semiotic supports author-supplied HatchFill patterns through styleRules, but this config has no statically visible HatchFill descriptor and there is no automatic per-category texture assignment.",fix:i?"Verify every category remains distinguishable with color removed; add direct labels where hatching is incomplete, keep categories ≤ ~7, and use a CVD-safe palette.":"Add direct labels (directLabel on LineChart/AreaChart, showLabels on network/hierarchy) or category-targeted styleRules with distinct HatchFill descriptors; keep categories ≤ ~7 and use a CVD-safe palette."}})}}(g,Z),null!=u.colorBy){let t=e(u),a=function(e){if(!Array.isArray(e))return!1;let t=e.filter(e=>"string"==typeof e&&e.startsWith("#")).map(e=>e.toLowerCase());return t.length>0&&t.every(e=>f.has(e))}(u.colorScheme);g.push({id:"perceivable.cvd-safe",principle:"perceivable",heuristic:"Not CVD-friendly",critical:!1,...a?{status:"pass",message:"colorScheme uses Semiotic's Wong colorblind-safe palette."}:{status:"manual",message:"Color encodes meaning; statically we can't confirm the palette is colorblind-safe.",fix:'Use COLOR_BLIND_SAFE_CATEGORICAL from "semiotic", or test your scheme with Viz Palette / Chroma.'}}),g.push({id:"flexible.textures-adjustable",principle:"flexible",heuristic:"Contrast and textures cannot be adjusted",critical:!1,status:"warn",message:t?"This config uses an author-supplied HatchFill through styleRules, but Semiotic has no automatic, theme-aware per-category texture channel or user-facing texture toggle.":"Semiotic supports author-supplied HatchFill patterns through styleRules, but this config has no statically visible HatchFill descriptor; there is no automatic, theme-aware per-category texture channel or user-facing texture toggle.",fix:t?"Verify the authored hatches cover every meaningful category and remain legible in the active theme; pair them with direct labels and a CVD-safe palette.":"Use category-targeted styleRules with distinct HatchFill descriptors or direct labels so the encoding survives color removal. Contrast itself is themeable via CSS variables."})}{let e=J.filter(r);if(e.length>0){let t=u.autoPlaceAnnotations,a="object"==typeof t&&null!==t&&!0===t.redundantCues,s=e.filter(e=>{if("string"!=typeof e.color)return!1;let t=i(e),s=a&&"text"===t;return!(n(e)||s)});g.push({id:"perceivable.annotation-association",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...0===s.length?{status:"pass",message:"No annotation relies on color alone to indicate its target — wherever color is used, a connector, enclosure, or reference-line cue is present too."}:{status:"warn",message:`${s.length} of ${e.length} annotation(s) carry a color but no connector, enclosure, or reference-line cue, so a color-blind or non-visual reader can't tie them to their target (the correspondence problem).`,fix:"Add a connector (the label/callout default), place the note adjacent to its target, enclose the target, or enable autoPlaceAnnotations: { redundantCues: true } to give colored text notes a leader line — don't rely on color matching alone."}})}}g.push({id:"operable.single-input-modality",principle:"operable",heuristic:"Interaction modality only has one input type",critical:!0,...C?{status:"pass",message:"Built-in keyboard navigation (arrows/Home/End/PageUp-Down/Enter) mirrors mouse hover."}:{status:"manual",message:`Can't confirm keyboard support for "${a}".`,fix:"Verify Tab + arrow-key operation."}});{let e=[];(null!=u.brush||null!=u.onBrush)&&e.push("brushing"),!0===u.zoomable&&e.push("zoom/pan"),("isolate"===u.legendInteraction||"highlight"===u.legendInteraction)&&e.push("legend filtering"),e.length>0&&g.push({id:"operable.complex-action-alternatives",principle:"operable",heuristic:"Complex actions have no alternatives",critical:!1,status:"warn",message:`Mouse-driven ${e.join(", ")} ${e.length>1?"have":"has"} no built-in keyboard/standard-UI equivalent.`,fix:"Pair the complex interaction with a standard control (range inputs for a brush, buttons for zoom, a checkbox list for legend filtering) operable by keyboard and screen reader."})}{let e=N[a];if(e&&W){let t=u[e];"number"==typeof t&&t>0&&2*t<24&&g.push({id:"operable.target-size",principle:"operable",heuristic:"Target pointer interaction size is too small",critical:!1,status:"warn",message:`${e}=${t} gives a ~${2*t}px hit target, below the 24×24px minimum for pointer interaction.`,fix:"Increase the radius, or rely on the chart's hoverRadius / keyboard navigation as the alternative for precise selection."})}}g.push({id:"operable.tab-stops",principle:"operable",heuristic:"Inappropriate tab stops",critical:!1,status:Q,message:`The chart takes a single tab stop and navigates data with arrow keys${X} — the recommended pattern for dense charts (no per-datum tab stops to wade through).`}),g.push({id:"operable.interaction-cues",principle:"operable",heuristic:"No interaction cues or instructions",critical:!0,...W?H||z?{status:"manual",message:"Chart is interactive and has descriptive text. Confirm that text explains how to interact (keyboard + pointer).",fix:'State the interaction model in summary, e.g. "Use arrow keys to move between points."'}:{status:"warn",message:"Chart is interactive but nothing explains how to use it.",fix:"Describe the interaction in a summary or nearby text (keyboard navigation, what hover/click reveals)."}:{status:"not-applicable",message:"No interactive behavior detected."}}),g.push({id:"operable.controls-override-at",principle:"operable",heuristic:"Controls override AT controls",critical:!0,status:Q,message:`Keyboard handlers fire only while the chart has focus, so they don't hijack page/app screen-reader shortcuts${X}.`}),g.push({id:"operable.focus-indicator",principle:"operable",heuristic:"Keyboard focus indicator missing, obscured, or low contrast",critical:!1,status:Q,message:`A shape-adaptive focus ring (var(--semiotic-focus)) marks the focused element${X}.`,fix:C?"Ensure --semiotic-focus keeps ≥ 3:1 contrast against your background.":void 0}),g.push({id:"understandable.title-summary-caption",principle:"understandable",heuristic:"No title, summary, or caption",critical:!0,...U?{status:"pass",message:`Provided: ${[E&&"title",z&&"description",H&&"summary"].filter(Boolean).join(", ")}.`}:w?{status:"manual",message:"No title/description/summary on the chart. If the wrapping ChartContainer supplies a title/subtitle, this is covered at that layer — verify it does.",fix:"Give the ChartContainer a title (and optionally enable describe), or set title/description/summary on the chart."}:{status:"fail",message:"No title, description, or summary — the screen reader falls back to a generic label.",fix:"Add title/description/summary on the chart, or wrap it in a ChartContainer (the opt-in layer for title/caption/description chrome)."}}),g.push({id:"understandable.explain-purpose",principle:"understandable",heuristic:"No explanation for purpose or for how to read",critical:!0,...z||H?{status:"pass",message:"A description/summary is available to explain purpose and how to read the chart."}:x?{status:"manual",message:"ChartContainer's describe option explains how to read the chart (type, stats, trend). Confirm the domain purpose — why this chart exists — is also conveyed (title/subtitle).",fix:"Give the ChartContainer a title/subtitle stating the purpose; describe() covers the how-to-read half."}:E?{status:"warn",message:"Only a title is set — a label, not an explanation of purpose or how to read the chart.",fix:"Add a summary, or enable ChartContainer's describe option for an auto-generated how-to-read description."}:{status:"fail",message:"Nothing explains the chart's purpose or how to read it.",fix:"Add a summary/description, or wrap in a ChartContainer with a title and the describe option (the opt-in full-accessibility layer)."}});{let e=[u.description,u.summary].filter(t).join(". "),a=e?function(e){let t=e.split(/[.!?]+/).map(e=>e.trim()).filter(Boolean),a=e.trim().split(/\s+/).filter(Boolean);if(0===a.length||0===t.length)return null;let s=0;for(let e of a)s+=l(e);return a.length/t.length*.39+s/a.length*11.8-15.59}(e):null;g.push({id:"understandable.reading-level",principle:"understandable",heuristic:"Reading level inappropriate",critical:!0,...null==a?{status:"not-applicable",message:"No description/summary text to grade."}:a>9?{status:"warn",message:`Description/summary reads at ~grade ${a.toFixed(0)}; Chartability targets grade 9 or lower.`,fix:"Shorten sentences and prefer common words."}:{status:"pass",message:`Description/summary reads at ~grade ${Math.max(0,Math.round(a))} (≤ 9).`}})}if(F.has(a)){let e=t(u.xLabel),a=t(u.yLabel);g.push({id:"understandable.axis-labels",principle:"understandable",heuristic:"Axis labels are unclear or missing",critical:!1,...e&&a?{status:"pass",message:"Both axes are labeled (xLabel, yLabel)."}:{status:"warn",message:`Missing axis label: ${[!e&&"xLabel",!a&&"yLabel"].filter(Boolean).join(", ")}. Ticks alone may not name the variable.`,fix:"Set xLabel and yLabel to name each axis's variable and units."}})}if(B.has(a)&&g.push({id:"understandable.information-complexity",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,status:"warn",message:"Dual-axis chart: two y-scales are hard to read accurately and notoriously easy to misinterpret (the crossover point is arbitrary).",fix:"Confirm the second axis is necessary; consider two aligned charts (small multiples) or indexing both series to a common baseline. Label each axis and its series unambiguously."}),J.length>1){let e=J.filter(o).length,t=J.length-e;g.push({id:"understandable.annotation-hierarchy",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,...e===J.length?{status:"pass",message:`All ${J.length} annotation(s) declare hierarchy through emphasis or provenance confidence, so the renderer can resolve reading order and visual priority.`}:0===e?{status:"warn",message:`${J.length} annotations are present with no emphasis or provenance confidence; readers may not know which note is primary.`,fix:'Mark the main annotation with emphasis="primary", set supporting notes to emphasis="secondary", or provide provenance.confidence so Semiotic can infer order.'}:{status:"warn",message:`${t} of ${J.length} annotation(s) have no emphasis or provenance confidence; readers may not know which note is primary among the unordered notes.`,fix:"Set emphasis on each annotation (primary/secondary), or provide provenance.confidence on all annotations so Semiotic can infer order."}})}(null!=u.forecast||null!=u.anomaly||null!=u.band||null!=u.regression)&&g.push({id:"understandable.uncertainty",principle:"understandable",heuristic:"Statistical uncertainty isn't clearly communicated",critical:!1,status:"manual",message:"The chart shows a forecast/regression/band/anomaly overlay. Confirm the uncertainty it represents is explained in text, not just drawn.",fix:"State the confidence interval / method in the summary, and label the band so it isn't mistaken for data."}),null!=u.animate&&!1!==u.animate&&g.push({id:"understandable.changes-followable",principle:"understandable",heuristic:"Changes are not easy to follow",critical:!1,status:Q,message:`Transitions animate with object constancy and data changes are mirrored to the live region${X}.`,fix:C?"Keep transition durations in the 250ms–2s range so changes are followable but not slow.":void 0}),g.push({id:"robust.conforms-to-standards",principle:"robust",heuristic:"Does not conform to standards",critical:!1,status:"manual",message:"WCAG 2.1 / Section 508 conformance can't be settled from config alone.",fix:"Run an automated checker (axe) on the rendered output and test with real assistive tech."}),g.push({id:"robust.semantically-valid",principle:"robust",heuristic:"Semantically invalid",critical:!1,status:"manual",message:"Whether interactive elements expose correct roles/names is a render-time, screen-reader question.",fix:"Verify with a screen reader that buttons read as buttons, the chart as an image/group, etc."}),g.push({id:"robust.fragile-technology-support",principle:"robust",heuristic:"Fragile technology support",critical:!1,status:Q,message:`Charts render on canvas with an SVG overlay and render to SVG in SSR, so access isn't tied to one rendering path${X}.`,fix:C?"Still test across NVDA+Firefox, JAWS+Chrome, and VoiceOver+Safari — AT support varies.":void 0}),function(e,{isValue:t,tableEnabled:a}){e.push({id:"compromising.table",principle:"compromising",heuristic:"No table",critical:!0,...t?{status:"not-applicable",message:"Single-value display — a table isn't meaningful."}:a?{status:"pass",message:"A human-readable data table is provided (accessibleTable)."}:{status:"fail",message:"accessibleTable is disabled — no human-readable table of the underlying data.",fix:"Remove accessibleTable={false} (unless title/summary/annotations already convey all the data)."}})}(g,Z),A||g.push({id:"compromising.table-static",principle:"compromising",heuristic:"Table/data is static",critical:!1,...w?{status:"manual",message:"Rendered in a ChartContainer. If a data-download action is enabled, the data is exportable.",fix:"Enable the ChartContainer data-download action so users can save the underlying data (keep it opt-in)."}:{status:"warn",message:"The data table is read-only — not downloadable, sortable, or filterable.",fix:"Wrap the chart in a ChartContainer and enable its data-download action (opt-in, so deployments can withhold it where export isn't allowed)."}}),g.push({id:"compromising.shareable-state",principle:"compromising",heuristic:"State is not easy to share and reproduce",critical:!1,status:C?"pass":"manual",message:`Chart state serializes via toConfig/toURL/copyConfig${C?"":X}.`,fix:C?"Expose it to users via the ChartContainer copyConfig action or a shareable URL.":void 0}),function(e,{navigable:t,isHierarchy:a,builtIn:s,builtInNote:i,known:r}){e.push({id:"compromising.navigable-structure",principle:"compromising",heuristic:"Information cannot be navigated according to narrative or structure",critical:!1,...t?a?{status:"pass",message:"ChartContainer's navigable option mounts a structured navigation tree, including hierarchy/network branches and their data items."}:{status:"pass",message:"ChartContainer's navigable option mounts a structured tree (chart → axes/series → data points) that screen readers can traverse."}:a?{status:"warn",message:"Hierarchical chart: built-in keyboard navigation is largely flat — it doesn't descend the tree structure.",fix:"Enable ChartContainer's navigable option for a structured navigation tree, or lean on the data table and a summary that conveys the hierarchy."}:{status:s,message:`Keyboard navigation steps through points and switches series/groups${i}.`,fix:r?"For deeper structure (axis → series → datum), enable ChartContainer's navigable option.":void 0}})}(g,Z),function(e,{component:t,props:a}){{let s,i=Array.isArray(a.data)?a.data:null,r=Array.isArray(a.nodes)?a.nodes:null,n={id:"assistive.data-density",principle:"assistive",heuristic:"Data density is inappropriate",critical:!0};s=k.has(t)&&i&&i.length>7?{...n,status:"warn",message:`${i.length} slices in a part-to-whole chart. Chartability suggests ≤ 5 categories; many thin slices are hard to perceive and to describe.`,fix:'Group small slices into an "Other" category, or switch to a ranked bar chart.'}:r&&r.length>200?{...n,status:"warn",message:`${r.length} nodes. A network this size is hard to navigate non-visually node by node.`,fix:"Provide a summary of structure (clusters, hubs, components) and consider filtering or aggregating the graph."}:i&&i.length>5e3?{...n,status:"warn",message:`${i.length} data points. Canvas renders this fine, but the non-visual table/navigation become unwieldy.`,fix:"Aggregate or bin for the accessible representation, or expose summary statistics rather than every row."}:i?{...n,status:"pass",message:`${i.length} data points — a reasonable density for non-visual consumption.`}:r?{...n,status:"pass",message:`${r.length} nodes — a reasonable density for non-visual consumption.`}:{...n,status:"manual",message:"Data not provided inline (push mode); verify density at runtime."},e.push(s)}}(g,Z),function(e,{props:t}){{let a=Array.isArray(t.data)?t.data:null,s=["valueFormat","yFormat","xFormat","tickFormat","format"].some(e=>"function"==typeof t[e]||"string"==typeof t[e]),i=!1;if(a&&!s)for(let e of a.slice(0,50))if(e&&"object"==typeof e){for(let t of Object.values(e))if("number"==typeof t&&Number.isFinite(t)&&Math.abs(t)>=1e5){i=!0;break}if(i)break}i&&e.push({id:"assistive.human-readable-numbers",principle:"assistive",heuristic:"Data in text is not human-readable",critical:!1,status:"warn",message:'Data includes large numbers (≥ 100,000) and no value/tick formatter — screen readers will read every digit (e.g. "six hundred fifty thousand…").',fix:'Pass valueFormat / yFormat (e.g. a compact formatter so 6,500,000 reads as "6.5M"); the formatter flows to ticks, tooltips, and the data table.'})}}(g,Z),g.push({id:"assistive.features-described",principle:"assistive",heuristic:"Visually apparent features and relationships are not described",critical:!1,...x?{status:"pass",message:"ChartContainer's describe option auto-generates an L1–L3 description (chart type, statistics, and trend) via describeChart()."}:H?{status:"manual",message:"A summary is present. Confirm it describes trends, extrema, clusters, and outliers — not just what the chart is.",fix:"Cover the L2/L3 content blind readers value most: direction of trend, peak/trough, notable outliers."}:{status:"warn",message:"No text describes the visually apparent trends, extrema, or outliers.",fix:"Enable ChartContainer's describe option (auto-generates via describeChart()), or write a summary covering the key trend and notable points."}}),function(e,{isValue:t,tableEnabled:a}){e.push({id:"assistive.skippable-navigation",principle:"assistive",heuristic:"Navigation and interaction is tedious",critical:!0,...t?{status:"not-applicable",message:"Single value — nothing to skip."}:a?{status:"pass",message:'A "Skip to data table" link lets screen-reader users bypass point-by-point navigation.'}:{status:"warn",message:"accessibleTable is off, removing the skip-to-table affordance.",fix:"Keep accessibleTable enabled so users can skip past dense point navigation."}})}(g,Z),g.push({id:"flexible.user-style-respected",principle:"flexible",heuristic:"User style change not respected",critical:!0,status:Q,message:`Styling flows through CSS custom properties and honors forced-colors mode, so user/user-agent style changes cascade in${X}.`,fix:C?"Avoid hardcoding colors via frameProps style fns that bypass theme variables.":void 0}),g.push({id:"flexible.reduced-motion",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...R.has(a)||L.has(a)?q?{status:"pass",message:`${a} animates continuously and declares an in-chart pause/stop control.`}:{status:"warn",message:`${a} animates continuously. prefers-reduced-motion is auto-honored, but there's no in-chart pause/stop control for users who don't set that preference.`,fix:"Offer a pause/stop control for looping/streaming motion (Chartability requires it for animation > 2s)."}:{status:Q,message:`prefers-reduced-motion is auto-detected; transitions fast-forward and looping animation stops${X}.`}}),v&&(g.push({id:"flexible.sim-pause-control",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...q?{status:"pass",message:"Physics simulation exposes a pause/stop control for users who need to stop motion."}:{status:"warn",message:"Physics simulation has no declared pause/stop control.",fix:"Provide a visible pause control and set physics.pauseControl=true (or pauseControl=true) so the contract is auditable."}}),g.push({id:"flexible.settled-projection",principle:"flexible",heuristic:"User style change not respected",critical:!1,..._?{status:"pass",message:"A settled-projection table is declared, so non-visual readers get aggregate chart semantics instead of trajectories."}:{status:"warn",message:"Physics chart does not declare a settled projection for its accessible table.",fix:"Provide aggregate rows from the settled projection and set physics.settledProjection=true."}}),g.push({id:"flexible.reduced-motion-settle",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...Y?{status:"pass",message:"Reduced-motion mode settles the simulation to a static chart state instead of freezing bodies mid-flight."}:{status:"warn",message:"Physics chart does not declare reduced-motion synchronous settle behavior.",fix:"In reduced motion, run the world to its settled projection and paint once; set physics.reducedMotionSettle=true."}}));{let e=!0===u.responsiveWidth||!0===u.responsiveHeight,t=T.has(a)&&!0===u.zoomable;g.push({id:"flexible.zoom-reflow",principle:"flexible",heuristic:"Zoom and reflow are not supported",critical:!1,...e?{status:"pass",message:`Chart reflows to its container (${[!0===u.responsiveWidth&&"responsiveWidth",!0===u.responsiveHeight&&"responsiveHeight"].filter(Boolean).join(", ")}), so page zoom doesn't clip it.`}:t?{status:"pass",message:"Geo chart is zoomable/pannable."}:{status:"manual",message:"Fixed width/height — verify the chart survives browser zoom and reflow without clipping or loss of function.",fix:"Use responsiveWidth/responsiveHeight so the chart reflows to its container."}})}y&&(y.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length))&&g.push({id:"perceivable.recipe-color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,status:"warn",message:`${y.name} declares a color encoding without a redundant cue.`,fix:"Add shape, label, position, texture, or a textual category summary to the recipe encoding."}),"required"===y.accessibility.description&&!z&&g.push({id:"understandable.recipe-description",principle:"understandable",heuristic:"Features are not described",critical:!1,status:"fail",message:`${y.name} requires a recipe-aware description, but none is attached.`,fix:"Call describeChart with recipeId/recipe metadata and attach the returned text as description."}),y.accessibility.fallbackTable&&!1===u.accessibleTable&&g.push({id:"compromising.recipe-fallback",principle:"compromising",heuristic:"No data table is provided",critical:!0,status:"fail",message:`${y.name} requires a fallback table, but accessibleTable is disabled.`,fix:"Enable accessibleTable and preserve recipe-declared table fields on scene nodes."}));let ee=g.filter(e=>"not-applicable"!==e.status).filter(e=>e.critical),te={criticalsPassed:ee.filter(e=>"pass"===e.status).length,criticalsEvaluated:ee.length,fails:g.filter(e=>"fail"===e.status).length,warnings:g.filter(e=>"warn"===e.status).length,manual:g.filter(e=>"manual"===e.status).length,passes:g.filter(e=>"pass"===e.status).length};return{component:a,ok:!ee.some(e=>"fail"===e.status),summary:te,findings:g,reference:"Chartability (POUR-CAF) — https://chartability.github.io/POUR-CAF/. Not a pass/fail cert; pair with manual screen-reader testing (NVDA+Firefox, JAWS+Chrome, VoiceOver+Safari)."}}function h(e){let t=[],a=e.summary,s=e.ok?`${a.criticalsPassed}/${a.criticalsEvaluated} critical heuristics pass`:`${a.fails} blocking failure(s) — ${a.criticalsPassed}/${a.criticalsEvaluated} critical heuristics pass`;t.push(`${e.ok?"✓":"✗"} ${e.component}: accessibility audit (Chartability POUR-CAF)`),t.push(` ${s} · ${a.warnings} warning(s) · ${a.manual} to verify manually`);for(let a of G){let s=e.findings.filter(e=>e.principle===a&&"not-applicable"!==e.status);if(0!==s.length){t.push(""),t.push(` ${a.toUpperCase()}`);for(let e of s){let a=e.critical?" [critical]":"";t.push(` ${O[e.status]} ${e.id}${a}: ${e.message}`),e.fix&&("fail"===e.status||"warn"===e.status||"manual"===e.status)&&t.push(` → ${e.fix}`)}}}return t.push(""),t.push(` Ref: ${e.reference}`),t.join("\n")}import{i as d,v as p,w as m}from"./c-PBFRYNKM.min.js";var f=/*#__PURE__*/new Set(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#f0e442","#000000"]),b=/*#__PURE__*/new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),g=/*#__PURE__*/new Set(["ForceDirectedGraph","SankeyDiagram","ChordDiagram"]),y=/*#__PURE__*/new Set(["BarChart","StackedBarChart","GroupedBarChart","AreaChart","StackedAreaChart"]),v=/*#__PURE__*/new Set(["LineChart","AreaChart","StackedAreaChart"]),C=/*#__PURE__*/new Set(["BarChart","StackedBarChart","GroupedBarChart","FunnelChart"]),w=/*#__PURE__*/new Set(["LineChart","AreaChart","StackedAreaChart","ConnectedScatterplot"]),x=/*#__PURE__*/new Set(["PieChart","DonutChart"]),S={PieChart:"valueAccessor",DonutChart:"valueAccessor",FunnelChart:"valueAccessor"},k=/*#__PURE__*/new Set(
2
+ /*#__PURE__*/Object.keys(S)),A={StackedBarChart:"valueAccessor",StackedAreaChart:"yAccessor"},$=/*#__PURE__*/new Set(["BigNumber"]),F=/*#__PURE__*/new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart"]),P=/*#__PURE__*/new Set(["StreamPhysicsFrame","GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","PhysicsCustomChart"]),R=/*#__PURE__*/new Set(["OrbitDiagram",...P]),j=/*#__PURE__*/new Set(["GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart"]),D=/*#__PURE__*/new Set(["GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart","PhysicsCustomChart"]),L=/*#__PURE__*/new Set(["RealtimeLineChart","RealtimeHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","ProcessSankey"]),B=/*#__PURE__*/new Set(["MultiAxisLineChart"]),T=/*#__PURE__*/new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),N={Scatterplot:"pointRadius",BubbleChart:"pointRadius",ConnectedScatterplot:"pointRadius",QuadrantChart:"pointRadius",SwarmPlot:"pointRadius",DotPlot:"dotRadius"},I=["title","description","summary"],M=/*#__PURE__*/new Set(["XYCustomChart","OrdinalCustomChart","NetworkCustomChart","GeoCustomChart","PhysicsCustomChart"]),V=/*#__PURE__*/new Set([...M,"XYFrame","OrdinalFrame","NetworkFrame","GeoFrame"]),E=["label","callout","callout-circle","callout-rect"],z=/*#__PURE__*/new Set(["label","callout","callout-circle","callout-rect","text","widget"]),H=/*#__PURE__*/new Set(E),O={pass:"✓",fail:"✗",warn:"⚠",manual:"○","not-applicable":"·"},G=["perceivable","operable","understandable","robust","compromising","assistive","flexible"];export{b as a,g as b,y as c,v as d,C as e,w as f,x as g,S as h,A as i,D as j,s as k,i as l,r as m,n,u as o,h as p};
@@ -0,0 +1 @@
1
+ export{e as customXYPlugin}from"./c-YGTMWEEF.min.js";
@@ -0,0 +1 @@
1
+ function t(t){let e=Number.isFinite(t)&&t>0?t:6;return{width:Math.max(8,e),height:e,lineY:e/2}}function e(t){return{type:"hatch",background:t.background,stroke:t.stroke,lineWidth:t.lineWidth,spacing:t.spacing,angle:t.angle,...1!==t.lineOpacity?{lineOpacity:t.lineOpacity}:{}}}function n(n={},r){let i,{background:a="transparent",stroke:l="#000",lineWidth:o=1.5,spacing:s=6,angle:u=45,lineOpacity:c=1}=n,f={background:a,stroke:l,lineWidth:o,spacing:s,angle:u,lineOpacity:c},d=t(s),p=function(){let t=typeof window<"u"&&window.devicePixelRatio||1;return Math.min(3,Math.max(1,t))}(),h=Math.max(1,Math.round(d.width*p)),m=Math.max(1,Math.round(d.height*p));try{y=h,g=m,i=typeof OffscreenCanvas<"u"?new OffscreenCanvas(y,g):(B||(B=document.createElement("canvas")),B.width=y,B.height=g,B)}catch{return e(f)}var y,g;let b=i.getContext("2d");if(!b)return e(f);!function(t,e,n,r){e&&"transparent"!==e&&"none"!==e?(t.fillStyle=e,t.fillRect(0,0,n,r)):t.clearRect(0,0,n,r)}(b,a,h,m);let v=m/d.height,k=Math.max(0,o)*v;b.save(),b.globalAlpha=Math.min(1,Math.max(0,c)),b.fillStyle=l,b.fillRect(0,d.lineY*v-k/2,h,k),b.restore();let w=(r||b).createPattern(i,"repeat");if(!w)return w;let M=u*Math.PI/180,x=Math.cos(M),O=Math.sin(M),S=d.width/h,W=d.height/m;return w.setTransform?.({a:x*S,b:O*S,c:-O*W,d:x*W,e:0,f:0}),w}function r(t,e=2166136261){let n=e;for(let e=0;e<t.length;e++)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return n>>>0}function i(t){let e=typeof document>"u"?void 0:document.fonts;if(!e||"function"!=typeof e.addEventListener)return()=>{};let n=e=>{(function(t){return 0!==t.fontfaces?.length})(e)&&t()};return e.addEventListener("loadingdone",n),()=>e.removeEventListener("loadingdone",n)}function a(){if(G||typeof window>"u"||typeof document>"u")return;G=!0;let t=t=>{if(!t?.includes("--"))return"";let e=document.createElement("span").style;return e.cssText=t,Array.from(e).filter(t=>t.startsWith("--")).sort().map(t=>`${t}:${e.getPropertyValue(t)}!${e.getPropertyPriority(t)}`).join(";")},e=(e,n)=>{let r=e.target;if(!(r instanceof Element))return!1;if(r===n||r.contains(n))return!0;if(!n.contains(r))return!1;let i="CANVAS"===r.tagName;return!(!i&&!r.querySelector("canvas")||i&&"style"===e.attributeName&&t(e.oldValue)===t(r.getAttribute("style")))},n=t=>{let n=[];for(let r of J){let i=r.getElement();i&&(!t||t.some(t=>e(t,i)))&&n.push(r)}if(!t||0!==n.length){q++;for(let t of n)t.listener()}};if(typeof MutationObserver<"u"&&document.documentElement&&(U=new MutationObserver(t=>{n(t)})).observe(document.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme","data-semiotic-theme","data-semiotic-theme-mode"],attributeOldValue:!0,subtree:!0}),"function"==typeof window.matchMedia)try{X=window.matchMedia("(prefers-color-scheme: dark)"),D=()=>n(),"function"==typeof X.addEventListener?X.addEventListener("change",D):"function"==typeof X.addListener&&X.addListener(D)}catch{}H=i(()=>n())}function l(t,e){a();let n={getElement:t,listener:e};return J.add(n),()=>{J.delete(n)&&0===J.size&&(U?.disconnect(),U=null,X&&D&&("function"==typeof X.removeEventListener?X.removeEventListener("change",D):"function"==typeof X.removeListener&&X.removeListener(D)),X=null,D=null,H?.(),H=null,G=!1)}}function o(t,e){if(!e)return e;let n=function(t){let e=t.trim();if(!e.startsWith("var(")||!e.endsWith(")"))return null;let n=e.slice(4,-1),r=n.indexOf(",");if(-1===r){let t=n.trim();return t.startsWith("--")?{name:t}:null}let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();return i.startsWith("--")?{name:i,fallback:a||void 0}:null}(e);if(!n)return e;let r=()=>n.fallback?o(t,n.fallback):e,i=t.canvas;if(!i)return r();let a=T.get(i);(!a||a.version!==q)&&(a={version:q,map:new Map},T.set(i,a));let l=a.map.get(e);if(void 0!==l)return l;let s=getComputedStyle(i).getPropertyValue(n.name).trim()||r()||e;return a.map.set(e,s),s}function s(t){q++}function u(){return q}function c(t){return"object"==typeof t&&null!==t&&"hatch"===t.type}function f(t){return["hatch",t.background??"transparent",t.stroke??"#000",t.lineWidth??1.5,t.spacing??6,t.angle??45,t.lineOpacity??1].join("|")}function d(t,e){return`${t}-hatch-${r(f(e)).toString(36)}`}function p(e,n){let{background:r="transparent",stroke:i="#000",lineWidth:a=1.5,spacing:l=6,angle:o=45,lineOpacity:s=1}=e,u=t(l);return E("pattern",{id:n,width:u.width,height:u.height,patternUnits:"userSpaceOnUse",patternTransform:0!==o?`rotate(${o})`:void 0,children:[r&&"transparent"!==r&&"none"!==r&&C("rect",{width:u.width,height:u.height,fill:r}),C("line",{x1:0,y1:u.lineY,x2:u.width,y2:u.lineY,stroke:i,strokeWidth:a,...1!==s?{strokeOpacity:s}:{}})]},n)}function h(t,e,n="#4e79a7"){if(c(t)){let n=d(e,t);return{fill:`url(#${n})`,def:p(t,n)}}return t&&"string"==typeof t?{fill:t}:{fill:n}}function m(t,e,n){if(!t||"object"!=typeof t)return;let r=t;if(!Array.isArray(r.stops))return;let i=r.stops.flatMap(t=>{if(!t||"object"!=typeof t)return[];let{offset:e,color:r,opacity:i}=t;return"number"==typeof e&&Number.isFinite(e)?[{offset:Math.max(0,Math.min(1,e)),color:"string"==typeof r&&r?r:n,opacity:"number"==typeof i&&Number.isFinite(i)?Math.max(0,Math.min(1,i)):void 0}]:[]}).sort((t,e)=>t.offset-e.offset);return i.length?{direction:"horizontal"===r.direction?"horizontal":"vertical"===r.direction?"vertical":e,stops:i}:void 0}function y(t,e,n,r){let i=m(t,n,r);if(!i)return;let{direction:a,stops:l}=i,o=`${e}-gradient`;return{fill:`url(#${o})`,def:C("linearGradient",{id:o,x1:0,y1:0,x2:"horizontal"===a?"100%":0,y2:"vertical"===a?"100%":0,children:l.map((t,e)=>C("stop",{offset:100*t.offset+"%",stopColor:t.color,stopOpacity:t.opacity},`${t.offset}-${e}`))},o)}}function g(t,e){let n=t.fillStyle,r="#010203";try{t.fillStyle=r,t.fillStyle=e}catch{return t.fillStyle=n,[78,121,167]}let i=t.fillStyle;if(t.fillStyle=n,"string"!=typeof i)return[78,121,167];if(i.toLowerCase()===r&&e.trim().toLowerCase()!==r)return[78,121,167];if(i.startsWith("#"))return[parseInt(i.slice(1,3),16),parseInt(i.slice(3,5),16),parseInt(i.slice(5,7),16)];let a=i.match(/(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return a?[+a[1],+a[2],+a[3]]:[78,121,167]}function b(t){switch(t){case"monotoneX":return I;case"monotoneY":return z;case"cardinal":return V;case"catmullRom":return Y;case"step":return F;case"stepBefore":return R;case"stepAfter":return P;case"basis":return N;case"natural":return j;default:return null}}function v(t){return"string"==typeof t&&"none"===t.trim().toLowerCase()}function k(t,e,r){return v(e)?Q:null==e?r:c(e)?function(t,e){let r=t.background??"transparent",i=t.stroke??"#000",a="transparent"===r||"none"===r?r:o(e,r)||r,l=o(e,i)||i||"#000",s=typeof window<"u"&&window.devicePixelRatio||1,u=`${f(t)}|${a}|${l}@${s}`,d=K.get(u);if(void 0!==d)return d;let p=n({background:a,stroke:l,lineWidth:t.lineWidth,spacing:t.spacing,angle:t.angle,lineOpacity:t.lineOpacity},e),h=c(p)?null:p;return K.set(u,h),h}(e,t)||e.background&&o(t,e.background)||r:"string"!=typeof e?e:o(t,e)||r}function w(t,e,n){let r=k(t,e,n);if("string"==typeof r&&r.trim().startsWith("var(")){let e=o(t,n);return e&&!e.trim().startsWith("var(")?e:n}return r}function M(t,e){if(null==e)return;let n=k(t,e,"");return""===n?void 0:n}function x(t,e,n,r,i,a,l){let o=e.stops.filter(t=>Number.isFinite(t.offset)&&(null==t.opacity||Number.isFinite(t.opacity)));if(o.length<2)return null;let s=t.createLinearGradient(r,i,a,l);for(let e of o)s.addColorStop(Math.max(0,Math.min(1,e.offset)),O(t,e,n));return s}function O(t,e,n){let r=e.color??n,i=o(t,r)||r;if(null==e.opacity)return i;let a=Math.max(0,Math.min(1,e.opacity)),[l,s,u]=g(t,i);return`rgba(${l},${s},${u},${a})`}function S(t,e=0){return!(e>0||0!==t.opacity&&(t.fill&&"transparent"!==t.fill||t.stroke&&"none"!==t.stroke&&"transparent"!==t.stroke))}function W(t,e,n,r){if(!e.fill||v(e.fill))return;let i=t.globalAlpha;t.fillStyle=k(t,e.fill,n),void 0!==e.fillOpacity&&(t.globalAlpha=(e.opacity??i)*e.fillOpacity),r(),t.globalAlpha=i}function $(t,e,n){if(!e.stroke||v(e.stroke))return;let r=t.globalAlpha;t.strokeStyle=o(t,e.stroke)||e.stroke,t.lineWidth=e.strokeWidth??1,t.globalAlpha=(e.opacity??r)*(e.strokeOpacity??1),n(),t.globalAlpha=r}function A(t){return(t.tl??0)>0||(t.tr??0)>0||(t.br??0)>0||(t.bl??0)>0}function L(t){let e=t.cornerRadii;if(!e)return{tl:0,tr:0,br:0,bl:0};let n=Math.min(t.w,t.h)/2,r=t=>Math.max(0,Math.min(t??0,n));return{tl:r(e.tl),tr:r(e.tr),br:r(e.br),bl:r(e.bl)}}import{jsxs as E,jsx as C}from"react/jsx-runtime";import{curveNatural as j,curveBasis as N,curveStepAfter as P,curveStepBefore as R,curveStep as F,curveCatmullRom as Y,curveCardinal as V,curveMonotoneY as z,curveMonotoneX as I}from"d3-shape";var B=null,T=/*#__PURE__*/new WeakMap,q=0,G=!1,U=null,X=null,D=null,H=null,J=/*#__PURE__*/new Set,K=/*#__PURE__*/new Map,Q="rgba(0,0,0,0)";export{i as a,l as b,o as c,s as d,u as e,g as f,r as g,n as h,c as i,d as j,p as k,h as l,m,y as n,b as o,v as p,k as q,w as r,M as s,x as t,S as u,W as v,$ as w,A as x,L as y};