@bino-bi/bn-template-engine 1.0.0-next.26 → 1.0.0-next.27

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 (138) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-0a19e8af.entry.js +1 -0
  3. package/dist/bn-template-engine/p-0f6ece5a.entry.js +1 -0
  4. package/dist/bn-template-engine/p-13db2986.entry.js +1 -0
  5. package/dist/bn-template-engine/p-1b35c4ac.entry.js +1 -0
  6. package/dist/bn-template-engine/{p-0fb02c57.entry.js → p-4602d613.entry.js} +1 -1
  7. package/dist/bn-template-engine/{p-fcfbb329.entry.js → p-489438ed.entry.js} +1 -1
  8. package/dist/bn-template-engine/{p-5d7a3a77.entry.js → p-6f86159c.entry.js} +1 -1
  9. package/dist/bn-template-engine/{p-45508f1b.entry.js → p-7401e3f3.entry.js} +1 -1
  10. package/dist/bn-template-engine/{p-b27009eb.entry.js → p-83d50a14.entry.js} +1 -1
  11. package/dist/bn-template-engine/{p-qRZrT-U3.js → p-BCr2-Ka-.js} +1 -1
  12. package/dist/bn-template-engine/{p-BbmobTg0.js → p-BEkgk7Ij.js} +1 -1
  13. package/dist/bn-template-engine/{p-CsJ84YRk.js → p-BVYKc5cH.js} +1 -1
  14. package/dist/bn-template-engine/{p-CWWWM-XC.js → p-BeLWoM0Q.js} +1 -1
  15. package/dist/bn-template-engine/p-CHZZqoB7.js +1 -0
  16. package/dist/bn-template-engine/p-CURM2Nrr.js +1 -0
  17. package/dist/bn-template-engine/{p-DVrDYxlh.js → p-Ckhir6Ux.js} +1 -1
  18. package/dist/bn-template-engine/{p-EtT29btN.js → p-Ct0wEGrw.js} +1 -1
  19. package/dist/bn-template-engine/p-CtEA0ZQc.js +1 -0
  20. package/dist/bn-template-engine/{p-DjPXefnq.js → p-DJ5KJ6GF.js} +1 -1
  21. package/dist/bn-template-engine/{p-BcaI745G.js → p-DoIuKI09.js} +1 -1
  22. package/dist/bn-template-engine/{p-B5Jd_eCX.js → p-DwGg2_vO.js} +1 -1
  23. package/dist/bn-template-engine/{p-CG_Bcm6V.js → p-Z-mcXias.js} +1 -1
  24. package/dist/bn-template-engine/p-aeba74a4.entry.js +1 -0
  25. package/dist/bn-template-engine/{p-4419db8f.entry.js → p-b4dabaf9.entry.js} +1 -1
  26. package/dist/bn-template-engine/{p-a5867a4c.entry.js → p-d083f0e6.entry.js} +1 -1
  27. package/dist/bn-template-engine/p-ee09f216.entry.js +1 -0
  28. package/dist/bn-template-engine/p-f00b189f.entry.js +1 -0
  29. package/dist/cjs/{AxisConfig-DwiNUyYG.js → AxisConfig-CbNnsmGC.js} +1 -1
  30. package/dist/cjs/{LabelCollisionManager-Bv-xkeXw.js → LabelCollisionManager-tOT40-pH.js} +2 -2
  31. package/dist/cjs/{Order-2wRydarc.js → Order-C5XgrPzr.js} +1 -1
  32. package/dist/cjs/SVGStyle-C1LhLgbT.js +6513 -0
  33. package/dist/cjs/{SVGVariancesStyleGroup-CiI4GeWe.js → SVGVariancesStyleGroup-C2Ys_Iz6.js} +1 -1
  34. package/dist/cjs/{VarianceMeasure-CQlSRzlp.js → VarianceMeasure-uph4FBRa.js} +1 -1
  35. package/dist/cjs/{XYChartDataRow-C2FdL58s.js → XYChartDataRow-BNqTnXnX.js} +4 -4
  36. package/dist/cjs/bn-asset_21.cjs.entry.js +79 -42
  37. package/dist/cjs/bn-chart-bubble.cjs.entry.js +15 -14
  38. package/dist/cjs/bn-chart-bullet.cjs.entry.js +14 -13
  39. package/dist/cjs/bn-chart-scatter.cjs.entry.js +14 -13
  40. package/dist/cjs/bn-grid.cjs.entry.js +5 -5
  41. package/dist/cjs/bn-image.cjs.entry.js +4 -4
  42. package/dist/cjs/bn-internationalization.cjs.entry.js +1 -1
  43. package/dist/cjs/bn-ruleset.cjs.entry.js +1 -1
  44. package/dist/cjs/bn-text.cjs.entry.js +5 -5
  45. package/dist/cjs/bn-tree.cjs.entry.js +5 -5
  46. package/dist/cjs/{context-protocol-DcTEh1rq.js → context-protocol-G4pi217i.js} +10 -10
  47. package/dist/cjs/{diagnostics-CTgbq_Gc.js → diagnostics-CRfecdNZ.js} +1 -1
  48. package/dist/cjs/editor-companion.cjs.entry.js +1 -1
  49. package/dist/cjs/{svgChartElements-tDA43aYj.js → emptyState-B3kPjSFO.js} +27 -4
  50. package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +9 -8
  51. package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +9 -8
  52. package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +9 -8
  53. package/dist/cjs/{scaling-Dsb5_NXy.js → scaling-BGTK5H0H.js} +1 -1
  54. package/dist/cjs/{withScalingGroup-CFIc5-6s.js → withScalingGroup-DrFV_zsQ.js} +1 -1
  55. package/dist/cjs/{withStyled-D0jLwCib.js → withStyled-CZCnmfPw.js} +3 -3
  56. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +37 -0
  57. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +3 -1
  58. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +37 -5
  59. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +3 -2
  60. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +37 -0
  61. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +3 -1
  62. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +37 -5
  63. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +3 -2
  64. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +37 -0
  65. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +3 -1
  66. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +37 -5
  67. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +3 -2
  68. package/dist/collection/components/bn-chart-structure/bn-chart-structure.css +37 -5
  69. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +16 -2
  70. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +4 -4
  71. package/dist/collection/components/bn-chart-time/bn-chart-time.css +37 -0
  72. package/dist/collection/components/bn-chart-time/bn-chart-time.js +24 -2
  73. package/dist/collection/components/bn-chart-time/ibcs-chart-time.css +37 -0
  74. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +4 -4
  75. package/dist/collection/components/bn-table/bn-table.css +38 -1
  76. package/dist/collection/components/bn-table/bn-table.js +4 -2
  77. package/dist/collection/components/bn-table/ibcs-table.css +37 -0
  78. package/dist/collection/components/bn-table/ibcs-table.js +5 -3
  79. package/dist/collection/stores/internationalization.js +10 -10
  80. package/dist/collection/utils/emptyState.js +21 -0
  81. package/dist/components/bn-chart-bubble.js +1 -1
  82. package/dist/components/bn-chart-bullet.js +1 -1
  83. package/dist/components/bn-chart-scatter.js +1 -1
  84. package/dist/components/bn-chart-structure.js +1 -1
  85. package/dist/components/bn-chart-time.js +1 -1
  86. package/dist/components/bn-table.js +1 -1
  87. package/dist/components/context-protocol.js +1 -1
  88. package/dist/components/emptyState.js +1 -0
  89. package/dist/components/ibcs-chart-bubble2.js +1 -1
  90. package/dist/components/ibcs-chart-bullet2.js +1 -1
  91. package/dist/components/ibcs-chart-scatter2.js +1 -1
  92. package/dist/components/ibcs-chart-structure2.js +1 -1
  93. package/dist/components/ibcs-chart-time2.js +1 -1
  94. package/dist/components/ibcs-table2.js +1 -1
  95. package/dist/components/svg.esm.js +1 -0
  96. package/dist/esm/{AxisConfig-KqzWQbML.js → AxisConfig-CEFoGHUN.js} +1 -1
  97. package/dist/esm/{LabelCollisionManager-585bQMtP.js → LabelCollisionManager-Dou5LvUs.js} +2 -2
  98. package/dist/esm/{Order-DZVWjEL_.js → Order-Tn0j255j.js} +1 -1
  99. package/dist/esm/SVGStyle-BSuFK9YW.js +6503 -0
  100. package/dist/esm/{SVGVariancesStyleGroup-DO5QJfRQ.js → SVGVariancesStyleGroup-D52LMGw8.js} +1 -1
  101. package/dist/esm/{VarianceMeasure-DDjChp8C.js → VarianceMeasure-BXWH7oAW.js} +1 -1
  102. package/dist/esm/{XYChartDataRow-Dn83Tqh9.js → XYChartDataRow-D272UFel.js} +4 -4
  103. package/dist/esm/bn-asset_21.entry.js +70 -33
  104. package/dist/esm/bn-chart-bubble.entry.js +12 -11
  105. package/dist/esm/bn-chart-bullet.entry.js +11 -10
  106. package/dist/esm/bn-chart-scatter.entry.js +11 -10
  107. package/dist/esm/bn-grid.entry.js +5 -5
  108. package/dist/esm/bn-image.entry.js +4 -4
  109. package/dist/esm/bn-internationalization.entry.js +1 -1
  110. package/dist/esm/bn-ruleset.entry.js +1 -1
  111. package/dist/esm/bn-text.entry.js +5 -5
  112. package/dist/esm/bn-tree.entry.js +5 -5
  113. package/dist/esm/{context-protocol-B-vdGKeG.js → context-protocol-D_ysqCp8.js} +10 -10
  114. package/dist/esm/{diagnostics-CiquIw8B.js → diagnostics-BjZRZraG.js} +1 -1
  115. package/dist/esm/editor-companion.entry.js +1 -1
  116. package/dist/esm/{svgChartElements-B3YClivG.js → emptyState-DqkM4Yc5.js} +27 -5
  117. package/dist/esm/ibcs-chart-bubble.entry.js +9 -8
  118. package/dist/esm/ibcs-chart-bullet.entry.js +9 -8
  119. package/dist/esm/ibcs-chart-scatter.entry.js +9 -8
  120. package/dist/esm/{scaling-Dggyeqts.js → scaling-YbP727FC.js} +1 -1
  121. package/dist/esm/{withScalingGroup-DNBSqRC0.js → withScalingGroup-Byn-W6z8.js} +1 -1
  122. package/dist/esm/{withStyled-DoNsbwS3.js → withStyled-3yRswBcf.js} +3 -3
  123. package/dist/types/utils/emptyState.d.ts +10 -0
  124. package/package.json +2 -2
  125. package/dist/bn-template-engine/p-03304284.entry.js +0 -1
  126. package/dist/bn-template-engine/p-461fdffa.entry.js +0 -1
  127. package/dist/bn-template-engine/p-62cc95b7.entry.js +0 -1
  128. package/dist/bn-template-engine/p-829212c3.entry.js +0 -1
  129. package/dist/bn-template-engine/p-BcLsoDrW.js +0 -1
  130. package/dist/bn-template-engine/p-D5e8I9Qe.js +0 -1
  131. package/dist/bn-template-engine/p-TuLpbB5O.js +0 -1
  132. package/dist/bn-template-engine/p-bfa87b07.entry.js +0 -1
  133. package/dist/bn-template-engine/p-ceb80db3.entry.js +0 -1
  134. package/dist/bn-template-engine/p-f06c3703.entry.js +0 -1
  135. package/dist/cjs/SVGStyle-DoxylrEQ.js +0 -8219
  136. package/dist/components/layoutObserver.js +0 -1
  137. package/dist/components/main.js +0 -1
  138. package/dist/esm/SVGStyle-OrPkzjcb.js +0 -8209
