semiotic 3.8.2 → 3.8.4

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 (195) hide show
  1. package/CLAUDE.md +9 -9
  2. package/README.md +42 -40
  3. package/ai/examples.md +1 -1
  4. package/ai/schema.json +2726 -300
  5. package/ai/surface-manifest.json +1 -1
  6. package/ai/system-prompt.md +1 -1
  7. package/dist/chunk-chunk-2JGJ5GUG.module.min.js +0 -1
  8. package/dist/chunk-chunk-3ILKBVVQ.module.min.js +1 -0
  9. package/dist/{chunk-chunk-NO4MCQVD.module.min.js → chunk-chunk-5RKXZQ2P.module.min.js} +1 -1
  10. package/dist/{chunk-chunk-CYIML3AV.module.min.js → chunk-chunk-6TPGFL7M.module.min.js} +1 -1
  11. package/dist/{chunk-chunk-VVCA3DB7.module.min.js → chunk-chunk-7ALTGHK6.module.min.js} +1 -1
  12. package/dist/chunk-chunk-7KZJUTKP.module.min.js +2 -0
  13. package/dist/chunk-chunk-7RYBCTK5.module.min.js +1 -0
  14. package/dist/chunk-chunk-ACLDBMRH.module.min.js +2 -0
  15. package/dist/chunk-chunk-ANYDWOZF.module.min.js +1 -0
  16. package/dist/{chunk-chunk-ZLKRTF5N.module.min.js → chunk-chunk-AQPQN2HH.module.min.js} +1 -1
  17. package/dist/chunk-chunk-ASKSE5F5.module.min.js +1 -0
  18. package/dist/chunk-chunk-AVBI6GDT.module.min.js +1 -0
  19. package/dist/chunk-chunk-B3DRZPBK.module.min.js +2 -0
  20. package/dist/chunk-chunk-BFHUYEOS.module.min.js +2 -0
  21. package/dist/chunk-chunk-C4YA6TDR.module.min.js +1 -0
  22. package/dist/chunk-chunk-C57LR3YG.module.min.js +1 -0
  23. package/dist/chunk-chunk-EMO5NUGE.module.min.js +1 -0
  24. package/dist/chunk-chunk-F5V4UIE6.module.min.js +2 -0
  25. package/dist/chunk-chunk-F7WFPD4O.module.min.js +2 -0
  26. package/dist/chunk-chunk-FBGHXL72.module.min.js +2 -0
  27. package/dist/chunk-chunk-FP44FHFO.module.min.js +2 -0
  28. package/dist/chunk-chunk-HKXUAEPJ.module.min.js +2 -0
  29. package/dist/chunk-chunk-ICEXPNDC.module.min.js +2 -0
  30. package/dist/chunk-chunk-IY7RYD4S.module.min.js +1 -0
  31. package/dist/{chunk-chunk-7LHMKRKE.module.min.js → chunk-chunk-JDXT6ORT.module.min.js} +1 -1
  32. package/dist/chunk-chunk-JMVEIZXP.module.min.js +1 -0
  33. package/dist/chunk-chunk-KHCOJMGK.module.min.js +1 -0
  34. package/dist/chunk-chunk-KQ546MKE.module.min.js +2 -0
  35. package/dist/chunk-chunk-LQBSXO7K.module.min.js +2 -0
  36. package/dist/chunk-chunk-LRIFN2HK.module.min.js +1 -0
  37. package/dist/chunk-chunk-MFHF4J2Z.module.min.js +1 -0
  38. package/dist/chunk-chunk-N6VKKF3A.module.min.js +2 -0
  39. package/dist/chunk-chunk-NEVE562N.module.min.js +1 -0
  40. package/dist/chunk-chunk-NKZ75IM5.module.min.js +2 -0
  41. package/dist/chunk-chunk-PLIDPQNG.module.min.js +2 -0
  42. package/dist/{chunk-chunk-FYY2ACNJ.module.min.js → chunk-chunk-PRDGLMJT.module.min.js} +1 -1
  43. package/dist/chunk-chunk-QGZGZI4X.module.min.js +1 -0
  44. package/dist/chunk-chunk-RP7WTID5.module.min.js +1 -0
  45. package/dist/chunk-chunk-S7KLNUO6.module.min.js +1 -0
  46. package/dist/chunk-chunk-SR4ZXOWR.module.min.js +2 -0
  47. package/dist/chunk-chunk-ZOAQDIJO.module.min.js +1 -0
  48. package/dist/chunk-minimapBrushOverlay-JU57U7NM.module.min.js +2 -0
  49. package/dist/chunk-scatterplotMatrixBrushOverlay-SDIZSN66.module.min.js +2 -0
  50. package/dist/chunk-statisticalOverlays-QGDLRUHX.module.min.js +1 -0
  51. package/dist/chunk-statisticalOverlays-T77OKLDY.module.min.js +1 -0
  52. package/dist/components/ChartContainer.d.ts +2 -2
  53. package/dist/components/ai/chartCapabilityTypes.d.ts +5 -0
  54. package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
  55. package/dist/components/charts/geo/ChoroplethMap.d.ts +2 -0
  56. package/dist/components/charts/geo/DistanceCartogram.d.ts +7 -3
  57. package/dist/components/charts/geo/FlowMap.d.ts +4 -0
  58. package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +3 -1
  59. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +6 -1
  60. package/dist/components/charts/physics/GaltonBoardChart.d.ts +6 -1
  61. package/dist/components/charts/physics/gauntletChartProps.d.ts +7 -1
  62. package/dist/components/charts/physics/gauntletChrome.d.ts +2 -1
  63. package/dist/components/charts/physics/gauntletPhysics.d.ts +19 -4
  64. package/dist/components/charts/physics/gauntletRuntime.d.ts +3 -0
  65. package/dist/components/charts/physics/physicsHocUtils.d.ts +12 -0
  66. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +5 -6
  67. package/dist/components/charts/realtime/temporalHistogramConfig.d.ts +11 -0
  68. package/dist/components/charts/shared/areaSeriesData.d.ts +15 -0
  69. package/dist/components/charts/shared/chartMode.d.ts +75 -0
  70. package/dist/components/charts/shared/chartSpecCore.d.ts +2 -2
  71. package/dist/components/charts/shared/colorUtils.d.ts +8 -0
  72. package/dist/components/charts/shared/geoStyleDefaults.d.ts +3 -0
  73. package/dist/components/charts/shared/hatchPattern.d.ts +8 -3
  74. package/dist/components/charts/shared/hooks.d.ts +13 -80
  75. package/dist/components/charts/shared/lineSeriesSsr.d.ts +55 -0
  76. package/dist/components/charts/shared/types.d.ts +2 -2
  77. package/dist/components/charts/shared/useChartSetup.d.ts +3 -0
  78. package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
  79. package/dist/components/charts/shared/useXYLineStyle.d.ts +3 -2
  80. package/dist/components/charts/shared/validateProps.d.ts +1 -1
  81. package/dist/components/charts/shared/xyLineStyle.d.ts +21 -0
  82. package/dist/components/charts/xy/AreaChart.d.ts +10 -0
  83. package/dist/components/charts/xy/LineChart.d.ts +3 -0
  84. package/dist/components/charts/xy/minimapBrushOverlay.d.ts +17 -0
  85. package/dist/components/charts/xy/minimapBrushOverlayLazy.d.ts +4 -0
  86. package/dist/components/charts/xy/scatterplotMatrixBrushOverlay.d.ts +8 -0
  87. package/dist/components/charts/xy/scatterplotMatrixBrushOverlayLazy.d.ts +3 -0
  88. package/dist/components/legendLayout.d.ts +31 -0
  89. package/dist/components/realtime/types.d.ts +5 -0
  90. package/dist/components/recipes/gridObservatory.d.ts +176 -0
  91. package/dist/components/recipes/recipeChrome.d.ts +24 -0
  92. package/dist/components/recipes/sequenceLayout.d.ts +139 -0
  93. package/dist/components/semiotic-recipes-core.d.ts +6 -2
  94. package/dist/components/server/serverChartConfigShared.d.ts +29 -0
  95. package/dist/components/server/serverChartConfigs.d.ts +2 -13
  96. package/dist/components/server/serverChartConfigsXY.d.ts +3 -0
  97. package/dist/components/server/serverGaugeOverlay.d.ts +28 -0
  98. package/dist/components/server/staticAnnotations.d.ts +3 -1
  99. package/dist/components/server/staticLegend.d.ts +7 -1
  100. package/dist/components/server/staticSVGChrome.d.ts +57 -0
  101. package/dist/components/stream/GeoPipelineStore.d.ts +2 -0
  102. package/dist/components/stream/GeoSVGOverlay.d.ts +2 -0
  103. package/dist/components/stream/SceneToSVG.d.ts +10 -8
  104. package/dist/components/stream/SceneToSVGGeo.d.ts +10 -0
  105. package/dist/components/stream/SceneToSVGNetwork.d.ts +12 -0
  106. package/dist/components/stream/SceneToSVGOrdinal.d.ts +12 -0
  107. package/dist/components/stream/canvasBackground.d.ts +7 -0
  108. package/dist/components/stream/networkFramePaint.d.ts +2 -0
  109. package/dist/components/stream/networkTypes.d.ts +2 -4
  110. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +18 -2
  111. package/dist/components/stream/physics/physicsBodyCanvas.d.ts +7 -0
  112. package/dist/components/stream/physics/physicsPipelineEviction.d.ts +15 -0
  113. package/dist/components/stream/physics/physicsPipelineObservations.d.ts +1 -1
  114. package/dist/components/stream/physics/physicsPipelineQuiescence.d.ts +20 -0
  115. package/dist/components/stream/renderBackend.d.ts +14 -0
  116. package/dist/components/stream/sceneToSVGShared.d.ts +80 -0
  117. package/dist/components/stream/types.d.ts +4 -0
  118. package/dist/components/stream/useHydration.d.ts +7 -1
  119. package/dist/components/stream/xySceneBuilders/candlestickScene.d.ts +1 -1
  120. package/dist/components/types/legendTypes.d.ts +16 -3
  121. package/dist/forceLayoutWorker.js +1 -1
  122. package/dist/geo.min.js +1 -1
  123. package/dist/geo.module.min.js +1 -1
  124. package/dist/network.min.js +1 -1
  125. package/dist/network.module.min.js +1 -1
  126. package/dist/ordinal.min.js +1 -1
  127. package/dist/ordinal.module.min.js +1 -1
  128. package/dist/physics.min.js +1 -1
  129. package/dist/physics.module.min.js +1 -1
  130. package/dist/physicsWorker.js +1 -1
  131. package/dist/realtime.min.js +1 -1
  132. package/dist/realtime.module.min.js +1 -1
  133. package/dist/rough.min.js +1 -1
  134. package/dist/rough.module.min.js +1 -1
  135. package/dist/semiotic-ai-core.min.js +1 -1
  136. package/dist/semiotic-ai-core.module.min.js +1 -1
  137. package/dist/semiotic-ai.min.js +1 -1
  138. package/dist/semiotic-ai.module.min.js +1 -1
  139. package/dist/semiotic-experimental.min.js +1 -1
  140. package/dist/semiotic-experimental.module.min.js +1 -1
  141. package/dist/semiotic-realtime-core.min.js +1 -1
  142. package/dist/semiotic-realtime-core.module.min.js +1 -1
  143. package/dist/semiotic-recipes-core.d.ts +6 -2
  144. package/dist/semiotic-recipes-core.min.js +1 -1
  145. package/dist/semiotic-recipes-core.module.min.js +1 -1
  146. package/dist/semiotic-recipes.min.js +1 -1
  147. package/dist/semiotic-recipes.module.min.js +1 -1
  148. package/dist/semiotic-server-edge.min.js +1 -1
  149. package/dist/semiotic-server-edge.module.min.js +1 -1
  150. package/dist/semiotic-server-node.min.js +1 -1
  151. package/dist/semiotic-server-node.module.min.js +1 -1
  152. package/dist/semiotic-utils-core.min.js +1 -1
  153. package/dist/semiotic-utils-core.module.min.js +1 -1
  154. package/dist/semiotic-utils.min.js +1 -1
  155. package/dist/semiotic-utils.module.min.js +1 -1
  156. package/dist/semiotic-value.module.min.js +1 -1
  157. package/dist/semiotic.min.js +1 -1
  158. package/dist/semiotic.module.min.js +1 -1
  159. package/dist/server.min.js +1 -1
  160. package/dist/server.module.min.js +1 -1
  161. package/dist/xy.min.js +1 -1
  162. package/dist/xy.module.min.js +1 -1
  163. package/package.json +3 -2
  164. package/dist/chunk-chunk-255KDHW5.module.min.js +0 -1
  165. package/dist/chunk-chunk-27HVVXS6.module.min.js +0 -1
  166. package/dist/chunk-chunk-2UN3ANRN.module.min.js +0 -2
  167. package/dist/chunk-chunk-2VUEY5TH.module.min.js +0 -1
  168. package/dist/chunk-chunk-2WVCH4PL.module.min.js +0 -1
  169. package/dist/chunk-chunk-5WEFWNUW.module.min.js +0 -2
  170. package/dist/chunk-chunk-6F6GEAQU.module.min.js +0 -1
  171. package/dist/chunk-chunk-BHYTYMY2.module.min.js +0 -2
  172. package/dist/chunk-chunk-C6EJ4IOD.module.min.js +0 -2
  173. package/dist/chunk-chunk-CP3EN6KZ.module.min.js +0 -1
  174. package/dist/chunk-chunk-DNY43POY.module.min.js +0 -1
  175. package/dist/chunk-chunk-E7MIQX7D.module.min.js +0 -2
  176. package/dist/chunk-chunk-ES4DCG3L.module.min.js +0 -1
  177. package/dist/chunk-chunk-FAKO3RGQ.module.min.js +0 -2
  178. package/dist/chunk-chunk-H4PPRW6N.module.min.js +0 -1
  179. package/dist/chunk-chunk-IFYPMWKY.module.min.js +0 -1
  180. package/dist/chunk-chunk-J3ELI22J.module.min.js +0 -1
  181. package/dist/chunk-chunk-L6D3I3V7.module.min.js +0 -2
  182. package/dist/chunk-chunk-M337NY6L.module.min.js +0 -1
  183. package/dist/chunk-chunk-ODUZEEBH.module.min.js +0 -2
  184. package/dist/chunk-chunk-P6UBCMSQ.module.min.js +0 -2
  185. package/dist/chunk-chunk-QRIBHZYW.module.min.js +0 -1
  186. package/dist/chunk-chunk-RH5TSQPH.module.min.js +0 -1
  187. package/dist/chunk-chunk-STZFFTAN.module.min.js +0 -2
  188. package/dist/chunk-chunk-T27ZEV6A.module.min.js +0 -1
  189. package/dist/chunk-chunk-U3AGQ5EF.module.min.js +0 -2
  190. package/dist/chunk-chunk-W3DB2MN4.module.min.js +0 -2
  191. package/dist/chunk-chunk-WDIN4LRC.module.min.js +0 -1
  192. package/dist/chunk-chunk-XOYX77KF.module.min.js +0 -2
  193. package/dist/chunk-chunk-Z5KXAVQD.module.min.js +0 -2
  194. package/dist/chunk-chunk-ZCNBUZPL.module.min.js +0 -2
  195. package/dist/chunk-chunk-ZTNVDWAK.module.min.js +0 -2
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{useStreamStatus as m}from"./chunk-chunk-ROP4HI7H.module.min.js";import{syncPushBuffer as n,useSyncedPushData as u}from"./chunk-chunk-Q2YADC2V.module.min.js";import{RealtimeHeatmap as o,RealtimeHistogram as k,RealtimeLineChart as c,RealtimeSwarmChart as h,RealtimeWaterfallChart as i,ReorderBuffer as r,RunningStats as e,TemporalHistogram as t,WindowAccumulator as s,bandBounds as p,parseWindowDuration as d,statValue as j}from"./chunk-chunk-ZTNVDWAK.module.min.js";import{StreamXYFrame_default as l}from"./chunk-chunk-L6D3I3V7.module.min.js";import"./chunk-chunk-CYIML3AV.module.min.js";import{IncrementalExtent as N}from"./chunk-chunk-ZLKRTF5N.module.min.js";import{RingBuffer as F}from"./chunk-chunk-5WEFWNUW.module.min.js";import{StreamNetworkFrame_default as Z}from"./chunk-chunk-2UN3ANRN.module.min.js";import"./chunk-chunk-XOYX77KF.module.min.js";import"./chunk-chunk-FAKO3RGQ.module.min.js";import"./chunk-chunk-5UKL5W76.module.min.js";import"./chunk-chunk-SV4XAZ3Q.module.min.js";import"./chunk-chunk-STZFFTAN.module.min.js";import{DEFAULT_LIFECYCLE_THRESHOLDS as f,bandFromAge as A,compileMotionEncoding as O,deriveMotionVector as W,opacityFromAge as a,resolveMotionAccessor as K,resolveMotionVector as T}from"./chunk-chunk-ODUZEEBH.module.min.js";import"./chunk-chunk-JJ2OOIET.module.min.js";import"./chunk-chunk-WCX6U47H.module.min.js";import"./chunk-chunk-KTWEBFMX.module.min.js";import"./chunk-chunk-ZCNBUZPL.module.min.js";import"./chunk-chunk-YHNZCPOZ.module.min.js";export{f as DEFAULT_LIFECYCLE_THRESHOLDS,N as IncrementalExtent,o as RealtimeHeatmap,k as RealtimeHistogram,c as RealtimeLineChart,h as RealtimeSwarmChart,i as RealtimeWaterfallChart,r as ReorderBuffer,F as RingBuffer,e as RunningStats,Z as StreamNetworkFrame,l as StreamXYFrame,t as TemporalHistogram,s as WindowAccumulator,p as bandBounds,A as bandFromAge,O as compileMotionEncoding,W as deriveMotionVector,a as opacityFromAge,d as parseWindowDuration,K as resolveMotionAccessor,T as resolveMotionVector,j as statValue,n as syncPushBuffer,m as useStreamStatus,u as useSyncedPushData};
2
+ import{useStreamStatus as m}from"./chunk-chunk-ROP4HI7H.module.min.js";import{syncPushBuffer as n,useSyncedPushData as u}from"./chunk-chunk-Q2YADC2V.module.min.js";import{RealtimeHeatmap as o,RealtimeHistogram as k,RealtimeLineChart as c,RealtimeSwarmChart as h,RealtimeWaterfallChart as i,ReorderBuffer as r,RunningStats as e,TemporalHistogram as t,WindowAccumulator as s,bandBounds as p,parseWindowDuration as d,statValue as j}from"./chunk-chunk-N6VKKF3A.module.min.js";import{StreamXYFrame_default as l}from"./chunk-chunk-B3DRZPBK.module.min.js";import"./chunk-chunk-6TPGFL7M.module.min.js";import{IncrementalExtent as F}from"./chunk-chunk-AQPQN2HH.module.min.js";import{RingBuffer as H}from"./chunk-chunk-F5V4UIE6.module.min.js";import{StreamNetworkFrame_default as f}from"./chunk-chunk-LQBSXO7K.module.min.js";import"./chunk-chunk-KQ546MKE.module.min.js";import"./chunk-chunk-F7WFPD4O.module.min.js";import"./chunk-chunk-5UKL5W76.module.min.js";import"./chunk-chunk-SV4XAZ3Q.module.min.js";import"./chunk-chunk-FBGHXL72.module.min.js";import{DEFAULT_LIFECYCLE_THRESHOLDS as K,bandFromAge as B,compileMotionEncoding as O,deriveMotionVector as a,opacityFromAge as P,resolveMotionAccessor as Q,resolveMotionVector as X}from"./chunk-chunk-BFHUYEOS.module.min.js";import"./chunk-chunk-JJ2OOIET.module.min.js";import"./chunk-chunk-WCX6U47H.module.min.js";import"./chunk-chunk-KTWEBFMX.module.min.js";import"./chunk-chunk-ACLDBMRH.module.min.js";import"./chunk-chunk-YHNZCPOZ.module.min.js";export{K as DEFAULT_LIFECYCLE_THRESHOLDS,F as IncrementalExtent,o as RealtimeHeatmap,k as RealtimeHistogram,c as RealtimeLineChart,h as RealtimeSwarmChart,i as RealtimeWaterfallChart,r as ReorderBuffer,H as RingBuffer,e as RunningStats,f as StreamNetworkFrame,l as StreamXYFrame,t as TemporalHistogram,s as WindowAccumulator,p as bandBounds,B as bandFromAge,O as compileMotionEncoding,a as deriveMotionVector,P as opacityFromAge,d as parseWindowDuration,Q as resolveMotionAccessor,X as resolveMotionVector,j as statValue,n as syncPushBuffer,m as useStreamStatus,u as useSyncedPushData};
package/dist/rough.min.js CHANGED
@@ -1 +1 @@
1
- var e,t=Object.create,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,s=(e,t,o,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of i(t))a.call(e,l)||l===o||r(e,l,{get:()=>t[l],enumerable:!(s=n(t,l))||s.enumerable});return e},l={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(l,{createRoughRenderMode:()=>W,stableRoughSeed:()=>P}),module.exports=(e=l,s(r({},"__esModule",{value:!0}),e));var c=((e,n,i)=>(i=null!=e?t(o(e)):{},s(e&&e.__esModule?i:r(i,"default",{value:e,enumerable:!0}),e)))(require("roughjs")),f=/^var\(\s*(--[^,)]+)(?:\s*,\s*([^)]+))?\s*\)$/,u=new WeakMap,p=0,d=!1,y=null,h=null;function g(e,t){if(!t)return t;const r=f.exec(t);if(!r)return t;const n=e.canvas;if(!n)return r[2]?.trim()||t;!function(){if(d)return;if("undefined"==typeof window||"undefined"==typeof document)return;d=!0;const e=()=>{p++};if("undefined"!=typeof MutationObserver&&document.documentElement&&new MutationObserver(e).observe(document.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme","data-semiotic-theme"]}),"function"==typeof window.matchMedia)try{y=window.matchMedia("(prefers-color-scheme: dark)"),h=e,"function"==typeof y.addEventListener?y.addEventListener("change",h):"function"==typeof y.addListener&&y.addListener(h)}catch{}}();let i=u.get(n);i&&i.version===p||(i={version:p,map:new Map},u.set(n,i));const o=i.map.get(t);if(void 0!==o)return o;const a=getComputedStyle(n).getPropertyValue(r[1]).trim()||r[2]?.trim()||t;return i.map.set(t,a),a}var k=require("react/jsx-runtime"),m=1,b=2147483647;function v(e){return"number"==typeof e&&Number.isFinite(e)}function x(e){if(!Array.isArray(e))return null;const t=[];for(const r of e){if(!Array.isArray(r)||!v(r[0])||!v(r[1]))return null;t.push([r[0],r[1]])}return t}function O(e){if(e.style?.icon||e.fillGradient||e.strokeGradient||e.colorThresholds||e.clipRect)return null;if("rect"===e.type&&v(e.x)&&v(e.y)&&v(e.w)&&v(e.h))return{kind:"rectangle",x:e.x,y:e.y,width:e.w,height:e.h};if("point"===e.type&&v(e.x)&&v(e.y)&&v(e.r))return{kind:"circle",x:e.x,y:e.y,diameter:2*e.r};if("circle"===e.type&&v(e.cx)&&v(e.cy)&&v(e.r))return{kind:"circle",x:e.cx,y:e.cy,diameter:2*e.r};if("line"===e.type){const t=x(e.path);if(t&&t.length>=2&&!e._decayOpacities)return{kind:"linearPath",points:t};if(v(e.x1)&&v(e.y1)&&v(e.x2)&&v(e.y2))return{kind:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}}if("area"===e.type){const t=x(e.topPath),r=x(e.bottomPath);if(t&&r&&t.length>1&&r.length>1&&!e._decayOpacities)return{kind:"polygon",points:[...t,...r.slice().reverse()]}}if("geoarea"===e.type&&"string"==typeof e.pathData&&e.pathData)return{kind:"path",d:e.pathData};if(("bezier"===e.type||"ribbon"===e.type||"curved"===e.type)&&"string"==typeof e.pathD&&e.pathD)return{kind:"path",d:e.pathD};if("trapezoid"===e.type){const t=x(e.points);if(t&&t.length>=3)return{kind:"polygon",points:t}}if("connector"===e.type&&v(e.x1)&&v(e.y1)&&v(e.x2)&&v(e.y2))return{kind:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2};if("violin"===e.type&&"string"==typeof e.pathString&&v(e.translateX)&&v(e.translateY))return{kind:"path",d:e.pathString,transform:{x:e.translateX,y:e.translateY}};if("symbol"===e.type&&"string"==typeof e.path){const t=v(e.x)?e.x:e.cx,r=v(e.y)?e.y:e.cy;if(v(t)&&v(r))return{kind:"path",d:e.path,transform:{x:t,y:r,rotation:v(e.rotation)?e.rotation:void 0}}}return"arc"===e.type&&v(e.cx)&&v(e.cy)&&v(e.outerR)&&v(e.startAngle)&&v(e.endAngle)?{kind:"arc",x:e.cx,y:e.cy,width:2*e.outerR,height:2*e.outerR,start:e.startAngle,stop:e.endAngle,closed:!0}:null}function D(e,t=new WeakSet){if(null==e||"string"==typeof e||"boolean"==typeof e)return e;if("number"==typeof e)return Number.isFinite(e)?e:e+"";if("object"!=typeof e)return e+"";if(t.has(e))return"[Circular]";if(t.add(e),Array.isArray(e))return e.map(e=>D(e,t));const r=e;return Object.fromEntries(Object.keys(r).sort().map(e=>[e,D(r[e],t)]))}function w(e){return JSON.stringify(D(e))??e+""}function P(e){const t="string"==typeof e?e:w(e);let r=2166136261;for(let e=0;t.length>e;e+=1)r^=t.charCodeAt(e),r=Math.imul(r,16777619);return(r>>>0)%b+1}function S(e){const t=e.datum&&"object"==typeof e.datum?e.datum:void 0;return e._transitionKey??e.pointId??e.id??e.category??e.group??t?.id??t?.key??t?.name??null}function j(e){return{fill:"string"==typeof e.fill?e.fill:e.fill?"[CanvasPattern]":void 0,fillOpacity:e.fillOpacity,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,strokeLinecap:e.strokeLinecap}}function M(e){if(!e)return;const t=e.split(/[\s,]+/).map(Number).filter(Number.isFinite);return t.length?t:void 0}function L(e,t,r){switch(t.kind){case"rectangle":return e.rectangle(t.x,t.y,t.width,t.height,r);case"circle":return e.circle(t.x,t.y,t.diameter,r);case"line":return e.line(t.x1,t.y1,t.x2,t.y2,r);case"linearPath":return e.linearPath(t.points,r);case"polygon":return e.polygon(t.points,r);case"path":return e.path(t.d,r);case"arc":return e.arc(t.x,t.y,t.width,t.height,t.start,t.stop,t.closed,r)}}function A(e,t,r){e.beginPath();for(const n of t.ops){const t="number"!=typeof r||0>r?n.data:n.data.map(e=>+e.toFixed(r));"move"===n.op?e.moveTo(t[0],t[1]):"lineTo"===n.op?e.lineTo(t[0],t[1]):"bcurveTo"===n.op&&e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5])}}function W(e={}){const t=function(e){return v(e)&&Math.trunc(Math.abs(e))%b||m}(e.seed),r=v(e.cacheSize)?Math.max(1,Math.trunc(e.cacheSize)):1e3,n=Object.fromEntries(Object.entries({roughness:e.roughness,bowing:e.bowing,maxRandomnessOffset:e.maxRandomnessOffset,curveFitting:e.curveFitting,curveTightness:e.curveTightness,curveStepCount:e.curveStepCount,fillStyle:e.fillStyle,fillWeight:e.fillWeight,hachureAngle:e.hachureAngle,hachureGap:e.hachureGap,dashOffset:e.dashOffset,dashGap:e.dashGap,zigzagOffset:e.zigzagOffset,disableMultiStroke:e.disableMultiStroke,disableMultiStrokeFill:e.disableMultiStrokeFill,preserveVertices:e.preserveVertices,simplification:e.simplification,fixedDecimalPlaceDigits:e.fixedDecimalPlaceDigits}).filter(([,e])=>void 0!==e)),i=w({...n,seed:t}),o=c.default.generator(),a=new Map;function s(e,r){const n=O(e);return w({backend:"roughjs",identity:S(e),type:e.type,geometry:n,style:j(r),options:i,seed:t})}function l(e,i,l){const c=O(e);if(!c)return null;const f=function(e,t){if(t.fill&&"string"!=typeof t.fill)return null;if("string"==typeof t.fill&&t.fill.startsWith("url("))return null;const r="string"==typeof t.fill&&"none"!==t.fill?t.fill:void 0,n=t.stroke&&"none"!==t.stroke?t.stroke:void 0;switch(e.type){case"line":case"connector":case"curved":return{stroke:n??"#007bff"};case"bezier":case"ribbon":return{fill:r??"#999999",stroke:n??"none"};case"geoarea":return{fill:r??"#e0e0e0",stroke:n??"none"};case"point":case"circle":case"rect":case"area":case"trapezoid":case"violin":case"arc":return{fill:r??"#4e79a7",stroke:n??"none"};case"symbol":return{fill:r,stroke:n??(r?"none":"#4e79a7")};default:return{fill:r,stroke:n??"#007bff"}}}(e,i);if(!f)return null;const u=l?{fill:f.fill?g(l,f.fill)||f.fill:void 0,stroke:g(l,f.stroke)||f.stroke}:f,p=`${s(e,i)}:${w(u)}`,d=a.get(p);if(d)return a.delete(p),a.set(p,d),d;const y=P(`${t}:${S(e)??w(c)}`),h={...n,seed:y,fill:u.fill,stroke:u.stroke,strokeWidth:i.strokeWidth??1,strokeLineDash:M(i.strokeDasharray)},k={drawable:L(o,c,h),geometry:c,style:i};for(a.set(p,k);a.size>r;){const e=a.keys().next().value;if(void 0===e)break;a.delete(e)}return k}const f={id:"roughjs",seed:t,cacheKey:s,drawCanvas({context:e,node:t,style:r}){const n=l(t,r,e);return!!n&&(function(e,t){const{drawable:r,geometry:n,style:i}=t,o=r.options,a=e.globalAlpha,s="path"===n.kind?n.transform:void 0;s&&(e.translate(s.x,s.y),s.rotation&&e.rotate(s.rotation));for(const t of r.sets){if(e.save(),"path"===t.type)e.strokeStyle="none"===o.stroke?"transparent":o.stroke,e.lineWidth=o.strokeWidth,e.globalAlpha=a*(i.opacity??1),o.strokeLineDash&&e.setLineDash(o.strokeLineDash),o.strokeLineDashOffset&&(e.lineDashOffset=o.strokeLineDashOffset),A(e,t,o.fixedDecimalPlaceDigits),e.stroke();else if("fillPath"===t.type)e.fillStyle=o.fill??"transparent",e.globalAlpha=a*(i.opacity??1)*(i.fillOpacity??1),A(e,t,o.fixedDecimalPlaceDigits),e.fill("curve"===r.shape||"polygon"===r.shape||"path"===r.shape?"evenodd":"nonzero");else{const r=0>o.fillWeight?o.strokeWidth/2:o.fillWeight;e.strokeStyle=o.fill??"transparent",e.lineWidth=r,e.globalAlpha=a*(i.opacity??1)*(i.fillOpacity??1),o.fillLineDash&&e.setLineDash(o.fillLineDash),o.fillLineDashOffset&&(e.lineDashOffset=o.fillLineDashOffset),A(e,t,o.fixedDecimalPlaceDigits),e.stroke()}e.restore()}}(e,n),!0)},renderStaticSVG({node:e,style:t,key:r}){const n=l(e,t);if(!n)return null;const i="path"===n.geometry.kind?n.geometry.transform:void 0,a=o.toPaths(n.drawable).map((e,n)=>(0,k.jsx)("path",{d:e.d,fill:e.fill??"none",fillOpacity:e.fill&&"none"!==e.fill?t.fillOpacity:void 0,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:t.opacity,strokeLinecap:t.strokeLinecap,strokeDasharray:t.strokeDasharray},`${r}-path-${n}`));return(0,k.jsx)("g",{"data-semiotic-render-backend":"roughjs",transform:i?`translate(${i.x} ${i.y})${i.rotation?` rotate(${180*i.rotation/Math.PI})`:""}`:void 0,children:a},r)},clearCache(){a.clear()},get cacheEntries(){return a.size}};return f}
1
+ var e,t=Object.create,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t,a,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of i(t))o.call(e,l)||l===a||r(e,l,{get:()=>t[l],enumerable:!(s=n(t,l))||s.enumerable});return e},l={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(l,{createRoughRenderMode:()=>L,stableRoughSeed:()=>w}),module.exports=(e=l,s(r({},"__esModule",{value:!0}),e));var c=((e,n,i)=>(i=null!=e?t(a(e)):{},s(e&&e.__esModule?i:r(i,"default",{value:e,enumerable:!0}),e)))(require("roughjs")),f=new WeakMap,u=0,d=!1,p=null,y=null;function h(e,t){if(!t)return t;const r=function(e){const t=e.trim();if(!t.startsWith("var(")||!t.endsWith(")"))return null;const r=t.slice(4,-1),n=r.indexOf(",");if(-1===n){const e=r.trim();return e.startsWith("--")?{name:e}:null}const i=r.slice(0,n).trim(),a=r.slice(n+1).trim();return i.startsWith("--")?{name:i,fallback:a||void 0}:null}(t);if(!r)return t;const n=()=>r.fallback?h(e,r.fallback):t,i=e.canvas;if(!i)return n();!function(){if(d)return;if("undefined"==typeof window||"undefined"==typeof document)return;d=!0;const e=()=>{u++};if("undefined"!=typeof MutationObserver&&document.documentElement&&new MutationObserver(e).observe(document.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme","data-semiotic-theme"],subtree:!0}),"function"==typeof window.matchMedia)try{p=window.matchMedia("(prefers-color-scheme: dark)"),y=e,"function"==typeof p.addEventListener?p.addEventListener("change",y):"function"==typeof p.addListener&&p.addListener(y)}catch{}}();let a=f.get(i);a&&a.version===u||(a={version:u,map:new Map},f.set(i,a));const o=a.map.get(t);if(void 0!==o)return o;const s=getComputedStyle(i).getPropertyValue(r.name).trim()||n()||t;return a.map.set(t,s),s}var g=require("react/jsx-runtime"),m=1,k=2147483647;function b(e){return"number"==typeof e&&Number.isFinite(e)}function v(e){if(!Array.isArray(e))return null;const t=[];for(const r of e){if(!Array.isArray(r)||!b(r[0])||!b(r[1]))return null;t.push([r[0],r[1]])}return t}function x(e){if(e.style?.icon||e.fillGradient||e.strokeGradient||e.colorThresholds||e.clipRect)return null;if("rect"===e.type&&b(e.x)&&b(e.y)&&b(e.w)&&b(e.h))return{kind:"rectangle",x:e.x,y:e.y,width:e.w,height:e.h};if("point"===e.type&&b(e.x)&&b(e.y)&&b(e.r))return{kind:"circle",x:e.x,y:e.y,diameter:2*e.r};if("circle"===e.type&&b(e.cx)&&b(e.cy)&&b(e.r))return{kind:"circle",x:e.cx,y:e.cy,diameter:2*e.r};if("line"===e.type){const t=v(e.path);if(t&&t.length>=2&&!e._decayOpacities)return{kind:"linearPath",points:t};if(b(e.x1)&&b(e.y1)&&b(e.x2)&&b(e.y2))return{kind:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}}if("area"===e.type){const t=v(e.topPath),r=v(e.bottomPath);if(t&&r&&t.length>1&&r.length>1&&!e._decayOpacities)return{kind:"polygon",points:[...t,...r.slice().reverse()]}}if("geoarea"===e.type&&"string"==typeof e.pathData&&e.pathData)return{kind:"path",d:e.pathData};if(("bezier"===e.type||"ribbon"===e.type||"curved"===e.type)&&"string"==typeof e.pathD&&e.pathD)return{kind:"path",d:e.pathD};if("trapezoid"===e.type){const t=v(e.points);if(t&&t.length>=3)return{kind:"polygon",points:t}}if("connector"===e.type&&b(e.x1)&&b(e.y1)&&b(e.x2)&&b(e.y2))return{kind:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2};if("violin"===e.type&&"string"==typeof e.pathString&&b(e.translateX)&&b(e.translateY))return{kind:"path",d:e.pathString,transform:{x:e.translateX,y:e.translateY}};if("symbol"===e.type&&"string"==typeof e.path){const t=b(e.x)?e.x:e.cx,r=b(e.y)?e.y:e.cy;if(b(t)&&b(r))return{kind:"path",d:e.path,transform:{x:t,y:r,rotation:b(e.rotation)?e.rotation:void 0}}}return"arc"===e.type&&b(e.cx)&&b(e.cy)&&b(e.outerR)&&b(e.startAngle)&&b(e.endAngle)?{kind:"arc",x:e.cx,y:e.cy,width:2*e.outerR,height:2*e.outerR,start:e.startAngle,stop:e.endAngle,closed:!0}:null}function O(e,t=new WeakSet){if(null==e||"string"==typeof e||"boolean"==typeof e)return e;if("number"==typeof e)return Number.isFinite(e)?e:e+"";if("object"!=typeof e)return e+"";if(t.has(e))return"[Circular]";if(t.add(e),Array.isArray(e))return e.map(e=>O(e,t));const r=e;return Object.fromEntries(Object.keys(r).sort().map(e=>[e,O(r[e],t)]))}function D(e){return JSON.stringify(O(e))??e+""}function w(e){const t="string"==typeof e?e:D(e);let r=2166136261;for(let e=0;t.length>e;e+=1)r^=t.charCodeAt(e),r=Math.imul(r,16777619);return(r>>>0)%k+1}function P(e){const t=e.datum&&"object"==typeof e.datum?e.datum:void 0;return e._transitionKey??e.pointId??e.id??e.category??e.group??t?.id??t?.key??t?.name??null}function S(e){return{fill:"string"==typeof e.fill?e.fill:e.fill?"[CanvasPattern]":void 0,fillOpacity:e.fillOpacity,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,strokeLinecap:e.strokeLinecap}}function W(e){if(!e)return;const t=e.split(/[\s,]+/).map(Number).filter(Number.isFinite);return t.length?t:void 0}function j(e,t,r){switch(t.kind){case"rectangle":return e.rectangle(t.x,t.y,t.width,t.height,r);case"circle":return e.circle(t.x,t.y,t.diameter,r);case"line":return e.line(t.x1,t.y1,t.x2,t.y2,r);case"linearPath":return e.linearPath(t.points,r);case"polygon":return e.polygon(t.points,r);case"path":return e.path(t.d,r);case"arc":return e.arc(t.x,t.y,t.width,t.height,t.start,t.stop,t.closed,r)}}function M(e,t,r){e.beginPath();for(const n of t.ops){const t="number"!=typeof r||0>r?n.data:n.data.map(e=>+e.toFixed(r));"move"===n.op?e.moveTo(t[0],t[1]):"lineTo"===n.op?e.lineTo(t[0],t[1]):"bcurveTo"===n.op&&e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5])}}function L(e={}){const t=function(e){return b(e)&&Math.trunc(Math.abs(e))%k||m}(e.seed),r=b(e.cacheSize)?Math.max(1,Math.trunc(e.cacheSize)):1e3,n=Object.fromEntries(Object.entries({roughness:e.roughness,bowing:e.bowing,maxRandomnessOffset:e.maxRandomnessOffset,curveFitting:e.curveFitting,curveTightness:e.curveTightness,curveStepCount:e.curveStepCount,fillStyle:e.fillStyle,fillWeight:e.fillWeight,hachureAngle:e.hachureAngle,hachureGap:e.hachureGap,dashOffset:e.dashOffset,dashGap:e.dashGap,zigzagOffset:e.zigzagOffset,disableMultiStroke:e.disableMultiStroke,disableMultiStrokeFill:e.disableMultiStrokeFill,preserveVertices:e.preserveVertices,simplification:e.simplification,fixedDecimalPlaceDigits:e.fixedDecimalPlaceDigits}).filter(([,e])=>void 0!==e)),i=D({...n,seed:t}),a=c.default.generator(),o=new Map;function s(e,r){const n=x(e);return D({backend:"roughjs",identity:P(e),type:e.type,geometry:n,style:S(r),options:i,seed:t})}function l(e,i,l){const c=x(e);if(!c)return null;const f=function(e,t){if(t.fill&&"string"!=typeof t.fill)return null;if("string"==typeof t.fill&&t.fill.startsWith("url("))return null;const r="string"==typeof t.fill&&"none"!==t.fill?t.fill:void 0,n=t.stroke&&"none"!==t.stroke?t.stroke:void 0;switch(e.type){case"line":case"connector":case"curved":return{stroke:n??"#007bff"};case"bezier":case"ribbon":return{fill:r??"#999999",stroke:n??"none"};case"geoarea":return{fill:r??"#e0e0e0",stroke:n??"none"};case"point":case"circle":case"rect":case"area":case"trapezoid":case"violin":case"arc":return{fill:r??"#4e79a7",stroke:n??"none"};case"symbol":return{fill:r,stroke:n??(r?"none":"#4e79a7")};default:return{fill:r,stroke:n??"#007bff"}}}(e,i);if(!f)return null;const u=l?{fill:f.fill?h(l,f.fill)||f.fill:void 0,stroke:h(l,f.stroke)||f.stroke}:f,d=`${s(e,i)}:${D(u)}`,p=o.get(d);if(p)return o.delete(d),o.set(d,p),p;const y=w(`${t}:${P(e)??D(c)}`),g={...n,seed:y,fill:u.fill,stroke:u.stroke,strokeWidth:i.strokeWidth??1,strokeLineDash:W(i.strokeDasharray)},m={drawable:j(a,c,g),geometry:c,style:i};for(o.set(d,m);o.size>r;){const e=o.keys().next().value;if(void 0===e)break;o.delete(e)}return m}const f={id:"roughjs",seed:t,cacheKey:s,drawCanvas({context:e,node:t,style:r}){const n=l(t,r,e);return!!n&&(function(e,t){const{drawable:r,geometry:n,style:i}=t,a=r.options,o=e.globalAlpha,s="path"===n.kind?n.transform:void 0;s&&(e.translate(s.x,s.y),s.rotation&&e.rotate(s.rotation));for(const t of r.sets){if(e.save(),"path"===t.type)e.strokeStyle="none"===a.stroke?"transparent":a.stroke,e.lineWidth=a.strokeWidth,e.globalAlpha=o*(i.opacity??1),a.strokeLineDash&&e.setLineDash(a.strokeLineDash),a.strokeLineDashOffset&&(e.lineDashOffset=a.strokeLineDashOffset),M(e,t,a.fixedDecimalPlaceDigits),e.stroke();else if("fillPath"===t.type)e.fillStyle=a.fill??"transparent",e.globalAlpha=o*(i.opacity??1)*(i.fillOpacity??1),M(e,t,a.fixedDecimalPlaceDigits),e.fill("curve"===r.shape||"polygon"===r.shape||"path"===r.shape?"evenodd":"nonzero");else{const r=0>a.fillWeight?a.strokeWidth/2:a.fillWeight;e.strokeStyle=a.fill??"transparent",e.lineWidth=r,e.globalAlpha=o*(i.opacity??1)*(i.fillOpacity??1),a.fillLineDash&&e.setLineDash(a.fillLineDash),a.fillLineDashOffset&&(e.lineDashOffset=a.fillLineDashOffset),M(e,t,a.fixedDecimalPlaceDigits),e.stroke()}e.restore()}}(e,n),!0)},renderStaticSVG({node:e,style:t,key:r}){const n=l(e,t);if(!n)return null;const i="path"===n.geometry.kind?n.geometry.transform:void 0,o=a.toPaths(n.drawable).map((e,n)=>(0,g.jsx)("path",{d:e.d,fill:e.fill??"none",fillOpacity:e.fill&&"none"!==e.fill?t.fillOpacity:void 0,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:t.opacity,strokeLinecap:t.strokeLinecap,strokeDasharray:t.strokeDasharray},`${r}-path-${n}`));return(0,g.jsx)("g",{"data-semiotic-render-backend":"roughjs",transform:i?`translate(${i.x} ${i.y})${i.rotation?` rotate(${180*i.rotation/Math.PI})`:""}`:void 0,children:o},r)},clearCache(){o.clear()},get cacheEntries(){return o.size}};return f}
@@ -1 +1 @@
1
- import{resolveCSSColor as e}from"./chunk-chunk-QRIBHZYW.module.min.js";import t from"roughjs";import{jsx as r}from"react/jsx-runtime";var i=2147483647;function n(e){return"number"==typeof e&&Number.isFinite(e)}function a(e){if(!Array.isArray(e))return null;const t=[];for(const r of e){if(!Array.isArray(r)||!n(r[0])||!n(r[1]))return null;t.push([r[0],r[1]])}return t}function o(e){if(e.style?.icon||e.fillGradient||e.strokeGradient||e.colorThresholds||e.clipRect)return null;if("rect"===e.type&&n(e.x)&&n(e.y)&&n(e.w)&&n(e.h))return{kind:"rectangle",x:e.x,y:e.y,width:e.w,height:e.h};if("point"===e.type&&n(e.x)&&n(e.y)&&n(e.r))return{kind:"circle",x:e.x,y:e.y,diameter:2*e.r};if("circle"===e.type&&n(e.cx)&&n(e.cy)&&n(e.r))return{kind:"circle",x:e.cx,y:e.cy,diameter:2*e.r};if("line"===e.type){const t=a(e.path);if(t&&t.length>=2&&!e._decayOpacities)return{kind:"linearPath",points:t};if(n(e.x1)&&n(e.y1)&&n(e.x2)&&n(e.y2))return{kind:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}}if("area"===e.type){const t=a(e.topPath),r=a(e.bottomPath);if(t&&r&&t.length>1&&r.length>1&&!e._decayOpacities)return{kind:"polygon",points:[...t,...r.slice().reverse()]}}if("geoarea"===e.type&&"string"==typeof e.pathData&&e.pathData)return{kind:"path",d:e.pathData};if(("bezier"===e.type||"ribbon"===e.type||"curved"===e.type)&&"string"==typeof e.pathD&&e.pathD)return{kind:"path",d:e.pathD};if("trapezoid"===e.type){const t=a(e.points);if(t&&t.length>=3)return{kind:"polygon",points:t}}if("connector"===e.type&&n(e.x1)&&n(e.y1)&&n(e.x2)&&n(e.y2))return{kind:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2};if("violin"===e.type&&"string"==typeof e.pathString&&n(e.translateX)&&n(e.translateY))return{kind:"path",d:e.pathString,transform:{x:e.translateX,y:e.translateY}};if("symbol"===e.type&&"string"==typeof e.path){const t=n(e.x)?e.x:e.cx,r=n(e.y)?e.y:e.cy;if(n(t)&&n(r))return{kind:"path",d:e.path,transform:{x:t,y:r,rotation:n(e.rotation)?e.rotation:void 0}}}return"arc"===e.type&&n(e.cx)&&n(e.cy)&&n(e.outerR)&&n(e.startAngle)&&n(e.endAngle)?{kind:"arc",x:e.cx,y:e.cy,width:2*e.outerR,height:2*e.outerR,start:e.startAngle,stop:e.endAngle,closed:!0}:null}function s(e,t=new WeakSet){if(null==e||"string"==typeof e||"boolean"==typeof e)return e;if("number"==typeof e)return Number.isFinite(e)?e:e+"";if("object"!=typeof e)return e+"";if(t.has(e))return"[Circular]";if(t.add(e),Array.isArray(e))return e.map(e=>s(e,t));const r=e;return Object.fromEntries(Object.keys(r).sort().map(e=>[e,s(r[e],t)]))}function l(e){return JSON.stringify(s(e))??e+""}function c(e){const t="string"==typeof e?e:l(e);let r=2166136261;for(let e=0;t.length>e;e+=1)r^=t.charCodeAt(e),r=Math.imul(r,16777619);return(r>>>0)%i+1}function f(e){const t=e.datum&&"object"==typeof e.datum?e.datum:void 0;return e._transitionKey??e.pointId??e.id??e.category??e.group??t?.id??t?.key??t?.name??null}function u(e){return{fill:"string"==typeof e.fill?e.fill:e.fill?"[CanvasPattern]":void 0,fillOpacity:e.fillOpacity,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,strokeLinecap:e.strokeLinecap}}function p(e){if(!e)return;const t=e.split(/[\s,]+/).map(Number).filter(Number.isFinite);return t.length?t:void 0}function h(e,t,r){switch(t.kind){case"rectangle":return e.rectangle(t.x,t.y,t.width,t.height,r);case"circle":return e.circle(t.x,t.y,t.diameter,r);case"line":return e.line(t.x1,t.y1,t.x2,t.y2,r);case"linearPath":return e.linearPath(t.points,r);case"polygon":return e.polygon(t.points,r);case"path":return e.path(t.d,r);case"arc":return e.arc(t.x,t.y,t.width,t.height,t.start,t.stop,t.closed,r)}}function y(e,t,r){e.beginPath();for(const i of t.ops){const t="number"!=typeof r||0>r?i.data:i.data.map(e=>+e.toFixed(r));"move"===i.op?e.moveTo(t[0],t[1]):"lineTo"===i.op?e.lineTo(t[0],t[1]):"bcurveTo"===i.op&&e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5])}}function d(a={}){const s=function(e){return n(e)&&Math.trunc(Math.abs(e))%i||1}(a.seed),d=n(a.cacheSize)?Math.max(1,Math.trunc(a.cacheSize)):1e3,g=Object.fromEntries(Object.entries({roughness:a.roughness,bowing:a.bowing,maxRandomnessOffset:a.maxRandomnessOffset,curveFitting:a.curveFitting,curveTightness:a.curveTightness,curveStepCount:a.curveStepCount,fillStyle:a.fillStyle,fillWeight:a.fillWeight,hachureAngle:a.hachureAngle,hachureGap:a.hachureGap,dashOffset:a.dashOffset,dashGap:a.dashGap,zigzagOffset:a.zigzagOffset,disableMultiStroke:a.disableMultiStroke,disableMultiStrokeFill:a.disableMultiStrokeFill,preserveVertices:a.preserveVertices,simplification:a.simplification,fixedDecimalPlaceDigits:a.fixedDecimalPlaceDigits}).filter(([,e])=>void 0!==e)),k=l({...g,seed:s}),m=t.generator(),x=new Map;function b(e,t){const r=o(e);return l({backend:"roughjs",identity:f(e),type:e.type,geometry:r,style:u(t),options:k,seed:s})}function v(t,r,i){const n=o(t);if(!n)return null;const a=function(e,t){if(t.fill&&"string"!=typeof t.fill)return null;if("string"==typeof t.fill&&t.fill.startsWith("url("))return null;const r="string"==typeof t.fill&&"none"!==t.fill?t.fill:void 0,i=t.stroke&&"none"!==t.stroke?t.stroke:void 0;switch(e.type){case"line":case"connector":case"curved":return{stroke:i??"#007bff"};case"bezier":case"ribbon":return{fill:r??"#999999",stroke:i??"none"};case"geoarea":return{fill:r??"#e0e0e0",stroke:i??"none"};case"point":case"circle":case"rect":case"area":case"trapezoid":case"violin":case"arc":return{fill:r??"#4e79a7",stroke:i??"none"};case"symbol":return{fill:r,stroke:i??(r?"none":"#4e79a7")};default:return{fill:r,stroke:i??"#007bff"}}}(t,r);if(!a)return null;const u=i?{fill:a.fill?e(i,a.fill)||a.fill:void 0,stroke:e(i,a.stroke)||a.stroke}:a,y=`${b(t,r)}:${l(u)}`,k=x.get(y);if(k)return x.delete(y),x.set(y,k),k;const v=c(`${s}:${f(t)??l(n)}`),D={...g,seed:v,fill:u.fill,stroke:u.stroke,strokeWidth:r.strokeWidth??1,strokeLineDash:p(r.strokeDasharray)},O={drawable:h(m,n,D),geometry:n,style:r};for(x.set(y,O);x.size>d;){const e=x.keys().next().value;if(void 0===e)break;x.delete(e)}return O}const D={id:"roughjs",seed:s,cacheKey:b,drawCanvas({context:e,node:t,style:r}){const i=v(t,r,e);return!!i&&(function(e,t){const{drawable:r,geometry:i,style:n}=t,a=r.options,o=e.globalAlpha,s="path"===i.kind?i.transform:void 0;s&&(e.translate(s.x,s.y),s.rotation&&e.rotate(s.rotation));for(const t of r.sets){if(e.save(),"path"===t.type)e.strokeStyle="none"===a.stroke?"transparent":a.stroke,e.lineWidth=a.strokeWidth,e.globalAlpha=o*(n.opacity??1),a.strokeLineDash&&e.setLineDash(a.strokeLineDash),a.strokeLineDashOffset&&(e.lineDashOffset=a.strokeLineDashOffset),y(e,t,a.fixedDecimalPlaceDigits),e.stroke();else if("fillPath"===t.type)e.fillStyle=a.fill??"transparent",e.globalAlpha=o*(n.opacity??1)*(n.fillOpacity??1),y(e,t,a.fixedDecimalPlaceDigits),e.fill("curve"===r.shape||"polygon"===r.shape||"path"===r.shape?"evenodd":"nonzero");else{const r=0>a.fillWeight?a.strokeWidth/2:a.fillWeight;e.strokeStyle=a.fill??"transparent",e.lineWidth=r,e.globalAlpha=o*(n.opacity??1)*(n.fillOpacity??1),a.fillLineDash&&e.setLineDash(a.fillLineDash),a.fillLineDashOffset&&(e.lineDashOffset=a.fillLineDashOffset),y(e,t,a.fixedDecimalPlaceDigits),e.stroke()}e.restore()}}(e,i),!0)},renderStaticSVG({node:e,style:t,key:i}){const n=v(e,t);if(!n)return null;const a="path"===n.geometry.kind?n.geometry.transform:void 0,o=m.toPaths(n.drawable).map((e,n)=>r("path",{d:e.d,fill:e.fill??"none",fillOpacity:e.fill&&"none"!==e.fill?t.fillOpacity:void 0,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:t.opacity,strokeLinecap:t.strokeLinecap,strokeDasharray:t.strokeDasharray},`${i}-path-${n}`));return r("g",{"data-semiotic-render-backend":"roughjs",transform:a?`translate(${a.x} ${a.y})${a.rotation?` rotate(${180*a.rotation/Math.PI})`:""}`:void 0,children:o},i)},clearCache(){x.clear()},get cacheEntries(){return x.size}};return D}export{d as createRoughRenderMode,c as stableRoughSeed};
1
+ import{resolveCSSColor as e}from"./chunk-chunk-IY7RYD4S.module.min.js";import t from"roughjs";import{jsx as r}from"react/jsx-runtime";var i=2147483647;function n(e){return"number"==typeof e&&Number.isFinite(e)}function a(e){if(!Array.isArray(e))return null;const t=[];for(const r of e){if(!Array.isArray(r)||!n(r[0])||!n(r[1]))return null;t.push([r[0],r[1]])}return t}function o(e){if(e.style?.icon||e.fillGradient||e.strokeGradient||e.colorThresholds||e.clipRect)return null;if("rect"===e.type&&n(e.x)&&n(e.y)&&n(e.w)&&n(e.h))return{kind:"rectangle",x:e.x,y:e.y,width:e.w,height:e.h};if("point"===e.type&&n(e.x)&&n(e.y)&&n(e.r))return{kind:"circle",x:e.x,y:e.y,diameter:2*e.r};if("circle"===e.type&&n(e.cx)&&n(e.cy)&&n(e.r))return{kind:"circle",x:e.cx,y:e.cy,diameter:2*e.r};if("line"===e.type){const t=a(e.path);if(t&&t.length>=2&&!e._decayOpacities)return{kind:"linearPath",points:t};if(n(e.x1)&&n(e.y1)&&n(e.x2)&&n(e.y2))return{kind:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}}if("area"===e.type){const t=a(e.topPath),r=a(e.bottomPath);if(t&&r&&t.length>1&&r.length>1&&!e._decayOpacities)return{kind:"polygon",points:[...t,...r.slice().reverse()]}}if("geoarea"===e.type&&"string"==typeof e.pathData&&e.pathData)return{kind:"path",d:e.pathData};if(("bezier"===e.type||"ribbon"===e.type||"curved"===e.type)&&"string"==typeof e.pathD&&e.pathD)return{kind:"path",d:e.pathD};if("trapezoid"===e.type){const t=a(e.points);if(t&&t.length>=3)return{kind:"polygon",points:t}}if("connector"===e.type&&n(e.x1)&&n(e.y1)&&n(e.x2)&&n(e.y2))return{kind:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2};if("violin"===e.type&&"string"==typeof e.pathString&&n(e.translateX)&&n(e.translateY))return{kind:"path",d:e.pathString,transform:{x:e.translateX,y:e.translateY}};if("symbol"===e.type&&"string"==typeof e.path){const t=n(e.x)?e.x:e.cx,r=n(e.y)?e.y:e.cy;if(n(t)&&n(r))return{kind:"path",d:e.path,transform:{x:t,y:r,rotation:n(e.rotation)?e.rotation:void 0}}}return"arc"===e.type&&n(e.cx)&&n(e.cy)&&n(e.outerR)&&n(e.startAngle)&&n(e.endAngle)?{kind:"arc",x:e.cx,y:e.cy,width:2*e.outerR,height:2*e.outerR,start:e.startAngle,stop:e.endAngle,closed:!0}:null}function s(e,t=new WeakSet){if(null==e||"string"==typeof e||"boolean"==typeof e)return e;if("number"==typeof e)return Number.isFinite(e)?e:e+"";if("object"!=typeof e)return e+"";if(t.has(e))return"[Circular]";if(t.add(e),Array.isArray(e))return e.map(e=>s(e,t));const r=e;return Object.fromEntries(Object.keys(r).sort().map(e=>[e,s(r[e],t)]))}function l(e){return JSON.stringify(s(e))??e+""}function c(e){const t="string"==typeof e?e:l(e);let r=2166136261;for(let e=0;t.length>e;e+=1)r^=t.charCodeAt(e),r=Math.imul(r,16777619);return(r>>>0)%i+1}function f(e){const t=e.datum&&"object"==typeof e.datum?e.datum:void 0;return e._transitionKey??e.pointId??e.id??e.category??e.group??t?.id??t?.key??t?.name??null}function u(e){return{fill:"string"==typeof e.fill?e.fill:e.fill?"[CanvasPattern]":void 0,fillOpacity:e.fillOpacity,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,strokeLinecap:e.strokeLinecap}}function p(e){if(!e)return;const t=e.split(/[\s,]+/).map(Number).filter(Number.isFinite);return t.length?t:void 0}function h(e,t,r){switch(t.kind){case"rectangle":return e.rectangle(t.x,t.y,t.width,t.height,r);case"circle":return e.circle(t.x,t.y,t.diameter,r);case"line":return e.line(t.x1,t.y1,t.x2,t.y2,r);case"linearPath":return e.linearPath(t.points,r);case"polygon":return e.polygon(t.points,r);case"path":return e.path(t.d,r);case"arc":return e.arc(t.x,t.y,t.width,t.height,t.start,t.stop,t.closed,r)}}function y(e,t,r){e.beginPath();for(const i of t.ops){const t="number"!=typeof r||0>r?i.data:i.data.map(e=>+e.toFixed(r));"move"===i.op?e.moveTo(t[0],t[1]):"lineTo"===i.op?e.lineTo(t[0],t[1]):"bcurveTo"===i.op&&e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5])}}function d(a={}){const s=function(e){return n(e)&&Math.trunc(Math.abs(e))%i||1}(a.seed),d=n(a.cacheSize)?Math.max(1,Math.trunc(a.cacheSize)):1e3,g=Object.fromEntries(Object.entries({roughness:a.roughness,bowing:a.bowing,maxRandomnessOffset:a.maxRandomnessOffset,curveFitting:a.curveFitting,curveTightness:a.curveTightness,curveStepCount:a.curveStepCount,fillStyle:a.fillStyle,fillWeight:a.fillWeight,hachureAngle:a.hachureAngle,hachureGap:a.hachureGap,dashOffset:a.dashOffset,dashGap:a.dashGap,zigzagOffset:a.zigzagOffset,disableMultiStroke:a.disableMultiStroke,disableMultiStrokeFill:a.disableMultiStrokeFill,preserveVertices:a.preserveVertices,simplification:a.simplification,fixedDecimalPlaceDigits:a.fixedDecimalPlaceDigits}).filter(([,e])=>void 0!==e)),k=l({...g,seed:s}),m=t.generator(),x=new Map;function b(e,t){const r=o(e);return l({backend:"roughjs",identity:f(e),type:e.type,geometry:r,style:u(t),options:k,seed:s})}function v(t,r,i){const n=o(t);if(!n)return null;const a=function(e,t){if(t.fill&&"string"!=typeof t.fill)return null;if("string"==typeof t.fill&&t.fill.startsWith("url("))return null;const r="string"==typeof t.fill&&"none"!==t.fill?t.fill:void 0,i=t.stroke&&"none"!==t.stroke?t.stroke:void 0;switch(e.type){case"line":case"connector":case"curved":return{stroke:i??"#007bff"};case"bezier":case"ribbon":return{fill:r??"#999999",stroke:i??"none"};case"geoarea":return{fill:r??"#e0e0e0",stroke:i??"none"};case"point":case"circle":case"rect":case"area":case"trapezoid":case"violin":case"arc":return{fill:r??"#4e79a7",stroke:i??"none"};case"symbol":return{fill:r,stroke:i??(r?"none":"#4e79a7")};default:return{fill:r,stroke:i??"#007bff"}}}(t,r);if(!a)return null;const u=i?{fill:a.fill?e(i,a.fill)||a.fill:void 0,stroke:e(i,a.stroke)||a.stroke}:a,y=`${b(t,r)}:${l(u)}`,k=x.get(y);if(k)return x.delete(y),x.set(y,k),k;const v=c(`${s}:${f(t)??l(n)}`),D={...g,seed:v,fill:u.fill,stroke:u.stroke,strokeWidth:r.strokeWidth??1,strokeLineDash:p(r.strokeDasharray)},O={drawable:h(m,n,D),geometry:n,style:r};for(x.set(y,O);x.size>d;){const e=x.keys().next().value;if(void 0===e)break;x.delete(e)}return O}const D={id:"roughjs",seed:s,cacheKey:b,drawCanvas({context:e,node:t,style:r}){const i=v(t,r,e);return!!i&&(function(e,t){const{drawable:r,geometry:i,style:n}=t,a=r.options,o=e.globalAlpha,s="path"===i.kind?i.transform:void 0;s&&(e.translate(s.x,s.y),s.rotation&&e.rotate(s.rotation));for(const t of r.sets){if(e.save(),"path"===t.type)e.strokeStyle="none"===a.stroke?"transparent":a.stroke,e.lineWidth=a.strokeWidth,e.globalAlpha=o*(n.opacity??1),a.strokeLineDash&&e.setLineDash(a.strokeLineDash),a.strokeLineDashOffset&&(e.lineDashOffset=a.strokeLineDashOffset),y(e,t,a.fixedDecimalPlaceDigits),e.stroke();else if("fillPath"===t.type)e.fillStyle=a.fill??"transparent",e.globalAlpha=o*(n.opacity??1)*(n.fillOpacity??1),y(e,t,a.fixedDecimalPlaceDigits),e.fill("curve"===r.shape||"polygon"===r.shape||"path"===r.shape?"evenodd":"nonzero");else{const r=0>a.fillWeight?a.strokeWidth/2:a.fillWeight;e.strokeStyle=a.fill??"transparent",e.lineWidth=r,e.globalAlpha=o*(n.opacity??1)*(n.fillOpacity??1),a.fillLineDash&&e.setLineDash(a.fillLineDash),a.fillLineDashOffset&&(e.lineDashOffset=a.fillLineDashOffset),y(e,t,a.fixedDecimalPlaceDigits),e.stroke()}e.restore()}}(e,i),!0)},renderStaticSVG({node:e,style:t,key:i}){const n=v(e,t);if(!n)return null;const a="path"===n.geometry.kind?n.geometry.transform:void 0,o=m.toPaths(n.drawable).map((e,n)=>r("path",{d:e.d,fill:e.fill??"none",fillOpacity:e.fill&&"none"!==e.fill?t.fillOpacity:void 0,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:t.opacity,strokeLinecap:t.strokeLinecap,strokeDasharray:t.strokeDasharray},`${i}-path-${n}`));return r("g",{"data-semiotic-render-backend":"roughjs",transform:a?`translate(${a.x} ${a.y})${a.rotation?` rotate(${180*a.rotation/Math.PI})`:""}`:void 0,children:o},i)},clearCache(){x.clear()},get cacheEntries(){return x.size}};return D}export{d as createRoughRenderMode,c as stableRoughSeed};