@toclocoinc/lattice-grid 1.89.0 → 1.89.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 (310) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +1 -1
  3. package/angular/package.json +1 -1
  4. package/docs/API.html +5 -5
  5. package/docs/THEMING.md +27 -0
  6. package/docs/api/adapters.html +1 -1
  7. package/docs/api/ai.html +1 -1
  8. package/docs/api/alarms.html +1 -1
  9. package/docs/api/calendar.html +1 -1
  10. package/docs/api/charts.html +1 -1
  11. package/docs/api/dashboard.html +1 -1
  12. package/docs/api/data-router.html +1 -1
  13. package/docs/api/deckgl.html +1 -1
  14. package/docs/api/designer.html +2 -2
  15. package/docs/api/gantt.html +1 -1
  16. package/docs/api/geometry.html +1 -1
  17. package/docs/api/grid.html +2 -2
  18. package/docs/api/index.html +1 -1
  19. package/docs/api/kanban.html +1 -1
  20. package/docs/api/kpi.html +1 -1
  21. package/docs/api/layout.html +1 -1
  22. package/docs/api/leaflet.html +1 -1
  23. package/docs/api/list.html +1 -1
  24. package/docs/api/mapview.html +1 -1
  25. package/docs/api/mock-socket.html +1 -1
  26. package/docs/api/presets.html +1 -1
  27. package/docs/api/tabs.html +1 -1
  28. package/docs/api/types.html +1 -1
  29. package/docs/api-detail.html +4 -4
  30. package/docs/warnings.json +1 -1
  31. package/lattice-grid.d.ts +1 -1
  32. package/lattice-grid.esm.min.js +3 -3
  33. package/lattice-grid.min.cjs +3 -3
  34. package/lattice-grid.min.css +1 -1
  35. package/lattice-grid.min.js +3 -3
  36. package/modules/ai.d.ts +1 -1
  37. package/modules/ai.esm.min.js +2 -2
  38. package/modules/ai.min.cjs +2 -2
  39. package/modules/ai.min.js +2 -2
  40. package/modules/alarms.d.ts +1 -1
  41. package/modules/alarms.esm.min.js +2 -2
  42. package/modules/alarms.min.cjs +2 -2
  43. package/modules/alarms.min.js +2 -2
  44. package/modules/angular.d.ts +1 -1
  45. package/modules/angular.esm.min.js +2 -2
  46. package/modules/angular.min.cjs +2 -2
  47. package/modules/angular.min.js +2 -2
  48. package/modules/calendar.d.ts +1 -1
  49. package/modules/calendar.esm.min.js +2 -2
  50. package/modules/calendar.min.cjs +2 -2
  51. package/modules/calendar.min.js +2 -2
  52. package/modules/chart-alluvial.d.ts +1 -1
  53. package/modules/chart-alluvial.esm.min.js +1 -1
  54. package/modules/chart-alluvial.min.cjs +1 -1
  55. package/modules/chart-alluvial.min.js +1 -1
  56. package/modules/chart-arc.d.ts +1 -1
  57. package/modules/chart-arc.esm.min.js +1 -1
  58. package/modules/chart-arc.min.cjs +1 -1
  59. package/modules/chart-arc.min.js +1 -1
  60. package/modules/chart-barrace.d.ts +1 -1
  61. package/modules/chart-barrace.esm.min.js +1 -1
  62. package/modules/chart-barrace.min.cjs +1 -1
  63. package/modules/chart-barrace.min.js +1 -1
  64. package/modules/chart-bubblemap.d.ts +1 -1
  65. package/modules/chart-bubblemap.esm.min.js +1 -1
  66. package/modules/chart-bubblemap.min.cjs +1 -1
  67. package/modules/chart-bubblemap.min.js +1 -1
  68. package/modules/chart-bump.d.ts +1 -1
  69. package/modules/chart-bump.esm.min.js +1 -1
  70. package/modules/chart-bump.min.cjs +1 -1
  71. package/modules/chart-bump.min.js +1 -1
  72. package/modules/chart-calendar.d.ts +1 -1
  73. package/modules/chart-calendar.esm.min.js +1 -1
  74. package/modules/chart-calendar.min.cjs +1 -1
  75. package/modules/chart-calendar.min.js +1 -1
  76. package/modules/chart-choropleth.d.ts +1 -1
  77. package/modules/chart-choropleth.esm.min.js +1 -1
  78. package/modules/chart-choropleth.min.cjs +1 -1
  79. package/modules/chart-choropleth.min.js +1 -1
  80. package/modules/chart-decomposition.d.ts +1 -1
  81. package/modules/chart-decomposition.esm.min.js +1 -1
  82. package/modules/chart-decomposition.min.cjs +1 -1
  83. package/modules/chart-decomposition.min.js +1 -1
  84. package/modules/chart-diverging.d.ts +1 -1
  85. package/modules/chart-diverging.esm.min.js +1 -1
  86. package/modules/chart-diverging.min.cjs +1 -1
  87. package/modules/chart-diverging.min.js +1 -1
  88. package/modules/chart-dumbbell.d.ts +1 -1
  89. package/modules/chart-dumbbell.esm.min.js +1 -1
  90. package/modules/chart-dumbbell.min.cjs +1 -1
  91. package/modules/chart-dumbbell.min.js +1 -1
  92. package/modules/chart-fan.d.ts +1 -1
  93. package/modules/chart-fan.esm.min.js +1 -1
  94. package/modules/chart-fan.min.cjs +1 -1
  95. package/modules/chart-fan.min.js +1 -1
  96. package/modules/chart-forcetree.d.ts +1 -1
  97. package/modules/chart-forcetree.esm.min.js +1 -1
  98. package/modules/chart-forcetree.min.cjs +1 -1
  99. package/modules/chart-forcetree.min.js +1 -1
  100. package/modules/chart-hexbin.d.ts +1 -1
  101. package/modules/chart-hexbin.esm.min.js +1 -1
  102. package/modules/chart-hexbin.min.cjs +1 -1
  103. package/modules/chart-hexbin.min.js +1 -1
  104. package/modules/chart-hexmap.d.ts +1 -1
  105. package/modules/chart-hexmap.esm.min.js +1 -1
  106. package/modules/chart-hexmap.min.cjs +1 -1
  107. package/modules/chart-hexmap.min.js +1 -1
  108. package/modules/chart-icicle.d.ts +1 -1
  109. package/modules/chart-icicle.esm.min.js +1 -1
  110. package/modules/chart-icicle.min.cjs +1 -1
  111. package/modules/chart-icicle.min.js +1 -1
  112. package/modules/chart-markermap.d.ts +1 -1
  113. package/modules/chart-markermap.esm.min.js +1 -1
  114. package/modules/chart-markermap.min.cjs +1 -1
  115. package/modules/chart-markermap.min.js +1 -1
  116. package/modules/chart-motion.d.ts +1 -1
  117. package/modules/chart-motion.esm.min.js +1 -1
  118. package/modules/chart-motion.min.cjs +1 -1
  119. package/modules/chart-motion.min.js +1 -1
  120. package/modules/chart-pack.d.ts +1 -1
  121. package/modules/chart-pack.esm.min.js +1 -1
  122. package/modules/chart-pack.min.cjs +1 -1
  123. package/modules/chart-pack.min.js +1 -1
  124. package/modules/chart-parallel.d.ts +1 -1
  125. package/modules/chart-parallel.esm.min.js +1 -1
  126. package/modules/chart-parallel.min.cjs +1 -1
  127. package/modules/chart-parallel.min.js +1 -1
  128. package/modules/chart-pictorial.d.ts +1 -1
  129. package/modules/chart-pictorial.esm.min.js +1 -1
  130. package/modules/chart-pictorial.min.cjs +1 -1
  131. package/modules/chart-pictorial.min.js +1 -1
  132. package/modules/chart-polararea.d.ts +1 -1
  133. package/modules/chart-polararea.esm.min.js +1 -1
  134. package/modules/chart-polararea.min.cjs +1 -1
  135. package/modules/chart-polararea.min.js +1 -1
  136. package/modules/chart-polarscatter.d.ts +1 -1
  137. package/modules/chart-polarscatter.esm.min.js +1 -1
  138. package/modules/chart-polarscatter.min.cjs +1 -1
  139. package/modules/chart-polarscatter.min.js +1 -1
  140. package/modules/chart-pyramid.d.ts +1 -1
  141. package/modules/chart-pyramid.esm.min.js +1 -1
  142. package/modules/chart-pyramid.min.cjs +1 -1
  143. package/modules/chart-pyramid.min.js +1 -1
  144. package/modules/chart-radialbar.d.ts +1 -1
  145. package/modules/chart-radialbar.esm.min.js +1 -1
  146. package/modules/chart-radialbar.min.cjs +1 -1
  147. package/modules/chart-radialbar.min.js +1 -1
  148. package/modules/chart-ridgeline.d.ts +1 -1
  149. package/modules/chart-ridgeline.esm.min.js +1 -1
  150. package/modules/chart-ridgeline.min.cjs +1 -1
  151. package/modules/chart-ridgeline.min.js +1 -1
  152. package/modules/chart-roc.d.ts +1 -1
  153. package/modules/chart-roc.esm.min.js +1 -1
  154. package/modules/chart-roc.min.cjs +1 -1
  155. package/modules/chart-roc.min.js +1 -1
  156. package/modules/chart-serpentine.d.ts +1 -1
  157. package/modules/chart-serpentine.esm.min.js +1 -1
  158. package/modules/chart-serpentine.min.cjs +1 -1
  159. package/modules/chart-serpentine.min.js +1 -1
  160. package/modules/chart-slope.d.ts +1 -1
  161. package/modules/chart-slope.esm.min.js +1 -1
  162. package/modules/chart-slope.min.cjs +1 -1
  163. package/modules/chart-slope.min.js +1 -1
  164. package/modules/chart-spiral.d.ts +1 -1
  165. package/modules/chart-spiral.esm.min.js +1 -1
  166. package/modules/chart-spiral.min.cjs +1 -1
  167. package/modules/chart-spiral.min.js +1 -1
  168. package/modules/chart-splom.d.ts +1 -1
  169. package/modules/chart-splom.esm.min.js +1 -1
  170. package/modules/chart-splom.min.cjs +1 -1
  171. package/modules/chart-splom.min.js +1 -1
  172. package/modules/chart-tree.d.ts +1 -1
  173. package/modules/chart-tree.esm.min.js +1 -1
  174. package/modules/chart-tree.min.cjs +1 -1
  175. package/modules/chart-tree.min.js +1 -1
  176. package/modules/chart-venn.d.ts +1 -1
  177. package/modules/chart-venn.esm.min.js +1 -1
  178. package/modules/chart-venn.min.cjs +1 -1
  179. package/modules/chart-venn.min.js +1 -1
  180. package/modules/chart-voronoi.d.ts +1 -1
  181. package/modules/chart-voronoi.esm.min.js +1 -1
  182. package/modules/chart-voronoi.min.cjs +1 -1
  183. package/modules/chart-voronoi.min.js +1 -1
  184. package/modules/chart-waffle.d.ts +1 -1
  185. package/modules/chart-waffle.esm.min.js +1 -1
  186. package/modules/chart-waffle.min.cjs +1 -1
  187. package/modules/chart-waffle.min.js +1 -1
  188. package/modules/chart-wordcloud.d.ts +1 -1
  189. package/modules/chart-wordcloud.esm.min.js +1 -1
  190. package/modules/chart-wordcloud.min.cjs +1 -1
  191. package/modules/chart-wordcloud.min.js +1 -1
  192. package/modules/charts.d.ts +1 -1
  193. package/modules/charts.esm.min.js +2 -2
  194. package/modules/charts.min.cjs +2 -2
  195. package/modules/charts.min.js +2 -2
  196. package/modules/dashboard.d.ts +1 -1
  197. package/modules/dashboard.esm.min.js +2 -2
  198. package/modules/dashboard.min.cjs +2 -2
  199. package/modules/dashboard.min.js +2 -2
  200. package/modules/data-router.d.ts +1 -1
  201. package/modules/data-router.esm.min.js +2 -2
  202. package/modules/data-router.min.cjs +2 -2
  203. package/modules/data-router.min.js +2 -2
  204. package/modules/deckgl.d.ts +1 -1
  205. package/modules/deckgl.esm.min.js +2 -2
  206. package/modules/deckgl.min.cjs +2 -2
  207. package/modules/deckgl.min.js +2 -2
  208. package/modules/designer.d.ts +1 -1
  209. package/modules/designer.esm.min.js +187 -73
  210. package/modules/designer.esm.min.js.map +2 -2
  211. package/modules/designer.min.cjs +187 -73
  212. package/modules/designer.min.js +187 -73
  213. package/modules/designer.min.js.map +2 -2
  214. package/modules/devtools.d.ts +1 -1
  215. package/modules/devtools.esm.min.js +1 -1
  216. package/modules/devtools.min.cjs +1 -1
  217. package/modules/devtools.min.js +1 -1
  218. package/modules/dhtmlx-compat.d.ts +1 -1
  219. package/modules/dhtmlx-compat.esm.min.js +2 -2
  220. package/modules/dhtmlx-compat.min.cjs +2 -2
  221. package/modules/dhtmlx-compat.min.js +2 -2
  222. package/modules/gantt.d.ts +1 -1
  223. package/modules/gantt.esm.min.js +2 -2
  224. package/modules/gantt.min.cjs +2 -2
  225. package/modules/gantt.min.js +2 -2
  226. package/modules/geo-europe-nuts.d.ts +1 -1
  227. package/modules/geo-europe-nuts.esm.min.js +1 -1
  228. package/modules/geo-europe-nuts.min.cjs +1 -1
  229. package/modules/geo-europe-nuts.min.js +1 -1
  230. package/modules/geo-uk.d.ts +1 -1
  231. package/modules/geo-uk.esm.min.js +1 -1
  232. package/modules/geo-uk.min.cjs +1 -1
  233. package/modules/geo-uk.min.js +1 -1
  234. package/modules/geo-us-states.d.ts +1 -1
  235. package/modules/geo-us-states.esm.min.js +1 -1
  236. package/modules/geo-us-states.min.cjs +1 -1
  237. package/modules/geo-us-states.min.js +1 -1
  238. package/modules/geo-world-110m.d.ts +1 -1
  239. package/modules/geo-world-110m.esm.min.js +1 -1
  240. package/modules/geo-world-110m.min.cjs +1 -1
  241. package/modules/geo-world-110m.min.js +1 -1
  242. package/modules/geo-world-50m.d.ts +1 -1
  243. package/modules/geo-world-50m.esm.min.js +1 -1
  244. package/modules/geo-world-50m.min.cjs +1 -1
  245. package/modules/geo-world-50m.min.js +1 -1
  246. package/modules/geometry.d.ts +1 -1
  247. package/modules/geometry.esm.min.js +2 -2
  248. package/modules/geometry.min.cjs +2 -2
  249. package/modules/geometry.min.js +2 -2
  250. package/modules/htmx.d.ts +1 -1
  251. package/modules/htmx.esm.min.js +3 -3
  252. package/modules/htmx.min.cjs +3 -3
  253. package/modules/htmx.min.js +3 -3
  254. package/modules/kanban.d.ts +1 -1
  255. package/modules/kanban.esm.min.js +2 -2
  256. package/modules/kanban.min.cjs +2 -2
  257. package/modules/kanban.min.js +2 -2
  258. package/modules/kpi.d.ts +1 -1
  259. package/modules/kpi.esm.min.js +2 -2
  260. package/modules/kpi.min.cjs +2 -2
  261. package/modules/kpi.min.js +2 -2
  262. package/modules/layout.d.ts +1 -1
  263. package/modules/layout.esm.min.js +2 -2
  264. package/modules/layout.min.cjs +2 -2
  265. package/modules/layout.min.js +2 -2
  266. package/modules/leaflet.d.ts +1 -1
  267. package/modules/leaflet.esm.min.js +2 -2
  268. package/modules/leaflet.min.cjs +2 -2
  269. package/modules/leaflet.min.js +2 -2
  270. package/modules/list.d.ts +1 -1
  271. package/modules/list.esm.min.js +2 -2
  272. package/modules/list.min.cjs +2 -2
  273. package/modules/list.min.js +2 -2
  274. package/modules/mapview.d.ts +1 -1
  275. package/modules/mapview.esm.min.js +2 -2
  276. package/modules/mapview.min.cjs +2 -2
  277. package/modules/mapview.min.js +2 -2
  278. package/modules/mock-socket.d.ts +1 -1
  279. package/modules/mock-socket.esm.min.js +1 -1
  280. package/modules/mock-socket.min.cjs +1 -1
  281. package/modules/mock-socket.min.js +1 -1
  282. package/modules/presets/antd5.css +9 -0
  283. package/modules/presets/bootstrap5.css +9 -0
  284. package/modules/presets/fluent2.css +9 -0
  285. package/modules/presets/material3.css +9 -0
  286. package/modules/presets.d.ts +1 -1
  287. package/modules/presets.esm.min.js +2 -2
  288. package/modules/presets.min.cjs +2 -2
  289. package/modules/presets.min.js +2 -2
  290. package/modules/react.d.ts +1 -1
  291. package/modules/react.esm.min.js +2 -2
  292. package/modules/react.min.cjs +2 -2
  293. package/modules/react.min.js +2 -2
  294. package/modules/svelte.d.ts +1 -1
  295. package/modules/svelte.esm.min.js +2 -2
  296. package/modules/svelte.min.cjs +2 -2
  297. package/modules/svelte.min.js +2 -2
  298. package/modules/tabs.d.ts +1 -1
  299. package/modules/tabs.esm.min.js +2 -2
  300. package/modules/tabs.min.cjs +2 -2
  301. package/modules/tabs.min.js +2 -2
  302. package/modules/vue.d.ts +1 -1
  303. package/modules/vue.esm.min.js +2 -2
  304. package/modules/vue.min.cjs +2 -2
  305. package/modules/vue.min.js +2 -2
  306. package/modules/webcomponent.d.ts +1 -1
  307. package/modules/webcomponent.esm.min.js +3 -3
  308. package/modules/webcomponent.min.cjs +3 -3
  309. package/modules/webcomponent.min.js +3 -3
  310. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * Lattice Grid 1.89.0, react module