@@ -1 +1 @@
1
- import{F as t}from"./p-TuLpbB5O.js";import"./p-BbmobTg0.js";class s{constructor(t="",s=1){this.prefix=t,this.value=s}}const e=["pl","fc","pp","ac"];function i(t){return t.replace(/\d+$/,"")}function r(t){return.299*parseInt(t.slice(1,3),16)+.587*parseInt(t.slice(3,5),16)+.114*parseInt(t.slice(5,7),16)>128?"#000000":"#ffffff"}var h;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom"}(h||(h={}));class n{constructor(t,s,e,i,r,n,o,a){this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.isRelativeLabel=!1,this.segmentFillColor=null,this.x=s,this.y=e,this.value=r,this.group=t.group().id(this.createElementID(t.toString(),i)),this.styles=n,this.isVarianceLabel=!1,this.verticalHookLocation=o||h.Top,this.horizontalHookLocation=a||h.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}updateGroup(t){return this.group=t,this}draw(e=!0,i={percent:2,decimal:1},r=new s){if(this.isEmpty())return this;const h=this.group;let n,o="";if(!1===Number.isNaN(Number(this.value))){let s="percent",e=i.percent,h=i.percent,a=1;!1===this.isRelativeLabel&&(e=i.decimal,h=i.decimal,a=r.value,s="decimal"),n=t.number(Number(this.value),s,e,h,a),this.isVarianceLabel&&Number(this.value)>=0&&(o="+")}else n=""+this.value;const a=this.drawLabel(h,o+n);return!1===e&&(a.addClass("hide"),h.addClass("hide")),this}isEmpty(){return null==this.value||""===this.value}setPos(t,s){return this.x=t,this.y=s,this}forceStringTypeDraw(){return this.drawLabel(this.group,""+this.value),this}drawLabel(t,s){const e=this.styles.fontStyles.background||"#ffffff";let i="start";const n=t.text(s);n.move(this.x,this.y);const o=n.bbox(),a=o.w,c=o.h;let l=0,u=0;const f=n.x();let p=n.y();return this.horizontalHookLocation===h.Left?(i="left",l=n.x()):this.horizontalHookLocation===h.Center?(i="middle",l=n.x()-(a+2)/2):this.horizontalHookLocation===h.Right&&(i="end",l=n.x()-a),this.verticalHookLocation===h.Center?(p=n.y()-1.2*c/2,u=p+.2*c):this.verticalHookLocation===h.Top?(p-=c/4,u=p+.2*c):this.verticalHookLocation===h.Bottom&&(p-=c,u=p+.2*c),n.move(f,p),n.font({anchor:i}),null!=this.segmentFillColor?n.fill(r(this.segmentFillColor)):t.rect(a+2,.8*c).stroke(e).fill(e).opacity(.9).move(l-1,u).insertBefore(n),n}createElementID(t,s){return t+"_"+s+"_"+this.ID_SCENARIOLABEL}}const o={ac:1,pp:2,fc:3,pl:4};var a;!function(t){t[t.Above=0]="Above",t[t.Below=1]="Below",t[t.Left=2]="Left",t[t.Right=3]="Right"}(a||(a={}));class c{constructor(){this.labels=[],this.scenarioLabels=[]}clear(){this.labels=[],this.scenarioLabels=[]}register(t){this.labels.push(t)}hasCollision(t){return this.labels.some((s=>this.intersects(t,s)))}getOptimalPlacement(t,s,e,i,r,h,n,a){const c=o[n]||99,l=h/2;for(const h of a){const n=this.calculatePlacementForDirection(t,s,e,i,r,l,8,h);if(!this.hasCollision(n.bounds))return n}for(const h of a){const n=this.calculatePlacementForDirection(t,s,e,i,r,l,8,h);if(!this.collidesWithHigherPriority(n.bounds,c))return n}return null}calculatePlacementForDirection(t,s,e,i,r,n,o,c){let l,u,f,p,b,d;switch(c){case a.Above:l=t,u=s-n-o,f=h.Bottom,p=h.Center,b=t-e/2,d=s-n-o-i;break;case a.Below:l=t,u=s+n+o,f=h.Top,p=h.Center,b=t-e/2,d=s+n+o-i/4;break;case a.Left:l=t-n-o,u=s,f=h.Center,p=h.Right,b=t-n-o-e,d=s-.6*i;break;case a.Right:l=t+n+o,u=s,f=h.Center,p=h.Left,b=t+n+o,d=s-.6*i}return{labelX:l,labelY:u,verticalHook:f,horizontalHook:p,bounds:{x:b,y:d,width:e,height:i,pointIndex:r,preferredHook:f}}}collidesWithHigherPriority(t,s){return this.labels.some((e=>!!e.scenarioType&&((o[e.scenarioType]||99)<s&&this.intersects(t,e))))}shouldHideScenarioLabel(t,s,e,i=20){const r=o[e]||99;return!(r<=1)&&this.scenarioLabels.some((e=>{if((o[e.scenarioType]||99)>=r)return!1;const h=Math.abs(s-e.y),n=Math.abs(t-e.x);return h<i&&n<i}))}registerScenarioLabel(t,s,e){this.scenarioLabels.push({x:t,y:s,scenarioType:e})}intersects(t,s){return!(t.x+t.width<s.x||s.x+s.width<t.x||t.y+t.height<s.y||s.y+s.height<t.y)}getLabelCount(){return this.labels.length}}export{h as H,e as I,c as L,s as S,i as a,n as b,a as c,o as d,r as g}
1
+ import{F as t}from"./p-CHZZqoB7.js";import"./p-BEkgk7Ij.js";class s{constructor(t="",s=1){this.prefix=t,this.value=s}}const e=["pl","fc","pp","ac"];function i(t){return t.replace(/\d+$/,"")}function r(t){return.299*parseInt(t.slice(1,3),16)+.587*parseInt(t.slice(3,5),16)+.114*parseInt(t.slice(5,7),16)>128?"#000000":"#ffffff"}var h;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom"}(h||(h={}));class n{constructor(t,s,e,i,r,n,o,a){this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.isRelativeLabel=!1,this.segmentFillColor=null,this.x=s,this.y=e,this.value=r,this.group=t.group().id(this.createElementID(t.toString(),i)),this.styles=n,this.isVarianceLabel=!1,this.verticalHookLocation=o||h.Top,this.horizontalHookLocation=a||h.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}updateGroup(t){return this.group=t,this}draw(e=!0,i={percent:2,decimal:1},r=new s){if(this.isEmpty())return this;const h=this.group;let n,o="";if(!1===Number.isNaN(Number(this.value))){let s="percent",e=i.percent,h=i.percent,a=1;!1===this.isRelativeLabel&&(e=i.decimal,h=i.decimal,a=r.value,s="decimal"),n=t.number(Number(this.value),s,e,h,a),this.isVarianceLabel&&Number(this.value)>=0&&(o="+")}else n=""+this.value;const a=this.drawLabel(h,o+n);return!1===e&&(a.addClass("hide"),h.addClass("hide")),this}isEmpty(){return null==this.value||""===this.value}setPos(t,s){return this.x=t,this.y=s,this}forceStringTypeDraw(){return this.drawLabel(this.group,""+this.value),this}drawLabel(t,s){const e=this.styles.fontStyles.background||"#ffffff";let i="start";const n=t.text(s);n.move(this.x,this.y);const o=n.bbox(),a=o.w,c=o.h;let l=0,u=0;const f=n.x();let p=n.y();return this.horizontalHookLocation===h.Left?(i="left",l=n.x()):this.horizontalHookLocation===h.Center?(i="middle",l=n.x()-(a+2)/2):this.horizontalHookLocation===h.Right&&(i="end",l=n.x()-a),this.verticalHookLocation===h.Center?(p=n.y()-1.2*c/2,u=p+.2*c):this.verticalHookLocation===h.Top?(p-=c/4,u=p+.2*c):this.verticalHookLocation===h.Bottom&&(p-=c,u=p+.2*c),n.move(f,p),n.font({anchor:i}),null!=this.segmentFillColor?n.fill(r(this.segmentFillColor)):t.rect(a+2,.8*c).stroke(e).fill(e).opacity(.9).move(l-1,u).insertBefore(n),n}createElementID(t,s){return t+"_"+s+"_"+this.ID_SCENARIOLABEL}}const o={ac:1,pp:2,fc:3,pl:4};var a;!function(t){t[t.Above=0]="Above",t[t.Below=1]="Below",t[t.Left=2]="Left",t[t.Right=3]="Right"}(a||(a={}));class c{constructor(){this.labels=[],this.scenarioLabels=[]}clear(){this.labels=[],this.scenarioLabels=[]}register(t){this.labels.push(t)}hasCollision(t){return this.labels.some((s=>this.intersects(t,s)))}getOptimalPlacement(t,s,e,i,r,h,n,a){const c=o[n]||99,l=h/2;for(const h of a){const n=this.calculatePlacementForDirection(t,s,e,i,r,l,8,h);if(!this.hasCollision(n.bounds))return n}for(const h of a){const n=this.calculatePlacementForDirection(t,s,e,i,r,l,8,h);if(!this.collidesWithHigherPriority(n.bounds,c))return n}return null}calculatePlacementForDirection(t,s,e,i,r,n,o,c){let l,u,f,p,b,d;switch(c){case a.Above:l=t,u=s-n-o,f=h.Bottom,p=h.Center,b=t-e/2,d=s-n-o-i;break;case a.Below:l=t,u=s+n+o,f=h.Top,p=h.Center,b=t-e/2,d=s+n+o-i/4;break;case a.Left:l=t-n-o,u=s,f=h.Center,p=h.Right,b=t-n-o-e,d=s-.6*i;break;case a.Right:l=t+n+o,u=s,f=h.Center,p=h.Left,b=t+n+o,d=s-.6*i}return{labelX:l,labelY:u,verticalHook:f,horizontalHook:p,bounds:{x:b,y:d,width:e,height:i,pointIndex:r,preferredHook:f}}}collidesWithHigherPriority(t,s){return this.labels.some((e=>!!e.scenarioType&&((o[e.scenarioType]||99)<s&&this.intersects(t,e))))}shouldHideScenarioLabel(t,s,e,i=20){const r=o[e]||99;return!(r<=1)&&this.scenarioLabels.some((e=>{if((o[e.scenarioType]||99)>=r)return!1;const h=Math.abs(s-e.y),n=Math.abs(t-e.x);return h<i&&n<i}))}registerScenarioLabel(t,s,e){this.scenarioLabels.push({x:t,y:s,scenarioType:e})}intersects(t,s){return!(t.x+t.width<s.x||s.x+s.width<t.x||t.y+t.height<s.y||s.y+s.height<t.y)}getLabelCount(){return this.labels.length}}export{h as H,e as I,c as L,s as S,i as a,n as b,a as c,o as d,r as g}
@@ -1 +1 @@
1
- import{g as t,c as n}from"./p-D5e8I9Qe.js";import{r as e}from"./p-DtLI_CzV.js";import{g as o,f as r}from"./p-C5UYpZUU.js";const i=(t,n)=>{const e=[],o=[];for(const r of n)(t(r)?e:o).push(r);return[e,o]},a="WARN_use_dataset",s=(t,n)=>{const e=t.errors;if(e)if(n.length>0){const t=n.map((t=>t.substring(1))).join(", ");e.addOrReplace({id:a,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else e.remove(a)},u=(r,a,u)=>{let l,c,f=[],d=[],p=[];const v=(t,n)=>{const e=n?t.substring(1):t;let o;try{o=c.db.db.exec(`SELECT * FROM \`${e}\``)}catch(t){o=[]}a(t,o)},m=()=>{f.forEach((t=>t())),f=[],d.forEach((t=>{t&&(f.push(c.db.subscribe(t,(()=>v(t,!1)))),v(t,!1),(t=>{if(u){const n=c.datasetsMeta.get(t);n&&u(t,n)}})(t))})),p.forEach((t=>{t&&(f.push(c.db.subscribe(t.substring(1),(()=>v(t,!0)))),v(t,!0))}))},b=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&([p,d]=i((t=>t.startsWith("$")),o(r).getAttribute("datasets").split(",")),s(r,p),m())}))})),h=r.connectedCallback;r.connectedCallback=()=>{const n=o(r);c=t(n),[p,d]=i((t=>t.startsWith("$")),(n.getAttribute("datasets")||"").split(",")),s(r,p),m(),b.observe(n,{attributes:!0,attributeFilter:["datasets"]}),u&&(l=c.datasetsMeta.on("set",((t,n)=>{d.includes(t)&&u(t,n)}))),e(h,r)};const g=r.disconnectedCallback;return r.disconnectedCallback=()=>{b.disconnect(),f.forEach((t=>t())),f=[],e(l),n(o(r)),e(g,r)},t=>{d=t,m()}},l="inherited-page",c="bn-layout-page";function f(t){return"inherited-closest"===t||t===l}function d(t,n){let e=t.parentNode;for(;e;){if(e instanceof HTMLElement){const t=e.nodeName.toLowerCase();if(n===l){if(t===c)return e}else if("bn-layout-card"===t||t===c)return e}if(e.parentNode)e=e.parentNode;else{if(!(e instanceof ShadowRoot))break;e=e.host}}}const p=(t,n)=>{const i=new Map;let a,s=null;const u=t.connectedCallback;t.connectedCallback=()=>{(()=>{const e=o(t);i.clear();const u=[];for(const o of n){const n=t[o.propName];if("string"!=typeof n||!f(n))continue;if(a||(a=d(e,n)),!a)continue;const r=a.getAttribute(o.ancestorAttr);null!=r&&i.set(o.propName,r),u.push(o.ancestorAttr)}a&&u.length>0&&(s=new MutationObserver((()=>{for(const e of n){if(!f(t[e.propName]))continue;const n=a.getAttribute(e.ancestorAttr);null!=n?i.set(e.propName,n):i.delete(e.propName)}r(t)})),s.observe(a,{attributes:!0,attributeFilter:u}))})(),e(u,t)};const l=t.disconnectedCallback;return t.disconnectedCallback=()=>{s&&(s.disconnect(),s=null),a=void 0,i.clear(),e(l,t)},(t,n)=>{if(f(n))return i.get(t)}},v=i=>{let a,s,u,l=null;const c=()=>{var t;const n=o(i);if(l&&(l.disconnect(),l=null),s=null!==(t=n.getAttribute("i18n-namespace"))&&void 0!==t?t:n.getAttribute("namespace"),null!=s)return;const e=function(t){let n=t.parentNode;for(;n;){if(n instanceof HTMLElement&&n.hasAttribute("i18n-namespace"))return n;if(n.parentNode)n=n.parentNode;else{if(!(n instanceof ShadowRoot))break;n=n.host}}}(n);e&&(s=e.getAttribute("i18n-namespace"),l=new MutationObserver((()=>{c(),r(i)})),l.observe(e,{attributes:!0,attributeFilter:["i18n-namespace"]}))},f=new MutationObserver((t=>{t.forEach((t=>{"i18n-namespace"!==t.attributeName&&"namespace"!==t.attributeName||(c(),r(i))}))})),d=i.connectedCallback;i.connectedCallback=()=>{const n=o(i);u=t(n),f.observe(n,{attributes:!0,attributeFilter:["i18n-namespace","namespace"]}),c(),a=u.internationalization.on("set",(t=>{t!==s&&"_system"!==t||r(i)})),e(d,i)};const p=i.disconnectedCallback;return i.disconnectedCallback=()=>{f.disconnect(),l&&(l.disconnect(),l=null),e(a),n(o(i)),e(p,i)},{t:(t,n)=>{var e,r,a,l,c;t.startsWith(".")&&(t=o(i).localName+t);const f=u.internationalization.state,d=u.context.state.locale,p=null!==(a=null===(r=null===(e=f[s])||void 0===e?void 0:e[d])||void 0===r?void 0:r[t])&&void 0!==a?a:null===(c=null===(l=f._system)||void 0===l?void 0:l[d])||void 0===c?void 0:c[t];return null==p?t:p.replace(/{{([\s\S]+?)}}/g,((t,e)=>{var o;return null!==(o=null==n?void 0:n[e.trim()])&&void 0!==o?o:""}))}}};function m(t,n=!1){const e=b(t);if(!e)return n&&console.log("[parentDims] no layout parent found for",t.tagName),{width:0,height:0};const o=getComputedStyle(e),r=e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight),i=function(t,n=!1){let e=b(t),o=0,r=null,i=1;for(;e;){if(e.hasAttribute("data-bn-fit-content")){n&&console.log(`[height:${o}]`,e.tagName,"fit-content region → discarding inner candidate"),r=null;const t=parseInt(e.getAttribute("data-bn-fit-content"),10);!isNaN(t)&&t>1&&(i*=t),e=h(e),o++;continue}const t=getComputedStyle(e),a=t.overflowY;if(n&&console.log(`[height:${o}]`,e.tagName,e.className||"(no class)",`overflow=${a} clientH=${e.clientHeight} h=${t.height}`),null===r)if("hidden"===a||"scroll"===a||"auto"===a)r=e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom),n&&console.log(`[height] candidate at depth ${o}: ${Math.round(r)}px`);else if("none"!==t.maxHeight){const n=parseFloat(t.maxHeight);!isNaN(n)&&n>0&&(r=Math.min(n,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)))}e=h(e),o++}return null!==r?r/i:(n&&console.log("[height] NO constrained ancestor → viewport fallback"),"undefined"!=typeof window?window.innerHeight/i:0)}(t,n);return n&&console.log("[parentDims]",t.tagName,"→ layoutParent:",e.tagName,e.className||"(no class)",`clientW=${e.clientWidth} → w=${Math.round(r)}, h=${Math.round(i)}`,"overflow:",o.overflow),{width:Math.max(0,r),height:Math.max(0,i)}}function b(t){var n;const e=t.parentElement;return(null===(n=null==e?void 0:e.assignedSlot)||void 0===n?void 0:n.parentElement)?e.assignedSlot.parentElement:e}function h(t){var n;if(null===(n=t.assignedSlot)||void 0===n?void 0:n.parentElement)return t.assignedSlot.parentElement;if(t.parentElement)return t.parentElement;const e=t.getRootNode();return e instanceof ShadowRoot?e.host:null}function g(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const n=Number(t);return!isNaN(n)&&n>0?{mode:"factor",factor:n}:{mode:"empty"}}const w={k:1e3,K:1e3,M:1e6,G:1e9,T:1e12},y=/^(\d+(?:\.\d+)?|\.\d+)\s*([kKMGT])?$/;function M(t){var n;if("number"==typeof t)return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"invalid",raw:String(t)};const e=null!==(n=null==t?void 0:t.toString().trim())&&void 0!==n?n:"";if("auto"===e.toLowerCase())return{kind:"auto"};const o=y.exec(e);if(o){const t=Number(o[1])*(o[2]?w[o[2]]:1);if(Number.isFinite(t)&&t>0)return{kind:"number",value:t}}return{kind:"invalid",raw:e}}function $(t,n){const e=M(t);if("auto"===e.kind)return{kind:"auto"};if("string"==typeof t){const e=t.trim();if(n.has(e))return{kind:"value",value:n.get(e)}}return"number"===e.kind?{kind:"value",value:e.value}:{kind:"invalid",raw:e.raw}}const k=[[1e12,"T"],[1e9,"G"],[1e6,"M"],[1e3,"k"]];function N(t){if(!Number.isFinite(t)||t<=0)return String(t);const n=t=>String(Number(t.toPrecision(3)));for(const[e,o]of k)if(t>=e)return`${n(t/e)}${o}`;return n(t)}export{v as a,N as b,p as c,M as d,d as f,m as g,f as i,g as p,$ as r,u as w}
1
+ import{g as t,c as n}from"./p-CURM2Nrr.js";import{r as e}from"./p-DtLI_CzV.js";import{g as o,f as r}from"./p-C5UYpZUU.js";const i=(t,n)=>{const e=[],o=[];for(const r of n)(t(r)?e:o).push(r);return[e,o]},a="WARN_use_dataset",s=(t,n)=>{const e=t.errors;if(e)if(n.length>0){const t=n.map((t=>t.substring(1))).join(", ");e.addOrReplace({id:a,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else e.remove(a)},u=(r,a,u)=>{let l,c,f=[],d=[],p=[];const v=(t,n)=>{const e=n?t.substring(1):t;let o;try{o=c.db.db.exec(`SELECT * FROM \`${e}\``)}catch(t){o=[]}a(t,o)},m=()=>{f.forEach((t=>t())),f=[],d.forEach((t=>{t&&(f.push(c.db.subscribe(t,(()=>v(t,!1)))),v(t,!1),(t=>{if(u){const n=c.datasetsMeta.get(t);n&&u(t,n)}})(t))})),p.forEach((t=>{t&&(f.push(c.db.subscribe(t.substring(1),(()=>v(t,!0)))),v(t,!0))}))},b=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&([p,d]=i((t=>t.startsWith("$")),o(r).getAttribute("datasets").split(",")),s(r,p),m())}))})),h=r.connectedCallback;r.connectedCallback=()=>{const n=o(r);c=t(n),[p,d]=i((t=>t.startsWith("$")),(n.getAttribute("datasets")||"").split(",")),s(r,p),m(),b.observe(n,{attributes:!0,attributeFilter:["datasets"]}),u&&(l=c.datasetsMeta.on("set",((t,n)=>{d.includes(t)&&u(t,n)}))),e(h,r)};const g=r.disconnectedCallback;return r.disconnectedCallback=()=>{b.disconnect(),f.forEach((t=>t())),f=[],e(l),n(o(r)),e(g,r)},t=>{d=t,m()}},l="inherited-page",c="bn-layout-page";function f(t){return"inherited-closest"===t||t===l}function d(t,n){let e=t.parentNode;for(;e;){if(e instanceof HTMLElement){const t=e.nodeName.toLowerCase();if(n===l){if(t===c)return e}else if("bn-layout-card"===t||t===c)return e}if(e.parentNode)e=e.parentNode;else{if(!(e instanceof ShadowRoot))break;e=e.host}}}const p=(t,n)=>{const i=new Map;let a,s=null;const u=t.connectedCallback;t.connectedCallback=()=>{(()=>{const e=o(t);i.clear();const u=[];for(const o of n){const n=t[o.propName];if("string"!=typeof n||!f(n))continue;if(a||(a=d(e,n)),!a)continue;const r=a.getAttribute(o.ancestorAttr);null!=r&&i.set(o.propName,r),u.push(o.ancestorAttr)}a&&u.length>0&&(s=new MutationObserver((()=>{for(const e of n){if(!f(t[e.propName]))continue;const n=a.getAttribute(e.ancestorAttr);null!=n?i.set(e.propName,n):i.delete(e.propName)}r(t)})),s.observe(a,{attributes:!0,attributeFilter:u}))})(),e(u,t)};const l=t.disconnectedCallback;return t.disconnectedCallback=()=>{s&&(s.disconnect(),s=null),a=void 0,i.clear(),e(l,t)},(t,n)=>{if(f(n))return i.get(t)}},v=i=>{let a,s,u,l=null;const c=()=>{var t;const n=o(i);if(l&&(l.disconnect(),l=null),s=null!==(t=n.getAttribute("i18n-namespace"))&&void 0!==t?t:n.getAttribute("namespace"),null!=s)return;const e=function(t){let n=t.parentNode;for(;n;){if(n instanceof HTMLElement&&n.hasAttribute("i18n-namespace"))return n;if(n.parentNode)n=n.parentNode;else{if(!(n instanceof ShadowRoot))break;n=n.host}}}(n);e&&(s=e.getAttribute("i18n-namespace"),l=new MutationObserver((()=>{c(),r(i)})),l.observe(e,{attributes:!0,attributeFilter:["i18n-namespace"]}))},f=new MutationObserver((t=>{t.forEach((t=>{"i18n-namespace"!==t.attributeName&&"namespace"!==t.attributeName||(c(),r(i))}))})),d=i.connectedCallback;i.connectedCallback=()=>{const n=o(i);u=t(n),f.observe(n,{attributes:!0,attributeFilter:["i18n-namespace","namespace"]}),c(),a=u.internationalization.on("set",(t=>{t!==s&&"_system"!==t||r(i)})),e(d,i)};const p=i.disconnectedCallback;return i.disconnectedCallback=()=>{f.disconnect(),l&&(l.disconnect(),l=null),e(a),n(o(i)),e(p,i)},{t:(t,n)=>{var e,r,a,l,c;t.startsWith(".")&&(t=o(i).localName+t);const f=u.internationalization.state,d=u.context.state.locale,p=null!==(a=null===(r=null===(e=f[s])||void 0===e?void 0:e[d])||void 0===r?void 0:r[t])&&void 0!==a?a:null===(c=null===(l=f._system)||void 0===l?void 0:l[d])||void 0===c?void 0:c[t];return null==p?t:p.replace(/{{([\s\S]+?)}}/g,((t,e)=>{var o;return null!==(o=null==n?void 0:n[e.trim()])&&void 0!==o?o:""}))}}};function m(t,n=!1){const e=b(t);if(!e)return n&&console.log("[parentDims] no layout parent found for",t.tagName),{width:0,height:0};const o=getComputedStyle(e),r=e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight),i=function(t,n=!1){let e=b(t),o=0,r=null,i=1;for(;e;){if(e.hasAttribute("data-bn-fit-content")){n&&console.log(`[height:${o}]`,e.tagName,"fit-content region → discarding inner candidate"),r=null;const t=parseInt(e.getAttribute("data-bn-fit-content"),10);!isNaN(t)&&t>1&&(i*=t),e=h(e),o++;continue}const t=getComputedStyle(e),a=t.overflowY;if(n&&console.log(`[height:${o}]`,e.tagName,e.className||"(no class)",`overflow=${a} clientH=${e.clientHeight} h=${t.height}`),null===r)if("hidden"===a||"scroll"===a||"auto"===a)r=e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom),n&&console.log(`[height] candidate at depth ${o}: ${Math.round(r)}px`);else if("none"!==t.maxHeight){const n=parseFloat(t.maxHeight);!isNaN(n)&&n>0&&(r=Math.min(n,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)))}e=h(e),o++}return null!==r?r/i:(n&&console.log("[height] NO constrained ancestor → viewport fallback"),"undefined"!=typeof window?window.innerHeight/i:0)}(t,n);return n&&console.log("[parentDims]",t.tagName,"→ layoutParent:",e.tagName,e.className||"(no class)",`clientW=${e.clientWidth} → w=${Math.round(r)}, h=${Math.round(i)}`,"overflow:",o.overflow),{width:Math.max(0,r),height:Math.max(0,i)}}function b(t){var n;const e=t.parentElement;return(null===(n=null==e?void 0:e.assignedSlot)||void 0===n?void 0:n.parentElement)?e.assignedSlot.parentElement:e}function h(t){var n;if(null===(n=t.assignedSlot)||void 0===n?void 0:n.parentElement)return t.assignedSlot.parentElement;if(t.parentElement)return t.parentElement;const e=t.getRootNode();return e instanceof ShadowRoot?e.host:null}function g(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const n=Number(t);return!isNaN(n)&&n>0?{mode:"factor",factor:n}:{mode:"empty"}}const w={k:1e3,K:1e3,M:1e6,G:1e9,T:1e12},M=/^(\d+(?:\.\d+)?|\.\d+)\s*([kKMGT])?$/;function y(t){var n;if("number"==typeof t)return Number.isFinite(t)&&t>0?{kind:"number",value:t}:{kind:"invalid",raw:String(t)};const e=null!==(n=null==t?void 0:t.toString().trim())&&void 0!==n?n:"";if("auto"===e.toLowerCase())return{kind:"auto"};const o=M.exec(e);if(o){const t=Number(o[1])*(o[2]?w[o[2]]:1);if(Number.isFinite(t)&&t>0)return{kind:"number",value:t}}return{kind:"invalid",raw:e}}function $(t,n){const e=y(t);if("auto"===e.kind)return{kind:"auto"};if("string"==typeof t){const e=t.trim();if(n.has(e))return{kind:"value",value:n.get(e)}}return"number"===e.kind?{kind:"value",value:e.value}:{kind:"invalid",raw:e.raw}}const k=[[1e12,"T"],[1e9,"G"],[1e6,"M"],[1e3,"k"]];function N(t){if(!Number.isFinite(t)||t<=0)return String(t);const n=t=>String(Number(t.toPrecision(3)));for(const[e,o]of k)if(t>=e)return`${n(t/e)}${o}`;return n(t)}export{v as a,N as b,p as c,y as d,d as f,m as g,f as i,g as p,$ as r,u as w}
@@ -0,0 +1 @@
1
+ import{b as n}from"./p-CURM2Nrr.js";const t=n=>Math.round(100*n)/100;function r(n){return{x:t(n.left),y:t(n.top),width:t(n.width),height:t(n.height)}}function o(n,r){return function(n,r){const o=t(n.width),i=t(n.height);return{context:{x:t(n.left-r.context.x),y:t(n.top-r.context.y),width:o,height:i},component:{x:t(n.left-r.component.x),y:t(n.top-r.component.y),width:o,height:i}}}(n.getBoundingClientRect(),r)}function i(t){const r=t.getBoundingClientRect(),o=n(t),i=o?o.getBoundingClientRect():r;return{context:{x:i.left,y:i.top},component:{x:r.left,y:r.top}}}function u(n){var t,r;return null!==(r=null!==(t=n.getAttribute("id"))&&void 0!==t?t:n.getAttribute("name"))&&void 0!==r?r:void 0}function c(n){var t;return null!==(t=u(n))&&void 0!==t?t:n.localName}function e(n){const t=new Map;return n.map((({tag:n,explicitId:r})=>{var o;const i=null!==(o=t.get(n))&&void 0!==o?o:0;return t.set(n,i+1),null!=r?r:`${n}[${i}]`}))}function a(n){const t=n.getAttribute("has-error");if(!t)return[];try{const n=JSON.parse(t);return Array.isArray(n)?n:[]}catch(n){return[]}}export{c as a,e as b,u as c,o as m,i as o,a as r,r as t}
@@ -1 +1 @@
1
- import{f as t,g as n}from"./p-C5UYpZUU.js";import{g as e,c as i}from"./p-D5e8I9Qe.js";import{r as o}from"./p-DtLI_CzV.js";import{i as r,f as l}from"./p-EtT29btN.js";import{m as s}from"./p-BbmobTg0.js";import{m as u,r as a,a as d}from"./p-BcLsoDrW.js";import{LAYOUT_STATE_VERSION as c}from"./index.esm.js";const v=u=>{let a,d,c,v,f=null;const m=()=>{const t=d.ruleSets.state;v=s([t._system||{},t._default||{},t[c]||{}])},g=()=>{const e=n(u),i=e.getAttribute("ruleset");if(f&&(f.disconnect(),f=null),i&&r(i)){const n=l(e,i);c=null==n?void 0:n.getAttribute("ruleset"),n&&(f=new MutationObserver((()=>{c=n.getAttribute("ruleset"),m(),t(u)})),f.observe(n,{attributes:!0,attributeFilter:["ruleset"]}))}else c=i},b=new MutationObserver((n=>{n.forEach((n=>{"ruleset"===n.attributeName&&(g(),m(),t(u))}))})),p=u.connectedCallback;u.connectedCallback=()=>{const i=n(u);d=e(i),v=d.ruleSets.state._system,b.observe(i,{attributes:!0,attributeFilter:["ruleset"]}),g(),m(),a=d.ruleSets.on("set",(e=>{e!==c&&"_default"!==e||(g(),m(),t(n(u)))})),o(p,u)};const x=u.disconnectedCallback;return u.disconnectedCallback=()=>{b.disconnect(),f&&(f.disconnect(),f=null),o(a),i(n(u)),o(x,u)},()=>v};function f(t,n,e=80){let i=null,o=!1,r=-1,l=-1;const s=function(t){var n;const e=t.parentElement;return(null===(n=null==e?void 0:e.assignedSlot)||void 0===n?void 0:n.parentElement)?e.assignedSlot.parentElement:e}(t);if(!s)return{disconnect(){}};const u=new ResizeObserver((t=>{var u;if(o)return;let a,d;const c=t[0];if(null===(u=null==c?void 0:c.contentBoxSize)||void 0===u?void 0:u.length){const t=c.contentBoxSize[0];a=t.inlineSize,d=t.blockSize}else a=s.clientWidth,d=s.clientHeight;Math.abs(a-r)<=2&&Math.abs(d-l)<=2||(r=a,l=d,null!=i&&clearTimeout(i),i=setTimeout((()=>{o||n()}),e))}));return u.observe(s),{disconnect(){o=!0,null!=i&&clearTimeout(i),u.disconnect()}}}const m=/^Scenario([1-4])$/;function g(t,n){var e;let i=t.parentElement;for(;i&&i!==n;){const t=m.exec(null!==(e=i.id)&&void 0!==e?e:"");if(t)return`scenario${t[1]}`;i=i.parentElement}}function b(t){const n=Number(t.split("_")[0]);return Number.isFinite(n)?n:void 0}function p(t,n){var e;return(null!==(e=t.getAttribute("class"))&&void 0!==e?e:"").split(/\s+/).includes(n)}function x(t,n,e,i,o){var r,l;const s={regions:[],barCount:0},a=[];return Array.from(null!==(l=null===(r=t.shadowRoot)||void 0===r?void 0:r.querySelectorAll(n))&&void 0!==l?l:[]).forEach(((t,n)=>{var r,l,d,c;const v=null!==(r=e[n])&&void 0!==r?r:`segment${n}`,f=null===(l=t.shadowRoot)||void 0===l?void 0:l.querySelector("svg#drawCanvas");if(f&&(s.regions.push({id:`canvas:${v}`,rect:u(f,i)}),0===n&&(s.barCount=function(t){const n=t.querySelector('g[id="Scenario1"]');return n?Array.from(n.children).filter((t=>{var n;return/^\d+$/.test(null!==(n=t.id)&&void 0!==n?n:"")})).length:0}(f)),"full"===o&&a.push(...function(t,n,e){const i=[];return t.querySelectorAll('g[id$="_RECT"]').forEach(((o,r)=>{var l;const s={kind:"bar",id:o.id,segment:n,scenario:g(o,t),index:null!==(l=b(o.id))&&void 0!==l?l:r,rect:u(o,e)};i.push(s)})),["DATA","SCENARIO"].forEach((o=>{t.querySelectorAll(`g[id$="_${o}_Label"]`).forEach(((t,r)=>{var l,s,a;if(p(t,"hide"))return;const d=null!==(s=null===(l=t.textContent)||void 0===l?void 0:l.trim())&&void 0!==s?s:"";if(!d)return;const c={kind:"label",id:t.id,role:"DATA"===o?"data":"scenario",text:d,segment:n,index:null!==(a=b(t.id))&&void 0!==a?a:r,rect:u(t,e)};i.push(c)}))})),t.querySelectorAll('g[id="axis"] line').forEach((t=>{var o;const r=(null!==(o=t.getAttribute("class"))&&void 0!==o?o:"").split(/\s+/).find((t=>t.startsWith("axis-"))),l=u(t,e),s={kind:"axis",style:null==r?void 0:r.slice(5),orientation:l.context.width>=l.context.height?"horizontal":"vertical",segment:n,rect:l};i.push(s)})),t.querySelectorAll('g[id="AxisAndDateLables"] text, g[id="AxisAndDateLabelsLine"] text').forEach((o=>{var r,l;if(p(o,"hide")||function(t,n){var e;let i=t.parentElement;for(;i&&i!==n;){if((null!==(e=i.id)&&void 0!==e?e:"").endsWith("_Label"))return!0;i=i.parentElement}return!1}(o,t))return;const s=null!==(l=null===(r=o.textContent)||void 0===r?void 0:r.trim())&&void 0!==l?l:"";if(!s)return;const a={kind:"label",role:p(o,"categories")?"title":"category",text:s,segment:n,rect:u(o,e)};i.push(a)})),i}(f,v,i))),"full"===o){const n=null===(d=t.shadowRoot)||void 0===d?void 0:d.querySelector(".footer"),e=null===(c=null==n?void 0:n.textContent)||void 0===c?void 0:c.trim();e&&a.push({kind:"label",role:"footer",text:e,segment:v,rect:u(n,i)})}})),"full"===o&&(s.elements=a),s}function A(t,n,e,i,o,r){var l,s,v,f;const m={version:c,tag:t.localName,id:d(t),slot:null!==(l=t.getAttribute("slot"))&&void 0!==l?l:void 0,rect:u(t,o),em:i,regions:[],metadata:{title:e},diagnostics:a(t)},g=null===(f=null===(v=null===(s=t.shadowRoot)||void 0===s?void 0:s.querySelector(n))||void 0===v?void 0:v.shadowRoot)||void 0===f?void 0:f.querySelector("svg#drawCanvas");return g&&(m.regions.push({id:"canvas",rect:u(g,o)}),m.metadata.pointCount=g.querySelectorAll("circle, ellipse").length,"full"===r&&(m.elements=function(t,n){const e=[];return t.querySelectorAll("circle, ellipse").forEach(((t,i)=>{const o={kind:"point",index:i,rect:u(t,n)};e.push(o)})),t.querySelectorAll("text").forEach((t=>{var i,o;const r=null!==(o=null===(i=t.textContent)||void 0===i?void 0:i.trim())&&void 0!==o?o:"";if(!r)return;const l={kind:"label",role:"data",text:r,rect:u(t,n)};e.push(l)})),e}(g,o))),m}export{x as a,A as c,f as o,v as w}
1
+ import{f as t,g as n}from"./p-C5UYpZUU.js";import{g as e,c as i}from"./p-CURM2Nrr.js";import{r as o}from"./p-DtLI_CzV.js";import{i as r,f as l}from"./p-Ct0wEGrw.js";import{m as s}from"./p-BEkgk7Ij.js";import{m as a,r as u,a as d}from"./p-CtEA0ZQc.js";import{LAYOUT_STATE_VERSION as c}from"./index.esm.js";const v=a=>{let u,d,c,v,f=null;const m=()=>{const t=d.ruleSets.state;v=s([t._system||{},t._default||{},t[c]||{}])},g=()=>{const e=n(a),i=e.getAttribute("ruleset");if(f&&(f.disconnect(),f=null),i&&r(i)){const n=l(e,i);c=null==n?void 0:n.getAttribute("ruleset"),n&&(f=new MutationObserver((()=>{c=n.getAttribute("ruleset"),m(),t(a)})),f.observe(n,{attributes:!0,attributeFilter:["ruleset"]}))}else c=i},b=new MutationObserver((n=>{n.forEach((n=>{"ruleset"===n.attributeName&&(g(),m(),t(a))}))})),p=a.connectedCallback;a.connectedCallback=()=>{const i=n(a);d=e(i),v=d.ruleSets.state._system,b.observe(i,{attributes:!0,attributeFilter:["ruleset"]}),g(),m(),u=d.ruleSets.on("set",(e=>{e!==c&&"_default"!==e||(g(),m(),t(n(a)))})),o(p,a)};const x=a.disconnectedCallback;return a.disconnectedCallback=()=>{b.disconnect(),f&&(f.disconnect(),f=null),o(u),i(n(a)),o(x,a)},()=>v};function f(t,n,e=80){let i=null,o=!1,r=-1,l=-1;const s=function(t){var n;const e=t.parentElement;return(null===(n=null==e?void 0:e.assignedSlot)||void 0===n?void 0:n.parentElement)?e.assignedSlot.parentElement:e}(t);if(!s)return{disconnect(){}};const a=new ResizeObserver((t=>{var a;if(o)return;let u,d;const c=t[0];if(null===(a=null==c?void 0:c.contentBoxSize)||void 0===a?void 0:a.length){const t=c.contentBoxSize[0];u=t.inlineSize,d=t.blockSize}else u=s.clientWidth,d=s.clientHeight;Math.abs(u-r)<=2&&Math.abs(d-l)<=2||(r=u,l=d,null!=i&&clearTimeout(i),i=setTimeout((()=>{o||n()}),e))}));return a.observe(s),{disconnect(){o=!0,null!=i&&clearTimeout(i),a.disconnect()}}}const m=/^Scenario([1-4])$/;function g(t,n){var e;let i=t.parentElement;for(;i&&i!==n;){const t=m.exec(null!==(e=i.id)&&void 0!==e?e:"");if(t)return`scenario${t[1]}`;i=i.parentElement}}function b(t){const n=Number(t.split("_")[0]);return Number.isFinite(n)?n:void 0}function p(t,n){var e;return(null!==(e=t.getAttribute("class"))&&void 0!==e?e:"").split(/\s+/).includes(n)}function x(t,n,e,i,o){var r,l;const s={regions:[],barCount:0},u=[];return Array.from(null!==(l=null===(r=t.shadowRoot)||void 0===r?void 0:r.querySelectorAll(n))&&void 0!==l?l:[]).forEach(((t,n)=>{var r,l,d,c;const v=null!==(r=e[n])&&void 0!==r?r:`segment${n}`,f=null===(l=t.shadowRoot)||void 0===l?void 0:l.querySelector("svg#drawCanvas");if(f&&(s.regions.push({id:`canvas:${v}`,rect:a(f,i)}),0===n&&(s.barCount=function(t){const n=t.querySelector('g[id="Scenario1"]');return n?Array.from(n.children).filter((t=>{var n;return/^\d+$/.test(null!==(n=t.id)&&void 0!==n?n:"")})).length:0}(f)),"full"===o&&u.push(...function(t,n,e){const i=[];return t.querySelectorAll('g[id$="_RECT"]').forEach(((o,r)=>{var l;const s={kind:"bar",id:o.id,segment:n,scenario:g(o,t),index:null!==(l=b(o.id))&&void 0!==l?l:r,rect:a(o,e)};i.push(s)})),["DATA","SCENARIO"].forEach((o=>{t.querySelectorAll(`g[id$="_${o}_Label"]`).forEach(((t,r)=>{var l,s,u;if(p(t,"hide"))return;const d=null!==(s=null===(l=t.textContent)||void 0===l?void 0:l.trim())&&void 0!==s?s:"";if(!d)return;const c={kind:"label",id:t.id,role:"DATA"===o?"data":"scenario",text:d,segment:n,index:null!==(u=b(t.id))&&void 0!==u?u:r,rect:a(t,e)};i.push(c)}))})),t.querySelectorAll('g[id="axis"] line').forEach((t=>{var o;const r=(null!==(o=t.getAttribute("class"))&&void 0!==o?o:"").split(/\s+/).find((t=>t.startsWith("axis-"))),l=a(t,e),s={kind:"axis",style:null==r?void 0:r.slice(5),orientation:l.context.width>=l.context.height?"horizontal":"vertical",segment:n,rect:l};i.push(s)})),t.querySelectorAll('g[id="AxisAndDateLables"] text, g[id="AxisAndDateLabelsLine"] text').forEach((o=>{var r,l;if(p(o,"hide")||function(t,n){var e;let i=t.parentElement;for(;i&&i!==n;){if((null!==(e=i.id)&&void 0!==e?e:"").endsWith("_Label"))return!0;i=i.parentElement}return!1}(o,t))return;const s=null!==(l=null===(r=o.textContent)||void 0===r?void 0:r.trim())&&void 0!==l?l:"";if(!s)return;const u={kind:"label",role:p(o,"categories")?"title":"category",text:s,segment:n,rect:a(o,e)};i.push(u)})),i}(f,v,i))),"full"===o){const n=null===(d=t.shadowRoot)||void 0===d?void 0:d.querySelector(".footer"),e=null===(c=null==n?void 0:n.textContent)||void 0===c?void 0:c.trim();e&&u.push({kind:"label",role:"footer",text:e,segment:v,rect:a(n,i)})}})),"full"===o&&(s.elements=u),s}function A(t,n,e,i,o,r){var l,s,v,f;const m={version:c,tag:t.localName,id:d(t),slot:null!==(l=t.getAttribute("slot"))&&void 0!==l?l:void 0,rect:a(t,o),em:i,regions:[],metadata:{title:e},diagnostics:u(t)},g=null===(f=null===(v=null===(s=t.shadowRoot)||void 0===s?void 0:s.querySelector(n))||void 0===v?void 0:v.shadowRoot)||void 0===f?void 0:f.querySelector("svg#drawCanvas");return g&&(m.regions.push({id:"canvas",rect:a(g,o)}),m.metadata.pointCount=g.querySelectorAll("circle, ellipse").length,"full"===r&&(m.elements=function(t,n){const e=[];return t.querySelectorAll("circle, ellipse").forEach(((t,i)=>{const o={kind:"point",index:i,rect:a(t,n)};e.push(o)})),t.querySelectorAll("text").forEach((t=>{var i,o;const r=null!==(o=null===(i=t.textContent)||void 0===i?void 0:i.trim())&&void 0!==o?o:"";if(!r)return;const l={kind:"label",role:"data",text:r,rect:a(t,n)};e.push(l)})),e}(g,o))),m}function C(t,n){var e,i;const o=Array.from(null!==(i=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelectorAll(n))&&void 0!==i?i:[]);o.length>0&&o.every((t=>t.classList.contains("no-data")))?t.classList.add("no-data"):t.classList.remove("no-data")}export{x as a,A as c,f as o,C as s,v as w}
@@ -1 +1 @@
1
- import{g as o,f as t}from"./p-C5UYpZUU.js";import{g as s,c as f}from"./p-D5e8I9Qe.js";import{r as n}from"./p-DtLI_CzV.js";const c=c=>{let p,e;const r=()=>{"function"==typeof c.validateUnitScaling&&c.validateUnitScaling(c.unitScaling),"function"==typeof c.validatePercentageScaling&&c.validatePercentageScaling(c.percentageScaling),"function"==typeof c.validateSizeScaling&&c.validateSizeScaling()},i=c.connectedCallback;c.connectedCallback=()=>{const f=o(c);e=s(f),(()=>{const o=e.scalingGroups.state;for(const t of Object.keys(o))void 0!==o[t]?c.pixelPerUnitGroupMap.set(t,o[t]):c.pixelPerUnitGroupMap.delete(t)})(),r(),p=e.scalingGroups.on("set",((s,f)=>{void 0!==f?c.pixelPerUnitGroupMap.set(s,f):c.pixelPerUnitGroupMap.delete(s),r(),t(o(c))})),n(i,c)};const a=c.disconnectedCallback;c.disconnectedCallback=()=>{n(p),f(o(c)),n(a,c)}};export{c as w}
1
+ import{g as o,f as t}from"./p-C5UYpZUU.js";import{g as s,c as f}from"./p-CURM2Nrr.js";import{r as n}from"./p-DtLI_CzV.js";const c=c=>{let p,r;const i=()=>{"function"==typeof c.validateUnitScaling&&c.validateUnitScaling(c.unitScaling),"function"==typeof c.validatePercentageScaling&&c.validatePercentageScaling(c.percentageScaling),"function"==typeof c.validateSizeScaling&&c.validateSizeScaling()},e=c.connectedCallback;c.connectedCallback=()=>{const f=o(c);r=s(f),(()=>{const o=r.scalingGroups.state;for(const t of Object.keys(o))void 0!==o[t]?c.pixelPerUnitGroupMap.set(t,o[t]):c.pixelPerUnitGroupMap.delete(t)})(),i(),p=r.scalingGroups.on("set",((s,f)=>{void 0!==f?c.pixelPerUnitGroupMap.set(s,f):c.pixelPerUnitGroupMap.delete(s),i(),t(o(c))})),n(e,c)};const a=c.disconnectedCallback;c.disconnectedCallback=()=>{n(p),f(o(c)),n(a,c)}};export{c as w}
@@ -1 +1 @@
1
- import{C as a}from"./p-BbmobTg0.js";class t{static adaptDefaultString(t){return a.isString(t)?t.trim():""}static adaptArray(t,r){const c=[];return a.isArray(t)&&t.forEach((a=>{c.push(r.adapt(a))})),c}}var r,c;!function(a){a.ASC="asc",a.DESC="desc"}(r||(r={})),function(a){a.ROWGROUP="rowGroup",a.ROWGROUPINDEX="rowGroupIndex",a.CATEGORY="category",a.CATEGORYINDEX="categoryIndex",a.SUBCATEGORY="subCategory",a.SUBCATEGORYINDEX="subCategoryIndex",a.AC1="ac1",a.AC2="ac2",a.AC3="ac3",a.AC4="ac4",a.PP1="pp1",a.PP2="pp2",a.PP3="pp3",a.PP4="pp4",a.FC1="fc1",a.FC2="fc2",a.FC3="fc3",a.FC4="fc4",a.PL1="pl1",a.PL2="pl2",a.PL3="pl3",a.PL4="pl4"}(c||(c={}));class s{constructor(a=["category"],t=r.ASC){this.hierarchy=a,this.direction=t}}class o{constructor(a){this.stringAdapter=a}adapt(a){var o;const p=t.adaptArray(a.hierarchy,this.stringAdapter),e=r[null===(o=a.direction)||void 0===o?void 0:o.toUpperCase()]||r.ASC;return new s(p.map((a=>c[a.toUpperCase()]||c.CATEGORY)),e)}default(){return new s(["category"],r.ASC)}}export{t as A,r as O,s as a,c as b,o as c}
1
+ import{C as a}from"./p-BEkgk7Ij.js";class t{static adaptDefaultString(t){return a.isString(t)?t.trim():""}static adaptArray(t,r){const c=[];return a.isArray(t)&&t.forEach((a=>{c.push(r.adapt(a))})),c}}var r,c;!function(a){a.ASC="asc",a.DESC="desc"}(r||(r={})),function(a){a.ROWGROUP="rowGroup",a.ROWGROUPINDEX="rowGroupIndex",a.CATEGORY="category",a.CATEGORYINDEX="categoryIndex",a.SUBCATEGORY="subCategory",a.SUBCATEGORYINDEX="subCategoryIndex",a.AC1="ac1",a.AC2="ac2",a.AC3="ac3",a.AC4="ac4",a.PP1="pp1",a.PP2="pp2",a.PP3="pp3",a.PP4="pp4",a.FC1="fc1",a.FC2="fc2",a.FC3="fc3",a.FC4="fc4",a.PL1="pl1",a.PL2="pl2",a.PL3="pl3",a.PL4="pl4"}(c||(c={}));class s{constructor(a=["category"],t=r.ASC){this.hierarchy=a,this.direction=t}}class o{constructor(a){this.stringAdapter=a}adapt(a){var o;const p=t.adaptArray(a.hierarchy,this.stringAdapter),e=r[null===(o=a.direction)||void 0===o?void 0:o.toUpperCase()]||r.ASC;return new s(p.map((a=>c[a.toUpperCase()]||c.CATEGORY)),e)}default(){return new s(["category"],r.ASC)}}export{t as A,r as O,s as a,c as b,o as c}
@@ -1 +1 @@
1
- import{C as n}from"./p-BbmobTg0.js";function i(n,i){var o;const e=null!==(o=null==n?void 0:n.trim())&&void 0!==o?o:"";if(""===e||"null"===e)return{data:null,parseError:!1};if(e.startsWith("{")||e.startsWith("["))try{const n=JSON.parse(e);return"object"!=typeof n||null===n||Array.isArray(n)?{data:null,parseError:!0}:{data:n,parseError:!1}}catch(n){return{data:null,parseError:!0}}return null!==i?{data:{[i]:e},parseError:!1}:{data:null,parseError:!0}}function o(n,i){return Object.keys(n).filter((n=>!i.includes(n)))}function e(i,o,e){if(n.isExisting(i[o]))return n.isString(i[o])?i[o]:void e.push(o)}function r(i,o,e){if(n.isExisting(i[o]))return n.isNumber(i[o])?i[o]:void e.push(o)}const t=["measure","label","unit","min","max","refLine","highlight"];function u(i){const u=[],l=e(i,"measure",u);if(void 0===l||""===l.trim())return u.push("measure"),{config:null,unknownKeys:o(i,t),invalidFields:u};const s={measure:l.trim()};return s.label=e(i,"label",u),s.unit=e(i,"unit",u),s.min=r(i,"min",u),s.max=r(i,"max",u),s.refLine=r(i,"refLine",u),s.highlight=function(i,o){if(!n.isExisting(i.highlight))return;if(!n.isObject(i.highlight)||Array.isArray(i.highlight))return void o.push("highlight");const e=i.highlight,t={},u=r(e,"from",o),l=r(e,"to",o);return void 0!==u&&(t.from=u),void 0!==l&&(t.to=l),t}(i,u),{config:s,unknownKeys:o(i,t),invalidFields:u}}const l=["measure","label","unit","group"];function s(n){const i=[],r=e(n,"measure",i);if(void 0===r||""===r.trim())return i.push("measure"),{config:null,unknownKeys:o(n,l),invalidFields:i};const t={measure:r.trim()};return t.label=e(n,"label",i),t.unit=e(n,"unit",i),t.group=e(n,"group",i),{config:t,unknownKeys:o(n,l),invalidFields:i}}const a=["measure"];function c(n){const i=[],r=e(n,"measure",i);return void 0===r||""===r.trim()?(i.push("measure"),{config:null,unknownKeys:o(n,a),invalidFields:i}):{config:{measure:r.trim()},unknownKeys:o(n,a),invalidFields:i}}const f=["values","label","unit","highlight"];function d(i){const t=[];let u=null;if("auto"===i.values?u="auto":n.isArray(i.values)&&i.values.every((i=>n.isNumber(i)))?u=i.values:t.push("values"),null===u)return{config:null,unknownKeys:o(i,f),invalidFields:t};const l={values:u};if(l.label=e(i,"label",t),l.unit=e(i,"unit",t),n.isExisting(i.highlight))if(n.isObject(i.highlight)&&!Array.isArray(i.highlight)){const n=r(i.highlight,"from",t);void 0!==n&&(l.highlight={from:n})}else t.push("highlight");return{config:l,unknownKeys:o(i,f),invalidFields:t}}const v=["points","values","max"];function m(i,e){const r=[],t={points:e.points,values:e.values,max:e.max};return n.isExisting(i.points)&&("auto"===i.points||"none"===i.points||"all"===i.points||n.isArray(i.points)&&i.points.every((i=>n.isString(i)))?t.points=i.points:r.push("points")),n.isExisting(i.values)&&(n.isBoolean(i.values)?t.values=i.values:r.push("values")),n.isExisting(i.max)&&(n.isNumber(i.max)&&i.max>0?t.max=Math.floor(i.max):r.push("max")),{config:t,unknownKeys:o(i,v),invalidFields:r}}const g=["level","columns"];function h(i){const e=[],r=n.isString(i.level)?i.level.toLowerCase():null;if("rowgroup"!==r&&"category"!==r)return e.push("level"),{config:null,unknownKeys:o(i,g),invalidFields:e};const t={level:r};return n.isExisting(i.columns)&&(n.isNumber(i.columns)&&i.columns>=1?t.columns=Math.floor(i.columns):e.push("columns")),{config:t,unknownKeys:o(i,g),invalidFields:e}}const p=["show","position"];function y(i){const e=[],r={show:!0,position:"right"};return n.isExisting(i.show)&&(n.isBoolean(i.show)?r.show=i.show:e.push("show")),n.isExisting(i.position)&&("right"===i.position||"bottom"===i.position?r.position=i.position:e.push("position")),{config:r,unknownKeys:o(i,p),invalidFields:e}}export{s as a,c as b,h as c,m as d,y as e,d as f,i as p,u as t}
1
+ import{C as n}from"./p-BEkgk7Ij.js";function i(n,i){var o;const e=null!==(o=null==n?void 0:n.trim())&&void 0!==o?o:"";if(""===e||"null"===e)return{data:null,parseError:!1};if(e.startsWith("{")||e.startsWith("["))try{const n=JSON.parse(e);return"object"!=typeof n||null===n||Array.isArray(n)?{data:null,parseError:!0}:{data:n,parseError:!1}}catch(n){return{data:null,parseError:!0}}return null!==i?{data:{[i]:e},parseError:!1}:{data:null,parseError:!0}}function o(n,i){return Object.keys(n).filter((n=>!i.includes(n)))}function e(i,o,e){if(n.isExisting(i[o]))return n.isString(i[o])?i[o]:void e.push(o)}function r(i,o,e){if(n.isExisting(i[o]))return n.isNumber(i[o])?i[o]:void e.push(o)}const t=["measure","label","unit","min","max","refLine","highlight"];function u(i){const u=[],l=e(i,"measure",u);if(void 0===l||""===l.trim())return u.push("measure"),{config:null,unknownKeys:o(i,t),invalidFields:u};const s={measure:l.trim()};return s.label=e(i,"label",u),s.unit=e(i,"unit",u),s.min=r(i,"min",u),s.max=r(i,"max",u),s.refLine=r(i,"refLine",u),s.highlight=function(i,o){if(!n.isExisting(i.highlight))return;if(!n.isObject(i.highlight)||Array.isArray(i.highlight))return void o.push("highlight");const e=i.highlight,t={},u=r(e,"from",o),l=r(e,"to",o);return void 0!==u&&(t.from=u),void 0!==l&&(t.to=l),t}(i,u),{config:s,unknownKeys:o(i,t),invalidFields:u}}const l=["measure","label","unit","group"];function s(n){const i=[],r=e(n,"measure",i);if(void 0===r||""===r.trim())return i.push("measure"),{config:null,unknownKeys:o(n,l),invalidFields:i};const t={measure:r.trim()};return t.label=e(n,"label",i),t.unit=e(n,"unit",i),t.group=e(n,"group",i),{config:t,unknownKeys:o(n,l),invalidFields:i}}const a=["measure"];function c(n){const i=[],r=e(n,"measure",i);return void 0===r||""===r.trim()?(i.push("measure"),{config:null,unknownKeys:o(n,a),invalidFields:i}):{config:{measure:r.trim()},unknownKeys:o(n,a),invalidFields:i}}const f=["values","label","unit","highlight"];function d(i){const t=[];let u=null;if("auto"===i.values?u="auto":n.isArray(i.values)&&i.values.every((i=>n.isNumber(i)))?u=i.values:t.push("values"),null===u)return{config:null,unknownKeys:o(i,f),invalidFields:t};const l={values:u};if(l.label=e(i,"label",t),l.unit=e(i,"unit",t),n.isExisting(i.highlight))if(n.isObject(i.highlight)&&!Array.isArray(i.highlight)){const n=r(i.highlight,"from",t);void 0!==n&&(l.highlight={from:n})}else t.push("highlight");return{config:l,unknownKeys:o(i,f),invalidFields:t}}const v=["points","values","max"];function g(i,e){const r=[],t={points:e.points,values:e.values,max:e.max};return n.isExisting(i.points)&&("auto"===i.points||"none"===i.points||"all"===i.points||n.isArray(i.points)&&i.points.every((i=>n.isString(i)))?t.points=i.points:r.push("points")),n.isExisting(i.values)&&(n.isBoolean(i.values)?t.values=i.values:r.push("values")),n.isExisting(i.max)&&(n.isNumber(i.max)&&i.max>0?t.max=Math.floor(i.max):r.push("max")),{config:t,unknownKeys:o(i,v),invalidFields:r}}const m=["level","columns"];function h(i){const e=[],r=n.isString(i.level)?i.level.toLowerCase():null;if("rowgroup"!==r&&"category"!==r)return e.push("level"),{config:null,unknownKeys:o(i,m),invalidFields:e};const t={level:r};return n.isExisting(i.columns)&&(n.isNumber(i.columns)&&i.columns>=1?t.columns=Math.floor(i.columns):e.push("columns")),{config:t,unknownKeys:o(i,m),invalidFields:e}}const p=["show","position"];function y(i){const e=[],r={show:!0,position:"right"};return n.isExisting(i.show)&&(n.isBoolean(i.show)?r.show=i.show:e.push("show")),n.isExisting(i.position)&&("right"===i.position||"bottom"===i.position?r.position=i.position:e.push("position")),{config:r,unknownKeys:o(i,p),invalidFields:e}}export{s as a,c as b,h as c,g as d,y as e,d as f,i as p,u as t}