2
+ * Lattice Grid 1.89.1, react module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
6
- (function(De){"use strict";var Ae=Object.create(null),Ge=Object.create(null);function Ee(a,ae){Ae[a]=ae}function Te(a){var ae=Ge[a];if(ae)return ae;var be=Object.create(null);Ge[a]=be;var me=Ae[a];if(!me)throw new Error("[lattice] missing module: "+a);return me(be,Te),be}Ee("packages/core/src/internal/util.js",function(a,ae){"use strict";Object.defineProperty(a,"VERSION",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(a,"reportedWarnings",{enumerable:!0,get:function(){return l}}),Object.defineProperty(a,"warnOnce",{enumerable:!0,get:function(){return U}}),Object.defineProperty(a,"infoOnce",{enumerable:!0,get:function(){return D}}),Object.defineProperty(a,"resetWarnings",{enumerable:!0,get:function(){return S}}),Object.defineProperty(a,"fail",{enumerable:!0,get:function(){return X}}),Object.defineProperty(a,"invariant",{enumerable:!0,get:function(){return _}}),Object.defineProperty(a,"DEV",{enumerable:!0,get:function(){return T}}),Object.defineProperty(a,"isObject",{enumerable:!0,get:function(){return I}}),Object.defineProperty(a,"isFunction",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(a,"isNil",{enumerable:!0,get:function(){return z}}),Object.defineProperty(a,"isBlank",{enumerable:!0,get:function(){return L}}),Object.defineProperty(a,"isCtor",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(a,"pathGetter",{enumerable:!0,get:function(){return J}}),Object.defineProperty(a,"pathSetter",{enumerable:!0,get:function(){return x}}),Object.defineProperty(a,"getPath",{enumerable:!0,get:function(){return de}}),Object.defineProperty(a,"setPath",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(a,"humanise",{enumerable:!0,get:function(){return f}}),Object.defineProperty(a,"escapeHtml",{enumerable:!0,get:function(){return P}}),Object.defineProperty(a,"titleCase",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(a,"expand",{enumerable:!0,get:function(){return o}}),Object.defineProperty(a,"toArray",{enumerable:!0,get:function(){return p}}),Object.defineProperty(a,"merge",{enumerable:!0,get:function(){return r}}),Object.defineProperty(a,"mergeRow",{enumerable:!0,get:function(){return i}}),Object.defineProperty(a,"Lru",{enumerable:!0,get:function(){return g}}),Object.defineProperty(a,"collator",{enumerable:!0,get:function(){return y}}),Object.defineProperty(a,"defaultCompare",{enumerable:!0,get:function(){return O}}),Object.defineProperty(a,"now",{enumerable:!0,get:function(){return k}}),Object.defineProperty(a,"nextFrame",{enumerable:!0,get:function(){return H}}),Object.defineProperty(a,"cancelFrame",{enumerable:!0,get:function(){return N}}),Object.defineProperty(a,"frameBatched",{enumerable:!0,get:function(){return B}}),Object.defineProperty(a,"settleDebounce",{enumerable:!0,get:function(){return E}}),Object.defineProperty(a,"whenIdle",{enumerable:!0,get:function(){return w}}),Object.defineProperty(a,"uid",{enumerable:!0,get:function(){return pe}});const be="1.89.0";async function me(){return be}const Z="1.89.0",re=new Set,se=2e3;function q(t){if(re.add(t),re.size>se){const n=re.values().next().value;n!==void 0&&re.delete(n)}}const oe=[],M=500;function C(t,n,c){oe.push({key:t,level:n,message:c.map(d=>typeof d=="string"?d:m(d)).join(" "),at:Date.now()}),oe.length>M&&oe.shift()}function m(t){if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch{return String(t)}}function l(){return oe.map(t=>({...t}))}function R(t){if(t.length===0||typeof t[0]!="string")return t;const n=t[0].replace(/^\[lattice\]\s*/,"");return n===t[0]?t:[n,...t.slice(1)]}function U(t,...n){if(re.has(t))return;q(t);const c=R(n);C(t,"warn",c),console.warn("[lattice]",...c)}function D(t,...n){if(re.has(t))return;q(t);const c=R(n);C(t,"info",c),console.info("[lattice]",...c)}function S(){re.clear(),oe.length=0}function X(t,n){const c=new Error(`[lattice] ${t}`);throw n!==void 0&&(c.cause=n),c}function _(t,n){t||X(n)}const T=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function I(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function ue(t){return typeof t=="function"}function z(t){return t==null}function L(t){return t==null||t===""}function ie(t){return typeof t!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(t))?!0:!!(t.prototype&&Object.getOwnPropertyNames(t.prototype).length>1)}const V=new Map;function J(t){let n=V.get(t);if(n)return n;if(!t.includes("."))n=c=>c?.[t];else{const c=t.split("."),d=c.length;n=$=>{let v=$;for(let G=0;G<d;G++){if(v==null)return;v=v[c[G]]}return v}}return V.set(t,n),n}const F=new Map;function x(t){let n=F.get(t);if(n)return n;if(!t.includes("."))n=(c,d)=>{c!=null&&(c[t]=d)};else{const c=t.split("."),d=c.length-1;n=($,v)=>{let G=$;for(let ee=0;ee<d;ee++){if(G==null)return;const te=c[ee];G[te]==null&&(G[te]={}),G=G[te]}G!=null&&(G[c[d]]=v)}}return F.set(t,n),n}function de(t,n){return J(n)(t)}function Pe(t,n,c){x(n)(t,c)}function f(t){return t?(t.includes(".")?t.slice(t.lastIndexOf(".")+1):t).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,c=>c.toUpperCase()):""}const b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function P(t){const n=t==null?"":String(t);return/[&<>"']/.test(n)?n.replace(/[&<>"']/g,c=>b[c]):n}function ce(t){return String(t).replace(/\w\S*/g,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}function o(t,n,c){if(t!==void 0)return t===!0?{enabled:!0,...c}:t===!1?{enabled:!1}:I(t)?t:{[n]:t,enabled:!0}}function p(t){return t==null?[]:Array.isArray(t)?t:[t]}const K=Object.freeze(new Set(["__proto__","constructor","prototype"]));function r(t,n){if(!I(t))return I(n)?{...n}:n;if(!I(n))return n===void 0?t:n;const c={...t};for(const d of Object.keys(n)){if(K.has(d))continue;const $=n[d];$!==void 0&&(c[d]=I($)&&I(c[d])?r(c[d],$):$)}return c}function i(t,n){if(!I(t)||!I(n)||t===n)return n;const c=Object.create(Object.getPrototypeOf(t));return Object.assign(c,t,n),c}class g{#n;#e=new Map;#t;constructor(n=256,c=null){this.#n=n,this.#t=c}get size(){return this.#e.size}get max(){return this.#n}set max(n){this.#n=n,this.#r()}has(n){return this.#e.has(n)}get(n){const c=this.#e;if(!c.has(n))return;const d=c.get(n);return c.delete(n),c.set(n,d),d}peek(n){return this.#e.get(n)}set(n,c){const d=this.#e;return d.has(n)&&d.delete(n),d.set(n,c),this.#r(),c}delete(n){const c=this.#e.get(n);return this.#e.delete(n)&&this.#t&&this.#t(c,n),c}clear(){if(this.#t)for(const[n,c]of this.#e)this.#t(c,n);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const n=this.#e;for(;n.size>this.#n;){const c=n.keys().next().value,d=n.get(c);n.delete(c),this.#t&&this.#t(d,c)}}}const h=new Map;function y(t,n){const c=`${t||""}|${n?JSON.stringify(n):""}`;let d=h.get(c);return d||(d=new Intl.Collator(t||void 0,{numeric:!0,sensitivity:"variant",...n}),h.set(c,d)),d}function O(t,n){if(t===n)return 0;if(t==null)return 1;if(n==null)return-1;if(typeof t=="number"&&typeof n=="number")return Number.isNaN(t)?Number.isNaN(n)?0:1:Number.isNaN(n)||t<n?-1:t>n?1:0;const c=String(t),d=String(n);return c<d?-1:c>d?1:0}function k(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const W=typeof requestAnimationFrame=="function";function H(t){return W?requestAnimationFrame(t):setTimeout(()=>t(k()),16)}function N(t){t!=null&&(W?cancelAnimationFrame(t):clearTimeout(t))}function B(t){let n=null,c=null;const d=()=>{n=null;const v=c;c=null,t(...v||[])},$=(...v)=>{c=v,n===null&&(n=H(d))};return $.cancel=()=>{N(n),n=null,c=null},$.flush=()=>{n!==null&&(N(n),d())},$}function E(t,n){let c=null,d=null;const $=()=>{if(c=null,d===null)return;const ee=d;d=null,t(...ee),v()},v=()=>{c=setTimeout($,n),typeof c?.unref=="function"&&c.unref()},G=(...ee)=>{c===null?(t(...ee),v()):(d=ee,clearTimeout(c),v())};return G.flush=()=>{if(c!==null&&clearTimeout(c),c=null,d===null)return;const ee=d;d=null,t(...ee)},G.cancel=()=>{c!==null&&clearTimeout(c),c=null,d=null},G.pending=()=>c!==null||d!==null,G}function w(t,n=50){return typeof requestIdleCallback=="function"?requestIdleCallback(t,{timeout:n}):setTimeout(()=>t({timeRemaining:()=>0,didTimeout:!0}),1)}let Q=0;function pe(t="l"){return`${t}${(++Q).toString(36)}`}}),Ee("packages/modules/shared/adapter.js",function(a,ae){"use strict";Object.defineProperty(a,"EVENT_NAMES",{enumerable:!0,get:function(){return be}}),Object.defineProperty(a,"handlerName",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(a,"dashedName",{enumerable:!0,get:function(){return re}}),Object.defineProperty(a,"CONFIG_KEY_ALIASES",{enumerable:!0,get:function(){return se}}),Object.defineProperty(a,"aliasConfigKey",{enumerable:!0,get:function(){return q}}),Object.defineProperty(a,"isHandlerProp",{enumerable:!0,get:function(){return M}}),Object.defineProperty(a,"partition",{enumerable:!0,get:function(){return C}}),Object.defineProperty(a,"createGridController",{enumerable:!0,get:function(){return m}});const be=Object.freeze(["ready","destroy","render:first","render:done","config:changed","licence:changed","model:changed","rows:changed","rows:queued","rows:deferred","rows:paused","rows:resumed","row:received","row:sent","row:copied","row:moved","source:error","source:total","stream:chunk","stream:end","stream:evicted","rowDrag:started","rowDrag:moved","rowDrag:left","rowDrag:ended","cell:changed","cell:pending","cell:confirmed","cell:reverted","cell:conflict","cell:clicked","cell:dblclicked","cell:contextmenu","cell:mouseover","cell:mouseout","cell:mousedown","cell:mouseup","cell:edit:start","cell:edit:end","row:edit:start","row:edit:end","row:clicked","row:dblclicked","row:pending","row:confirmed","row:reverted","row:conflict","form:opened","form:closed","form:saved","form:error","sort:changed","filter:changed","group:toggled","facet:computed","facet:filtered","facet:expanded","facet:failed","column:moved","column:resized","column:visible","column:pinned","column:grouped","column:pivoted","column:filter:open","column:profile:open","column:menu:open","columns:changed","columns:tagged","columngroup:changed","header:contextmenu","pivot:drill","selection:changed","range:changed","clipboard:copy","page:changed","scroll","scroll:end","size:changed","detail:toggled","detail:cell:edit:start","detail:cell:edit:end","detail:row:edit:start","detail:row:edit:end","detail:cell:changed","toolpanel:focus","highlight:changed","find:changed","tree:loading","tree:loaded","tree:loadFailed","tree:loadAborted","state:changed","state:reset","history:changed","history:applied","views:changed","view:applied","view:saved","view:removed","view:renamed","view:default","formatting:changed","redaction:changed","permissions:changed","presentation:changed","presentation:started","presentation:ended","presentation:view","presentation:scale","presentation:spotlight","presentation:captured","comment:added","comment:edited","comment:deleted","comment:failed","comment:resolved","comment:unresolved","comment:threadOpened","comment:threadClosed","comment:indexLoaded","presence:published","presence:joined","presence:updated","presence:left","presence:failed","presence:lockRefused","diff:changed","diff:swapped","timeline:attached","timeline:detached","timeline:seek","timeline:seeking","annotation:changed","validation:failed","validation:cleared","export:progress","export:request","export:done","shortcuts:opened","shortcuts:closed","print:before","print:after","beforeEdit","beforeSort","beforeFilter","beforeColumnMove","beforeColumnResize","beforeColumnHide","beforeSelect","beforeRowAdd","beforeDelete","beforeRowMove","beforeGroup","beforeRowReceive","edit:cancelled","sort:cancelled","filter:cancelled","columnMove:cancelled","columnResize:cancelled","columnHide:cancelled","selection:cancelled","rowAdd:cancelled","delete:cancelled","rowMove:cancelled","group:cancelled","rowReceive:cancelled"]),me=Object.freeze({sort:(l,R)=>l.sort.set(R||[]),filters:(l,R)=>l.filters.set(R||null),quickFilter:(l,R)=>{if(R&&typeof R=="object"){l.filters.quick(R.text||"",{mode:R.mode});return}l.filters.quick(typeof R=="string"?R:"")},selectedKeys:(l,R)=>l.selection.set(Array.isArray(R)?R:[])});function Z(l){return`on${String(l).split(":").map(U=>U.charAt(0).toUpperCase()+U.slice(1)).join("")}`}function re(l){return String(l).replace(/:/g,"-")}const se=Object.freeze({"row-key":"rowKey","row-height":"rowHeight","header-height":"headerHeight","auto-height":"autoHeight"});function q(l){return Object.hasOwn(se,l)?se[l]:l}const oe=Object.freeze(Object.fromEntries(be.map(l=>[Z(l),l])));function M(l){return Object.hasOwn(oe,l)}function C(l){const R={},U={},D={};for(const[S,X]of Object.entries(l||{})){if(M(S)){D[S]=X;continue}if(Object.hasOwn(me,S)){U[S]=X;continue}R[S]=X}return{config:R,imperative:U,handlers:D}}function m(l){const R=l.createGrid;if(typeof R!="function")throw new TypeError("createGridController needs createGrid; pass it in from the grid package.");const U=C(l.props||{}),D=R(l.element,{...U.config});let S=U.handlers,X=U.config,_={};const T=z=>{if(!z||typeof z.type!="string")return;const L=S[Z(z.type)];typeof L=="function"&&L(z)},I=D.on("*",T);for(const[z,L]of Object.entries(U.imperative))L!==void 0&&(me[z](D,L),_[z]=L);let ue=!1;return{grid:D,update(z){if(ue)return;const L=C(z||{});S=L.handlers;const ie={};for(const[V,J]of Object.entries(L.config))Object.is(X[V],J)||(ie[V]=J);for(const V of Object.keys(X))Object.hasOwn(L.config,V)||(ie[V]=void 0);Object.keys(ie).length&&D.setAll(ie),X=L.config;for(const[V,J]of Object.entries(me)){const F=L.imperative[V];Object.is(_[V],F)||F===void 0&&!Object.hasOwn(_,V)||(J(D,F),_[V]=F)}},destroy(){ue||(ue=!0,I(),D.destroy())}}}}),Ee("packages/modules/react/viewers.js",function(a,ae){"use strict";Object.defineProperty(a,"VIEWER_EVENTS",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(a,"VIEWER_APPLY",{enumerable:!0,get:function(){return re}}),Object.defineProperty(a,"VIEWER_BULK_UPDATE",{enumerable:!0,get:function(){return se}}),Object.defineProperty(a,"viewerHandlerName",{enumerable:!0,get:function(){return q}}),Object.defineProperty(a,"partitionViewerProps",{enumerable:!0,get:function(){return M}}),Object.defineProperty(a,"createViewerController",{enumerable:!0,get:function(){return C}});const me=ae("packages/core/src/internal/util.js").warnOnce,Z=Object.freeze({kpi:Object.freeze(["tile:click","tile:dblclick","tile:contextmenu","node:toggle","change","tile:status"]),kanban:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:move","card:reverted","card:confirmed","selection:changed","column:collapse","card:add","drag:start","drag:end","swimlane:collapse","swimlane:reorder","column:reorder","filter:changed","sprint:changed","epic:changed","card:expand","card:drill","card:edit","card:sla","beforeMove","beforeAdd","beforeEdit","beforeLaneReorder","beforeColumnReorder","beforeColumnChange","move:cancelled","add:cancelled","edit:cancelled","laneReorder:cancelled","columnReorder:cancelled","columnChange:cancelled"]),tabs:Object.freeze(["beforeTabChange","tab:changed","tabChange:cancelled"]),calendar:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:mount","range:change","beforeMove","card:move"]),chart:Object.freeze(["click","hover","leave","draw","legend"]),gantt:Object.freeze(["schedule","error","history","columnResize","workload:click","task:filtered","draw","dependencies","cell:click","zoomChange","visibleRangeChange","taskExpand","taskCollapse","resourceExpand","resourceCollapse","selectionChange","rowMove","taskAdd","taskRemove","taskUpdate","dependencyAdd","dependencyRemove","dependencyUpdate","assignmentChange","datesChanged","change","schedulingConflict","taskDragStart","taskDrag","taskResizeStart","taskPartialResize","taskResizeEnd","percentBarDragStart","percentBarDrag","percentBarDrop","taskClick","taskDblClick","taskMouseOver","taskMouseOut","dirtyChange"]),layout:Object.freeze(["layout:changed","window:moved","window:resized","window:closed","beforeWindowClose","windowClose:cancelled"]),router:Object.freeze(["metrics","fields:changed"])}),re=Object.freeze({kpi:Object.freeze({rows:(m,l)=>m.setRows(Array.isArray(l)?l:[])}),kanban:Object.freeze({rows:(m,l)=>m.setRows(Array.isArray(l)?l:[]),quickFilter:(m,l)=>m.setQuickFilter(typeof l=="string"?l:""),sprint:(m,l)=>m.setSprint(l),epic:(m,l)=>m.setEpic(l),loading:(m,l)=>m.setLoading(!!l),error:(m,l)=>m.setError(l??null)}),gantt:Object.freeze({tasks:(m,l)=>m.setTasks(Array.isArray(l)?l:[]),dependencies:(m,l)=>m.setDependencies(Array.isArray(l)?l:[])}),tabs:Object.freeze({active:(m,l)=>{typeof l=="string"&&m.activate(l)}}),calendar:Object.freeze({rows:(m,l)=>m.setRows(Array.isArray(l)?l:[]),view:(m,l)=>m.setView(l),date:(m,l)=>m.goTo(l),move:(m,l,R)=>m.move(l,R)}),chart:Object.freeze({}),layout:Object.freeze({})}),se=Object.freeze({chart:"update"});function q(m){return`on${String(m).split(":").map(R=>R.charAt(0).toUpperCase()+R.slice(1)).join("")}`}const oe=Object.freeze(Object.fromEntries(Object.entries(Z).map(([m,l])=>[m,Object.freeze(Object.fromEntries(l.map(R=>[q(R),R])))])));function M(m,l){const R=oe[m]||{},U=re[m]||{},D={},S={},X={};for(const[_,T]of Object.entries(l||{})){if(Object.hasOwn(R,_)){X[_]=T;continue}if(Object.hasOwn(U,_)){S[_]=T,D[_]=T;continue}D[_]=T}return{config:D,live:S,handlers:X}}function C(m){const l=String(m.viewer),R=m.mount,U=m.name||l;if(typeof R!="function")throw new TypeError(`createViewerController needs a mount factory for "${l}"; pass the module's own factory in, e.g. { createKPI } from lattice-grid/modules/kpi.`);const D=M(l,m.props||{}),S=R(m.element,{...D.config});if(!S||typeof S!="object")throw new TypeError(`the ${U} factory returned no instance; nothing can be driven.`);let X=D.handlers,_=D.config;const T={...D.live},I=[];if(typeof S.on=="function")for(const ie of Z[l]||[]){const V=q(ie),J=S.on(ie,F=>{const x=X[V];typeof x=="function"&&x(F)});typeof J=="function"&&I.push(J)}const ue=se[l],z=re[l]||{};let L=!1;return{instance:S,update(ie){if(L)return;const V=M(l,ie||{});X=V.handlers;const J={};for(const[x,de]of Object.entries(V.config))Object.is(_[x],de)||(J[x]=de);if(_=V.config,!Object.keys(J).length)return;const F=[];for(const x of Object.keys(J)){const de=z[x];if(de){de(S,J[x]),T[x]=J[x];continue}ue&&typeof S[ue]=="function"||F.push(x)}if(ue&&typeof S[ue]=="function"){const x={};for(const de of Object.keys(J))z[de]||(x[de]=J[de]);Object.keys(x).length&&S[ue](x)}F.length&&me(`react.viewer.${l}.mountOnly.${F.join(".")}`,`${U}: ${F.map(x=>`\`${x}\``).join(", ")} changed, but ${U} takes ${F.length===1?"it":"them"} only when the viewer is created. Nothing was applied and the viewer was NOT rebuilt — rebuilding it silently would throw away scroll position, selection and expansion. Give the component a \`key\` that changes when this must take effect, so the rebuild is yours and visible, or drive the instance through the ref.`)},destroy(){if(!L){L=!0;for(const ie of I)try{ie()}catch{}I.length=0,typeof S.destroy=="function"&&S.destroy()}}}}}),Ee("packages/modules/presets/index.js",function(a,ae){"use strict";Object.defineProperty(a,"themeFromMui",{enumerable:!0,get:function(){return q}}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return oe}});const me=ae("packages/core/src/internal/util.js").warnOnce;function Z(M,C){if(typeof M!="string")return M;const m=M.trim().match(/^#([0-9a-f]{6})$/i);if(!m)return M;const l=m[1],R=parseInt(l.slice(0,2),16),U=parseInt(l.slice(2,4),16),D=parseInt(l.slice(4,6),16);return`rgba(${R}, ${U}, ${D}, ${C})`}function re(M){const C=M.palette,m=C.mode==="dark";return{"--lattice-background":C.background.default,"--lattice-surface":C.background.paper,"--lattice-surface-alt":m?"#2a2a2a":C.grey[50],"--lattice-border-color":C.divider,"--lattice-border-strong":m?C.grey[600]:C.grey[400],"--lattice-foreground":C.text.primary,"--lattice-foreground-muted":C.text.secondary,"--lattice-header-foreground":C.text.primary,"--lattice-accent":C.primary.main,"--lattice-accent-contrast":C.primary.contrastText,"--lattice-link-color":C.primary.main,"--lattice-selected-background":Z(C.primary.main,.12),"--lattice-hovered-background":Z(C.text.primary,.06),"--lattice-focus-color":C.primary.main,"--lattice-variant-danger-solid":C.error.main,"--lattice-variant-danger-fill":Z(C.error.main,.12),"--lattice-variant-warning-solid":C.warning.main,"--lattice-variant-warning-fill":Z(C.warning.main,.12),"--lattice-variant-success-solid":C.success.main,"--lattice-variant-success-fill":Z(C.success.main,.12),"--lattice-variant-info-solid":C.info.main,"--lattice-variant-info-fill":Z(C.info.main,.12),"--lattice-radius":`${M.shape.borderRadius}px`,"--lattice-font-family":M.typography.fontFamily,"--lattice-font-size":`${M.typography.body2.fontSize}`,"--lattice-header-font-weight":String(M.typography.fontWeightMedium)}}function se(M){return`.lattice {
6
+ (function(De){"use strict";var Ae=Object.create(null),Ge=Object.create(null);function Ee(a,ae){Ae[a]=ae}function Te(a){var ae=Ge[a];if(ae)return ae;var be=Object.create(null);Ge[a]=be;var me=Ae[a];if(!me)throw new Error("[lattice] missing module: "+a);return me(be,Te),be}Ee("packages/core/src/internal/util.js",function(a,ae){"use strict";Object.defineProperty(a,"VERSION",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(a,"reportedWarnings",{enumerable:!0,get:function(){return l}}),Object.defineProperty(a,"warnOnce",{enumerable:!0,get:function(){return U}}),Object.defineProperty(a,"infoOnce",{enumerable:!0,get:function(){return D}}),Object.defineProperty(a,"resetWarnings",{enumerable:!0,get:function(){return S}}),Object.defineProperty(a,"fail",{enumerable:!0,get:function(){return X}}),Object.defineProperty(a,"invariant",{enumerable:!0,get:function(){return _}}),Object.defineProperty(a,"DEV",{enumerable:!0,get:function(){return T}}),Object.defineProperty(a,"isObject",{enumerable:!0,get:function(){return I}}),Object.defineProperty(a,"isFunction",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(a,"isNil",{enumerable:!0,get:function(){return z}}),Object.defineProperty(a,"isBlank",{enumerable:!0,get:function(){return L}}),Object.defineProperty(a,"isCtor",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(a,"pathGetter",{enumerable:!0,get:function(){return J}}),Object.defineProperty(a,"pathSetter",{enumerable:!0,get:function(){return x}}),Object.defineProperty(a,"getPath",{enumerable:!0,get:function(){return de}}),Object.defineProperty(a,"setPath",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(a,"humanise",{enumerable:!0,get:function(){return f}}),Object.defineProperty(a,"escapeHtml",{enumerable:!0,get:function(){return P}}),Object.defineProperty(a,"titleCase",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(a,"expand",{enumerable:!0,get:function(){return o}}),Object.defineProperty(a,"toArray",{enumerable:!0,get:function(){return p}}),Object.defineProperty(a,"merge",{enumerable:!0,get:function(){return r}}),Object.defineProperty(a,"mergeRow",{enumerable:!0,get:function(){return i}}),Object.defineProperty(a,"Lru",{enumerable:!0,get:function(){return g}}),Object.defineProperty(a,"collator",{enumerable:!0,get:function(){return y}}),Object.defineProperty(a,"defaultCompare",{enumerable:!0,get:function(){return O}}),Object.defineProperty(a,"now",{enumerable:!0,get:function(){return k}}),Object.defineProperty(a,"nextFrame",{enumerable:!0,get:function(){return H}}),Object.defineProperty(a,"cancelFrame",{enumerable:!0,get:function(){return N}}),Object.defineProperty(a,"frameBatched",{enumerable:!0,get:function(){return B}}),Object.defineProperty(a,"settleDebounce",{enumerable:!0,get:function(){return E}}),Object.defineProperty(a,"whenIdle",{enumerable:!0,get:function(){return w}}),Object.defineProperty(a,"uid",{enumerable:!0,get:function(){return pe}});const be="1.89.1";async function me(){return be}const Z="1.89.1",re=new Set,se=2e3;function q(t){if(re.add(t),re.size>se){const n=re.values().next().value;n!==void 0&&re.delete(n)}}const oe=[],M=500;function C(t,n,c){oe.push({key:t,level:n,message:c.map(d=>typeof d=="string"?d:m(d)).join(" "),at:Date.now()}),oe.length>M&&oe.shift()}function m(t){if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch{return String(t)}}function l(){return oe.map(t=>({...t}))}function R(t){if(t.length===0||typeof t[0]!="string")return t;const n=t[0].replace(/^\[lattice\]\s*/,"");return n===t[0]?t:[n,...t.slice(1)]}function U(t,...n){if(re.has(t))return;q(t);const c=R(n);C(t,"warn",c),console.warn("[lattice]",...c)}function D(t,...n){if(re.has(t))return;q(t);const c=R(n);C(t,"info",c),console.info("[lattice]",...c)}function S(){re.clear(),oe.length=0}function X(t,n){const c=new Error(`[lattice] ${t}`);throw n!==void 0&&(c.cause=n),c}function _(t,n){t||X(n)}const T=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function I(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function ue(t){return typeof t=="function"}function z(t){return t==null}function L(t){return t==null||t===""}function ie(t){return typeof t!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(t))?!0:!!(t.prototype&&Object.getOwnPropertyNames(t.prototype).length>1)}const V=new Map;function J(t){let n=V.get(t);if(n)return n;if(!t.includes("."))n=c=>c?.[t];else{const c=t.split("."),d=c.length;n=$=>{let v=$;for(let G=0;G<d;G++){if(v==null)return;v=v[c[G]]}return v}}return V.set(t,n),n}const F=new Map;function x(t){let n=F.get(t);if(n)return n;if(!t.includes("."))n=(c,d)=>{c!=null&&(c[t]=d)};else{const c=t.split("."),d=c.length-1;n=($,v)=>{let G=$;for(let ee=0;ee<d;ee++){if(G==null)return;const te=c[ee];G[te]==null&&(G[te]={}),G=G[te]}G!=null&&(G[c[d]]=v)}}return F.set(t,n),n}function de(t,n){return J(n)(t)}function Pe(t,n,c){x(n)(t,c)}function f(t){return t?(t.includes(".")?t.slice(t.lastIndexOf(".")+1):t).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,c=>c.toUpperCase()):""}const b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function P(t){const n=t==null?"":String(t);return/[&<>"']/.test(n)?n.replace(/[&<>"']/g,c=>b[c]):n}function ce(t){return String(t).replace(/\w\S*/g,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}function o(t,n,c){if(t!==void 0)return t===!0?{enabled:!0,...c}:t===!1?{enabled:!1}:I(t)?t:{[n]:t,enabled:!0}}function p(t){return t==null?[]:Array.isArray(t)?t:[t]}const K=Object.freeze(new Set(["__proto__","constructor","prototype"]));function r(t,n){if(!I(t))return I(n)?{...n}:n;if(!I(n))return n===void 0?t:n;const c={...t};for(const d of Object.keys(n)){if(K.has(d))continue;const $=n[d];$!==void 0&&(c[d]=I($)&&I(c[d])?r(c[d],$):$)}return c}function i(t,n){if(!I(t)||!I(n)||t===n)return n;const c=Object.create(Object.getPrototypeOf(t));return Object.assign(c,t,n),c}class g{#n;#e=new Map;#t;constructor(n=256,c=null){this.#n=n,this.#t=c}get size(){return this.#e.size}get max(){return this.#n}set max(n){this.#n=n,this.#r()}has(n){return this.#e.has(n)}get(n){const c=this.#e;if(!c.has(n))return;const d=c.get(n);return c.delete(n),c.set(n,d),d}peek(n){return this.#e.get(n)}set(n,c){const d=this.#e;return d.has(n)&&d.delete(n),d.set(n,c),this.#r(),c}delete(n){const c=this.#e.get(n);return this.#e.delete(n)&&this.#t&&this.#t(c,n),c}clear(){if(this.#t)for(const[n,c]of this.#e)this.#t(c,n);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const n=this.#e;for(;n.size>this.#n;){const c=n.keys().next().value,d=n.get(c);n.delete(c),this.#t&&this.#t(d,c)}}}const h=new Map;function y(t,n){const c=`${t||""}|${n?JSON.stringify(n):""}`;let d=h.get(c);return d||(d=new Intl.Collator(t||void 0,{numeric:!0,sensitivity:"variant",...n}),h.set(c,d)),d}function O(t,n){if(t===n)return 0;if(t==null)return 1;if(n==null)return-1;if(typeof t=="number"&&typeof n=="number")return Number.isNaN(t)?Number.isNaN(n)?0:1:Number.isNaN(n)||t<n?-1:t>n?1:0;const c=String(t),d=String(n);return c<d?-1:c>d?1:0}function k(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const W=typeof requestAnimationFrame=="function";function H(t){return W?requestAnimationFrame(t):setTimeout(()=>t(k()),16)}function N(t){t!=null&&(W?cancelAnimationFrame(t):clearTimeout(t))}function B(t){let n=null,c=null;const d=()=>{n=null;const v=c;c=null,t(...v||[])},$=(...v)=>{c=v,n===null&&(n=H(d))};return $.cancel=()=>{N(n),n=null,c=null},$.flush=()=>{n!==null&&(N(n),d())},$}function E(t,n){let c=null,d=null;const $=()=>{if(c=null,d===null)return;const ee=d;d=null,t(...ee),v()},v=()=>{c=setTimeout($,n),typeof c?.unref=="function"&&c.unref()},G=(...ee)=>{c===null?(t(...ee),v()):(d=ee,clearTimeout(c),v())};return G.flush=()=>{if(c!==null&&clearTimeout(c),c=null,d===null)return;const ee=d;d=null,t(...ee)},G.cancel=()=>{c!==null&&clearTimeout(c),c=null,d=null},G.pending=()=>c!==null||d!==null,G}function w(t,n=50){return typeof requestIdleCallback=="function"?requestIdleCallback(t,{timeout:n}):setTimeout(()=>t({timeRemaining:()=>0,didTimeout:!0}),1)}let Q=0;function pe(t="l"){return`${t}${(++Q).toString(36)}`}}),Ee("packages/modules/shared/adapter.js",function(a,ae){"use strict";Object.defineProperty(a,"EVENT_NAMES",{enumerable:!0,get:function(){return be}}),Object.defineProperty(a,"handlerName",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(a,"dashedName",{enumerable:!0,get:function(){return re}}),Object.defineProperty(a,"CONFIG_KEY_ALIASES",{enumerable:!0,get:function(){return se}}),Object.defineProperty(a,"aliasConfigKey",{enumerable:!0,get:function(){return q}}),Object.defineProperty(a,"isHandlerProp",{enumerable:!0,get:function(){return M}}),Object.defineProperty(a,"partition",{enumerable:!0,get:function(){return C}}),Object.defineProperty(a,"createGridController",{enumerable:!0,get:function(){return m}});const be=Object.freeze(["ready","destroy","render:first","render:done","config:changed","licence:changed","model:changed","rows:changed","rows:queued","rows:deferred","rows:paused","rows:resumed","row:received","row:sent","row:copied","row:moved","source:error","source:total","stream:chunk","stream:end","stream:evicted","rowDrag:started","rowDrag:moved","rowDrag:left","rowDrag:ended","cell:changed","cell:pending","cell:confirmed","cell:reverted","cell:conflict","cell:clicked","cell:dblclicked","cell:contextmenu","cell:mouseover","cell:mouseout","cell:mousedown","cell:mouseup","cell:edit:start","cell:edit:end","row:edit:start","row:edit:end","row:clicked","row:dblclicked","row:pending","row:confirmed","row:reverted","row:conflict","form:opened","form:closed","form:saved","form:error","sort:changed","filter:changed","group:toggled","facet:computed","facet:filtered","facet:expanded","facet:failed","column:moved","column:resized","column:visible","column:pinned","column:grouped","column:pivoted","column:filter:open","column:profile:open","column:menu:open","columns:changed","columns:tagged","columngroup:changed","header:contextmenu","pivot:drill","selection:changed","range:changed","clipboard:copy","page:changed","scroll","scroll:end","size:changed","detail:toggled","detail:cell:edit:start","detail:cell:edit:end","detail:row:edit:start","detail:row:edit:end","detail:cell:changed","toolpanel:focus","highlight:changed","find:changed","tree:loading","tree:loaded","tree:loadFailed","tree:loadAborted","state:changed","state:reset","history:changed","history:applied","views:changed","view:applied","view:saved","view:removed","view:renamed","view:default","formatting:changed","redaction:changed","permissions:changed","presentation:changed","presentation:started","presentation:ended","presentation:view","presentation:scale","presentation:spotlight","presentation:captured","comment:added","comment:edited","comment:deleted","comment:failed","comment:resolved","comment:unresolved","comment:threadOpened","comment:threadClosed","comment:indexLoaded","presence:published","presence:joined","presence:updated","presence:left","presence:failed","presence:lockRefused","diff:changed","diff:swapped","timeline:attached","timeline:detached","timeline:seek","timeline:seeking","annotation:changed","validation:failed","validation:cleared","export:progress","export:request","export:done","shortcuts:opened","shortcuts:closed","print:before","print:after","beforeEdit","beforeSort","beforeFilter","beforeColumnMove","beforeColumnResize","beforeColumnHide","beforeSelect","beforeRowAdd","beforeDelete","beforeRowMove","beforeGroup","beforeRowReceive","edit:cancelled","sort:cancelled","filter:cancelled","columnMove:cancelled","columnResize:cancelled","columnHide:cancelled","selection:cancelled","rowAdd:cancelled","delete:cancelled","rowMove:cancelled","group:cancelled","rowReceive:cancelled"]),me=Object.freeze({sort:(l,R)=>l.sort.set(R||[]),filters:(l,R)=>l.filters.set(R||null),quickFilter:(l,R)=>{if(R&&typeof R=="object"){l.filters.quick(R.text||"",{mode:R.mode});return}l.filters.quick(typeof R=="string"?R:"")},selectedKeys:(l,R)=>l.selection.set(Array.isArray(R)?R:[])});function Z(l){return`on${String(l).split(":").map(U=>U.charAt(0).toUpperCase()+U.slice(1)).join("")}`}function re(l){return String(l).replace(/:/g,"-")}const se=Object.freeze({"row-key":"rowKey","row-height":"rowHeight","header-height":"headerHeight","auto-height":"autoHeight"});function q(l){return Object.hasOwn(se,l)?se[l]:l}const oe=Object.freeze(Object.fromEntries(be.map(l=>[Z(l),l])));function M(l){return Object.hasOwn(oe,l)}function C(l){const R={},U={},D={};for(const[S,X]of Object.entries(l||{})){if(M(S)){D[S]=X;continue}if(Object.hasOwn(me,S)){U[S]=X;continue}R[S]=X}return{config:R,imperative:U,handlers:D}}function m(l){const R=l.createGrid;if(typeof R!="function")throw new TypeError("createGridController needs createGrid; pass it in from the grid package.");const U=C(l.props||{}),D=R(l.element,{...U.config});let S=U.handlers,X=U.config,_={};const T=z=>{if(!z||typeof z.type!="string")return;const L=S[Z(z.type)];typeof L=="function"&&L(z)},I=D.on("*",T);for(const[z,L]of Object.entries(U.imperative))L!==void 0&&(me[z](D,L),_[z]=L);let ue=!1;return{grid:D,update(z){if(ue)return;const L=C(z||{});S=L.handlers;const ie={};for(const[V,J]of Object.entries(L.config))Object.is(X[V],J)||(ie[V]=J);for(const V of Object.keys(X))Object.hasOwn(L.config,V)||(ie[V]=void 0);Object.keys(ie).length&&D.setAll(ie),X=L.config;for(const[V,J]of Object.entries(me)){const F=L.imperative[V];Object.is(_[V],F)||F===void 0&&!Object.hasOwn(_,V)||(J(D,F),_[V]=F)}},destroy(){ue||(ue=!0,I(),D.destroy())}}}}),Ee("packages/modules/react/viewers.js",function(a,ae){"use strict";Object.defineProperty(a,"VIEWER_EVENTS",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(a,"VIEWER_APPLY",{enumerable:!0,get:function(){return re}}),Object.defineProperty(a,"VIEWER_BULK_UPDATE",{enumerable:!0,get:function(){return se}}),Object.defineProperty(a,"viewerHandlerName",{enumerable:!0,get:function(){return q}}),Object.defineProperty(a,"partitionViewerProps",{enumerable:!0,get:function(){return M}}),Object.defineProperty(a,"createViewerController",{enumerable:!0,get:function(){return C}});const me=ae("packages/core/src/internal/util.js").warnOnce,Z=Object.freeze({kpi:Object.freeze(["tile:click","tile:dblclick","tile:contextmenu","node:toggle","change","tile:status"]),kanban:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:move","card:reverted","card:confirmed","selection:changed","column:collapse","card:add","drag:start","drag:end","swimlane:collapse","swimlane:reorder","column:reorder","filter:changed","sprint:changed","epic:changed","card:expand","card:drill","card:edit","card:sla","beforeMove","beforeAdd","beforeEdit","beforeLaneReorder","beforeColumnReorder","beforeColumnChange","move:cancelled","add:cancelled","edit:cancelled","laneReorder:cancelled","columnReorder:cancelled","columnChange:cancelled"]),tabs:Object.freeze(["beforeTabChange","tab:changed","tabChange:cancelled"]),calendar:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:mount","range:change","beforeMove","card:move"]),chart:Object.freeze(["click","hover","leave","draw","legend"]),gantt:Object.freeze(["schedule","error","history","columnResize","workload:click","task:filtered","draw","dependencies","cell:click","zoomChange","visibleRangeChange","taskExpand","taskCollapse","resourceExpand","resourceCollapse","selectionChange","rowMove","taskAdd","taskRemove","taskUpdate","dependencyAdd","dependencyRemove","dependencyUpdate","assignmentChange","datesChanged","change","schedulingConflict","taskDragStart","taskDrag","taskResizeStart","taskPartialResize","taskResizeEnd","percentBarDragStart","percentBarDrag","percentBarDrop","taskClick","taskDblClick","taskMouseOver","taskMouseOut","dirtyChange"]),layout:Object.freeze(["layout:changed","window:moved","window:resized","window:closed","beforeWindowClose","windowClose:cancelled"]),router:Object.freeze(["metrics","fields:changed"])}),re=Object.freeze({kpi:Object.freeze({rows:(m,l)=>m.setRows(Array.isArray(l)?l:[])}),kanban:Object.freeze({rows:(m,l)=>m.setRows(Array.isArray(l)?l:[]),quickFilter:(m,l)=>m.setQuickFilter(typeof l=="string"?l:""),sprint:(m,l)=>m.setSprint(l),epic:(m,l)=>m.setEpic(l),loading:(m,l)=>m.setLoading(!!l),error:(m,l)=>m.setError(l??null)}),gantt:Object.freeze({tasks:(m,l)=>m.setTasks(Array.isArray(l)?l:[]),dependencies:(m,l)=>m.setDependencies(Array.isArray(l)?l:[])}),tabs:Object.freeze({active:(m,l)=>{typeof l=="string"&&m.activate(l)}}),calendar:Object.freeze({rows:(m,l)=>m.setRows(Array.isArray(l)?l:[]),view:(m,l)=>m.setView(l),date:(m,l)=>m.goTo(l),move:(m,l,R)=>m.move(l,R)}),chart:Object.freeze({}),layout:Object.freeze({})}),se=Object.freeze({chart:"update"});function q(m){return`on${String(m).split(":").map(R=>R.charAt(0).toUpperCase()+R.slice(1)).join("")}`}const oe=Object.freeze(Object.fromEntries(Object.entries(Z).map(([m,l])=>[m,Object.freeze(Object.fromEntries(l.map(R=>[q(R),R])))])));function M(m,l){const R=oe[m]||{},U=re[m]||{},D={},S={},X={};for(const[_,T]of Object.entries(l||{})){if(Object.hasOwn(R,_)){X[_]=T;continue}if(Object.hasOwn(U,_)){S[_]=T,D[_]=T;continue}D[_]=T}return{config:D,live:S,handlers:X}}function C(m){const l=String(m.viewer),R=m.mount,U=m.name||l;if(typeof R!="function")throw new TypeError(`createViewerController needs a mount factory for "${l}"; pass the module's own factory in, e.g. { createKPI } from lattice-grid/modules/kpi.`);const D=M(l,m.props||{}),S=R(m.element,{...D.config});if(!S||typeof S!="object")throw new TypeError(`the ${U} factory returned no instance; nothing can be driven.`);let X=D.handlers,_=D.config;const T={...D.live},I=[];if(typeof S.on=="function")for(const ie of Z[l]||[]){const V=q(ie),J=S.on(ie,F=>{const x=X[V];typeof x=="function"&&x(F)});typeof J=="function"&&I.push(J)}const ue=se[l],z=re[l]||{};let L=!1;return{instance:S,update(ie){if(L)return;const V=M(l,ie||{});X=V.handlers;const J={};for(const[x,de]of Object.entries(V.config))Object.is(_[x],de)||(J[x]=de);if(_=V.config,!Object.keys(J).length)return;const F=[];for(const x of Object.keys(J)){const de=z[x];if(de){de(S,J[x]),T[x]=J[x];continue}ue&&typeof S[ue]=="function"||F.push(x)}if(ue&&typeof S[ue]=="function"){const x={};for(const de of Object.keys(J))z[de]||(x[de]=J[de]);Object.keys(x).length&&S[ue](x)}F.length&&me(`react.viewer.${l}.mountOnly.${F.join(".")}`,`${U}: ${F.map(x=>`\`${x}\``).join(", ")} changed, but ${U} takes ${F.length===1?"it":"them"} only when the viewer is created. Nothing was applied and the viewer was NOT rebuilt — rebuilding it silently would throw away scroll position, selection and expansion. Give the component a \`key\` that changes when this must take effect, so the rebuild is yours and visible, or drive the instance through the ref.`)},destroy(){if(!L){L=!0;for(const ie of I)try{ie()}catch{}I.length=0,typeof S.destroy=="function"&&S.destroy()}}}}}),Ee("packages/modules/presets/index.js",function(a,ae){"use strict";Object.defineProperty(a,"themeFromMui",{enumerable:!0,get:function(){return q}}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return oe}});const me=ae("packages/core/src/internal/util.js").warnOnce;function Z(M,C){if(typeof M!="string")return M;const m=M.trim().match(/^#([0-9a-f]{6})$/i);if(!m)return M;const l=m[1],R=parseInt(l.slice(0,2),16),U=parseInt(l.slice(2,4),16),D=parseInt(l.slice(4,6),16);return`rgba(${R}, ${U}, ${D}, ${C})`}function re(M){const C=M.palette,m=C.mode==="dark";return{"--lattice-background":C.background.default,"--lattice-surface":C.background.paper,"--lattice-surface-alt":m?"#2a2a2a":C.grey[50],"--lattice-border-color":C.divider,"--lattice-border-strong":m?C.grey[600]:C.grey[400],"--lattice-foreground":C.text.primary,"--lattice-foreground-muted":C.text.secondary,"--lattice-header-foreground":C.text.primary,"--lattice-accent":C.primary.main,"--lattice-accent-contrast":C.primary.contrastText,"--lattice-link-color":C.primary.main,"--lattice-selected-background":Z(C.primary.main,.12),"--lattice-hovered-background":Z(C.text.primary,.06),"--lattice-focus-color":C.primary.main,"--lattice-variant-danger-solid":C.error.main,"--lattice-variant-danger-fill":Z(C.error.main,.12),"--lattice-variant-warning-solid":C.warning.main,"--lattice-variant-warning-fill":Z(C.warning.main,.12),"--lattice-variant-success-solid":C.success.main,"--lattice-variant-success-fill":Z(C.success.main,.12),"--lattice-variant-info-solid":C.info.main,"--lattice-variant-info-fill":Z(C.info.main,.12),"--lattice-radius":`${M.shape.borderRadius}px`,"--lattice-font-family":M.typography.fontFamily,"--lattice-font-size":`${M.typography.body2.fontSize}`,"--lattice-header-font-weight":String(M.typography.fontWeightMedium)}}function se(M){return`.lattice {
7
7
  ${Object.entries(M).map(([m,l])=>` ${m}: ${l};`).join(`
8
8
  `)}
9
9
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.89.0, svelte module type declarations
2
+ * Lattice Grid 1.89.1, svelte module type declarations
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * Lattice Grid 1.89.0, svelte module
2
+ * Lattice Grid 1.89.1, svelte module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
6
- var le=Object.create(null),de=Object.create(null);function te(i,U){le[i]=U}function fe(i){var U=de[i];if(U)return U;var J=Object.create(null);de[i]=J;var Y=le[i];if(!Y)throw new Error("[lattice] missing module: "+i);return Y(J,fe),J}te("packages/core/src/internal/util.js",function(i,U){"use strict";Object.defineProperty(i,"VERSION",{enumerable:!0,get:function(){return C}}),Object.defineProperty(i,"reportedWarnings",{enumerable:!0,get:function(){return n}}),Object.defineProperty(i,"warnOnce",{enumerable:!0,get:function(){return A}}),Object.defineProperty(i,"infoOnce",{enumerable:!0,get:function(){return T}}),Object.defineProperty(i,"resetWarnings",{enumerable:!0,get:function(){return O}}),Object.defineProperty(i,"fail",{enumerable:!0,get:function(){return G}}),Object.defineProperty(i,"invariant",{enumerable:!0,get:function(){return D}}),Object.defineProperty(i,"DEV",{enumerable:!0,get:function(){return x}}),Object.defineProperty(i,"isObject",{enumerable:!0,get:function(){return M}}),Object.defineProperty(i,"isFunction",{enumerable:!0,get:function(){return L}}),Object.defineProperty(i,"isNil",{enumerable:!0,get:function(){return F}}),Object.defineProperty(i,"isBlank",{enumerable:!0,get:function(){return z}}),Object.defineProperty(i,"isCtor",{enumerable:!0,get:function(){return W}}),Object.defineProperty(i,"pathGetter",{enumerable:!0,get:function(){return k}}),Object.defineProperty(i,"pathSetter",{enumerable:!0,get:function(){return w}}),Object.defineProperty(i,"getPath",{enumerable:!0,get:function(){return X}}),Object.defineProperty(i,"setPath",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(i,"humanise",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(i,"escapeHtml",{enumerable:!0,get:function(){return re}}),Object.defineProperty(i,"titleCase",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(i,"expand",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(i,"toArray",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(i,"merge",{enumerable:!0,get:function(){return c}}),Object.defineProperty(i,"mergeRow",{enumerable:!0,get:function(){return p}}),Object.defineProperty(i,"Lru",{enumerable:!0,get:function(){return d}}),Object.defineProperty(i,"collator",{enumerable:!0,get:function(){return a}}),Object.defineProperty(i,"defaultCompare",{enumerable:!0,get:function(){return m}}),Object.defineProperty(i,"now",{enumerable:!0,get:function(){return u}}),Object.defineProperty(i,"nextFrame",{enumerable:!0,get:function(){return j}}),Object.defineProperty(i,"cancelFrame",{enumerable:!0,get:function(){return N}}),Object.defineProperty(i,"frameBatched",{enumerable:!0,get:function(){return E}}),Object.defineProperty(i,"settleDebounce",{enumerable:!0,get:function(){return g}}),Object.defineProperty(i,"whenIdle",{enumerable:!0,get:function(){return v}}),Object.defineProperty(i,"uid",{enumerable:!0,get:function(){return P}});const J="1.89.0";async function Y(){return J}const C="1.89.0",V=new Set,K=2e3;function q(e){if(V.add(e),V.size>K){const t=V.values().next().value;t!==void 0&&V.delete(t)}}const Q=[],R=500;function f(e,t,r){Q.push({key:e,level:t,message:r.map(l=>typeof l=="string"?l:o(l)).join(" "),at:Date.now()}),Q.length>R&&Q.shift()}function o(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function n(){return Q.map(e=>({...e}))}function b(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function A(e,...t){if(V.has(e))return;q(e);const r=b(t);f(e,"warn",r),console.warn("[lattice]",...r)}function T(e,...t){if(V.has(e))return;q(e);const r=b(t);f(e,"info",r),console.info("[lattice]",...r)}function O(){V.clear(),Q.length=0}function G(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function D(e,t){e||G(t)}const x=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function M(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function L(e){return typeof e=="function"}function F(e){return e==null}function z(e){return e==null||e===""}function W(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const S=new Map;function k(e){let t=S.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),l=r.length;t=B=>{let Z=B;for(let H=0;H<l;H++){if(Z==null)return;Z=Z[r[H]]}return Z}}return S.set(e,t),t}const $=new Map;function w(e){let t=$.get(e);if(t)return t;if(!e.includes("."))t=(r,l)=>{r!=null&&(r[e]=l)};else{const r=e.split("."),l=r.length-1;t=(B,Z)=>{let H=B;for(let _=0;_<l;_++){if(H==null)return;const ue=r[_];H[ue]==null&&(H[ue]={}),H=H[ue]}H!=null&&(H[r[l]]=Z)}}return $.set(e,t),t}function X(e,t){return k(t)(e)}function ne(e,t,r){w(t)(e,r)}function ie(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,r=>r.toUpperCase()):""}const ee={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function re(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>ee[r]):t}function oe(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ce(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:M(e)?e:{[t]:e,enabled:!0}}function ae(e){return e==null?[]:Array.isArray(e)?e:[e]}const se=Object.freeze(new Set(["__proto__","constructor","prototype"]));function c(e,t){if(!M(e))return M(t)?{...t}:t;if(!M(t))return t===void 0?e:t;const r={...e};for(const l of Object.keys(t)){if(se.has(l))continue;const B=t[l];B!==void 0&&(r[l]=M(B)&&M(r[l])?c(r[l],B):B)}return r}function p(e,t){if(!M(e)||!M(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class d{#n;#e=new Map;#t;constructor(t=256,r=null){this.#n=t,this.#t=r}get size(){return this.#e.size}get max(){return this.#n}set max(t){this.#n=t,this.#r()}has(t){return this.#e.has(t)}get(t){const r=this.#e;if(!r.has(t))return;const l=r.get(t);return r.delete(t),r.set(t,l),l}peek(t){return this.#e.get(t)}set(t,r){const l=this.#e;return l.has(t)&&l.delete(t),l.set(t,r),this.#r(),r}delete(t){const r=this.#e.get(t);return this.#e.delete(t)&&this.#t&&this.#t(r,t),r}clear(){if(this.#t)for(const[t,r]of this.#e)this.#t(r,t);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const t=this.#e;for(;t.size>this.#n;){const r=t.keys().next().value,l=t.get(r);t.delete(r),this.#t&&this.#t(l,r)}}}const s=new Map;function a(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let l=s.get(r);return l||(l=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),s.set(r,l)),l}function m(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),l=String(t);return r<l?-1:r>l?1:0}function u(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const h=typeof requestAnimationFrame=="function";function j(e){return h?requestAnimationFrame(e):setTimeout(()=>e(u()),16)}function N(e){e!=null&&(h?cancelAnimationFrame(e):clearTimeout(e))}function E(e){let t=null,r=null;const l=()=>{t=null;const Z=r;r=null,e(...Z||[])},B=(...Z)=>{r=Z,t===null&&(t=j(l))};return B.cancel=()=>{N(t),t=null,r=null},B.flush=()=>{t!==null&&(N(t),l())},B}function g(e,t){let r=null,l=null;const B=()=>{if(r=null,l===null)return;const _=l;l=null,e(..._),Z()},Z=()=>{r=setTimeout(B,t),typeof r?.unref=="function"&&r.unref()},H=(..._)=>{r===null?(e(..._),Z()):(l=_,clearTimeout(r),Z())};return H.flush=()=>{if(r!==null&&clearTimeout(r),r=null,l===null)return;const _=l;l=null,e(..._)},H.cancel=()=>{r!==null&&clearTimeout(r),r=null,l=null},H.pending=()=>r!==null||l!==null,H}function v(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let y=0;function P(e="l"){return`${e}${(++y).toString(36)}`}}),te("packages/modules/shared/adapter.js",function(i,U){"use strict";Object.defineProperty(i,"EVENT_NAMES",{enumerable:!0,get:function(){return J}}),Object.defineProperty(i,"handlerName",{enumerable:!0,get:function(){return C}}),Object.defineProperty(i,"dashedName",{enumerable:!0,get:function(){return V}}),Object.defineProperty(i,"CONFIG_KEY_ALIASES",{enumerable:!0,get:function(){return K}}),Object.defineProperty(i,"aliasConfigKey",{enumerable:!0,get:function(){return q}}),Object.defineProperty(i,"isHandlerProp",{enumerable:!0,get:function(){return R}}),Object.defineProperty(i,"partition",{enumerable:!0,get:function(){return f}}),Object.defineProperty(i,"createGridController",{enumerable:!0,get:function(){return o}});const J=Object.freeze(["ready","destroy","render:first","render:done","config:changed","licence:changed","model:changed","rows:changed","rows:queued","rows:deferred","rows:paused","rows:resumed","row:received","row:sent","row:copied","row:moved","source:error","source:total","stream:chunk","stream:end","stream:evicted","rowDrag:started","rowDrag:moved","rowDrag:left","rowDrag:ended","cell:changed","cell:pending","cell:confirmed","cell:reverted","cell:conflict","cell:clicked","cell:dblclicked","cell:contextmenu","cell:mouseover","cell:mouseout","cell:mousedown","cell:mouseup","cell:edit:start","cell:edit:end","row:edit:start","row:edit:end","row:clicked","row:dblclicked","row:pending","row:confirmed","row:reverted","row:conflict","form:opened","form:closed","form:saved","form:error","sort:changed","filter:changed","group:toggled","facet:computed","facet:filtered","facet:expanded","facet:failed","column:moved","column:resized","column:visible","column:pinned","column:grouped","column:pivoted","column:filter:open","column:profile:open","column:menu:open","columns:changed","columns:tagged","columngroup:changed","header:contextmenu","pivot:drill","selection:changed","range:changed","clipboard:copy","page:changed","scroll","scroll:end","size:changed","detail:toggled","detail:cell:edit:start","detail:cell:edit:end","detail:row:edit:start","detail:row:edit:end","detail:cell:changed","toolpanel:focus","highlight:changed","find:changed","tree:loading","tree:loaded","tree:loadFailed","tree:loadAborted","state:changed","state:reset","history:changed","history:applied","views:changed","view:applied","view:saved","view:removed","view:renamed","view:default","formatting:changed","redaction:changed","permissions:changed","presentation:changed","presentation:started","presentation:ended","presentation:view","presentation:scale","presentation:spotlight","presentation:captured","comment:added","comment:edited","comment:deleted","comment:failed","comment:resolved","comment:unresolved","comment:threadOpened","comment:threadClosed","comment:indexLoaded","presence:published","presence:joined","presence:updated","presence:left","presence:failed","presence:lockRefused","diff:changed","diff:swapped","timeline:attached","timeline:detached","timeline:seek","timeline:seeking","annotation:changed","validation:failed","validation:cleared","export:progress","export:request","export:done","shortcuts:opened","shortcuts:closed","print:before","print:after","beforeEdit","beforeSort","beforeFilter","beforeColumnMove","beforeColumnResize","beforeColumnHide","beforeSelect","beforeRowAdd","beforeDelete","beforeRowMove","beforeGroup","beforeRowReceive","edit:cancelled","sort:cancelled","filter:cancelled","columnMove:cancelled","columnResize:cancelled","columnHide:cancelled","selection:cancelled","rowAdd:cancelled","delete:cancelled","rowMove:cancelled","group:cancelled","rowReceive:cancelled"]),Y=Object.freeze({sort:(n,b)=>n.sort.set(b||[]),filters:(n,b)=>n.filters.set(b||null),quickFilter:(n,b)=>{if(b&&typeof b=="object"){n.filters.quick(b.text||"",{mode:b.mode});return}n.filters.quick(typeof b=="string"?b:"")},selectedKeys:(n,b)=>n.selection.set(Array.isArray(b)?b:[])});function C(n){return`on${String(n).split(":").map(A=>A.charAt(0).toUpperCase()+A.slice(1)).join("")}`}function V(n){return String(n).replace(/:/g,"-")}const K=Object.freeze({"row-key":"rowKey","row-height":"rowHeight","header-height":"headerHeight","auto-height":"autoHeight"});function q(n){return Object.hasOwn(K,n)?K[n]:n}const Q=Object.freeze(Object.fromEntries(J.map(n=>[C(n),n])));function R(n){return Object.hasOwn(Q,n)}function f(n){const b={},A={},T={};for(const[O,G]of Object.entries(n||{})){if(R(O)){T[O]=G;continue}if(Object.hasOwn(Y,O)){A[O]=G;continue}b[O]=G}return{config:b,imperative:A,handlers:T}}function o(n){const b=n.createGrid;if(typeof b!="function")throw new TypeError("createGridController needs createGrid; pass it in from the grid package.");const A=f(n.props||{}),T=b(n.element,{...A.config});let O=A.handlers,G=A.config,D={};const x=F=>{if(!F||typeof F.type!="string")return;const z=O[C(F.type)];typeof z=="function"&&z(F)},M=T.on("*",x);for(const[F,z]of Object.entries(A.imperative))z!==void 0&&(Y[F](T,z),D[F]=z);let L=!1;return{grid:T,update(F){if(L)return;const z=f(F||{});O=z.handlers;const W={};for(const[S,k]of Object.entries(z.config))Object.is(G[S],k)||(W[S]=k);for(const S of Object.keys(G))Object.hasOwn(z.config,S)||(W[S]=void 0);Object.keys(W).length&&T.setAll(W),G=z.config;for(const[S,k]of Object.entries(Y)){const $=z.imperative[S];Object.is(D[S],$)||$===void 0&&!Object.hasOwn(D,S)||(k(T,$),D[S]=$)}},destroy(){L||(L=!0,M(),T.destroy())}}}}),te("packages/modules/react/viewers.js",function(i,U){"use strict";Object.defineProperty(i,"VIEWER_EVENTS",{enumerable:!0,get:function(){return C}}),Object.defineProperty(i,"VIEWER_APPLY",{enumerable:!0,get:function(){return V}}),Object.defineProperty(i,"VIEWER_BULK_UPDATE",{enumerable:!0,get:function(){return K}}),Object.defineProperty(i,"viewerHandlerName",{enumerable:!0,get:function(){return q}}),Object.defineProperty(i,"partitionViewerProps",{enumerable:!0,get:function(){return R}}),Object.defineProperty(i,"createViewerController",{enumerable:!0,get:function(){return f}});const Y=U("packages/core/src/internal/util.js").warnOnce,C=Object.freeze({kpi:Object.freeze(["tile:click","tile:dblclick","tile:contextmenu","node:toggle","change","tile:status"]),kanban:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:move","card:reverted","card:confirmed","selection:changed","column:collapse","card:add","drag:start","drag:end","swimlane:collapse","swimlane:reorder","column:reorder","filter:changed","sprint:changed","epic:changed","card:expand","card:drill","card:edit","card:sla","beforeMove","beforeAdd","beforeEdit","beforeLaneReorder","beforeColumnReorder","beforeColumnChange","move:cancelled","add:cancelled","edit:cancelled","laneReorder:cancelled","columnReorder:cancelled","columnChange:cancelled"]),tabs:Object.freeze(["beforeTabChange","tab:changed","tabChange:cancelled"]),calendar:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:mount","range:change","beforeMove","card:move"]),chart:Object.freeze(["click","hover","leave","draw","legend"]),gantt:Object.freeze(["schedule","error","history","columnResize","workload:click","task:filtered","draw","dependencies","cell:click","zoomChange","visibleRangeChange","taskExpand","taskCollapse","resourceExpand","resourceCollapse","selectionChange","rowMove","taskAdd","taskRemove","taskUpdate","dependencyAdd","dependencyRemove","dependencyUpdate","assignmentChange","datesChanged","change","schedulingConflict","taskDragStart","taskDrag","taskResizeStart","taskPartialResize","taskResizeEnd","percentBarDragStart","percentBarDrag","percentBarDrop","taskClick","taskDblClick","taskMouseOver","taskMouseOut","dirtyChange"]),layout:Object.freeze(["layout:changed","window:moved","window:resized","window:closed","beforeWindowClose","windowClose:cancelled"]),router:Object.freeze(["metrics","fields:changed"])}),V=Object.freeze({kpi:Object.freeze({rows:(o,n)=>o.setRows(Array.isArray(n)?n:[])}),kanban:Object.freeze({rows:(o,n)=>o.setRows(Array.isArray(n)?n:[]),quickFilter:(o,n)=>o.setQuickFilter(typeof n=="string"?n:""),sprint:(o,n)=>o.setSprint(n),epic:(o,n)=>o.setEpic(n),loading:(o,n)=>o.setLoading(!!n),error:(o,n)=>o.setError(n??null)}),gantt:Object.freeze({tasks:(o,n)=>o.setTasks(Array.isArray(n)?n:[]),dependencies:(o,n)=>o.setDependencies(Array.isArray(n)?n:[])}),tabs:Object.freeze({active:(o,n)=>{typeof n=="string"&&o.activate(n)}}),calendar:Object.freeze({rows:(o,n)=>o.setRows(Array.isArray(n)?n:[]),view:(o,n)=>o.setView(n),date:(o,n)=>o.goTo(n),move:(o,n,b)=>o.move(n,b)}),chart:Object.freeze({}),layout:Object.freeze({})}),K=Object.freeze({chart:"update"});function q(o){return`on${String(o).split(":").map(b=>b.charAt(0).toUpperCase()+b.slice(1)).join("")}`}const Q=Object.freeze(Object.fromEntries(Object.entries(C).map(([o,n])=>[o,Object.freeze(Object.fromEntries(n.map(b=>[q(b),b])))])));function R(o,n){const b=Q[o]||{},A=V[o]||{},T={},O={},G={};for(const[D,x]of Object.entries(n||{})){if(Object.hasOwn(b,D)){G[D]=x;continue}if(Object.hasOwn(A,D)){O[D]=x,T[D]=x;continue}T[D]=x}return{config:T,live:O,handlers:G}}function f(o){const n=String(o.viewer),b=o.mount,A=o.name||n;if(typeof b!="function")throw new TypeError(`createViewerController needs a mount factory for "${n}"; pass the module's own factory in, e.g. { createKPI } from lattice-grid/modules/kpi.`);const T=R(n,o.props||{}),O=b(o.element,{...T.config});if(!O||typeof O!="object")throw new TypeError(`the ${A} factory returned no instance; nothing can be driven.`);let G=T.handlers,D=T.config;const x={...T.live},M=[];if(typeof O.on=="function")for(const W of C[n]||[]){const S=q(W),k=O.on(W,$=>{const w=G[S];typeof w=="function"&&w($)});typeof k=="function"&&M.push(k)}const L=K[n],F=V[n]||{};let z=!1;return{instance:O,update(W){if(z)return;const S=R(n,W||{});G=S.handlers;const k={};for(const[w,X]of Object.entries(S.config))Object.is(D[w],X)||(k[w]=X);if(D=S.config,!Object.keys(k).length)return;const $=[];for(const w of Object.keys(k)){const X=F[w];if(X){X(O,k[w]),x[w]=k[w];continue}L&&typeof O[L]=="function"||$.push(w)}if(L&&typeof O[L]=="function"){const w={};for(const X of Object.keys(k))F[X]||(w[X]=k[X]);Object.keys(w).length&&O[L](w)}$.length&&Y(`react.viewer.${n}.mountOnly.${$.join(".")}`,`${A}: ${$.map(w=>`\`${w}\``).join(", ")} changed, but ${A} takes ${$.length===1?"it":"them"} only when the viewer is created. Nothing was applied and the viewer was NOT rebuilt — rebuilding it silently would throw away scroll position, selection and expansion. Give the component a \`key\` that changes when this must take effect, so the rebuild is yours and visible, or drive the instance through the ref.`)},destroy(){if(!z){z=!0;for(const W of M)try{W()}catch{}M.length=0,typeof O.destroy=="function"&&O.destroy()}}}}}),te("packages/modules/presets/index.js",function(i,U){"use strict";Object.defineProperty(i,"themeFromMui",{enumerable:!0,get:function(){return q}}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return Q}});const Y=U("packages/core/src/internal/util.js").warnOnce;function C(R,f){if(typeof R!="string")return R;const o=R.trim().match(/^#([0-9a-f]{6})$/i);if(!o)return R;const n=o[1],b=parseInt(n.slice(0,2),16),A=parseInt(n.slice(2,4),16),T=parseInt(n.slice(4,6),16);return`rgba(${b}, ${A}, ${T}, ${f})`}function V(R){const f=R.palette,o=f.mode==="dark";return{"--lattice-background":f.background.default,"--lattice-surface":f.background.paper,"--lattice-surface-alt":o?"#2a2a2a":f.grey[50],"--lattice-border-color":f.divider,"--lattice-border-strong":o?f.grey[600]:f.grey[400],"--lattice-foreground":f.text.primary,"--lattice-foreground-muted":f.text.secondary,"--lattice-header-foreground":f.text.primary,"--lattice-accent":f.primary.main,"--lattice-accent-contrast":f.primary.contrastText,"--lattice-link-color":f.primary.main,"--lattice-selected-background":C(f.primary.main,.12),"--lattice-hovered-background":C(f.text.primary,.06),"--lattice-focus-color":f.primary.main,"--lattice-variant-danger-solid":f.error.main,"--lattice-variant-danger-fill":C(f.error.main,.12),"--lattice-variant-warning-solid":f.warning.main,"--lattice-variant-warning-fill":C(f.warning.main,.12),"--lattice-variant-success-solid":f.success.main,"--lattice-variant-success-fill":C(f.success.main,.12),"--lattice-variant-info-solid":f.info.main,"--lattice-variant-info-fill":C(f.info.main,.12),"--lattice-radius":`${R.shape.borderRadius}px`,"--lattice-font-family":R.typography.fontFamily,"--lattice-font-size":`${R.typography.body2.fontSize}`,"--lattice-header-font-weight":String(R.typography.fontWeightMedium)}}function K(R){return`.lattice {
6
+ var le=Object.create(null),de=Object.create(null);function te(i,U){le[i]=U}function fe(i){var U=de[i];if(U)return U;var J=Object.create(null);de[i]=J;var Y=le[i];if(!Y)throw new Error("[lattice] missing module: "+i);return Y(J,fe),J}te("packages/core/src/internal/util.js",function(i,U){"use strict";Object.defineProperty(i,"VERSION",{enumerable:!0,get:function(){return C}}),Object.defineProperty(i,"reportedWarnings",{enumerable:!0,get:function(){return n}}),Object.defineProperty(i,"warnOnce",{enumerable:!0,get:function(){return A}}),Object.defineProperty(i,"infoOnce",{enumerable:!0,get:function(){return T}}),Object.defineProperty(i,"resetWarnings",{enumerable:!0,get:function(){return O}}),Object.defineProperty(i,"fail",{enumerable:!0,get:function(){return G}}),Object.defineProperty(i,"invariant",{enumerable:!0,get:function(){return D}}),Object.defineProperty(i,"DEV",{enumerable:!0,get:function(){return x}}),Object.defineProperty(i,"isObject",{enumerable:!0,get:function(){return M}}),Object.defineProperty(i,"isFunction",{enumerable:!0,get:function(){return L}}),Object.defineProperty(i,"isNil",{enumerable:!0,get:function(){return F}}),Object.defineProperty(i,"isBlank",{enumerable:!0,get:function(){return z}}),Object.defineProperty(i,"isCtor",{enumerable:!0,get:function(){return W}}),Object.defineProperty(i,"pathGetter",{enumerable:!0,get:function(){return k}}),Object.defineProperty(i,"pathSetter",{enumerable:!0,get:function(){return w}}),Object.defineProperty(i,"getPath",{enumerable:!0,get:function(){return X}}),Object.defineProperty(i,"setPath",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(i,"humanise",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(i,"escapeHtml",{enumerable:!0,get:function(){return re}}),Object.defineProperty(i,"titleCase",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(i,"expand",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(i,"toArray",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(i,"merge",{enumerable:!0,get:function(){return c}}),Object.defineProperty(i,"mergeRow",{enumerable:!0,get:function(){return p}}),Object.defineProperty(i,"Lru",{enumerable:!0,get:function(){return d}}),Object.defineProperty(i,"collator",{enumerable:!0,get:function(){return a}}),Object.defineProperty(i,"defaultCompare",{enumerable:!0,get:function(){return m}}),Object.defineProperty(i,"now",{enumerable:!0,get:function(){return u}}),Object.defineProperty(i,"nextFrame",{enumerable:!0,get:function(){return j}}),Object.defineProperty(i,"cancelFrame",{enumerable:!0,get:function(){return N}}),Object.defineProperty(i,"frameBatched",{enumerable:!0,get:function(){return E}}),Object.defineProperty(i,"settleDebounce",{enumerable:!0,get:function(){return g}}),Object.defineProperty(i,"whenIdle",{enumerable:!0,get:function(){return v}}),Object.defineProperty(i,"uid",{enumerable:!0,get:function(){return P}});const J="1.89.1";async function Y(){return J}const C="1.89.1",V=new Set,K=2e3;function q(e){if(V.add(e),V.size>K){const t=V.values().next().value;t!==void 0&&V.delete(t)}}const Q=[],R=500;function f(e,t,r){Q.push({key:e,level:t,message:r.map(l=>typeof l=="string"?l:o(l)).join(" "),at:Date.now()}),Q.length>R&&Q.shift()}function o(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function n(){return Q.map(e=>({...e}))}function b(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function A(e,...t){if(V.has(e))return;q(e);const r=b(t);f(e,"warn",r),console.warn("[lattice]",...r)}function T(e,...t){if(V.has(e))return;q(e);const r=b(t);f(e,"info",r),console.info("[lattice]",...r)}function O(){V.clear(),Q.length=0}function G(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function D(e,t){e||G(t)}const x=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function M(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function L(e){return typeof e=="function"}function F(e){return e==null}function z(e){return e==null||e===""}function W(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const S=new Map;function k(e){let t=S.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),l=r.length;t=B=>{let Z=B;for(let H=0;H<l;H++){if(Z==null)return;Z=Z[r[H]]}return Z}}return S.set(e,t),t}const $=new Map;function w(e){let t=$.get(e);if(t)return t;if(!e.includes("."))t=(r,l)=>{r!=null&&(r[e]=l)};else{const r=e.split("."),l=r.length-1;t=(B,Z)=>{let H=B;for(let _=0;_<l;_++){if(H==null)return;const ue=r[_];H[ue]==null&&(H[ue]={}),H=H[ue]}H!=null&&(H[r[l]]=Z)}}return $.set(e,t),t}function X(e,t){return k(t)(e)}function ne(e,t,r){w(t)(e,r)}function ie(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,r=>r.toUpperCase()):""}const ee={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function re(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>ee[r]):t}function oe(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ce(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:M(e)?e:{[t]:e,enabled:!0}}function ae(e){return e==null?[]:Array.isArray(e)?e:[e]}const se=Object.freeze(new Set(["__proto__","constructor","prototype"]));function c(e,t){if(!M(e))return M(t)?{...t}:t;if(!M(t))return t===void 0?e:t;const r={...e};for(const l of Object.keys(t)){if(se.has(l))continue;const B=t[l];B!==void 0&&(r[l]=M(B)&&M(r[l])?c(r[l],B):B)}return r}function p(e,t){if(!M(e)||!M(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class d{#n;#e=new Map;#t;constructor(t=256,r=null){this.#n=t,this.#t=r}get size(){return this.#e.size}get max(){return this.#n}set max(t){this.#n=t,this.#r()}has(t){return this.#e.has(t)}get(t){const r=this.#e;if(!r.has(t))return;const l=r.get(t);return r.delete(t),r.set(t,l),l}peek(t){return this.#e.get(t)}set(t,r){const l=this.#e;return l.has(t)&&l.delete(t),l.set(t,r),this.#r(),r}delete(t){const r=this.#e.get(t);return this.#e.delete(t)&&this.#t&&this.#t(r,t),r}clear(){if(this.#t)for(const[t,r]of this.#e)this.#t(r,t);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const t=this.#e;for(;t.size>this.#n;){const r=t.keys().next().value,l=t.get(r);t.delete(r),this.#t&&this.#t(l,r)}}}const s=new Map;function a(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let l=s.get(r);return l||(l=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),s.set(r,l)),l}function m(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),l=String(t);return r<l?-1:r>l?1:0}function u(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const h=typeof requestAnimationFrame=="function";function j(e){return h?requestAnimationFrame(e):setTimeout(()=>e(u()),16)}function N(e){e!=null&&(h?cancelAnimationFrame(e):clearTimeout(e))}function E(e){let t=null,r=null;const l=()=>{t=null;const Z=r;r=null,e(...Z||[])},B=(...Z)=>{r=Z,t===null&&(t=j(l))};return B.cancel=()=>{N(t),t=null,r=null},B.flush=()=>{t!==null&&(N(t),l())},B}function g(e,t){let r=null,l=null;const B=()=>{if(r=null,l===null)return;const _=l;l=null,e(..._),Z()},Z=()=>{r=setTimeout(B,t),typeof r?.unref=="function"&&r.unref()},H=(..._)=>{r===null?(e(..._),Z()):(l=_,clearTimeout(r),Z())};return H.flush=()=>{if(r!==null&&clearTimeout(r),r=null,l===null)return;const _=l;l=null,e(..._)},H.cancel=()=>{r!==null&&clearTimeout(r),r=null,l=null},H.pending=()=>r!==null||l!==null,H}function v(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let y=0;function P(e="l"){return`${e}${(++y).toString(36)}`}}),te("packages/modules/shared/adapter.js",function(i,U){"use strict";Object.defineProperty(i,"EVENT_NAMES",{enumerable:!0,get:function(){return J}}),Object.defineProperty(i,"handlerName",{enumerable:!0,get:function(){return C}}),Object.defineProperty(i,"dashedName",{enumerable:!0,get:function(){return V}}),Object.defineProperty(i,"CONFIG_KEY_ALIASES",{enumerable:!0,get:function(){return K}}),Object.defineProperty(i,"aliasConfigKey",{enumerable:!0,get:function(){return q}}),Object.defineProperty(i,"isHandlerProp",{enumerable:!0,get:function(){return R}}),Object.defineProperty(i,"partition",{enumerable:!0,get:function(){return f}}),Object.defineProperty(i,"createGridController",{enumerable:!0,get:function(){return o}});const J=Object.freeze(["ready","destroy","render:first","render:done","config:changed","licence:changed","model:changed","rows:changed","rows:queued","rows:deferred","rows:paused","rows:resumed","row:received","row:sent","row:copied","row:moved","source:error","source:total","stream:chunk","stream:end","stream:evicted","rowDrag:started","rowDrag:moved","rowDrag:left","rowDrag:ended","cell:changed","cell:pending","cell:confirmed","cell:reverted","cell:conflict","cell:clicked","cell:dblclicked","cell:contextmenu","cell:mouseover","cell:mouseout","cell:mousedown","cell:mouseup","cell:edit:start","cell:edit:end","row:edit:start","row:edit:end","row:clicked","row:dblclicked","row:pending","row:confirmed","row:reverted","row:conflict","form:opened","form:closed","form:saved","form:error","sort:changed","filter:changed","group:toggled","facet:computed","facet:filtered","facet:expanded","facet:failed","column:moved","column:resized","column:visible","column:pinned","column:grouped","column:pivoted","column:filter:open","column:profile:open","column:menu:open","columns:changed","columns:tagged","columngroup:changed","header:contextmenu","pivot:drill","selection:changed","range:changed","clipboard:copy","page:changed","scroll","scroll:end","size:changed","detail:toggled","detail:cell:edit:start","detail:cell:edit:end","detail:row:edit:start","detail:row:edit:end","detail:cell:changed","toolpanel:focus","highlight:changed","find:changed","tree:loading","tree:loaded","tree:loadFailed","tree:loadAborted","state:changed","state:reset","history:changed","history:applied","views:changed","view:applied","view:saved","view:removed","view:renamed","view:default","formatting:changed","redaction:changed","permissions:changed","presentation:changed","presentation:started","presentation:ended","presentation:view","presentation:scale","presentation:spotlight","presentation:captured","comment:added","comment:edited","comment:deleted","comment:failed","comment:resolved","comment:unresolved","comment:threadOpened","comment:threadClosed","comment:indexLoaded","presence:published","presence:joined","presence:updated","presence:left","presence:failed","presence:lockRefused","diff:changed","diff:swapped","timeline:attached","timeline:detached","timeline:seek","timeline:seeking","annotation:changed","validation:failed","validation:cleared","export:progress","export:request","export:done","shortcuts:opened","shortcuts:closed","print:before","print:after","beforeEdit","beforeSort","beforeFilter","beforeColumnMove","beforeColumnResize","beforeColumnHide","beforeSelect","beforeRowAdd","beforeDelete","beforeRowMove","beforeGroup","beforeRowReceive","edit:cancelled","sort:cancelled","filter:cancelled","columnMove:cancelled","columnResize:cancelled","columnHide:cancelled","selection:cancelled","rowAdd:cancelled","delete:cancelled","rowMove:cancelled","group:cancelled","rowReceive:cancelled"]),Y=Object.freeze({sort:(n,b)=>n.sort.set(b||[]),filters:(n,b)=>n.filters.set(b||null),quickFilter:(n,b)=>{if(b&&typeof b=="object"){n.filters.quick(b.text||"",{mode:b.mode});return}n.filters.quick(typeof b=="string"?b:"")},selectedKeys:(n,b)=>n.selection.set(Array.isArray(b)?b:[])});function C(n){return`on${String(n).split(":").map(A=>A.charAt(0).toUpperCase()+A.slice(1)).join("")}`}function V(n){return String(n).replace(/:/g,"-")}const K=Object.freeze({"row-key":"rowKey","row-height":"rowHeight","header-height":"headerHeight","auto-height":"autoHeight"});function q(n){return Object.hasOwn(K,n)?K[n]:n}const Q=Object.freeze(Object.fromEntries(J.map(n=>[C(n),n])));function R(n){return Object.hasOwn(Q,n)}function f(n){const b={},A={},T={};for(const[O,G]of Object.entries(n||{})){if(R(O)){T[O]=G;continue}if(Object.hasOwn(Y,O)){A[O]=G;continue}b[O]=G}return{config:b,imperative:A,handlers:T}}function o(n){const b=n.createGrid;if(typeof b!="function")throw new TypeError("createGridController needs createGrid; pass it in from the grid package.");const A=f(n.props||{}),T=b(n.element,{...A.config});let O=A.handlers,G=A.config,D={};const x=F=>{if(!F||typeof F.type!="string")return;const z=O[C(F.type)];typeof z=="function"&&z(F)},M=T.on("*",x);for(const[F,z]of Object.entries(A.imperative))z!==void 0&&(Y[F](T,z),D[F]=z);let L=!1;return{grid:T,update(F){if(L)return;const z=f(F||{});O=z.handlers;const W={};for(const[S,k]of Object.entries(z.config))Object.is(G[S],k)||(W[S]=k);for(const S of Object.keys(G))Object.hasOwn(z.config,S)||(W[S]=void 0);Object.keys(W).length&&T.setAll(W),G=z.config;for(const[S,k]of Object.entries(Y)){const $=z.imperative[S];Object.is(D[S],$)||$===void 0&&!Object.hasOwn(D,S)||(k(T,$),D[S]=$)}},destroy(){L||(L=!0,M(),T.destroy())}}}}),te("packages/modules/react/viewers.js",function(i,U){"use strict";Object.defineProperty(i,"VIEWER_EVENTS",{enumerable:!0,get:function(){return C}}),Object.defineProperty(i,"VIEWER_APPLY",{enumerable:!0,get:function(){return V}}),Object.defineProperty(i,"VIEWER_BULK_UPDATE",{enumerable:!0,get:function(){return K}}),Object.defineProperty(i,"viewerHandlerName",{enumerable:!0,get:function(){return q}}),Object.defineProperty(i,"partitionViewerProps",{enumerable:!0,get:function(){return R}}),Object.defineProperty(i,"createViewerController",{enumerable:!0,get:function(){return f}});const Y=U("packages/core/src/internal/util.js").warnOnce,C=Object.freeze({kpi:Object.freeze(["tile:click","tile:dblclick","tile:contextmenu","node:toggle","change","tile:status"]),kanban:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:move","card:reverted","card:confirmed","selection:changed","column:collapse","card:add","drag:start","drag:end","swimlane:collapse","swimlane:reorder","column:reorder","filter:changed","sprint:changed","epic:changed","card:expand","card:drill","card:edit","card:sla","beforeMove","beforeAdd","beforeEdit","beforeLaneReorder","beforeColumnReorder","beforeColumnChange","move:cancelled","add:cancelled","edit:cancelled","laneReorder:cancelled","columnReorder:cancelled","columnChange:cancelled"]),tabs:Object.freeze(["beforeTabChange","tab:changed","tabChange:cancelled"]),calendar:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:mount","range:change","beforeMove","card:move"]),chart:Object.freeze(["click","hover","leave","draw","legend"]),gantt:Object.freeze(["schedule","error","history","columnResize","workload:click","task:filtered","draw","dependencies","cell:click","zoomChange","visibleRangeChange","taskExpand","taskCollapse","resourceExpand","resourceCollapse","selectionChange","rowMove","taskAdd","taskRemove","taskUpdate","dependencyAdd","dependencyRemove","dependencyUpdate","assignmentChange","datesChanged","change","schedulingConflict","taskDragStart","taskDrag","taskResizeStart","taskPartialResize","taskResizeEnd","percentBarDragStart","percentBarDrag","percentBarDrop","taskClick","taskDblClick","taskMouseOver","taskMouseOut","dirtyChange"]),layout:Object.freeze(["layout:changed","window:moved","window:resized","window:closed","beforeWindowClose","windowClose:cancelled"]),router:Object.freeze(["metrics","fields:changed"])}),V=Object.freeze({kpi:Object.freeze({rows:(o,n)=>o.setRows(Array.isArray(n)?n:[])}),kanban:Object.freeze({rows:(o,n)=>o.setRows(Array.isArray(n)?n:[]),quickFilter:(o,n)=>o.setQuickFilter(typeof n=="string"?n:""),sprint:(o,n)=>o.setSprint(n),epic:(o,n)=>o.setEpic(n),loading:(o,n)=>o.setLoading(!!n),error:(o,n)=>o.setError(n??null)}),gantt:Object.freeze({tasks:(o,n)=>o.setTasks(Array.isArray(n)?n:[]),dependencies:(o,n)=>o.setDependencies(Array.isArray(n)?n:[])}),tabs:Object.freeze({active:(o,n)=>{typeof n=="string"&&o.activate(n)}}),calendar:Object.freeze({rows:(o,n)=>o.setRows(Array.isArray(n)?n:[]),view:(o,n)=>o.setView(n),date:(o,n)=>o.goTo(n),move:(o,n,b)=>o.move(n,b)}),chart:Object.freeze({}),layout:Object.freeze({})}),K=Object.freeze({chart:"update"});function q(o){return`on${String(o).split(":").map(b=>b.charAt(0).toUpperCase()+b.slice(1)).join("")}`}const Q=Object.freeze(Object.fromEntries(Object.entries(C).map(([o,n])=>[o,Object.freeze(Object.fromEntries(n.map(b=>[q(b),b])))])));function R(o,n){const b=Q[o]||{},A=V[o]||{},T={},O={},G={};for(const[D,x]of Object.entries(n||{})){if(Object.hasOwn(b,D)){G[D]=x;continue}if(Object.hasOwn(A,D)){O[D]=x,T[D]=x;continue}T[D]=x}return{config:T,live:O,handlers:G}}function f(o){const n=String(o.viewer),b=o.mount,A=o.name||n;if(typeof b!="function")throw new TypeError(`createViewerController needs a mount factory for "${n}"; pass the module's own factory in, e.g. { createKPI } from lattice-grid/modules/kpi.`);const T=R(n,o.props||{}),O=b(o.element,{...T.config});if(!O||typeof O!="object")throw new TypeError(`the ${A} factory returned no instance; nothing can be driven.`);let G=T.handlers,D=T.config;const x={...T.live},M=[];if(typeof O.on=="function")for(const W of C[n]||[]){const S=q(W),k=O.on(W,$=>{const w=G[S];typeof w=="function"&&w($)});typeof k=="function"&&M.push(k)}const L=K[n],F=V[n]||{};let z=!1;return{instance:O,update(W){if(z)return;const S=R(n,W||{});G=S.handlers;const k={};for(const[w,X]of Object.entries(S.config))Object.is(D[w],X)||(k[w]=X);if(D=S.config,!Object.keys(k).length)return;const $=[];for(const w of Object.keys(k)){const X=F[w];if(X){X(O,k[w]),x[w]=k[w];continue}L&&typeof O[L]=="function"||$.push(w)}if(L&&typeof O[L]=="function"){const w={};for(const X of Object.keys(k))F[X]||(w[X]=k[X]);Object.keys(w).length&&O[L](w)}$.length&&Y(`react.viewer.${n}.mountOnly.${$.join(".")}`,`${A}: ${$.map(w=>`\`${w}\``).join(", ")} changed, but ${A} takes ${$.length===1?"it":"them"} only when the viewer is created. Nothing was applied and the viewer was NOT rebuilt — rebuilding it silently would throw away scroll position, selection and expansion. Give the component a \`key\` that changes when this must take effect, so the rebuild is yours and visible, or drive the instance through the ref.`)},destroy(){if(!z){z=!0;for(const W of M)try{W()}catch{}M.length=0,typeof O.destroy=="function"&&O.destroy()}}}}}),te("packages/modules/presets/index.js",function(i,U){"use strict";Object.defineProperty(i,"themeFromMui",{enumerable:!0,get:function(){return q}}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return Q}});const Y=U("packages/core/src/internal/util.js").warnOnce;function C(R,f){if(typeof R!="string")return R;const o=R.trim().match(/^#([0-9a-f]{6})$/i);if(!o)return R;const n=o[1],b=parseInt(n.slice(0,2),16),A=parseInt(n.slice(2,4),16),T=parseInt(n.slice(4,6),16);return`rgba(${b}, ${A}, ${T}, ${f})`}function V(R){const f=R.palette,o=f.mode==="dark";return{"--lattice-background":f.background.default,"--lattice-surface":f.background.paper,"--lattice-surface-alt":o?"#2a2a2a":f.grey[50],"--lattice-border-color":f.divider,"--lattice-border-strong":o?f.grey[600]:f.grey[400],"--lattice-foreground":f.text.primary,"--lattice-foreground-muted":f.text.secondary,"--lattice-header-foreground":f.text.primary,"--lattice-accent":f.primary.main,"--lattice-accent-contrast":f.primary.contrastText,"--lattice-link-color":f.primary.main,"--lattice-selected-background":C(f.primary.main,.12),"--lattice-hovered-background":C(f.text.primary,.06),"--lattice-focus-color":f.primary.main,"--lattice-variant-danger-solid":f.error.main,"--lattice-variant-danger-fill":C(f.error.main,.12),"--lattice-variant-warning-solid":f.warning.main,"--lattice-variant-warning-fill":C(f.warning.main,.12),"--lattice-variant-success-solid":f.success.main,"--lattice-variant-success-fill":C(f.success.main,.12),"--lattice-variant-info-solid":f.info.main,"--lattice-variant-info-fill":C(f.info.main,.12),"--lattice-radius":`${R.shape.borderRadius}px`,"--lattice-font-family":R.typography.fontFamily,"--lattice-font-size":`${R.typography.body2.fontSize}`,"--lattice-header-font-weight":String(R.typography.fontWeightMedium)}}function K(R){return`.lattice {
7
7
  ${Object.entries(R).map(([o,n])=>` ${o}: ${n};`).join(`
8
8
  `)}
9
9
  }
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * Lattice Grid 1.89.0, svelte module
2
+ * Lattice Grid 1.89.1, svelte module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
6
- (function(pe){"use strict";var le=Object.create(null),de=Object.create(null);function ee(o,H){le[o]=H}function fe(o){var H=de[o];if(H)return H;var Z=Object.create(null);de[o]=Z;var U=le[o];if(!U)throw new Error("[lattice] missing module: "+o);return U(Z,fe),Z}ee("packages/core/src/internal/util.js",function(o,H){"use strict";Object.defineProperty(o,"VERSION",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"reportedWarnings",{enumerable:!0,get:function(){return n}}),Object.defineProperty(o,"warnOnce",{enumerable:!0,get:function(){return C}}),Object.defineProperty(o,"infoOnce",{enumerable:!0,get:function(){return N}}),Object.defineProperty(o,"resetWarnings",{enumerable:!0,get:function(){return O}}),Object.defineProperty(o,"fail",{enumerable:!0,get:function(){return I}}),Object.defineProperty(o,"invariant",{enumerable:!0,get:function(){return D}}),Object.defineProperty(o,"DEV",{enumerable:!0,get:function(){return X}}),Object.defineProperty(o,"isObject",{enumerable:!0,get:function(){return L}}),Object.defineProperty(o,"isFunction",{enumerable:!0,get:function(){return V}}),Object.defineProperty(o,"isNil",{enumerable:!0,get:function(){return M}}),Object.defineProperty(o,"isBlank",{enumerable:!0,get:function(){return z}}),Object.defineProperty(o,"isCtor",{enumerable:!0,get:function(){return F}}),Object.defineProperty(o,"pathGetter",{enumerable:!0,get:function(){return k}}),Object.defineProperty(o,"pathSetter",{enumerable:!0,get:function(){return w}}),Object.defineProperty(o,"getPath",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(o,"setPath",{enumerable:!0,get:function(){return te}}),Object.defineProperty(o,"humanise",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(o,"escapeHtml",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(o,"titleCase",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(o,"expand",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(o,"toArray",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(o,"merge",{enumerable:!0,get:function(){return c}}),Object.defineProperty(o,"mergeRow",{enumerable:!0,get:function(){return b}}),Object.defineProperty(o,"Lru",{enumerable:!0,get:function(){return d}}),Object.defineProperty(o,"collator",{enumerable:!0,get:function(){return a}}),Object.defineProperty(o,"defaultCompare",{enumerable:!0,get:function(){return g}}),Object.defineProperty(o,"now",{enumerable:!0,get:function(){return s}}),Object.defineProperty(o,"nextFrame",{enumerable:!0,get:function(){return j}}),Object.defineProperty(o,"cancelFrame",{enumerable:!0,get:function(){return A}}),Object.defineProperty(o,"frameBatched",{enumerable:!0,get:function(){return E}}),Object.defineProperty(o,"settleDebounce",{enumerable:!0,get:function(){return m}}),Object.defineProperty(o,"whenIdle",{enumerable:!0,get:function(){return v}}),Object.defineProperty(o,"uid",{enumerable:!0,get:function(){return P}});const Z="1.89.0";async function U(){return Z}const S="1.89.0",G=new Set,q=2e3;function K(e){if(G.add(e),G.size>q){const t=G.values().next().value;t!==void 0&&G.delete(t)}}const J=[],R=500;function f(e,t,r){J.push({key:e,level:t,message:r.map(l=>typeof l=="string"?l:i(l)).join(" "),at:Date.now()}),J.length>R&&J.shift()}function i(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function n(){return J.map(e=>({...e}))}function p(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function C(e,...t){if(G.has(e))return;K(e);const r=p(t);f(e,"warn",r),console.warn("[lattice]",...r)}function N(e,...t){if(G.has(e))return;K(e);const r=p(t);f(e,"info",r),console.info("[lattice]",...r)}function O(){G.clear(),J.length=0}function I(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function D(e,t){e||I(t)}const X=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function L(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function V(e){return typeof e=="function"}function M(e){return e==null}function z(e){return e==null||e===""}function F(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const T=new Map;function k(e){let t=T.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),l=r.length;t=Y=>{let B=Y;for(let W=0;W<l;W++){if(B==null)return;B=B[r[W]]}return B}}return T.set(e,t),t}const $=new Map;function w(e){let t=$.get(e);if(t)return t;if(!e.includes("."))t=(r,l)=>{r!=null&&(r[e]=l)};else{const r=e.split("."),l=r.length-1;t=(Y,B)=>{let W=Y;for(let x=0;x<l;x++){if(W==null)return;const se=r[x];W[se]==null&&(W[se]={}),W=W[se]}W!=null&&(W[r[l]]=B)}}return $.set(e,t),t}function Q(e,t){return k(t)(e)}function te(e,t,r){w(t)(e,r)}function oe(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,r=>r.toUpperCase()):""}const _={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ne(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>_[r]):t}function ie(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ce(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:L(e)?e:{[t]:e,enabled:!0}}function ae(e){return e==null?[]:Array.isArray(e)?e:[e]}const ue=Object.freeze(new Set(["__proto__","constructor","prototype"]));function c(e,t){if(!L(e))return L(t)?{...t}:t;if(!L(t))return t===void 0?e:t;const r={...e};for(const l of Object.keys(t)){if(ue.has(l))continue;const Y=t[l];Y!==void 0&&(r[l]=L(Y)&&L(r[l])?c(r[l],Y):Y)}return r}function b(e,t){if(!L(e)||!L(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class d{#n;#e=new Map;#t;constructor(t=256,r=null){this.#n=t,this.#t=r}get size(){return this.#e.size}get max(){return this.#n}set max(t){this.#n=t,this.#r()}has(t){return this.#e.has(t)}get(t){const r=this.#e;if(!r.has(t))return;const l=r.get(t);return r.delete(t),r.set(t,l),l}peek(t){return this.#e.get(t)}set(t,r){const l=this.#e;return l.has(t)&&l.delete(t),l.set(t,r),this.#r(),r}delete(t){const r=this.#e.get(t);return this.#e.delete(t)&&this.#t&&this.#t(r,t),r}clear(){if(this.#t)for(const[t,r]of this.#e)this.#t(r,t);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const t=this.#e;for(;t.size>this.#n;){const r=t.keys().next().value,l=t.get(r);t.delete(r),this.#t&&this.#t(l,r)}}}const u=new Map;function a(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let l=u.get(r);return l||(l=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),u.set(r,l)),l}function g(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),l=String(t);return r<l?-1:r>l?1:0}function s(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const h=typeof requestAnimationFrame=="function";function j(e){return h?requestAnimationFrame(e):setTimeout(()=>e(s()),16)}function A(e){e!=null&&(h?cancelAnimationFrame(e):clearTimeout(e))}function E(e){let t=null,r=null;const l=()=>{t=null;const B=r;r=null,e(...B||[])},Y=(...B)=>{r=B,t===null&&(t=j(l))};return Y.cancel=()=>{A(t),t=null,r=null},Y.flush=()=>{t!==null&&(A(t),l())},Y}function m(e,t){let r=null,l=null;const Y=()=>{if(r=null,l===null)return;const x=l;l=null,e(...x),B()},B=()=>{r=setTimeout(Y,t),typeof r?.unref=="function"&&r.unref()},W=(...x)=>{r===null?(e(...x),B()):(l=x,clearTimeout(r),B())};return W.flush=()=>{if(r!==null&&clearTimeout(r),r=null,l===null)return;const x=l;l=null,e(...x)},W.cancel=()=>{r!==null&&clearTimeout(r),r=null,l=null},W.pending=()=>r!==null||l!==null,W}function v(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let y=0;function P(e="l"){return`${e}${(++y).toString(36)}`}}),ee("packages/modules/shared/adapter.js",function(o,H){"use strict";Object.defineProperty(o,"EVENT_NAMES",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(o,"handlerName",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"dashedName",{enumerable:!0,get:function(){return G}}),Object.defineProperty(o,"CONFIG_KEY_ALIASES",{enumerable:!0,get:function(){return q}}),Object.defineProperty(o,"aliasConfigKey",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"isHandlerProp",{enumerable:!0,get:function(){return R}}),Object.defineProperty(o,"partition",{enumerable:!0,get:function(){return f}}),Object.defineProperty(o,"createGridController",{enumerable:!0,get:function(){return i}});const Z=Object.freeze(["ready","destroy","render:first","render:done","config:changed","licence:changed","model:changed","rows:changed","rows:queued","rows:deferred","rows:paused","rows:resumed","row:received","row:sent","row:copied","row:moved","source:error","source:total","stream:chunk","stream:end","stream:evicted","rowDrag:started","rowDrag:moved","rowDrag:left","rowDrag:ended","cell:changed","cell:pending","cell:confirmed","cell:reverted","cell:conflict","cell:clicked","cell:dblclicked","cell:contextmenu","cell:mouseover","cell:mouseout","cell:mousedown","cell:mouseup","cell:edit:start","cell:edit:end","row:edit:start","row:edit:end","row:clicked","row:dblclicked","row:pending","row:confirmed","row:reverted","row:conflict","form:opened","form:closed","form:saved","form:error","sort:changed","filter:changed","group:toggled","facet:computed","facet:filtered","facet:expanded","facet:failed","column:moved","column:resized","column:visible","column:pinned","column:grouped","column:pivoted","column:filter:open","column:profile:open","column:menu:open","columns:changed","columns:tagged","columngroup:changed","header:contextmenu","pivot:drill","selection:changed","range:changed","clipboard:copy","page:changed","scroll","scroll:end","size:changed","detail:toggled","detail:cell:edit:start","detail:cell:edit:end","detail:row:edit:start","detail:row:edit:end","detail:cell:changed","toolpanel:focus","highlight:changed","find:changed","tree:loading","tree:loaded","tree:loadFailed","tree:loadAborted","state:changed","state:reset","history:changed","history:applied","views:changed","view:applied","view:saved","view:removed","view:renamed","view:default","formatting:changed","redaction:changed","permissions:changed","presentation:changed","presentation:started","presentation:ended","presentation:view","presentation:scale","presentation:spotlight","presentation:captured","comment:added","comment:edited","comment:deleted","comment:failed","comment:resolved","comment:unresolved","comment:threadOpened","comment:threadClosed","comment:indexLoaded","presence:published","presence:joined","presence:updated","presence:left","presence:failed","presence:lockRefused","diff:changed","diff:swapped","timeline:attached","timeline:detached","timeline:seek","timeline:seeking","annotation:changed","validation:failed","validation:cleared","export:progress","export:request","export:done","shortcuts:opened","shortcuts:closed","print:before","print:after","beforeEdit","beforeSort","beforeFilter","beforeColumnMove","beforeColumnResize","beforeColumnHide","beforeSelect","beforeRowAdd","beforeDelete","beforeRowMove","beforeGroup","beforeRowReceive","edit:cancelled","sort:cancelled","filter:cancelled","columnMove:cancelled","columnResize:cancelled","columnHide:cancelled","selection:cancelled","rowAdd:cancelled","delete:cancelled","rowMove:cancelled","group:cancelled","rowReceive:cancelled"]),U=Object.freeze({sort:(n,p)=>n.sort.set(p||[]),filters:(n,p)=>n.filters.set(p||null),quickFilter:(n,p)=>{if(p&&typeof p=="object"){n.filters.quick(p.text||"",{mode:p.mode});return}n.filters.quick(typeof p=="string"?p:"")},selectedKeys:(n,p)=>n.selection.set(Array.isArray(p)?p:[])});function S(n){return`on${String(n).split(":").map(C=>C.charAt(0).toUpperCase()+C.slice(1)).join("")}`}function G(n){return String(n).replace(/:/g,"-")}const q=Object.freeze({"row-key":"rowKey","row-height":"rowHeight","header-height":"headerHeight","auto-height":"autoHeight"});function K(n){return Object.hasOwn(q,n)?q[n]:n}const J=Object.freeze(Object.fromEntries(Z.map(n=>[S(n),n])));function R(n){return Object.hasOwn(J,n)}function f(n){const p={},C={},N={};for(const[O,I]of Object.entries(n||{})){if(R(O)){N[O]=I;continue}if(Object.hasOwn(U,O)){C[O]=I;continue}p[O]=I}return{config:p,imperative:C,handlers:N}}function i(n){const p=n.createGrid;if(typeof p!="function")throw new TypeError("createGridController needs createGrid; pass it in from the grid package.");const C=f(n.props||{}),N=p(n.element,{...C.config});let O=C.handlers,I=C.config,D={};const X=M=>{if(!M||typeof M.type!="string")return;const z=O[S(M.type)];typeof z=="function"&&z(M)},L=N.on("*",X);for(const[M,z]of Object.entries(C.imperative))z!==void 0&&(U[M](N,z),D[M]=z);let V=!1;return{grid:N,update(M){if(V)return;const z=f(M||{});O=z.handlers;const F={};for(const[T,k]of Object.entries(z.config))Object.is(I[T],k)||(F[T]=k);for(const T of Object.keys(I))Object.hasOwn(z.config,T)||(F[T]=void 0);Object.keys(F).length&&N.setAll(F),I=z.config;for(const[T,k]of Object.entries(U)){const $=z.imperative[T];Object.is(D[T],$)||$===void 0&&!Object.hasOwn(D,T)||(k(N,$),D[T]=$)}},destroy(){V||(V=!0,L(),N.destroy())}}}}),ee("packages/modules/react/viewers.js",function(o,H){"use strict";Object.defineProperty(o,"VIEWER_EVENTS",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"VIEWER_APPLY",{enumerable:!0,get:function(){return G}}),Object.defineProperty(o,"VIEWER_BULK_UPDATE",{enumerable:!0,get:function(){return q}}),Object.defineProperty(o,"viewerHandlerName",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"partitionViewerProps",{enumerable:!0,get:function(){return R}}),Object.defineProperty(o,"createViewerController",{enumerable:!0,get:function(){return f}});const U=H("packages/core/src/internal/util.js").warnOnce,S=Object.freeze({kpi:Object.freeze(["tile:click","tile:dblclick","tile:contextmenu","node:toggle","change","tile:status"]),kanban:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:move","card:reverted","card:confirmed","selection:changed","column:collapse","card:add","drag:start","drag:end","swimlane:collapse","swimlane:reorder","column:reorder","filter:changed","sprint:changed","epic:changed","card:expand","card:drill","card:edit","card:sla","beforeMove","beforeAdd","beforeEdit","beforeLaneReorder","beforeColumnReorder","beforeColumnChange","move:cancelled","add:cancelled","edit:cancelled","laneReorder:cancelled","columnReorder:cancelled","columnChange:cancelled"]),tabs:Object.freeze(["beforeTabChange","tab:changed","tabChange:cancelled"]),calendar:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:mount","range:change","beforeMove","card:move"]),chart:Object.freeze(["click","hover","leave","draw","legend"]),gantt:Object.freeze(["schedule","error","history","columnResize","workload:click","task:filtered","draw","dependencies","cell:click","zoomChange","visibleRangeChange","taskExpand","taskCollapse","resourceExpand","resourceCollapse","selectionChange","rowMove","taskAdd","taskRemove","taskUpdate","dependencyAdd","dependencyRemove","dependencyUpdate","assignmentChange","datesChanged","change","schedulingConflict","taskDragStart","taskDrag","taskResizeStart","taskPartialResize","taskResizeEnd","percentBarDragStart","percentBarDrag","percentBarDrop","taskClick","taskDblClick","taskMouseOver","taskMouseOut","dirtyChange"]),layout:Object.freeze(["layout:changed","window:moved","window:resized","window:closed","beforeWindowClose","windowClose:cancelled"]),router:Object.freeze(["metrics","fields:changed"])}),G=Object.freeze({kpi:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[])}),kanban:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[]),quickFilter:(i,n)=>i.setQuickFilter(typeof n=="string"?n:""),sprint:(i,n)=>i.setSprint(n),epic:(i,n)=>i.setEpic(n),loading:(i,n)=>i.setLoading(!!n),error:(i,n)=>i.setError(n??null)}),gantt:Object.freeze({tasks:(i,n)=>i.setTasks(Array.isArray(n)?n:[]),dependencies:(i,n)=>i.setDependencies(Array.isArray(n)?n:[])}),tabs:Object.freeze({active:(i,n)=>{typeof n=="string"&&i.activate(n)}}),calendar:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[]),view:(i,n)=>i.setView(n),date:(i,n)=>i.goTo(n),move:(i,n,p)=>i.move(n,p)}),chart:Object.freeze({}),layout:Object.freeze({})}),q=Object.freeze({chart:"update"});function K(i){return`on${String(i).split(":").map(p=>p.charAt(0).toUpperCase()+p.slice(1)).join("")}`}const J=Object.freeze(Object.fromEntries(Object.entries(S).map(([i,n])=>[i,Object.freeze(Object.fromEntries(n.map(p=>[K(p),p])))])));function R(i,n){const p=J[i]||{},C=G[i]||{},N={},O={},I={};for(const[D,X]of Object.entries(n||{})){if(Object.hasOwn(p,D)){I[D]=X;continue}if(Object.hasOwn(C,D)){O[D]=X,N[D]=X;continue}N[D]=X}return{config:N,live:O,handlers:I}}function f(i){const n=String(i.viewer),p=i.mount,C=i.name||n;if(typeof p!="function")throw new TypeError(`createViewerController needs a mount factory for "${n}"; pass the module's own factory in, e.g. { createKPI } from lattice-grid/modules/kpi.`);const N=R(n,i.props||{}),O=p(i.element,{...N.config});if(!O||typeof O!="object")throw new TypeError(`the ${C} factory returned no instance; nothing can be driven.`);let I=N.handlers,D=N.config;const X={...N.live},L=[];if(typeof O.on=="function")for(const F of S[n]||[]){const T=K(F),k=O.on(F,$=>{const w=I[T];typeof w=="function"&&w($)});typeof k=="function"&&L.push(k)}const V=q[n],M=G[n]||{};let z=!1;return{instance:O,update(F){if(z)return;const T=R(n,F||{});I=T.handlers;const k={};for(const[w,Q]of Object.entries(T.config))Object.is(D[w],Q)||(k[w]=Q);if(D=T.config,!Object.keys(k).length)return;const $=[];for(const w of Object.keys(k)){const Q=M[w];if(Q){Q(O,k[w]),X[w]=k[w];continue}V&&typeof O[V]=="function"||$.push(w)}if(V&&typeof O[V]=="function"){const w={};for(const Q of Object.keys(k))M[Q]||(w[Q]=k[Q]);Object.keys(w).length&&O[V](w)}$.length&&U(`react.viewer.${n}.mountOnly.${$.join(".")}`,`${C}: ${$.map(w=>`\`${w}\``).join(", ")} changed, but ${C} takes ${$.length===1?"it":"them"} only when the viewer is created. Nothing was applied and the viewer was NOT rebuilt — rebuilding it silently would throw away scroll position, selection and expansion. Give the component a \`key\` that changes when this must take effect, so the rebuild is yours and visible, or drive the instance through the ref.`)},destroy(){if(!z){z=!0;for(const F of L)try{F()}catch{}L.length=0,typeof O.destroy=="function"&&O.destroy()}}}}}),ee("packages/modules/presets/index.js",function(o,H){"use strict";Object.defineProperty(o,"themeFromMui",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"default",{enumerable:!0,get:function(){return J}});const U=H("packages/core/src/internal/util.js").warnOnce;function S(R,f){if(typeof R!="string")return R;const i=R.trim().match(/^#([0-9a-f]{6})$/i);if(!i)return R;const n=i[1],p=parseInt(n.slice(0,2),16),C=parseInt(n.slice(2,4),16),N=parseInt(n.slice(4,6),16);return`rgba(${p}, ${C}, ${N}, ${f})`}function G(R){const f=R.palette,i=f.mode==="dark";return{"--lattice-background":f.background.default,"--lattice-surface":f.background.paper,"--lattice-surface-alt":i?"#2a2a2a":f.grey[50],"--lattice-border-color":f.divider,"--lattice-border-strong":i?f.grey[600]:f.grey[400],"--lattice-foreground":f.text.primary,"--lattice-foreground-muted":f.text.secondary,"--lattice-header-foreground":f.text.primary,"--lattice-accent":f.primary.main,"--lattice-accent-contrast":f.primary.contrastText,"--lattice-link-color":f.primary.main,"--lattice-selected-background":S(f.primary.main,.12),"--lattice-hovered-background":S(f.text.primary,.06),"--lattice-focus-color":f.primary.main,"--lattice-variant-danger-solid":f.error.main,"--lattice-variant-danger-fill":S(f.error.main,.12),"--lattice-variant-warning-solid":f.warning.main,"--lattice-variant-warning-fill":S(f.warning.main,.12),"--lattice-variant-success-solid":f.success.main,"--lattice-variant-success-fill":S(f.success.main,.12),"--lattice-variant-info-solid":f.info.main,"--lattice-variant-info-fill":S(f.info.main,.12),"--lattice-radius":`${R.shape.borderRadius}px`,"--lattice-font-family":R.typography.fontFamily,"--lattice-font-size":`${R.typography.body2.fontSize}`,"--lattice-header-font-weight":String(R.typography.fontWeightMedium)}}function q(R){return`.lattice {
6
+ (function(pe){"use strict";var le=Object.create(null),de=Object.create(null);function ee(o,H){le[o]=H}function fe(o){var H=de[o];if(H)return H;var Z=Object.create(null);de[o]=Z;var U=le[o];if(!U)throw new Error("[lattice] missing module: "+o);return U(Z,fe),Z}ee("packages/core/src/internal/util.js",function(o,H){"use strict";Object.defineProperty(o,"VERSION",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"reportedWarnings",{enumerable:!0,get:function(){return n}}),Object.defineProperty(o,"warnOnce",{enumerable:!0,get:function(){return C}}),Object.defineProperty(o,"infoOnce",{enumerable:!0,get:function(){return N}}),Object.defineProperty(o,"resetWarnings",{enumerable:!0,get:function(){return O}}),Object.defineProperty(o,"fail",{enumerable:!0,get:function(){return I}}),Object.defineProperty(o,"invariant",{enumerable:!0,get:function(){return D}}),Object.defineProperty(o,"DEV",{enumerable:!0,get:function(){return X}}),Object.defineProperty(o,"isObject",{enumerable:!0,get:function(){return L}}),Object.defineProperty(o,"isFunction",{enumerable:!0,get:function(){return V}}),Object.defineProperty(o,"isNil",{enumerable:!0,get:function(){return M}}),Object.defineProperty(o,"isBlank",{enumerable:!0,get:function(){return z}}),Object.defineProperty(o,"isCtor",{enumerable:!0,get:function(){return F}}),Object.defineProperty(o,"pathGetter",{enumerable:!0,get:function(){return k}}),Object.defineProperty(o,"pathSetter",{enumerable:!0,get:function(){return w}}),Object.defineProperty(o,"getPath",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(o,"setPath",{enumerable:!0,get:function(){return te}}),Object.defineProperty(o,"humanise",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(o,"escapeHtml",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(o,"titleCase",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(o,"expand",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(o,"toArray",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(o,"merge",{enumerable:!0,get:function(){return c}}),Object.defineProperty(o,"mergeRow",{enumerable:!0,get:function(){return b}}),Object.defineProperty(o,"Lru",{enumerable:!0,get:function(){return d}}),Object.defineProperty(o,"collator",{enumerable:!0,get:function(){return a}}),Object.defineProperty(o,"defaultCompare",{enumerable:!0,get:function(){return g}}),Object.defineProperty(o,"now",{enumerable:!0,get:function(){return s}}),Object.defineProperty(o,"nextFrame",{enumerable:!0,get:function(){return j}}),Object.defineProperty(o,"cancelFrame",{enumerable:!0,get:function(){return A}}),Object.defineProperty(o,"frameBatched",{enumerable:!0,get:function(){return E}}),Object.defineProperty(o,"settleDebounce",{enumerable:!0,get:function(){return m}}),Object.defineProperty(o,"whenIdle",{enumerable:!0,get:function(){return v}}),Object.defineProperty(o,"uid",{enumerable:!0,get:function(){return P}});const Z="1.89.1";async function U(){return Z}const S="1.89.1",G=new Set,q=2e3;function K(e){if(G.add(e),G.size>q){const t=G.values().next().value;t!==void 0&&G.delete(t)}}const J=[],R=500;function f(e,t,r){J.push({key:e,level:t,message:r.map(l=>typeof l=="string"?l:i(l)).join(" "),at:Date.now()}),J.length>R&&J.shift()}function i(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function n(){return J.map(e=>({...e}))}function p(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function C(e,...t){if(G.has(e))return;K(e);const r=p(t);f(e,"warn",r),console.warn("[lattice]",...r)}function N(e,...t){if(G.has(e))return;K(e);const r=p(t);f(e,"info",r),console.info("[lattice]",...r)}function O(){G.clear(),J.length=0}function I(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function D(e,t){e||I(t)}const X=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function L(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function V(e){return typeof e=="function"}function M(e){return e==null}function z(e){return e==null||e===""}function F(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const T=new Map;function k(e){let t=T.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),l=r.length;t=Y=>{let B=Y;for(let W=0;W<l;W++){if(B==null)return;B=B[r[W]]}return B}}return T.set(e,t),t}const $=new Map;function w(e){let t=$.get(e);if(t)return t;if(!e.includes("."))t=(r,l)=>{r!=null&&(r[e]=l)};else{const r=e.split("."),l=r.length-1;t=(Y,B)=>{let W=Y;for(let x=0;x<l;x++){if(W==null)return;const se=r[x];W[se]==null&&(W[se]={}),W=W[se]}W!=null&&(W[r[l]]=B)}}return $.set(e,t),t}function Q(e,t){return k(t)(e)}function te(e,t,r){w(t)(e,r)}function oe(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,r=>r.toUpperCase()):""}const _={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ne(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>_[r]):t}function ie(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ce(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:L(e)?e:{[t]:e,enabled:!0}}function ae(e){return e==null?[]:Array.isArray(e)?e:[e]}const ue=Object.freeze(new Set(["__proto__","constructor","prototype"]));function c(e,t){if(!L(e))return L(t)?{...t}:t;if(!L(t))return t===void 0?e:t;const r={...e};for(const l of Object.keys(t)){if(ue.has(l))continue;const Y=t[l];Y!==void 0&&(r[l]=L(Y)&&L(r[l])?c(r[l],Y):Y)}return r}function b(e,t){if(!L(e)||!L(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class d{#n;#e=new Map;#t;constructor(t=256,r=null){this.#n=t,this.#t=r}get size(){return this.#e.size}get max(){return this.#n}set max(t){this.#n=t,this.#r()}has(t){return this.#e.has(t)}get(t){const r=this.#e;if(!r.has(t))return;const l=r.get(t);return r.delete(t),r.set(t,l),l}peek(t){return this.#e.get(t)}set(t,r){const l=this.#e;return l.has(t)&&l.delete(t),l.set(t,r),this.#r(),r}delete(t){const r=this.#e.get(t);return this.#e.delete(t)&&this.#t&&this.#t(r,t),r}clear(){if(this.#t)for(const[t,r]of this.#e)this.#t(r,t);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const t=this.#e;for(;t.size>this.#n;){const r=t.keys().next().value,l=t.get(r);t.delete(r),this.#t&&this.#t(l,r)}}}const u=new Map;function a(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let l=u.get(r);return l||(l=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),u.set(r,l)),l}function g(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),l=String(t);return r<l?-1:r>l?1:0}function s(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const h=typeof requestAnimationFrame=="function";function j(e){return h?requestAnimationFrame(e):setTimeout(()=>e(s()),16)}function A(e){e!=null&&(h?cancelAnimationFrame(e):clearTimeout(e))}function E(e){let t=null,r=null;const l=()=>{t=null;const B=r;r=null,e(...B||[])},Y=(...B)=>{r=B,t===null&&(t=j(l))};return Y.cancel=()=>{A(t),t=null,r=null},Y.flush=()=>{t!==null&&(A(t),l())},Y}function m(e,t){let r=null,l=null;const Y=()=>{if(r=null,l===null)return;const x=l;l=null,e(...x),B()},B=()=>{r=setTimeout(Y,t),typeof r?.unref=="function"&&r.unref()},W=(...x)=>{r===null?(e(...x),B()):(l=x,clearTimeout(r),B())};return W.flush=()=>{if(r!==null&&clearTimeout(r),r=null,l===null)return;const x=l;l=null,e(...x)},W.cancel=()=>{r!==null&&clearTimeout(r),r=null,l=null},W.pending=()=>r!==null||l!==null,W}function v(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let y=0;function P(e="l"){return`${e}${(++y).toString(36)}`}}),ee("packages/modules/shared/adapter.js",function(o,H){"use strict";Object.defineProperty(o,"EVENT_NAMES",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(o,"handlerName",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"dashedName",{enumerable:!0,get:function(){return G}}),Object.defineProperty(o,"CONFIG_KEY_ALIASES",{enumerable:!0,get:function(){return q}}),Object.defineProperty(o,"aliasConfigKey",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"isHandlerProp",{enumerable:!0,get:function(){return R}}),Object.defineProperty(o,"partition",{enumerable:!0,get:function(){return f}}),Object.defineProperty(o,"createGridController",{enumerable:!0,get:function(){return i}});const Z=Object.freeze(["ready","destroy","render:first","render:done","config:changed","licence:changed","model:changed","rows:changed","rows:queued","rows:deferred","rows:paused","rows:resumed","row:received","row:sent","row:copied","row:moved","source:error","source:total","stream:chunk","stream:end","stream:evicted","rowDrag:started","rowDrag:moved","rowDrag:left","rowDrag:ended","cell:changed","cell:pending","cell:confirmed","cell:reverted","cell:conflict","cell:clicked","cell:dblclicked","cell:contextmenu","cell:mouseover","cell:mouseout","cell:mousedown","cell:mouseup","cell:edit:start","cell:edit:end","row:edit:start","row:edit:end","row:clicked","row:dblclicked","row:pending","row:confirmed","row:reverted","row:conflict","form:opened","form:closed","form:saved","form:error","sort:changed","filter:changed","group:toggled","facet:computed","facet:filtered","facet:expanded","facet:failed","column:moved","column:resized","column:visible","column:pinned","column:grouped","column:pivoted","column:filter:open","column:profile:open","column:menu:open","columns:changed","columns:tagged","columngroup:changed","header:contextmenu","pivot:drill","selection:changed","range:changed","clipboard:copy","page:changed","scroll","scroll:end","size:changed","detail:toggled","detail:cell:edit:start","detail:cell:edit:end","detail:row:edit:start","detail:row:edit:end","detail:cell:changed","toolpanel:focus","highlight:changed","find:changed","tree:loading","tree:loaded","tree:loadFailed","tree:loadAborted","state:changed","state:reset","history:changed","history:applied","views:changed","view:applied","view:saved","view:removed","view:renamed","view:default","formatting:changed","redaction:changed","permissions:changed","presentation:changed","presentation:started","presentation:ended","presentation:view","presentation:scale","presentation:spotlight","presentation:captured","comment:added","comment:edited","comment:deleted","comment:failed","comment:resolved","comment:unresolved","comment:threadOpened","comment:threadClosed","comment:indexLoaded","presence:published","presence:joined","presence:updated","presence:left","presence:failed","presence:lockRefused","diff:changed","diff:swapped","timeline:attached","timeline:detached","timeline:seek","timeline:seeking","annotation:changed","validation:failed","validation:cleared","export:progress","export:request","export:done","shortcuts:opened","shortcuts:closed","print:before","print:after","beforeEdit","beforeSort","beforeFilter","beforeColumnMove","beforeColumnResize","beforeColumnHide","beforeSelect","beforeRowAdd","beforeDelete","beforeRowMove","beforeGroup","beforeRowReceive","edit:cancelled","sort:cancelled","filter:cancelled","columnMove:cancelled","columnResize:cancelled","columnHide:cancelled","selection:cancelled","rowAdd:cancelled","delete:cancelled","rowMove:cancelled","group:cancelled","rowReceive:cancelled"]),U=Object.freeze({sort:(n,p)=>n.sort.set(p||[]),filters:(n,p)=>n.filters.set(p||null),quickFilter:(n,p)=>{if(p&&typeof p=="object"){n.filters.quick(p.text||"",{mode:p.mode});return}n.filters.quick(typeof p=="string"?p:"")},selectedKeys:(n,p)=>n.selection.set(Array.isArray(p)?p:[])});function S(n){return`on${String(n).split(":").map(C=>C.charAt(0).toUpperCase()+C.slice(1)).join("")}`}function G(n){return String(n).replace(/:/g,"-")}const q=Object.freeze({"row-key":"rowKey","row-height":"rowHeight","header-height":"headerHeight","auto-height":"autoHeight"});function K(n){return Object.hasOwn(q,n)?q[n]:n}const J=Object.freeze(Object.fromEntries(Z.map(n=>[S(n),n])));function R(n){return Object.hasOwn(J,n)}function f(n){const p={},C={},N={};for(const[O,I]of Object.entries(n||{})){if(R(O)){N[O]=I;continue}if(Object.hasOwn(U,O)){C[O]=I;continue}p[O]=I}return{config:p,imperative:C,handlers:N}}function i(n){const p=n.createGrid;if(typeof p!="function")throw new TypeError("createGridController needs createGrid; pass it in from the grid package.");const C=f(n.props||{}),N=p(n.element,{...C.config});let O=C.handlers,I=C.config,D={};const X=M=>{if(!M||typeof M.type!="string")return;const z=O[S(M.type)];typeof z=="function"&&z(M)},L=N.on("*",X);for(const[M,z]of Object.entries(C.imperative))z!==void 0&&(U[M](N,z),D[M]=z);let V=!1;return{grid:N,update(M){if(V)return;const z=f(M||{});O=z.handlers;const F={};for(const[T,k]of Object.entries(z.config))Object.is(I[T],k)||(F[T]=k);for(const T of Object.keys(I))Object.hasOwn(z.config,T)||(F[T]=void 0);Object.keys(F).length&&N.setAll(F),I=z.config;for(const[T,k]of Object.entries(U)){const $=z.imperative[T];Object.is(D[T],$)||$===void 0&&!Object.hasOwn(D,T)||(k(N,$),D[T]=$)}},destroy(){V||(V=!0,L(),N.destroy())}}}}),ee("packages/modules/react/viewers.js",function(o,H){"use strict";Object.defineProperty(o,"VIEWER_EVENTS",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"VIEWER_APPLY",{enumerable:!0,get:function(){return G}}),Object.defineProperty(o,"VIEWER_BULK_UPDATE",{enumerable:!0,get:function(){return q}}),Object.defineProperty(o,"viewerHandlerName",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"partitionViewerProps",{enumerable:!0,get:function(){return R}}),Object.defineProperty(o,"createViewerController",{enumerable:!0,get:function(){return f}});const U=H("packages/core/src/internal/util.js").warnOnce,S=Object.freeze({kpi:Object.freeze(["tile:click","tile:dblclick","tile:contextmenu","node:toggle","change","tile:status"]),kanban:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:move","card:reverted","card:confirmed","selection:changed","column:collapse","card:add","drag:start","drag:end","swimlane:collapse","swimlane:reorder","column:reorder","filter:changed","sprint:changed","epic:changed","card:expand","card:drill","card:edit","card:sla","beforeMove","beforeAdd","beforeEdit","beforeLaneReorder","beforeColumnReorder","beforeColumnChange","move:cancelled","add:cancelled","edit:cancelled","laneReorder:cancelled","columnReorder:cancelled","columnChange:cancelled"]),tabs:Object.freeze(["beforeTabChange","tab:changed","tabChange:cancelled"]),calendar:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:mount","range:change","beforeMove","card:move"]),chart:Object.freeze(["click","hover","leave","draw","legend"]),gantt:Object.freeze(["schedule","error","history","columnResize","workload:click","task:filtered","draw","dependencies","cell:click","zoomChange","visibleRangeChange","taskExpand","taskCollapse","resourceExpand","resourceCollapse","selectionChange","rowMove","taskAdd","taskRemove","taskUpdate","dependencyAdd","dependencyRemove","dependencyUpdate","assignmentChange","datesChanged","change","schedulingConflict","taskDragStart","taskDrag","taskResizeStart","taskPartialResize","taskResizeEnd","percentBarDragStart","percentBarDrag","percentBarDrop","taskClick","taskDblClick","taskMouseOver","taskMouseOut","dirtyChange"]),layout:Object.freeze(["layout:changed","window:moved","window:resized","window:closed","beforeWindowClose","windowClose:cancelled"]),router:Object.freeze(["metrics","fields:changed"])}),G=Object.freeze({kpi:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[])}),kanban:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[]),quickFilter:(i,n)=>i.setQuickFilter(typeof n=="string"?n:""),sprint:(i,n)=>i.setSprint(n),epic:(i,n)=>i.setEpic(n),loading:(i,n)=>i.setLoading(!!n),error:(i,n)=>i.setError(n??null)}),gantt:Object.freeze({tasks:(i,n)=>i.setTasks(Array.isArray(n)?n:[]),dependencies:(i,n)=>i.setDependencies(Array.isArray(n)?n:[])}),tabs:Object.freeze({active:(i,n)=>{typeof n=="string"&&i.activate(n)}}),calendar:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[]),view:(i,n)=>i.setView(n),date:(i,n)=>i.goTo(n),move:(i,n,p)=>i.move(n,p)}),chart:Object.freeze({}),layout:Object.freeze({})}),q=Object.freeze({chart:"update"});function K(i){return`on${String(i).split(":").map(p=>p.charAt(0).toUpperCase()+p.slice(1)).join("")}`}const J=Object.freeze(Object.fromEntries(Object.entries(S).map(([i,n])=>[i,Object.freeze(Object.fromEntries(n.map(p=>[K(p),p])))])));function R(i,n){const p=J[i]||{},C=G[i]||{},N={},O={},I={};for(const[D,X]of Object.entries(n||{})){if(Object.hasOwn(p,D)){I[D]=X;continue}if(Object.hasOwn(C,D)){O[D]=X,N[D]=X;continue}N[D]=X}return{config:N,live:O,handlers:I}}function f(i){const n=String(i.viewer),p=i.mount,C=i.name||n;if(typeof p!="function")throw new TypeError(`createViewerController needs a mount factory for "${n}"; pass the module's own factory in, e.g. { createKPI } from lattice-grid/modules/kpi.`);const N=R(n,i.props||{}),O=p(i.element,{...N.config});if(!O||typeof O!="object")throw new TypeError(`the ${C} factory returned no instance; nothing can be driven.`);let I=N.handlers,D=N.config;const X={...N.live},L=[];if(typeof O.on=="function")for(const F of S[n]||[]){const T=K(F),k=O.on(F,$=>{const w=I[T];typeof w=="function"&&w($)});typeof k=="function"&&L.push(k)}const V=q[n],M=G[n]||{};let z=!1;return{instance:O,update(F){if(z)return;const T=R(n,F||{});I=T.handlers;const k={};for(const[w,Q]of Object.entries(T.config))Object.is(D[w],Q)||(k[w]=Q);if(D=T.config,!Object.keys(k).length)return;const $=[];for(const w of Object.keys(k)){const Q=M[w];if(Q){Q(O,k[w]),X[w]=k[w];continue}V&&typeof O[V]=="function"||$.push(w)}if(V&&typeof O[V]=="function"){const w={};for(const Q of Object.keys(k))M[Q]||(w[Q]=k[Q]);Object.keys(w).length&&O[V](w)}$.length&&U(`react.viewer.${n}.mountOnly.${$.join(".")}`,`${C}: ${$.map(w=>`\`${w}\``).join(", ")} changed, but ${C} takes ${$.length===1?"it":"them"} only when the viewer is created. Nothing was applied and the viewer was NOT rebuilt — rebuilding it silently would throw away scroll position, selection and expansion. Give the component a \`key\` that changes when this must take effect, so the rebuild is yours and visible, or drive the instance through the ref.`)},destroy(){if(!z){z=!0;for(const F of L)try{F()}catch{}L.length=0,typeof O.destroy=="function"&&O.destroy()}}}}}),ee("packages/modules/presets/index.js",function(o,H){"use strict";Object.defineProperty(o,"themeFromMui",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"default",{enumerable:!0,get:function(){return J}});const U=H("packages/core/src/internal/util.js").warnOnce;function S(R,f){if(typeof R!="string")return R;const i=R.trim().match(/^#([0-9a-f]{6})$/i);if(!i)return R;const n=i[1],p=parseInt(n.slice(0,2),16),C=parseInt(n.slice(2,4),16),N=parseInt(n.slice(4,6),16);return`rgba(${p}, ${C}, ${N}, ${f})`}function G(R){const f=R.palette,i=f.mode==="dark";return{"--lattice-background":f.background.default,"--lattice-surface":f.background.paper,"--lattice-surface-alt":i?"#2a2a2a":f.grey[50],"--lattice-border-color":f.divider,"--lattice-border-strong":i?f.grey[600]:f.grey[400],"--lattice-foreground":f.text.primary,"--lattice-foreground-muted":f.text.secondary,"--lattice-header-foreground":f.text.primary,"--lattice-accent":f.primary.main,"--lattice-accent-contrast":f.primary.contrastText,"--lattice-link-color":f.primary.main,"--lattice-selected-background":S(f.primary.main,.12),"--lattice-hovered-background":S(f.text.primary,.06),"--lattice-focus-color":f.primary.main,"--lattice-variant-danger-solid":f.error.main,"--lattice-variant-danger-fill":S(f.error.main,.12),"--lattice-variant-warning-solid":f.warning.main,"--lattice-variant-warning-fill":S(f.warning.main,.12),"--lattice-variant-success-solid":f.success.main,"--lattice-variant-success-fill":S(f.success.main,.12),"--lattice-variant-info-solid":f.info.main,"--lattice-variant-info-fill":S(f.info.main,.12),"--lattice-radius":`${R.shape.borderRadius}px`,"--lattice-font-family":R.typography.fontFamily,"--lattice-font-size":`${R.typography.body2.fontSize}`,"--lattice-header-font-weight":String(R.typography.fontWeightMedium)}}function q(R){return`.lattice {
7
7
  ${Object.entries(R).map(([i,n])=>` ${i}: ${n};`).join(`
8
8
  `)}
9
9
  }
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * Lattice Grid 1.89.0, svelte module
2
+ * Lattice Grid 1.89.1, svelte module
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */
6
- (function(pe){"use strict";var le=Object.create(null),de=Object.create(null);function ee(o,H){le[o]=H}function fe(o){var H=de[o];if(H)return H;var Z=Object.create(null);de[o]=Z;var U=le[o];if(!U)throw new Error("[lattice] missing module: "+o);return U(Z,fe),Z}ee("packages/core/src/internal/util.js",function(o,H){"use strict";Object.defineProperty(o,"VERSION",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"reportedWarnings",{enumerable:!0,get:function(){return n}}),Object.defineProperty(o,"warnOnce",{enumerable:!0,get:function(){return C}}),Object.defineProperty(o,"infoOnce",{enumerable:!0,get:function(){return N}}),Object.defineProperty(o,"resetWarnings",{enumerable:!0,get:function(){return O}}),Object.defineProperty(o,"fail",{enumerable:!0,get:function(){return I}}),Object.defineProperty(o,"invariant",{enumerable:!0,get:function(){return D}}),Object.defineProperty(o,"DEV",{enumerable:!0,get:function(){return X}}),Object.defineProperty(o,"isObject",{enumerable:!0,get:function(){return L}}),Object.defineProperty(o,"isFunction",{enumerable:!0,get:function(){return V}}),Object.defineProperty(o,"isNil",{enumerable:!0,get:function(){return M}}),Object.defineProperty(o,"isBlank",{enumerable:!0,get:function(){return z}}),Object.defineProperty(o,"isCtor",{enumerable:!0,get:function(){return F}}),Object.defineProperty(o,"pathGetter",{enumerable:!0,get:function(){return k}}),Object.defineProperty(o,"pathSetter",{enumerable:!0,get:function(){return w}}),Object.defineProperty(o,"getPath",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(o,"setPath",{enumerable:!0,get:function(){return te}}),Object.defineProperty(o,"humanise",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(o,"escapeHtml",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(o,"titleCase",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(o,"expand",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(o,"toArray",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(o,"merge",{enumerable:!0,get:function(){return c}}),Object.defineProperty(o,"mergeRow",{enumerable:!0,get:function(){return b}}),Object.defineProperty(o,"Lru",{enumerable:!0,get:function(){return d}}),Object.defineProperty(o,"collator",{enumerable:!0,get:function(){return a}}),Object.defineProperty(o,"defaultCompare",{enumerable:!0,get:function(){return g}}),Object.defineProperty(o,"now",{enumerable:!0,get:function(){return s}}),Object.defineProperty(o,"nextFrame",{enumerable:!0,get:function(){return j}}),Object.defineProperty(o,"cancelFrame",{enumerable:!0,get:function(){return A}}),Object.defineProperty(o,"frameBatched",{enumerable:!0,get:function(){return E}}),Object.defineProperty(o,"settleDebounce",{enumerable:!0,get:function(){return m}}),Object.defineProperty(o,"whenIdle",{enumerable:!0,get:function(){return v}}),Object.defineProperty(o,"uid",{enumerable:!0,get:function(){return P}});const Z="1.89.0";async function U(){return Z}const S="1.89.0",G=new Set,q=2e3;function K(e){if(G.add(e),G.size>q){const t=G.values().next().value;t!==void 0&&G.delete(t)}}const J=[],R=500;function f(e,t,r){J.push({key:e,level:t,message:r.map(l=>typeof l=="string"?l:i(l)).join(" "),at:Date.now()}),J.length>R&&J.shift()}function i(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function n(){return J.map(e=>({...e}))}function p(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function C(e,...t){if(G.has(e))return;K(e);const r=p(t);f(e,"warn",r),console.warn("[lattice]",...r)}function N(e,...t){if(G.has(e))return;K(e);const r=p(t);f(e,"info",r),console.info("[lattice]",...r)}function O(){G.clear(),J.length=0}function I(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function D(e,t){e||I(t)}const X=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function L(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function V(e){return typeof e=="function"}function M(e){return e==null}function z(e){return e==null||e===""}function F(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const T=new Map;function k(e){let t=T.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),l=r.length;t=Y=>{let B=Y;for(let W=0;W<l;W++){if(B==null)return;B=B[r[W]]}return B}}return T.set(e,t),t}const $=new Map;function w(e){let t=$.get(e);if(t)return t;if(!e.includes("."))t=(r,l)=>{r!=null&&(r[e]=l)};else{const r=e.split("."),l=r.length-1;t=(Y,B)=>{let W=Y;for(let x=0;x<l;x++){if(W==null)return;const se=r[x];W[se]==null&&(W[se]={}),W=W[se]}W!=null&&(W[r[l]]=B)}}return $.set(e,t),t}function Q(e,t){return k(t)(e)}function te(e,t,r){w(t)(e,r)}function oe(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,r=>r.toUpperCase()):""}const _={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ne(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>_[r]):t}function ie(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ce(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:L(e)?e:{[t]:e,enabled:!0}}function ae(e){return e==null?[]:Array.isArray(e)?e:[e]}const ue=Object.freeze(new Set(["__proto__","constructor","prototype"]));function c(e,t){if(!L(e))return L(t)?{...t}:t;if(!L(t))return t===void 0?e:t;const r={...e};for(const l of Object.keys(t)){if(ue.has(l))continue;const Y=t[l];Y!==void 0&&(r[l]=L(Y)&&L(r[l])?c(r[l],Y):Y)}return r}function b(e,t){if(!L(e)||!L(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class d{#n;#e=new Map;#t;constructor(t=256,r=null){this.#n=t,this.#t=r}get size(){return this.#e.size}get max(){return this.#n}set max(t){this.#n=t,this.#r()}has(t){return this.#e.has(t)}get(t){const r=this.#e;if(!r.has(t))return;const l=r.get(t);return r.delete(t),r.set(t,l),l}peek(t){return this.#e.get(t)}set(t,r){const l=this.#e;return l.has(t)&&l.delete(t),l.set(t,r),this.#r(),r}delete(t){const r=this.#e.get(t);return this.#e.delete(t)&&this.#t&&this.#t(r,t),r}clear(){if(this.#t)for(const[t,r]of this.#e)this.#t(r,t);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const t=this.#e;for(;t.size>this.#n;){const r=t.keys().next().value,l=t.get(r);t.delete(r),this.#t&&this.#t(l,r)}}}const u=new Map;function a(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let l=u.get(r);return l||(l=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),u.set(r,l)),l}function g(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),l=String(t);return r<l?-1:r>l?1:0}function s(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const h=typeof requestAnimationFrame=="function";function j(e){return h?requestAnimationFrame(e):setTimeout(()=>e(s()),16)}function A(e){e!=null&&(h?cancelAnimationFrame(e):clearTimeout(e))}function E(e){let t=null,r=null;const l=()=>{t=null;const B=r;r=null,e(...B||[])},Y=(...B)=>{r=B,t===null&&(t=j(l))};return Y.cancel=()=>{A(t),t=null,r=null},Y.flush=()=>{t!==null&&(A(t),l())},Y}function m(e,t){let r=null,l=null;const Y=()=>{if(r=null,l===null)return;const x=l;l=null,e(...x),B()},B=()=>{r=setTimeout(Y,t),typeof r?.unref=="function"&&r.unref()},W=(...x)=>{r===null?(e(...x),B()):(l=x,clearTimeout(r),B())};return W.flush=()=>{if(r!==null&&clearTimeout(r),r=null,l===null)return;const x=l;l=null,e(...x)},W.cancel=()=>{r!==null&&clearTimeout(r),r=null,l=null},W.pending=()=>r!==null||l!==null,W}function v(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let y=0;function P(e="l"){return`${e}${(++y).toString(36)}`}}),ee("packages/modules/shared/adapter.js",function(o,H){"use strict";Object.defineProperty(o,"EVENT_NAMES",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(o,"handlerName",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"dashedName",{enumerable:!0,get:function(){return G}}),Object.defineProperty(o,"CONFIG_KEY_ALIASES",{enumerable:!0,get:function(){return q}}),Object.defineProperty(o,"aliasConfigKey",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"isHandlerProp",{enumerable:!0,get:function(){return R}}),Object.defineProperty(o,"partition",{enumerable:!0,get:function(){return f}}),Object.defineProperty(o,"createGridController",{enumerable:!0,get:function(){return i}});const Z=Object.freeze(["ready","destroy","render:first","render:done","config:changed","licence:changed","model:changed","rows:changed","rows:queued","rows:deferred","rows:paused","rows:resumed","row:received","row:sent","row:copied","row:moved","source:error","source:total","stream:chunk","stream:end","stream:evicted","rowDrag:started","rowDrag:moved","rowDrag:left","rowDrag:ended","cell:changed","cell:pending","cell:confirmed","cell:reverted","cell:conflict","cell:clicked","cell:dblclicked","cell:contextmenu","cell:mouseover","cell:mouseout","cell:mousedown","cell:mouseup","cell:edit:start","cell:edit:end","row:edit:start","row:edit:end","row:clicked","row:dblclicked","row:pending","row:confirmed","row:reverted","row:conflict","form:opened","form:closed","form:saved","form:error","sort:changed","filter:changed","group:toggled","facet:computed","facet:filtered","facet:expanded","facet:failed","column:moved","column:resized","column:visible","column:pinned","column:grouped","column:pivoted","column:filter:open","column:profile:open","column:menu:open","columns:changed","columns:tagged","columngroup:changed","header:contextmenu","pivot:drill","selection:changed","range:changed","clipboard:copy","page:changed","scroll","scroll:end","size:changed","detail:toggled","detail:cell:edit:start","detail:cell:edit:end","detail:row:edit:start","detail:row:edit:end","detail:cell:changed","toolpanel:focus","highlight:changed","find:changed","tree:loading","tree:loaded","tree:loadFailed","tree:loadAborted","state:changed","state:reset","history:changed","history:applied","views:changed","view:applied","view:saved","view:removed","view:renamed","view:default","formatting:changed","redaction:changed","permissions:changed","presentation:changed","presentation:started","presentation:ended","presentation:view","presentation:scale","presentation:spotlight","presentation:captured","comment:added","comment:edited","comment:deleted","comment:failed","comment:resolved","comment:unresolved","comment:threadOpened","comment:threadClosed","comment:indexLoaded","presence:published","presence:joined","presence:updated","presence:left","presence:failed","presence:lockRefused","diff:changed","diff:swapped","timeline:attached","timeline:detached","timeline:seek","timeline:seeking","annotation:changed","validation:failed","validation:cleared","export:progress","export:request","export:done","shortcuts:opened","shortcuts:closed","print:before","print:after","beforeEdit","beforeSort","beforeFilter","beforeColumnMove","beforeColumnResize","beforeColumnHide","beforeSelect","beforeRowAdd","beforeDelete","beforeRowMove","beforeGroup","beforeRowReceive","edit:cancelled","sort:cancelled","filter:cancelled","columnMove:cancelled","columnResize:cancelled","columnHide:cancelled","selection:cancelled","rowAdd:cancelled","delete:cancelled","rowMove:cancelled","group:cancelled","rowReceive:cancelled"]),U=Object.freeze({sort:(n,p)=>n.sort.set(p||[]),filters:(n,p)=>n.filters.set(p||null),quickFilter:(n,p)=>{if(p&&typeof p=="object"){n.filters.quick(p.text||"",{mode:p.mode});return}n.filters.quick(typeof p=="string"?p:"")},selectedKeys:(n,p)=>n.selection.set(Array.isArray(p)?p:[])});function S(n){return`on${String(n).split(":").map(C=>C.charAt(0).toUpperCase()+C.slice(1)).join("")}`}function G(n){return String(n).replace(/:/g,"-")}const q=Object.freeze({"row-key":"rowKey","row-height":"rowHeight","header-height":"headerHeight","auto-height":"autoHeight"});function K(n){return Object.hasOwn(q,n)?q[n]:n}const J=Object.freeze(Object.fromEntries(Z.map(n=>[S(n),n])));function R(n){return Object.hasOwn(J,n)}function f(n){const p={},C={},N={};for(const[O,I]of Object.entries(n||{})){if(R(O)){N[O]=I;continue}if(Object.hasOwn(U,O)){C[O]=I;continue}p[O]=I}return{config:p,imperative:C,handlers:N}}function i(n){const p=n.createGrid;if(typeof p!="function")throw new TypeError("createGridController needs createGrid; pass it in from the grid package.");const C=f(n.props||{}),N=p(n.element,{...C.config});let O=C.handlers,I=C.config,D={};const X=M=>{if(!M||typeof M.type!="string")return;const z=O[S(M.type)];typeof z=="function"&&z(M)},L=N.on("*",X);for(const[M,z]of Object.entries(C.imperative))z!==void 0&&(U[M](N,z),D[M]=z);let V=!1;return{grid:N,update(M){if(V)return;const z=f(M||{});O=z.handlers;const F={};for(const[T,k]of Object.entries(z.config))Object.is(I[T],k)||(F[T]=k);for(const T of Object.keys(I))Object.hasOwn(z.config,T)||(F[T]=void 0);Object.keys(F).length&&N.setAll(F),I=z.config;for(const[T,k]of Object.entries(U)){const $=z.imperative[T];Object.is(D[T],$)||$===void 0&&!Object.hasOwn(D,T)||(k(N,$),D[T]=$)}},destroy(){V||(V=!0,L(),N.destroy())}}}}),ee("packages/modules/react/viewers.js",function(o,H){"use strict";Object.defineProperty(o,"VIEWER_EVENTS",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"VIEWER_APPLY",{enumerable:!0,get:function(){return G}}),Object.defineProperty(o,"VIEWER_BULK_UPDATE",{enumerable:!0,get:function(){return q}}),Object.defineProperty(o,"viewerHandlerName",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"partitionViewerProps",{enumerable:!0,get:function(){return R}}),Object.defineProperty(o,"createViewerController",{enumerable:!0,get:function(){return f}});const U=H("packages/core/src/internal/util.js").warnOnce,S=Object.freeze({kpi:Object.freeze(["tile:click","tile:dblclick","tile:contextmenu","node:toggle","change","tile:status"]),kanban:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:move","card:reverted","card:confirmed","selection:changed","column:collapse","card:add","drag:start","drag:end","swimlane:collapse","swimlane:reorder","column:reorder","filter:changed","sprint:changed","epic:changed","card:expand","card:drill","card:edit","card:sla","beforeMove","beforeAdd","beforeEdit","beforeLaneReorder","beforeColumnReorder","beforeColumnChange","move:cancelled","add:cancelled","edit:cancelled","laneReorder:cancelled","columnReorder:cancelled","columnChange:cancelled"]),tabs:Object.freeze(["beforeTabChange","tab:changed","tabChange:cancelled"]),calendar:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:mount","range:change","beforeMove","card:move"]),chart:Object.freeze(["click","hover","leave","draw","legend"]),gantt:Object.freeze(["schedule","error","history","columnResize","workload:click","task:filtered","draw","dependencies","cell:click","zoomChange","visibleRangeChange","taskExpand","taskCollapse","resourceExpand","resourceCollapse","selectionChange","rowMove","taskAdd","taskRemove","taskUpdate","dependencyAdd","dependencyRemove","dependencyUpdate","assignmentChange","datesChanged","change","schedulingConflict","taskDragStart","taskDrag","taskResizeStart","taskPartialResize","taskResizeEnd","percentBarDragStart","percentBarDrag","percentBarDrop","taskClick","taskDblClick","taskMouseOver","taskMouseOut","dirtyChange"]),layout:Object.freeze(["layout:changed","window:moved","window:resized","window:closed","beforeWindowClose","windowClose:cancelled"]),router:Object.freeze(["metrics","fields:changed"])}),G=Object.freeze({kpi:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[])}),kanban:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[]),quickFilter:(i,n)=>i.setQuickFilter(typeof n=="string"?n:""),sprint:(i,n)=>i.setSprint(n),epic:(i,n)=>i.setEpic(n),loading:(i,n)=>i.setLoading(!!n),error:(i,n)=>i.setError(n??null)}),gantt:Object.freeze({tasks:(i,n)=>i.setTasks(Array.isArray(n)?n:[]),dependencies:(i,n)=>i.setDependencies(Array.isArray(n)?n:[])}),tabs:Object.freeze({active:(i,n)=>{typeof n=="string"&&i.activate(n)}}),calendar:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[]),view:(i,n)=>i.setView(n),date:(i,n)=>i.goTo(n),move:(i,n,p)=>i.move(n,p)}),chart:Object.freeze({}),layout:Object.freeze({})}),q=Object.freeze({chart:"update"});function K(i){return`on${String(i).split(":").map(p=>p.charAt(0).toUpperCase()+p.slice(1)).join("")}`}const J=Object.freeze(Object.fromEntries(Object.entries(S).map(([i,n])=>[i,Object.freeze(Object.fromEntries(n.map(p=>[K(p),p])))])));function R(i,n){const p=J[i]||{},C=G[i]||{},N={},O={},I={};for(const[D,X]of Object.entries(n||{})){if(Object.hasOwn(p,D)){I[D]=X;continue}if(Object.hasOwn(C,D)){O[D]=X,N[D]=X;continue}N[D]=X}return{config:N,live:O,handlers:I}}function f(i){const n=String(i.viewer),p=i.mount,C=i.name||n;if(typeof p!="function")throw new TypeError(`createViewerController needs a mount factory for "${n}"; pass the module's own factory in, e.g. { createKPI } from lattice-grid/modules/kpi.`);const N=R(n,i.props||{}),O=p(i.element,{...N.config});if(!O||typeof O!="object")throw new TypeError(`the ${C} factory returned no instance; nothing can be driven.`);let I=N.handlers,D=N.config;const X={...N.live},L=[];if(typeof O.on=="function")for(const F of S[n]||[]){const T=K(F),k=O.on(F,$=>{const w=I[T];typeof w=="function"&&w($)});typeof k=="function"&&L.push(k)}const V=q[n],M=G[n]||{};let z=!1;return{instance:O,update(F){if(z)return;const T=R(n,F||{});I=T.handlers;const k={};for(const[w,Q]of Object.entries(T.config))Object.is(D[w],Q)||(k[w]=Q);if(D=T.config,!Object.keys(k).length)return;const $=[];for(const w of Object.keys(k)){const Q=M[w];if(Q){Q(O,k[w]),X[w]=k[w];continue}V&&typeof O[V]=="function"||$.push(w)}if(V&&typeof O[V]=="function"){const w={};for(const Q of Object.keys(k))M[Q]||(w[Q]=k[Q]);Object.keys(w).length&&O[V](w)}$.length&&U(`react.viewer.${n}.mountOnly.${$.join(".")}`,`${C}: ${$.map(w=>`\`${w}\``).join(", ")} changed, but ${C} takes ${$.length===1?"it":"them"} only when the viewer is created. Nothing was applied and the viewer was NOT rebuilt — rebuilding it silently would throw away scroll position, selection and expansion. Give the component a \`key\` that changes when this must take effect, so the rebuild is yours and visible, or drive the instance through the ref.`)},destroy(){if(!z){z=!0;for(const F of L)try{F()}catch{}L.length=0,typeof O.destroy=="function"&&O.destroy()}}}}}),ee("packages/modules/presets/index.js",function(o,H){"use strict";Object.defineProperty(o,"themeFromMui",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"default",{enumerable:!0,get:function(){return J}});const U=H("packages/core/src/internal/util.js").warnOnce;function S(R,f){if(typeof R!="string")return R;const i=R.trim().match(/^#([0-9a-f]{6})$/i);if(!i)return R;const n=i[1],p=parseInt(n.slice(0,2),16),C=parseInt(n.slice(2,4),16),N=parseInt(n.slice(4,6),16);return`rgba(${p}, ${C}, ${N}, ${f})`}function G(R){const f=R.palette,i=f.mode==="dark";return{"--lattice-background":f.background.default,"--lattice-surface":f.background.paper,"--lattice-surface-alt":i?"#2a2a2a":f.grey[50],"--lattice-border-color":f.divider,"--lattice-border-strong":i?f.grey[600]:f.grey[400],"--lattice-foreground":f.text.primary,"--lattice-foreground-muted":f.text.secondary,"--lattice-header-foreground":f.text.primary,"--lattice-accent":f.primary.main,"--lattice-accent-contrast":f.primary.contrastText,"--lattice-link-color":f.primary.main,"--lattice-selected-background":S(f.primary.main,.12),"--lattice-hovered-background":S(f.text.primary,.06),"--lattice-focus-color":f.primary.main,"--lattice-variant-danger-solid":f.error.main,"--lattice-variant-danger-fill":S(f.error.main,.12),"--lattice-variant-warning-solid":f.warning.main,"--lattice-variant-warning-fill":S(f.warning.main,.12),"--lattice-variant-success-solid":f.success.main,"--lattice-variant-success-fill":S(f.success.main,.12),"--lattice-variant-info-solid":f.info.main,"--lattice-variant-info-fill":S(f.info.main,.12),"--lattice-radius":`${R.shape.borderRadius}px`,"--lattice-font-family":R.typography.fontFamily,"--lattice-font-size":`${R.typography.body2.fontSize}`,"--lattice-header-font-weight":String(R.typography.fontWeightMedium)}}function q(R){return`.lattice {
6
+ (function(pe){"use strict";var le=Object.create(null),de=Object.create(null);function ee(o,H){le[o]=H}function fe(o){var H=de[o];if(H)return H;var Z=Object.create(null);de[o]=Z;var U=le[o];if(!U)throw new Error("[lattice] missing module: "+o);return U(Z,fe),Z}ee("packages/core/src/internal/util.js",function(o,H){"use strict";Object.defineProperty(o,"VERSION",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"reportedWarnings",{enumerable:!0,get:function(){return n}}),Object.defineProperty(o,"warnOnce",{enumerable:!0,get:function(){return C}}),Object.defineProperty(o,"infoOnce",{enumerable:!0,get:function(){return N}}),Object.defineProperty(o,"resetWarnings",{enumerable:!0,get:function(){return O}}),Object.defineProperty(o,"fail",{enumerable:!0,get:function(){return I}}),Object.defineProperty(o,"invariant",{enumerable:!0,get:function(){return D}}),Object.defineProperty(o,"DEV",{enumerable:!0,get:function(){return X}}),Object.defineProperty(o,"isObject",{enumerable:!0,get:function(){return L}}),Object.defineProperty(o,"isFunction",{enumerable:!0,get:function(){return V}}),Object.defineProperty(o,"isNil",{enumerable:!0,get:function(){return M}}),Object.defineProperty(o,"isBlank",{enumerable:!0,get:function(){return z}}),Object.defineProperty(o,"isCtor",{enumerable:!0,get:function(){return F}}),Object.defineProperty(o,"pathGetter",{enumerable:!0,get:function(){return k}}),Object.defineProperty(o,"pathSetter",{enumerable:!0,get:function(){return w}}),Object.defineProperty(o,"getPath",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(o,"setPath",{enumerable:!0,get:function(){return te}}),Object.defineProperty(o,"humanise",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(o,"escapeHtml",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(o,"titleCase",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(o,"expand",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(o,"toArray",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(o,"merge",{enumerable:!0,get:function(){return c}}),Object.defineProperty(o,"mergeRow",{enumerable:!0,get:function(){return b}}),Object.defineProperty(o,"Lru",{enumerable:!0,get:function(){return d}}),Object.defineProperty(o,"collator",{enumerable:!0,get:function(){return a}}),Object.defineProperty(o,"defaultCompare",{enumerable:!0,get:function(){return g}}),Object.defineProperty(o,"now",{enumerable:!0,get:function(){return s}}),Object.defineProperty(o,"nextFrame",{enumerable:!0,get:function(){return j}}),Object.defineProperty(o,"cancelFrame",{enumerable:!0,get:function(){return A}}),Object.defineProperty(o,"frameBatched",{enumerable:!0,get:function(){return E}}),Object.defineProperty(o,"settleDebounce",{enumerable:!0,get:function(){return m}}),Object.defineProperty(o,"whenIdle",{enumerable:!0,get:function(){return v}}),Object.defineProperty(o,"uid",{enumerable:!0,get:function(){return P}});const Z="1.89.1";async function U(){return Z}const S="1.89.1",G=new Set,q=2e3;function K(e){if(G.add(e),G.size>q){const t=G.values().next().value;t!==void 0&&G.delete(t)}}const J=[],R=500;function f(e,t,r){J.push({key:e,level:t,message:r.map(l=>typeof l=="string"?l:i(l)).join(" "),at:Date.now()}),J.length>R&&J.shift()}function i(e){if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}function n(){return J.map(e=>({...e}))}function p(e){if(e.length===0||typeof e[0]!="string")return e;const t=e[0].replace(/^\[lattice\]\s*/,"");return t===e[0]?e:[t,...e.slice(1)]}function C(e,...t){if(G.has(e))return;K(e);const r=p(t);f(e,"warn",r),console.warn("[lattice]",...r)}function N(e,...t){if(G.has(e))return;K(e);const r=p(t);f(e,"info",r),console.info("[lattice]",...r)}function O(){G.clear(),J.length=0}function I(e,t){const r=new Error(`[lattice] ${e}`);throw t!==void 0&&(r.cause=t),r}function D(e,t){e||I(t)}const X=(()=>{try{return!(typeof process<"u"&&process.env&&process.env.NODE_ENV==="production")}catch{return!0}})();function L(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function V(e){return typeof e=="function"}function M(e){return e==null}function z(e){return e==null||e===""}function F(e){return typeof e!="function"?!1:/^class[\s{]/.test(Function.prototype.toString.call(e))?!0:!!(e.prototype&&Object.getOwnPropertyNames(e.prototype).length>1)}const T=new Map;function k(e){let t=T.get(e);if(t)return t;if(!e.includes("."))t=r=>r?.[e];else{const r=e.split("."),l=r.length;t=Y=>{let B=Y;for(let W=0;W<l;W++){if(B==null)return;B=B[r[W]]}return B}}return T.set(e,t),t}const $=new Map;function w(e){let t=$.get(e);if(t)return t;if(!e.includes("."))t=(r,l)=>{r!=null&&(r[e]=l)};else{const r=e.split("."),l=r.length-1;t=(Y,B)=>{let W=Y;for(let x=0;x<l;x++){if(W==null)return;const se=r[x];W[se]==null&&(W[se]={}),W=W[se]}W!=null&&(W[r[l]]=B)}}return $.set(e,t),t}function Q(e,t){return k(t)(e)}function te(e,t,r){w(t)(e,r)}function oe(e){return e?(e.includes(".")?e.slice(e.lastIndexOf(".")+1):e).replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/^./,r=>r.toUpperCase()):""}const _={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ne(e){const t=e==null?"":String(e);return/[&<>"']/.test(t)?t.replace(/[&<>"']/g,r=>_[r]):t}function ie(e){return String(e).replace(/\w\S*/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ce(e,t,r){if(e!==void 0)return e===!0?{enabled:!0,...r}:e===!1?{enabled:!1}:L(e)?e:{[t]:e,enabled:!0}}function ae(e){return e==null?[]:Array.isArray(e)?e:[e]}const ue=Object.freeze(new Set(["__proto__","constructor","prototype"]));function c(e,t){if(!L(e))return L(t)?{...t}:t;if(!L(t))return t===void 0?e:t;const r={...e};for(const l of Object.keys(t)){if(ue.has(l))continue;const Y=t[l];Y!==void 0&&(r[l]=L(Y)&&L(r[l])?c(r[l],Y):Y)}return r}function b(e,t){if(!L(e)||!L(t)||e===t)return t;const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e,t),r}class d{#n;#e=new Map;#t;constructor(t=256,r=null){this.#n=t,this.#t=r}get size(){return this.#e.size}get max(){return this.#n}set max(t){this.#n=t,this.#r()}has(t){return this.#e.has(t)}get(t){const r=this.#e;if(!r.has(t))return;const l=r.get(t);return r.delete(t),r.set(t,l),l}peek(t){return this.#e.get(t)}set(t,r){const l=this.#e;return l.has(t)&&l.delete(t),l.set(t,r),this.#r(),r}delete(t){const r=this.#e.get(t);return this.#e.delete(t)&&this.#t&&this.#t(r,t),r}clear(){if(this.#t)for(const[t,r]of this.#e)this.#t(r,t);this.#e.clear()}keys(){return this.#e.keys()}values(){return this.#e.values()}#r(){const t=this.#e;for(;t.size>this.#n;){const r=t.keys().next().value,l=t.get(r);t.delete(r),this.#t&&this.#t(l,r)}}}const u=new Map;function a(e,t){const r=`${e||""}|${t?JSON.stringify(t):""}`;let l=u.get(r);return l||(l=new Intl.Collator(e||void 0,{numeric:!0,sensitivity:"variant",...t}),u.set(r,l)),l}function g(e,t){if(e===t)return 0;if(e==null)return 1;if(t==null)return-1;if(typeof e=="number"&&typeof t=="number")return Number.isNaN(e)?Number.isNaN(t)?0:1:Number.isNaN(t)||e<t?-1:e>t?1:0;const r=String(e),l=String(t);return r<l?-1:r>l?1:0}function s(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}const h=typeof requestAnimationFrame=="function";function j(e){return h?requestAnimationFrame(e):setTimeout(()=>e(s()),16)}function A(e){e!=null&&(h?cancelAnimationFrame(e):clearTimeout(e))}function E(e){let t=null,r=null;const l=()=>{t=null;const B=r;r=null,e(...B||[])},Y=(...B)=>{r=B,t===null&&(t=j(l))};return Y.cancel=()=>{A(t),t=null,r=null},Y.flush=()=>{t!==null&&(A(t),l())},Y}function m(e,t){let r=null,l=null;const Y=()=>{if(r=null,l===null)return;const x=l;l=null,e(...x),B()},B=()=>{r=setTimeout(Y,t),typeof r?.unref=="function"&&r.unref()},W=(...x)=>{r===null?(e(...x),B()):(l=x,clearTimeout(r),B())};return W.flush=()=>{if(r!==null&&clearTimeout(r),r=null,l===null)return;const x=l;l=null,e(...x)},W.cancel=()=>{r!==null&&clearTimeout(r),r=null,l=null},W.pending=()=>r!==null||l!==null,W}function v(e,t=50){return typeof requestIdleCallback=="function"?requestIdleCallback(e,{timeout:t}):setTimeout(()=>e({timeRemaining:()=>0,didTimeout:!0}),1)}let y=0;function P(e="l"){return`${e}${(++y).toString(36)}`}}),ee("packages/modules/shared/adapter.js",function(o,H){"use strict";Object.defineProperty(o,"EVENT_NAMES",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(o,"handlerName",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"dashedName",{enumerable:!0,get:function(){return G}}),Object.defineProperty(o,"CONFIG_KEY_ALIASES",{enumerable:!0,get:function(){return q}}),Object.defineProperty(o,"aliasConfigKey",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"isHandlerProp",{enumerable:!0,get:function(){return R}}),Object.defineProperty(o,"partition",{enumerable:!0,get:function(){return f}}),Object.defineProperty(o,"createGridController",{enumerable:!0,get:function(){return i}});const Z=Object.freeze(["ready","destroy","render:first","render:done","config:changed","licence:changed","model:changed","rows:changed","rows:queued","rows:deferred","rows:paused","rows:resumed","row:received","row:sent","row:copied","row:moved","source:error","source:total","stream:chunk","stream:end","stream:evicted","rowDrag:started","rowDrag:moved","rowDrag:left","rowDrag:ended","cell:changed","cell:pending","cell:confirmed","cell:reverted","cell:conflict","cell:clicked","cell:dblclicked","cell:contextmenu","cell:mouseover","cell:mouseout","cell:mousedown","cell:mouseup","cell:edit:start","cell:edit:end","row:edit:start","row:edit:end","row:clicked","row:dblclicked","row:pending","row:confirmed","row:reverted","row:conflict","form:opened","form:closed","form:saved","form:error","sort:changed","filter:changed","group:toggled","facet:computed","facet:filtered","facet:expanded","facet:failed","column:moved","column:resized","column:visible","column:pinned","column:grouped","column:pivoted","column:filter:open","column:profile:open","column:menu:open","columns:changed","columns:tagged","columngroup:changed","header:contextmenu","pivot:drill","selection:changed","range:changed","clipboard:copy","page:changed","scroll","scroll:end","size:changed","detail:toggled","detail:cell:edit:start","detail:cell:edit:end","detail:row:edit:start","detail:row:edit:end","detail:cell:changed","toolpanel:focus","highlight:changed","find:changed","tree:loading","tree:loaded","tree:loadFailed","tree:loadAborted","state:changed","state:reset","history:changed","history:applied","views:changed","view:applied","view:saved","view:removed","view:renamed","view:default","formatting:changed","redaction:changed","permissions:changed","presentation:changed","presentation:started","presentation:ended","presentation:view","presentation:scale","presentation:spotlight","presentation:captured","comment:added","comment:edited","comment:deleted","comment:failed","comment:resolved","comment:unresolved","comment:threadOpened","comment:threadClosed","comment:indexLoaded","presence:published","presence:joined","presence:updated","presence:left","presence:failed","presence:lockRefused","diff:changed","diff:swapped","timeline:attached","timeline:detached","timeline:seek","timeline:seeking","annotation:changed","validation:failed","validation:cleared","export:progress","export:request","export:done","shortcuts:opened","shortcuts:closed","print:before","print:after","beforeEdit","beforeSort","beforeFilter","beforeColumnMove","beforeColumnResize","beforeColumnHide","beforeSelect","beforeRowAdd","beforeDelete","beforeRowMove","beforeGroup","beforeRowReceive","edit:cancelled","sort:cancelled","filter:cancelled","columnMove:cancelled","columnResize:cancelled","columnHide:cancelled","selection:cancelled","rowAdd:cancelled","delete:cancelled","rowMove:cancelled","group:cancelled","rowReceive:cancelled"]),U=Object.freeze({sort:(n,p)=>n.sort.set(p||[]),filters:(n,p)=>n.filters.set(p||null),quickFilter:(n,p)=>{if(p&&typeof p=="object"){n.filters.quick(p.text||"",{mode:p.mode});return}n.filters.quick(typeof p=="string"?p:"")},selectedKeys:(n,p)=>n.selection.set(Array.isArray(p)?p:[])});function S(n){return`on${String(n).split(":").map(C=>C.charAt(0).toUpperCase()+C.slice(1)).join("")}`}function G(n){return String(n).replace(/:/g,"-")}const q=Object.freeze({"row-key":"rowKey","row-height":"rowHeight","header-height":"headerHeight","auto-height":"autoHeight"});function K(n){return Object.hasOwn(q,n)?q[n]:n}const J=Object.freeze(Object.fromEntries(Z.map(n=>[S(n),n])));function R(n){return Object.hasOwn(J,n)}function f(n){const p={},C={},N={};for(const[O,I]of Object.entries(n||{})){if(R(O)){N[O]=I;continue}if(Object.hasOwn(U,O)){C[O]=I;continue}p[O]=I}return{config:p,imperative:C,handlers:N}}function i(n){const p=n.createGrid;if(typeof p!="function")throw new TypeError("createGridController needs createGrid; pass it in from the grid package.");const C=f(n.props||{}),N=p(n.element,{...C.config});let O=C.handlers,I=C.config,D={};const X=M=>{if(!M||typeof M.type!="string")return;const z=O[S(M.type)];typeof z=="function"&&z(M)},L=N.on("*",X);for(const[M,z]of Object.entries(C.imperative))z!==void 0&&(U[M](N,z),D[M]=z);let V=!1;return{grid:N,update(M){if(V)return;const z=f(M||{});O=z.handlers;const F={};for(const[T,k]of Object.entries(z.config))Object.is(I[T],k)||(F[T]=k);for(const T of Object.keys(I))Object.hasOwn(z.config,T)||(F[T]=void 0);Object.keys(F).length&&N.setAll(F),I=z.config;for(const[T,k]of Object.entries(U)){const $=z.imperative[T];Object.is(D[T],$)||$===void 0&&!Object.hasOwn(D,T)||(k(N,$),D[T]=$)}},destroy(){V||(V=!0,L(),N.destroy())}}}}),ee("packages/modules/react/viewers.js",function(o,H){"use strict";Object.defineProperty(o,"VIEWER_EVENTS",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"VIEWER_APPLY",{enumerable:!0,get:function(){return G}}),Object.defineProperty(o,"VIEWER_BULK_UPDATE",{enumerable:!0,get:function(){return q}}),Object.defineProperty(o,"viewerHandlerName",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"partitionViewerProps",{enumerable:!0,get:function(){return R}}),Object.defineProperty(o,"createViewerController",{enumerable:!0,get:function(){return f}});const U=H("packages/core/src/internal/util.js").warnOnce,S=Object.freeze({kpi:Object.freeze(["tile:click","tile:dblclick","tile:contextmenu","node:toggle","change","tile:status"]),kanban:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:move","card:reverted","card:confirmed","selection:changed","column:collapse","card:add","drag:start","drag:end","swimlane:collapse","swimlane:reorder","column:reorder","filter:changed","sprint:changed","epic:changed","card:expand","card:drill","card:edit","card:sla","beforeMove","beforeAdd","beforeEdit","beforeLaneReorder","beforeColumnReorder","beforeColumnChange","move:cancelled","add:cancelled","edit:cancelled","laneReorder:cancelled","columnReorder:cancelled","columnChange:cancelled"]),tabs:Object.freeze(["beforeTabChange","tab:changed","tabChange:cancelled"]),calendar:Object.freeze(["card:click","card:dblclick","card:contextmenu","card:mount","range:change","beforeMove","card:move"]),chart:Object.freeze(["click","hover","leave","draw","legend"]),gantt:Object.freeze(["schedule","error","history","columnResize","workload:click","task:filtered","draw","dependencies","cell:click","zoomChange","visibleRangeChange","taskExpand","taskCollapse","resourceExpand","resourceCollapse","selectionChange","rowMove","taskAdd","taskRemove","taskUpdate","dependencyAdd","dependencyRemove","dependencyUpdate","assignmentChange","datesChanged","change","schedulingConflict","taskDragStart","taskDrag","taskResizeStart","taskPartialResize","taskResizeEnd","percentBarDragStart","percentBarDrag","percentBarDrop","taskClick","taskDblClick","taskMouseOver","taskMouseOut","dirtyChange"]),layout:Object.freeze(["layout:changed","window:moved","window:resized","window:closed","beforeWindowClose","windowClose:cancelled"]),router:Object.freeze(["metrics","fields:changed"])}),G=Object.freeze({kpi:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[])}),kanban:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[]),quickFilter:(i,n)=>i.setQuickFilter(typeof n=="string"?n:""),sprint:(i,n)=>i.setSprint(n),epic:(i,n)=>i.setEpic(n),loading:(i,n)=>i.setLoading(!!n),error:(i,n)=>i.setError(n??null)}),gantt:Object.freeze({tasks:(i,n)=>i.setTasks(Array.isArray(n)?n:[]),dependencies:(i,n)=>i.setDependencies(Array.isArray(n)?n:[])}),tabs:Object.freeze({active:(i,n)=>{typeof n=="string"&&i.activate(n)}}),calendar:Object.freeze({rows:(i,n)=>i.setRows(Array.isArray(n)?n:[]),view:(i,n)=>i.setView(n),date:(i,n)=>i.goTo(n),move:(i,n,p)=>i.move(n,p)}),chart:Object.freeze({}),layout:Object.freeze({})}),q=Object.freeze({chart:"update"});function K(i){return`on${String(i).split(":").map(p=>p.charAt(0).toUpperCase()+p.slice(1)).join("")}`}const J=Object.freeze(Object.fromEntries(Object.entries(S).map(([i,n])=>[i,Object.freeze(Object.fromEntries(n.map(p=>[K(p),p])))])));function R(i,n){const p=J[i]||{},C=G[i]||{},N={},O={},I={};for(const[D,X]of Object.entries(n||{})){if(Object.hasOwn(p,D)){I[D]=X;continue}if(Object.hasOwn(C,D)){O[D]=X,N[D]=X;continue}N[D]=X}return{config:N,live:O,handlers:I}}function f(i){const n=String(i.viewer),p=i.mount,C=i.name||n;if(typeof p!="function")throw new TypeError(`createViewerController needs a mount factory for "${n}"; pass the module's own factory in, e.g. { createKPI } from lattice-grid/modules/kpi.`);const N=R(n,i.props||{}),O=p(i.element,{...N.config});if(!O||typeof O!="object")throw new TypeError(`the ${C} factory returned no instance; nothing can be driven.`);let I=N.handlers,D=N.config;const X={...N.live},L=[];if(typeof O.on=="function")for(const F of S[n]||[]){const T=K(F),k=O.on(F,$=>{const w=I[T];typeof w=="function"&&w($)});typeof k=="function"&&L.push(k)}const V=q[n],M=G[n]||{};let z=!1;return{instance:O,update(F){if(z)return;const T=R(n,F||{});I=T.handlers;const k={};for(const[w,Q]of Object.entries(T.config))Object.is(D[w],Q)||(k[w]=Q);if(D=T.config,!Object.keys(k).length)return;const $=[];for(const w of Object.keys(k)){const Q=M[w];if(Q){Q(O,k[w]),X[w]=k[w];continue}V&&typeof O[V]=="function"||$.push(w)}if(V&&typeof O[V]=="function"){const w={};for(const Q of Object.keys(k))M[Q]||(w[Q]=k[Q]);Object.keys(w).length&&O[V](w)}$.length&&U(`react.viewer.${n}.mountOnly.${$.join(".")}`,`${C}: ${$.map(w=>`\`${w}\``).join(", ")} changed, but ${C} takes ${$.length===1?"it":"them"} only when the viewer is created. Nothing was applied and the viewer was NOT rebuilt — rebuilding it silently would throw away scroll position, selection and expansion. Give the component a \`key\` that changes when this must take effect, so the rebuild is yours and visible, or drive the instance through the ref.`)},destroy(){if(!z){z=!0;for(const F of L)try{F()}catch{}L.length=0,typeof O.destroy=="function"&&O.destroy()}}}}}),ee("packages/modules/presets/index.js",function(o,H){"use strict";Object.defineProperty(o,"themeFromMui",{enumerable:!0,get:function(){return K}}),Object.defineProperty(o,"default",{enumerable:!0,get:function(){return J}});const U=H("packages/core/src/internal/util.js").warnOnce;function S(R,f){if(typeof R!="string")return R;const i=R.trim().match(/^#([0-9a-f]{6})$/i);if(!i)return R;const n=i[1],p=parseInt(n.slice(0,2),16),C=parseInt(n.slice(2,4),16),N=parseInt(n.slice(4,6),16);return`rgba(${p}, ${C}, ${N}, ${f})`}function G(R){const f=R.palette,i=f.mode==="dark";return{"--lattice-background":f.background.default,"--lattice-surface":f.background.paper,"--lattice-surface-alt":i?"#2a2a2a":f.grey[50],"--lattice-border-color":f.divider,"--lattice-border-strong":i?f.grey[600]:f.grey[400],"--lattice-foreground":f.text.primary,"--lattice-foreground-muted":f.text.secondary,"--lattice-header-foreground":f.text.primary,"--lattice-accent":f.primary.main,"--lattice-accent-contrast":f.primary.contrastText,"--lattice-link-color":f.primary.main,"--lattice-selected-background":S(f.primary.main,.12),"--lattice-hovered-background":S(f.text.primary,.06),"--lattice-focus-color":f.primary.main,"--lattice-variant-danger-solid":f.error.main,"--lattice-variant-danger-fill":S(f.error.main,.12),"--lattice-variant-warning-solid":f.warning.main,"--lattice-variant-warning-fill":S(f.warning.main,.12),"--lattice-variant-success-solid":f.success.main,"--lattice-variant-success-fill":S(f.success.main,.12),"--lattice-variant-info-solid":f.info.main,"--lattice-variant-info-fill":S(f.info.main,.12),"--lattice-radius":`${R.shape.borderRadius}px`,"--lattice-font-family":R.typography.fontFamily,"--lattice-font-size":`${R.typography.body2.fontSize}`,"--lattice-header-font-weight":String(R.typography.fontWeightMedium)}}function q(R){return`.lattice {
7
7
  ${Object.entries(R).map(([i,n])=>` ${i}: ${n};`).join(`
8
8
  `)}
9
9
  }
package/modules/tabs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lattice Grid 1.89.0, tabs module type declarations
2
+ * Lattice Grid 1.89.1, tabs module type declarations
3
3
  * Copyright (c) 2026 TOCLOCO Inc. All rights reserved.
4
4
  * https://latticegrid.dev
5
5
  */