nish-ui 1.9.0 → 2.0.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 (152) hide show
  1. package/README.md +218 -58
  2. package/dist/base-tailwind.css +1757 -0
  3. package/dist/base.css +1590 -1445
  4. package/dist/chart.d.ts +4 -1
  5. package/dist/chart.js +122 -49
  6. package/dist/elements-all.d.ts +8 -0
  7. package/dist/elements-all.js +178 -0
  8. package/dist/elements-charts.d.ts +71 -0
  9. package/dist/elements-charts.js +56 -57
  10. package/dist/elements-data.d.ts +71 -0
  11. package/dist/elements-data.js +5 -6
  12. package/dist/elements-forms.d.ts +71 -0
  13. package/dist/elements-forms.js +24 -25
  14. package/dist/elements.d.ts +71 -0
  15. package/dist/elements.js +4 -5
  16. package/dist/esm/chart-values.js +58 -0
  17. package/dist/esm/chart.js +10 -0
  18. package/dist/esm/cn.js +19 -0
  19. package/dist/esm/combobox-filter.js +13 -0
  20. package/dist/esm/components/accordion.js +166 -0
  21. package/dist/esm/components/app-shell.js +198 -0
  22. package/dist/esm/components/avatar-classes.js +28 -0
  23. package/dist/esm/components/avatar.js +113 -0
  24. package/dist/esm/components/breadcrumbs.js +154 -0
  25. package/dist/esm/components/canvas/follow-caption.js +32 -0
  26. package/dist/esm/components/canvas/follow.js +119 -0
  27. package/dist/esm/components/canvas/icons.js +70 -0
  28. package/dist/esm/components/canvas/index.js +10 -0
  29. package/dist/esm/components/canvas/layout.js +258 -0
  30. package/dist/esm/components/canvas/legend.js +93 -0
  31. package/dist/esm/components/canvas/minimap.js +127 -0
  32. package/dist/esm/components/canvas/node.js +87 -0
  33. package/dist/esm/components/canvas/route.js +262 -0
  34. package/dist/esm/components/canvas/system-canvas.js +837 -0
  35. package/dist/esm/components/canvas/types.js +10 -0
  36. package/dist/esm/components/canvas/view.js +47 -0
  37. package/dist/esm/components/chart-hooks.js +19 -0
  38. package/dist/esm/components/charts.js +467 -0
  39. package/dist/esm/components/client.js +24 -0
  40. package/dist/esm/components/combobox.js +343 -0
  41. package/dist/esm/components/command.js +403 -0
  42. package/dist/esm/components/data-classes.js +159 -0
  43. package/dist/esm/components/data.js +517 -0
  44. package/dist/esm/components/display-classes.js +130 -0
  45. package/dist/esm/components/display.js +755 -0
  46. package/dist/esm/components/error-boundary.js +64 -0
  47. package/dist/esm/components/feedback.js +136 -0
  48. package/dist/esm/components/file-dropzone.js +184 -0
  49. package/dist/esm/components/filters.js +108 -0
  50. package/dist/esm/components/flow.js +746 -0
  51. package/dist/esm/components/forms-classes.js +43 -0
  52. package/dist/esm/components/forms.js +581 -0
  53. package/dist/esm/components/hooks-classes.js +9 -0
  54. package/dist/esm/components/hooks.js +236 -0
  55. package/dist/esm/components/icons.js +96 -0
  56. package/dist/esm/components/inbox-classes.js +29 -0
  57. package/dist/esm/components/inbox.js +257 -0
  58. package/dist/esm/components/latest.js +13 -0
  59. package/dist/esm/components/layout-vars.js +96 -0
  60. package/dist/esm/components/layout.js +272 -0
  61. package/dist/esm/components/media.js +143 -0
  62. package/dist/esm/components/nav.js +614 -0
  63. package/dist/esm/components/overlay-classes.js +66 -0
  64. package/dist/esm/components/overlay.js +1461 -0
  65. package/dist/esm/components/pagination-classes.js +29 -0
  66. package/dist/esm/components/pagination.js +154 -0
  67. package/dist/esm/components/portal.js +16 -0
  68. package/dist/esm/components/primitives-classes.js +198 -0
  69. package/dist/esm/components/primitives.js +268 -0
  70. package/dist/esm/components/progress.js +77 -0
  71. package/dist/esm/components/provider.js +32 -0
  72. package/dist/esm/components/radio-group.js +186 -0
  73. package/dist/esm/components/resource-classes.js +133 -0
  74. package/dist/esm/components/resource.js +209 -0
  75. package/dist/esm/components/segmented.js +178 -0
  76. package/dist/esm/components/separator.js +38 -0
  77. package/dist/esm/components/service-tokens.js +221 -0
  78. package/dist/esm/components/settings.js +301 -0
  79. package/dist/esm/components/slider.js +262 -0
  80. package/dist/esm/components/split-classes.js +8 -0
  81. package/dist/esm/components/split.js +411 -0
  82. package/dist/esm/components/strings.js +119 -0
  83. package/dist/esm/components/table.js +144 -0
  84. package/dist/esm/components/tabs-classes.js +21 -0
  85. package/dist/esm/components/tabs.js +201 -0
  86. package/dist/esm/components/tag-input.js +257 -0
  87. package/dist/esm/components/theme-toggle.js +177 -0
  88. package/dist/esm/components/toast.js +361 -0
  89. package/dist/esm/components/url-state.js +118 -0
  90. package/dist/esm/components/visually-hidden.js +20 -0
  91. package/dist/esm/format.js +320 -0
  92. package/dist/esm/inbox-client.js +2 -0
  93. package/dist/esm/inbox-types.js +2 -0
  94. package/dist/esm/index.js +320 -0
  95. package/dist/esm/runtime.js +37 -0
  96. package/dist/esm/server/inbox/client.js +297 -0
  97. package/dist/esm/server/inbox/types.js +24 -0
  98. package/dist/esm/sparkline-path.js +59 -0
  99. package/dist/esm/split-layout.js +419 -0
  100. package/dist/esm/system-canvas.js +2 -0
  101. package/dist/esm/theme.js +804 -0
  102. package/dist/esm/tokens.mjs +425 -0
  103. package/dist/esm/url.js +20 -0
  104. package/dist/files.json +5 -1
  105. package/dist/fonts/LICENSE-Inter.txt +93 -0
  106. package/dist/format.d.ts +32 -18
  107. package/dist/format.js +227 -82
  108. package/dist/inbox-client.js +3 -1
  109. package/dist/index.d.ts +1686 -667
  110. package/dist/nish-components.css +4649 -4506
  111. package/dist/nish-components.min.css +1 -0
  112. package/dist/nish.css +1603 -1450
  113. package/dist/nish.min.css +1 -0
  114. package/dist/node/eslint.js +29 -14
  115. package/dist/node/th-check.js +29 -14
  116. package/dist/node/vite.d.ts +12 -0
  117. package/dist/node/vite.js +12 -2
  118. package/dist/server/hono.d.ts +15 -6
  119. package/dist/server/hono.js +30 -25
  120. package/dist/server/index.d.ts +3 -10
  121. package/dist/server/index.js +71 -38
  122. package/dist/{spa-DuVB5O7S.d.ts → spa-BLlMc0eI.d.ts} +38 -5
  123. package/dist/system-canvas-BLuWd69H.d.ts +183 -0
  124. package/dist/system-canvas.d.ts +2 -168
  125. package/dist/tailwind-core.css +114 -0
  126. package/dist/tailwind.css +3 -7
  127. package/dist/theme-init.js +23 -9
  128. package/dist/theme-init.sha256 +1 -0
  129. package/dist/theme.d.ts +243 -4
  130. package/dist/theme.global.js +356 -89
  131. package/dist/theme.js +337 -67
  132. package/dist/tokens.css +14 -6
  133. package/dist/tokens.dtcg.json +1513 -0
  134. package/dist/tokens.js +29 -14
  135. package/dist/tokens.json +512 -0
  136. package/package.json +51 -13
  137. package/dist/chart.js.map +0 -1
  138. package/dist/elements-charts.js.map +0 -1
  139. package/dist/elements-data.js.map +0 -1
  140. package/dist/elements-forms.js.map +0 -1
  141. package/dist/elements.js.map +0 -1
  142. package/dist/format.js.map +0 -1
  143. package/dist/inbox-client.js.map +0 -1
  144. package/dist/index.js +0 -10260
  145. package/dist/index.js.map +0 -1
  146. package/dist/server/hono.js.map +0 -1
  147. package/dist/server/index.js.map +0 -1
  148. package/dist/split-layout.js.map +0 -1
  149. package/dist/system-canvas.js +0 -2204
  150. package/dist/system-canvas.js.map +0 -1
  151. package/dist/theme.global.js.map +0 -1
  152. package/dist/theme.js.map +0 -1
@@ -1,93 +1,93 @@
1
- var ct=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var O=function(i,e,t,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!s:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(i,t):s?s.value=t:e.set(i,t),t},x=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},ee,Ee,xe,re,He,oe,we,Y,ae,z,Ae,ut;var v={__proto__:null};v.enumerable=!0;Object.freeze(v);var Be=(z=class{constructor(e,t={}){if(ee.set(this,!1),Ee.set(this,!1),xe.set(this,!1),re.set(this,!1),He.set(this,Date.now()),oe.set(this,!1),we.set(this,void 0),Y.set(this,void 0),ae.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof t!="object"||!t)throw new Error('The "options" argument must be an object');let{bubbles:n,cancelable:s,composed:r}=t;O(this,ee,!!s,"f"),O(this,Ee,!!n,"f"),O(this,xe,!!r,"f"),O(this,we,`${e}`,"f"),O(this,Y,null,"f"),O(this,ae,!1,"f")}initEvent(e,t,n){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){O(this,re,!0,"f")}get target(){return x(this,Y,"f")}get currentTarget(){return x(this,Y,"f")}get srcElement(){return x(this,Y,"f")}get type(){return x(this,we,"f")}get cancelable(){return x(this,ee,"f")}get defaultPrevented(){return x(this,ee,"f")&&x(this,re,"f")}get timeStamp(){return x(this,He,"f")}composedPath(){return x(this,ae,"f")?[x(this,Y,"f")]:[]}get returnValue(){return!x(this,ee,"f")||!x(this,re,"f")}get bubbles(){return x(this,Ee,"f")}get composed(){return x(this,xe,"f")}get eventPhase(){return x(this,ae,"f")?z.AT_TARGET:z.NONE}get cancelBubble(){return x(this,oe,"f")}set cancelBubble(e){e&&O(this,oe,!0,"f")}stopPropagation(){O(this,oe,!0,"f")}get isTrusted(){return!1}},ee=new WeakMap,Ee=new WeakMap,xe=new WeakMap,re=new WeakMap,He=new WeakMap,oe=new WeakMap,we=new WeakMap,Y=new WeakMap,ae=new WeakMap,z.NONE=0,z.CAPTURING_PHASE=1,z.AT_TARGET=2,z.BUBBLING_PHASE=3,z);Object.defineProperties(Be.prototype,{initEvent:v,stopImmediatePropagation:v,preventDefault:v,target:v,currentTarget:v,srcElement:v,type:v,cancelable:v,defaultPrevented:v,timeStamp:v,composedPath:v,returnValue:v,bubbles:v,composed:v,eventPhase:v,cancelBubble:v,stopPropagation:v,isTrusted:v});var dt=(ut=class extends Be{constructor(e,t={}){super(e,t),Ae.set(this,void 0),O(this,Ae,t?.detail??null,"f")}initCustomEvent(e,t,n,s){throw new Error("Method not implemented.")}get detail(){return x(this,Ae,"f")}},Ae=new WeakMap,ut);Object.defineProperties(dt.prototype,{detail:v});var I=Be,Fe=dt;var R;var Dn=(R=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},R.STYLE_RULE=1,R.CHARSET_RULE=2,R.IMPORT_RULE=3,R.MEDIA_RULE=4,R.FONT_FACE_RULE=5,R.PAGE_RULE=6,R.NAMESPACE_RULE=10,R.KEYFRAMES_RULE=7,R.KEYFRAME_RULE=8,R.SUPPORTS_RULE=12,R.COUNTER_STYLE_RULE=11,R.FONT_FEATURE_VALUES_RULE=14,R.MARGIN_RULE=9,R);globalThis.Event??=I;globalThis.CustomEvent??=Fe;var ze=Symbol(),pt=i=>typeof i=="boolean"?i:i?.capture??!1,H={__proto__:null};H.enumerable=!0;Object.freeze(H);var Re=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,t,n){if(t==null)return;let s=pt(n)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);if(r===void 0)r=new Map,s.set(e,r);else if(r.has(t))return;let o=typeof n=="object"&&n?n:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(e,t,n)),r.set(t,o??{})}removeEventListener(e,t,n){if(t==null)return;let s=pt(n)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);r!==void 0&&(r.delete(t),r.size||s.delete(e))}dispatchEvent(e){let t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));let n=!1,s=!1,r=I.NONE,o=null,h=null,l=null,p=e.stopPropagation,m=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return o??h},...H},srcElement:{get(){return e.target},...H},currentTarget:{get(){return l},...H},eventPhase:{get(){return r},...H},composedPath:{value:()=>t,...H},stopPropagation:{value:()=>{n=!0,p.call(e)},...H},stopImmediatePropagation:{value:()=>{s=!0,m.call(e)},...H}});let c=(g,y,M)=>{typeof g=="function"?g(e):typeof g?.handleEvent=="function"&&g.handleEvent(e),y.once&&M.delete(g)},_=()=>(l=null,r=I.NONE,!e.defaultPrevented),b=t.slice().reverse();o=!this.__host||!e.composed?this:null;let A=g=>{for(h=this;h.__host&&g.includes(h.__host);)h=h.__host};for(let g of b){!o&&(!h||h===g.__host)&&A(b.slice(b.indexOf(g))),l=g,r=g===e.target?I.AT_TARGET:I.CAPTURING_PHASE;let y=g.__captureEventListeners.get(e.type);if(y){for(let[M,P]of y)if(c(M,P,y),s)return _()}if(n)return _()}let S=e.bubbles?t:[this];h=null;for(let g of S){!o&&(!h||g===h.__host)&&A(S.slice(0,S.indexOf(g)+1)),l=g,r=g===e.target?I.AT_TARGET:I.BUBBLING_PHASE;let y=g.__eventListeners.get(e.type);if(y){for(let[M,P]of y)if(c(M,P,y),s)return _()}if(n)return _()}return _()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,gt,un]}};var mt=new WeakMap,le=i=>{let e=mt.get(i);return e===void 0&&mt.set(i,e=new Map),e},he=class extends Re{getRootNode(e){return e?.composed?We:this.__host?.__shadowRoot??We}};var ft=class extends he{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var gt=new ft,We=gt;var _t=class extends he{constructor(e){if(super(),e!==ze)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:Te,customElements:Ve,document:We,Document:ft,Element:bt,EventTarget:Re,HTMLElement:yt,Node:he,ShadowRoot:vt,window:this,Window:_t})}};var bt=class extends he{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(le(this)).map(([e,t])=>({name:e,value:t}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){le(this).set(e,String(t))}removeAttribute(e){le(this).delete(e)}toggleAttribute(e,t){if(this.hasAttribute(e)){if(t===void 0||!t)return this.removeAttribute(e),!1}else return t===void 0||t?(this.setAttribute(e,""),!0):!1;return!0}hasAttribute(e){return le(this).has(e)}attachShadow(e){this.__shadowRootMode=e.mode;let t=new vt(ze,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let e=new ct(this);return this.__internals=e,e}getAttribute(e){return le(this).get(e)??null}};var yt=class extends bt{},je=yt;var vt=class extends he{get host(){return this.__host}constructor(e,t){if(super(),e!==e)throw new TypeError("Illegal constructor");this.mode=t.mode}};globalThis.litServerRoot??=Object.defineProperty(new je,"localName",{get(){return"lit-server-root"}});function hn(){let i,e;return{promise:new Promise((n,s)=>{i=n,e=s}),resolve:i,reject:e}}var Te=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(e,t){if(this.__definitions.has(e))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
2
- Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:t.observedAttributes??[]}),this.__reverseDefinitions.set(t,e),this.__pendingWhenDefineds.get(e)?.resolve(t),this.__pendingWhenDefineds.delete(e)}get(e){return this.__definitions.get(e)?.ctor}getName(e){return this.__reverseDefinitions.get(e)??null}initialize(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(e){let t=this.__definitions.get(e);if(t)return t.ctor;let n=this.__pendingWhenDefineds.get(e);return n||(n=hn(),this.__pendingWhenDefineds.set(e,n)),n.promise}},cn=Te;var Ve=new cn,un=new _t(ze);var ce=globalThis,Ce=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,St=Symbol(),$t=new WeakMap,Me=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==St)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Ce&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=$t.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&$t.set(t,e))}return e}toString(){return this.cssText}},Et=i=>new Me(typeof i=="string"?i:i+"",void 0,St);var xt=(i,e)=>{if(Ce)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let n=document.createElement("style"),s=ce.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=t.cssText,i.appendChild(n)}},Ge=Ce||ce.CSSStyleSheet===void 0?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let n of e.cssRules)t+=n.cssText;return Et(t)})(i):i;var{is:dn,defineProperty:pn,getOwnPropertyDescriptor:mn,getOwnPropertyNames:fn,getOwnPropertySymbols:gn,getPrototypeOf:_n}=Object,de=globalThis;de.customElements??=Ve;var wt=de.trustedTypes,bn=wt?wt.emptyScript:"",yn=de.reactiveElementPolyfillSupport,ue=(i,e)=>i,Ke={toAttribute(i,e){switch(e){case Boolean:i=i?bn:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Rt=(i,e)=>!dn(i,e),At={attribute:!0,type:String,converter:Ke,reflect:!1,useDefault:!1,hasChanged:Rt};Symbol.metadata??=Symbol("metadata"),de.litPropertyMetadata??=new WeakMap;var B=class extends(globalThis.HTMLElement??je){static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=At){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),s=this.getPropertyDescriptor(e,n,t);s!==void 0&&pn(this.prototype,e,s)}}static getPropertyDescriptor(e,t,n){let{get:s,set:r}=mn(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){let h=s?.call(this);r?.call(this,o),this.requestUpdate(e,h,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??At}static _$Ei(){if(this.hasOwnProperty(ue("elementProperties")))return;let e=_n(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ue("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ue("properties"))){let t=this.properties,n=[...fn(t),...gn(t)];for(let s of n)this.createProperty(s,t[s])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[n,s]of t)this.elementProperties.set(n,s)}this._$Eh=new Map;for(let[t,n]of this.elementProperties){let s=this._$Eu(t,n);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let s of n)t.unshift(Ge(s))}else e!==void 0&&t.push(Ge(e));return t}static _$Eu(e,t){let n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return xt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,n);if(s!==void 0&&n.reflect===!0){let r=(n.converter?.toAttribute!==void 0?n.converter:Ke).toAttribute(t,n.type);this._$Em=e,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){let n=this.constructor,s=n._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let r=n.getPropertyOptions(s),o=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:Ke;this._$Em=s;let h=o.fromAttribute(t,r.type);this[s]=h??this._$Ej?.get(s)??h,this._$Em=null}}requestUpdate(e,t,n,s=!1,r){if(e!==void 0){let o=this.constructor;if(s===!1&&(r=this[e]),n??=o.getPropertyOptions(e),!((n.hasChanged??Rt)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,n))))return;this.C(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:s,wrapped:r},o){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[s,r]of n){let{wrapped:o}=r,h=this[s];o!==!0||this._$AL.has(s)||h===void 0||this.C(s,void 0,r,h)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(t)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};B.elementStyles=[],B.shadowRootOptions={mode:"open"},B[ue("elementProperties")]=new Map,B[ue("finalized")]=new Map,yn?.({ReactiveElement:B}),(de.reactiveElementVersions??=[]).push("2.1.2");var Le=globalThis,Tt=i=>i,Pe=Le.trustedTypes,Mt=Pe?Pe.createPolicy("lit-html",{createHTML:i=>i}):void 0,kt="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,Ut="?"+j,vn=`<${Ut}>`,X=Le.document===void 0?{createTreeWalker:()=>({})}:document,me=()=>X.createComment(""),fe=i=>i===null||typeof i!="object"&&typeof i!="function",et=Array.isArray,$n=i=>et(i)||typeof i?.[Symbol.iterator]=="function",qe=`[
3
- \f\r]`,pe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ct=/-->/g,Pt=/>/g,Z=RegExp(`>|${qe}(?:([^\\s"'>=/]+)(${qe}*=${qe}*(?:[^
4
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Lt=/'/g,Nt=/"/g,Dt=/^(?:script|style|textarea|title)$/i,tt=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),w=tt(1),T=tt(2),_i=tt(3),Q=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),Ot=new WeakMap,J=X.createTreeWalker(X,129);function It(i,e){if(!et(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Mt!==void 0?Mt.createHTML(e):e}var Sn=(i,e)=>{let t=i.length-1,n=[],s,r=e===2?"<svg>":e===3?"<math>":"",o=pe;for(let h=0;h<t;h++){let l=i[h],p,m,c=-1,_=0;for(;_<l.length&&(o.lastIndex=_,m=o.exec(l),m!==null);)_=o.lastIndex,o===pe?m[1]==="!--"?o=Ct:m[1]!==void 0?o=Pt:m[2]!==void 0?(Dt.test(m[2])&&(s=RegExp("</"+m[2],"g")),o=Z):m[3]!==void 0&&(o=Z):o===Z?m[0]===">"?(o=s??pe,c=-1):m[1]===void 0?c=-2:(c=o.lastIndex-m[2].length,p=m[1],o=m[3]===void 0?Z:m[3]==='"'?Nt:Lt):o===Nt||o===Lt?o=Z:o===Ct||o===Pt?o=pe:(o=Z,s=void 0);let b=o===Z&&i[h+1].startsWith("/>")?" ":"";r+=o===pe?l+vn:c>=0?(n.push(p),l.slice(0,c)+kt+l.slice(c)+j+b):l+j+(c===-2?h:b)}return[It(i,r+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},ge=class i{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let r=0,o=0,h=e.length-1,l=this.parts,[p,m]=Sn(e,t);if(this.el=i.createElement(p,n),J.currentNode=this.el.content,t===2||t===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(s=J.nextNode())!==null&&l.length<h;){if(s.nodeType===1){if(s.hasAttributes())for(let c of s.getAttributeNames())if(c.endsWith(kt)){let _=m[o++],b=s.getAttribute(c).split(j),A=/([.?@])?(.*)/.exec(_);l.push({type:1,index:r,name:A[2],strings:b,ctor:A[1]==="."?Ze:A[1]==="?"?Je:A[1]==="@"?Xe:ne}),s.removeAttribute(c)}else c.startsWith(j)&&(l.push({type:6,index:r}),s.removeAttribute(c));if(Dt.test(s.tagName)){let c=s.textContent.split(j),_=c.length-1;if(_>0){s.textContent=Pe?Pe.emptyScript:"";for(let b=0;b<_;b++)s.append(c[b],me()),J.nextNode(),l.push({type:2,index:++r});s.append(c[_],me())}}}else if(s.nodeType===8)if(s.data===Ut)l.push({type:2,index:r});else{let c=-1;for(;(c=s.data.indexOf(j,c+1))!==-1;)l.push({type:7,index:r}),c+=j.length-1}r++}}static createElement(e,t){let n=X.createElement("template");return n.innerHTML=e,n}};function te(i,e,t=i,n){if(e===Q)return e;let s=n!==void 0?t._$Co?.[n]:t._$Cl,r=fe(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(i),s._$AT(i,t,n)),n!==void 0?(t._$Co??=[])[n]=s:t._$Cl=s),s!==void 0&&(e=te(i,s._$AS(i,e.values),s,n)),e}var Ye=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,s=(e?.creationScope??X).importNode(t,!0);J.currentNode=s;let r=J.nextNode(),o=0,h=0,l=n[0];for(;l!==void 0;){if(o===l.index){let p;l.type===2?p=new _e(r,r.nextSibling,this,e):l.type===1?p=new l.ctor(r,l.name,l.strings,this,e):l.type===6&&(p=new Qe(r,this,e)),this._$AV.push(p),l=n[++h]}o!==l?.index&&(r=J.nextNode(),o++)}return J.currentNode=X,s}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},_e=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,s){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=te(this,e,t),fe(e)?e===f||e==null||e===""?(this._$AH!==f&&this._$AR(),this._$AH=f):e!==this._$AH&&e!==Q&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):$n(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==f&&fe(this._$AH)?this._$AA.nextSibling.data=e:this.T(X.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=ge.createElement(It(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(t);else{let r=new Ye(s,this),o=r.u(this.options);r.p(t),this.T(o),this._$AH=r}}_$AC(e){let t=Ot.get(e.strings);return t===void 0&&Ot.set(e.strings,t=new ge(e)),t}k(e){et(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,s=0;for(let r of e)s===t.length?t.push(n=new i(this.O(me()),this.O(me()),this,this.options)):n=t[s],n._$AI(r),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let n=Tt(e).nextSibling;Tt(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},ne=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,s,r){this.type=1,this._$AH=f,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=f}_$AI(e,t=this,n,s){let r=this.strings,o=!1;if(r===void 0)e=te(this,e,t,0),o=!fe(e)||e!==this._$AH&&e!==Q,o&&(this._$AH=e);else{let h=e,l,p;for(e=r[0],l=0;l<r.length-1;l++)p=te(this,h[n+l],t,l),p===Q&&(p=this._$AH[l]),o||=!fe(p)||p!==this._$AH[l],p===f?e=f:e!==f&&(e+=(p??"")+r[l+1]),this._$AH[l]=p}o&&!s&&this.j(e)}j(e){e===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ze=class extends ne{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===f?void 0:e}},Je=class extends ne{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==f)}},Xe=class extends ne{constructor(e,t,n,s,r){super(e,t,n,s,r),this.type=5}_$AI(e,t=this){if((e=te(this,e,t,0)??f)===Q)return;let n=this._$AH,s=e===f&&n!==f||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==f&&(n===f||s);s&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Qe=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){te(this,e)}};var En=Le.litHtmlPolyfillSupport;En?.(ge,_e),(Le.litHtmlVersions??=[]).push("3.3.3");var Ht=(i,e,t)=>{let n=t?.renderBefore??e,s=n._$litPart$;if(s===void 0){let r=t?.renderBefore??null;n._$litPart$=s=new _e(e.insertBefore(me(),r),r,void 0,t??{})}return s._$AI(i),s};var nt=globalThis,V=class extends B{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ht(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Q}};V._$litElement$=!0,V.finalized=!0,nt.litElementHydrateSupport?.({LitElement:V});var xn=nt.litElementPolyfillSupport;xn?.({LitElement:V});(nt.litElementVersions??=[]).push("4.2.2");var be=class extends V{createRenderRoot(){return this}};function ye(i,e){customElements.get(i)||customElements.define(i,e)}function st(i){return typeof i=="number"&&Number.isFinite(i)}function G(i,e,t){return i.toLocaleString("en-US",{minimumFractionDigits:e,maximumFractionDigits:t})}var it=[[1e12,"T"],[1e9,"B"],[1e6,"M"],[1e3,"k"]];function Bt(i,e){for(let t=0;t<it.length;t++){let[n,s]=it[t];if(!(i<n)){if(t>0&&Number((i/n).toFixed(e))>=1e3){let[r,o]=it[t-1];return G(i/r,0,e)+o}return G(i/n,0,e)+s}}return G(i,0,e)}function Ft(i,e){return Number(Math.abs(i).toFixed(e))===0}function wn(i){try{return new Intl.NumberFormat("en-US",{style:"currency",currency:i,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(t=>t.type==="currency")?.value??i}catch{return i+" "}}function An(i,e){let t=wn(e.currency??"USD");if(e.compact&&i>=1e3)return t+Bt(i,1);let n=e.cents??"auto",s=Math.round(i*100)%100!==0,r=n==="always"||n==="auto"&&(i<1e3||s);return t+(r?G(i,2,2):G(i,0,0))}function Wt(i,e={}){if(!st(i))return"\u2013";let t=An(Math.abs(i),e);return i<0&&Math.round(Math.abs(i)*100)>0?"\u2212"+t:t}function zt(i,e={}){if(!st(i))return"\u2013";let t=e.digits??1,n=e.fromRatio??!0?i*100:i,s=G(Math.abs(n),t,t)+"%";return Ft(n,t)?s:n<0?"\u2212"+s:e.signed?"+"+s:s}function jt(i,e={}){if(!st(i))return"\u2013";let t=i<0&&!Ft(i,e.digits??2)?"\u2212":"",n=Math.abs(i);return e.compact&&n>=1e3?t+Bt(n,e.digits??1):t+(e.digits===void 0?G(n,0,2):G(n,e.digits,e.digits))}function Vt(i){if(i==null)return null;let e;if(i instanceof Date)e=i;else if(typeof i=="number")e=new Date(i);else{let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(i.trim());e=t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):new Date(i)}return Number.isNaN(e.getTime())?null:e}var Li=new Intl.RelativeTimeFormat("en-US",{numeric:"auto"});function Ne(i){return i.replace(/[  ]/g," ")}function Gt(i,e="short"){let t=Vt(i);if(!t)return"\u2013";switch(e){case"medium":return Ne(t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}));case"long":return Ne(t.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"}));case"weekday":return`${t.toLocaleDateString("en-US",{weekday:"short"})} ${t.getMonth()+1}/${t.getDate()}`;default:return Ne(t.toLocaleDateString("en-US",{month:"short",day:"numeric"}))}}function Kt(i,e={}){let t=Vt(i);return t?Ne(t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:e.timeZone})):"\u2013"}var qt={ok:"var(--nish-ok-fill)",warn:"var(--nish-warn-fill)",loss:"var(--nish-loss-fill)",info:"var(--nish-info-fill)",accent:"var(--nish-accent)"};function F(i,e){return i&&Object.hasOwn(qt,i)?qt[i]:i&&/^chart-[1-8]$/.test(i)?`var(--nish-${i})`:`var(--nish-chart-${(Math.trunc(e)%8+8)%8+1})`}var k={grid:"var(--nish-line)",axis:"var(--nish-line-strong)",zero:"var(--nish-hi3)",text:"var(--nish-hi3)"},Rn=i=>Math.abs(i)>=1e3?i.toLocaleString("en-US",{maximumFractionDigits:0}):String(Math.round(i*100)/100);function ie(i,e=Rn){let t=(i??"").trim();if(!t)return e;let n=t.indexOf(":"),s=(n<0?t:t.slice(0,n)).toLowerCase(),r=n<0?"":t.slice(n+1).trim();switch(s){case"number":return o=>jt(o);case"percent":{let o=r!==""&&Number.isInteger(Number(r))&&Number(r)>=0&&Number(r)<=10?Number(r):1;return h=>zt(h,{digits:o})}case"currency":return o=>Wt(o,{currency:r||"USD"});case"date":{let o=r==="medium"||r==="long"||r==="weekday"?r:"short";return h=>Gt(h,o)}case"time":return o=>Kt(o);default:return e}}function rt(i,e,t){let n=Math.max(2,Math.floor(t));return Array.from({length:n},(s,r)=>i+(e-i)*r/(n-1))}function Zt(i,e){if(i===e){let n=Math.abs(i)*.05||1;return[i-n,e+n]}let t=(e-i)*.06;return[i-t,e+t]}function Jt(i,e){let t=0,n=i.length-1;for(;n-t>1;){let s=t+n>>1;i[s]<e?t=s:n=s}return Math.abs(i[t]-e)<=Math.abs(i[n]-e)?t:n}function K(i){if(i==null||i==="")return null;let e=typeof i=="number"?i:Number(i);return Number.isFinite(e)?e:null}function ot(i){if(!Array.isArray(i))return[];let e=[];return i.forEach((t,n)=>{if(Array.isArray(t)){let s=K(t[0]);s!==null&&e.push({x:s,y:K(t[1])})}else if(t&&typeof t=="object"){let s=t,r=K(s.x);r!==null&&e.push({x:r,y:K(s.y)})}else e.push({x:n,y:K(t)})}),e}function Xt(i){return Array.isArray(i)?i.map((e,t)=>{let n=e&&typeof e=="object"?e:{};return{label:typeof n.label=="string"&&n.label?n.label:`Series ${t+1}`,tone:typeof n.tone=="string"?n.tone:void 0,points:ot(n.points??n.data)}}):[]}function Qt(i){return Array.isArray(i)?i.map((e,t)=>{if(Array.isArray(e))return{label:String(e[0]??""),value:K(e[1])??0};if(e&&typeof e=="object"){let n=e;return{label:n.label==null?String(t+1):String(n.label),value:K(n.value)??0}}return{label:String(t+1),value:K(e)??0}}):[]}var ve={fromAttribute(i){if(!i)return[];try{let e=JSON.parse(i);return Array.isArray(e)?e:[]}catch{return[]}},toAttribute(i){try{return JSON.stringify(i)}catch{return""}}},q=class extends be{static properties={label:{type:String,reflect:!0},height:{type:Number,reflect:!0},tone:{type:String,reflect:!0},empty:{type:String,reflect:!0},yFormat:{type:String,attribute:"y-format",reflect:!0},xFormat:{type:String,attribute:"x-format",reflect:!0},width:{state:!0}};ro=null;themeObserver=null;constructor(){super(),this.label="",this.tone="",this.empty="",this.yFormat="",this.xFormat="",this.width=0}connectedCallback(){super.connectedCallback(),getComputedStyle(this).display==="inline"&&(this.style.display="block"),this.width=this.clientWidth,typeof ResizeObserver<"u"&&(this.ro=new ResizeObserver(()=>{this.clientWidth!==this.width&&(this.width=this.clientWidth)}),this.ro.observe(this)),this.themeObserver=new MutationObserver(()=>this.requestUpdate()),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]})}disconnectedCallback(){super.disconnectedCallback(),this.ro?.disconnect(),this.ro=null,this.themeObserver?.disconnect(),this.themeObserver=null}get plotHeight(){return this.height>0?this.height:200}},Yt=0;function en(){return Yt+=1,`nish-chart-${Yt}`}var Oe="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";var tn=18,Tn=22,ke=class extends q{static properties={...q.properties,data:{converter:ve},xTicks:{type:String,attribute:"x-ticks",reflect:!0},showValues:{type:Boolean,attribute:"show-values",reflect:!0},selected:{state:!0},coarse:{state:!0}};mq=null;onCoarse=()=>{this.coarse=!!this.mq?.matches};constructor(){super(),this.data=[],this.height=140,this.xTicks="ends",this.showValues=!1,this.selected=null,this.coarse=!1}connectedCallback(){super.connectedCallback(),typeof window<"u"&&window.matchMedia&&(this.mq=window.matchMedia("(pointer: coarse)"),this.coarse=this.mq.matches,this.mq.addEventListener("change",this.onCoarse))}disconnectedCallback(){super.disconnectedCallback(),this.mq?.removeEventListener("change",this.onCoarse),this.mq=null}render(){let e=this.label,t=this.height>0?this.height:140,n=Qt(this.data),s=ie(this.yFormat),r=ie(this.xFormat,u=>String(u)),o=u=>this.xFormat&&u.trim()!==""&&Number.isFinite(Number(u))?r(Number(u)):u;if(!n.length)return w`<div class="nish-chart">
5
- <div class="nish-empty" role="img" aria-label="${e}: no data" style="height:${t}px;box-sizing:border-box">${this.empty||"No data yet"}</div>
6
- </div>`;let h=this.width,l=F(this.tone,0),p=n.map(u=>Number.isFinite(u.value)?u.value:0),m=Math.max(0,...p),c=Math.min(0,...p),_=m-c||1,b=Math.max(0,t-tn-Tn),A=tn+m/_*b,S=h/n.length,g=Math.max(1,S*.72),y=this.showValues,M=y||this.coarse,P=this.xTicks==="all",U=this.selected!=null&&this.selected<n.length?this.selected:null,L=u=>{let $=u.currentTarget.getBoundingClientRect(),C=Math.floor((u.clientX-$.left)/($.width||1)*n.length);this.selected=Math.min(n.length-1,Math.max(0,C))},se=u=>{if(u.key==="ArrowLeft"||u.key==="ArrowRight"){u.preventDefault();let $=u.key==="ArrowRight"?1:-1,C=this.selected;this.selected=C==null?$>0?0:n.length-1:Math.min(n.length-1,Math.max(0,C+$))}else u.key==="Escape"&&(this.selected=null)},$e=h>0?w`<svg
7
- width=${h}
8
- height=${t}
1
+ var be=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(t){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var L=function(n,t,e,s,r){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!r:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?r.call(n,e):r?r.value=e:t.set(n,e),e},x=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},nt,Tt,Mt,lt,Vt,ht,Ct,q,ct,W,Nt,ve;var b={__proto__:null};b.enumerable=!0;Object.freeze(b);var Gt=(W=class{constructor(t,e={}){if(nt.set(this,!1),Tt.set(this,!1),Mt.set(this,!1),lt.set(this,!1),Vt.set(this,Date.now()),ht.set(this,!1),Ct.set(this,void 0),q.set(this,void 0),ct.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof e!="object"||!e)throw new Error('The "options" argument must be an object');let{bubbles:s,cancelable:r,composed:i}=e;L(this,nt,!!r,"f"),L(this,Tt,!!s,"f"),L(this,Mt,!!i,"f"),L(this,Ct,`${t}`,"f"),L(this,q,null,"f"),L(this,ct,!1,"f")}initEvent(t,e,s){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){L(this,lt,!0,"f")}get target(){return x(this,q,"f")}get currentTarget(){return x(this,q,"f")}get srcElement(){return x(this,q,"f")}get type(){return x(this,Ct,"f")}get cancelable(){return x(this,nt,"f")}get defaultPrevented(){return x(this,nt,"f")&&x(this,lt,"f")}get timeStamp(){return x(this,Vt,"f")}composedPath(){return x(this,ct,"f")?[x(this,q,"f")]:[]}get returnValue(){return!x(this,nt,"f")||!x(this,lt,"f")}get bubbles(){return x(this,Tt,"f")}get composed(){return x(this,Mt,"f")}get eventPhase(){return x(this,ct,"f")?W.AT_TARGET:W.NONE}get cancelBubble(){return x(this,ht,"f")}set cancelBubble(t){t&&L(this,ht,!0,"f")}stopPropagation(){L(this,ht,!0,"f")}get isTrusted(){return!1}},nt=new WeakMap,Tt=new WeakMap,Mt=new WeakMap,lt=new WeakMap,Vt=new WeakMap,ht=new WeakMap,Ct=new WeakMap,q=new WeakMap,ct=new WeakMap,W.NONE=0,W.CAPTURING_PHASE=1,W.AT_TARGET=2,W.BUBBLING_PHASE=3,W);Object.defineProperties(Gt.prototype,{initEvent:b,stopImmediatePropagation:b,preventDefault:b,target:b,currentTarget:b,srcElement:b,type:b,cancelable:b,defaultPrevented:b,timeStamp:b,composedPath:b,returnValue:b,bubbles:b,composed:b,eventPhase:b,cancelBubble:b,stopPropagation:b,isTrusted:b});var $e=(ve=class extends Gt{constructor(t,e={}){super(t,e),Nt.set(this,void 0),L(this,Nt,e?.detail??null,"f")}initCustomEvent(t,e,s,r){throw new Error("Method not implemented.")}get detail(){return x(this,Nt,"f")}},Nt=new WeakMap,ve);Object.defineProperties($e.prototype,{detail:b});var U=Gt,Yt=$e;var R;var Ss=(R=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},R.STYLE_RULE=1,R.CHARSET_RULE=2,R.IMPORT_RULE=3,R.MEDIA_RULE=4,R.FONT_FACE_RULE=5,R.PAGE_RULE=6,R.NAMESPACE_RULE=10,R.KEYFRAMES_RULE=7,R.KEYFRAME_RULE=8,R.SUPPORTS_RULE=12,R.COUNTER_STYLE_RULE=11,R.FONT_FEATURE_VALUES_RULE=14,R.MARGIN_RULE=9,R);globalThis.Event??=U;globalThis.CustomEvent??=Yt;var qt=Symbol(),Se=n=>typeof n=="boolean"?n:n?.capture??!1,F={__proto__:null};F.enumerable=!0;Object.freeze(F);var Ot=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(t,e,s){if(e==null)return;let r=Se(s)?this.__captureEventListeners:this.__eventListeners,i=r.get(t);if(i===void 0)i=new Map,r.set(t,i);else if(i.has(e))return;let o=typeof s=="object"&&s?s:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(t,e,s)),i.set(e,o??{})}removeEventListener(t,e,s){if(e==null)return;let r=Se(s)?this.__captureEventListeners:this.__eventListeners,i=r.get(t);i!==void 0&&(i.delete(e),i.size||r.delete(t))}dispatchEvent(t){let e=this.__resolveFullEventPath();!t.composed&&this.__host&&(e=e.slice(0,e.indexOf(this.__host)));let s=!1,r=!1,i=U.NONE,o=null,h=null,l=null,u=t.stopPropagation,g=t.stopImmediatePropagation;Object.defineProperties(t,{target:{get(){return o??h},...F},srcElement:{get(){return t.target},...F},currentTarget:{get(){return l},...F},eventPhase:{get(){return i},...F},composedPath:{value:()=>e,...F},stopPropagation:{value:()=>{s=!0,u.call(t)},...F},stopImmediatePropagation:{value:()=>{r=!0,g.call(t)},...F}});let c=(m,A,S)=>{typeof m=="function"?m(t):typeof m?.handleEvent=="function"&&m.handleEvent(t),A.once&&S.delete(m)},y=()=>(l=null,i=U.NONE,!t.defaultPrevented),_=e.slice().reverse();o=!this.__host||!t.composed?this:null;let $=m=>{for(h=this;h.__host&&m.includes(h.__host);)h=h.__host};for(let m of _){!o&&(!h||h===m.__host)&&$(_.slice(_.indexOf(m))),l=m,i=m===t.target?U.AT_TARGET:U.CAPTURING_PHASE;let A=m.__captureEventListeners.get(t.type);if(A){for(let[S,N]of A)if(c(S,N,A),r)return y()}if(s)return y()}let C=t.bubbles?e:[this];h=null;for(let m of C){!o&&(!h||m===h.__host)&&$(C.slice(0,C.indexOf(m)+1)),l=m,i=m===t.target?U.AT_TARGET:U.BUBBLING_PHASE;let A=m.__eventListeners.get(t.type);if(A){for(let[S,N]of A)if(c(S,N,A),r)return y()}if(s)return y()}return y()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,we,Cn]}};var Ee=new WeakMap,ut=n=>{let t=Ee.get(n);return t===void 0&&Ee.set(n,t=new Map),t},dt=class extends Ot{getRootNode(t){return t?.composed?Kt:this.__host?.__shadowRoot??Kt}};var xe=class extends dt{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var we=new xe,Kt=we;var Ae=class extends dt{constructor(t){if(super(),t!==qt)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:Pt,customElements:Xt,document:Kt,Document:xe,Element:Re,EventTarget:Ot,HTMLElement:Te,Node:dt,ShadowRoot:Me,window:this,Window:Ae})}};var Re=class extends dt{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(ut(this)).map(([t,e])=>({name:t,value:e}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(t,e){ut(this).set(t,String(e))}removeAttribute(t){ut(this).delete(t)}toggleAttribute(t,e){if(this.hasAttribute(t)){if(e===void 0||!e)return this.removeAttribute(t),!1}else return e===void 0||e?(this.setAttribute(t,""),!0):!1;return!0}hasAttribute(t){return ut(this).has(t)}attachShadow(t){this.__shadowRootMode=t.mode;let e=new Me(qt,t);return e.__eventTargetParent=this,e.__host=this,this.__shadowRoot=e}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let t=new be(this);return this.__internals=t,t}getAttribute(t){return ut(this).get(t)??null}};var Te=class extends Re{},Jt=Te;var Me=class extends dt{get host(){return this.__host}constructor(t,e){if(super(),t!==t)throw new TypeError("Illegal constructor");this.mode=e.mode}};globalThis.litServerRoot??=Object.defineProperty(new Jt,"localName",{get(){return"lit-server-root"}});function Tn(){let n,t;return{promise:new Promise((s,r)=>{n=s,t=r}),resolve:n,reject:t}}var Pt=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(t,e){if(this.__definitions.has(t))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${t}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
2
+ Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(this.__reverseDefinitions.has(e))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(e)}`);e.__localName=t,this.__definitions.set(t,{ctor:e,observedAttributes:e.observedAttributes??[]}),this.__reverseDefinitions.set(e,t),this.__pendingWhenDefineds.get(t)?.resolve(e),this.__pendingWhenDefineds.delete(t)}get(t){return this.__definitions.get(t)?.ctor}getName(t){return this.__reverseDefinitions.get(t)??null}initialize(t){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(t){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(t){let e=this.__definitions.get(t);if(e)return e.ctor;let s=this.__pendingWhenDefineds.get(t);return s||(s=Tn(),this.__pendingWhenDefineds.set(t,s)),s.promise}},Mn=Pt;var Xt=new Mn,Cn=new Ae(qt);var pt=globalThis,Dt=pt.ShadowRoot&&(pt.ShadyCSS===void 0||pt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ne=Symbol(),Ce=new WeakMap,Lt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Ne)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Dt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Ce.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Ce.set(e,t))}return t}toString(){return this.cssText}},Oe=n=>new Lt(typeof n=="string"?n:n+"",void 0,Ne);var Pe=(n,t)=>{if(Dt)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),r=pt.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,n.appendChild(s)}},Zt=Dt||pt.CSSStyleSheet===void 0?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Oe(e)})(n):n;var{is:Nn,defineProperty:On,getOwnPropertyDescriptor:Pn,getOwnPropertyNames:Ln,getOwnPropertySymbols:Dn,getPrototypeOf:In}=Object,ft=globalThis;ft.customElements??=Xt;var Le=ft.trustedTypes,kn=Le?Le.emptyScript:"",Un=ft.reactiveElementPolyfillSupport,mt=(n,t)=>n,Qt={toAttribute(n,t){switch(t){case Boolean:n=n?kn:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Ie=(n,t)=>!Nn(n,t),De={attribute:!0,type:String,converter:Qt,reflect:!1,useDefault:!1,hasChanged:Ie};Symbol.metadata??=Symbol("metadata"),ft.litPropertyMetadata??=new WeakMap;var H=class extends(globalThis.HTMLElement??Jt){static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=De){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&On(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:i}=Pn(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:r,set(o){let h=r?.call(this);i?.call(this,o),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??De}static _$Ei(){if(this.hasOwnProperty(mt("elementProperties")))return;let t=In(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(mt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(mt("properties"))){let e=this.properties,s=[...Ln(e),...Dn(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(Zt(r))}else t!==void 0&&e.push(Zt(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pe(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:Qt).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=s.getPropertyOptions(r),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Qt;this._$Em=r;let h=o.fromAttribute(e,i.type);this[r]=h??this._$Ej?.get(r)??h,this._$Em=null}}requestUpdate(t,e,s,r=!1,i){if(t!==void 0){let o=this.constructor;if(r===!1&&(i=this[t]),s??=o.getPropertyOptions(t),!((s.hasChanged??Ie)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:i},o){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),i!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,i]of s){let{wrapped:o}=i,h=this[r];o!==!0||this._$AL.has(r)||h===void 0||this.C(r,void 0,i,h)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};H.elementStyles=[],H.shadowRootOptions={mode:"open"},H[mt("elementProperties")]=new Map,H[mt("finalized")]=new Map,Un?.({ReactiveElement:H}),(ft.reactiveElementVersions??=[]).push("2.1.2");var kt=globalThis,ke=n=>n,It=kt.trustedTypes,Ue=It?It.createPolicy("lit-html",{createHTML:n=>n}):void 0,je="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,Ve="?"+j,Fn=`<${Ve}>`,Z=kt.document===void 0?{createTreeWalker:()=>({})}:document,yt=()=>Z.createComment(""),_t=n=>n===null||typeof n!="object"&&typeof n!="function",oe=Array.isArray,Hn=n=>oe(n)||typeof n?.[Symbol.iterator]=="function",te=`[
3
+ \f\r]`,gt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fe=/-->/g,He=/>/g,J=RegExp(`>|${te}(?:([^\\s"'>=/]+)(${te}*=${te}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Be=/'/g,ze=/"/g,Ge=/^(?:script|style|textarea|title)$/i,ae=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),w=ae(1),T=ae(2),nr=ae(3),Q=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),We=new WeakMap,X=Z.createTreeWalker(Z,129);function Ye(n,t){if(!oe(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ue!==void 0?Ue.createHTML(t):t}var Bn=(n,t)=>{let e=n.length-1,s=[],r,i=t===2?"<svg>":t===3?"<math>":"",o=gt;for(let h=0;h<e;h++){let l=n[h],u,g,c=-1,y=0;for(;y<l.length&&(o.lastIndex=y,g=o.exec(l),g!==null);)y=o.lastIndex,o===gt?g[1]==="!--"?o=Fe:g[1]!==void 0?o=He:g[2]!==void 0?(Ge.test(g[2])&&(r=RegExp("</"+g[2],"g")),o=J):g[3]!==void 0&&(o=J):o===J?g[0]===">"?(o=r??gt,c=-1):g[1]===void 0?c=-2:(c=o.lastIndex-g[2].length,u=g[1],o=g[3]===void 0?J:g[3]==='"'?ze:Be):o===ze||o===Be?o=J:o===Fe||o===He?o=gt:(o=J,r=void 0);let _=o===J&&n[h+1].startsWith("/>")?" ":"";i+=o===gt?l+Fn:c>=0?(s.push(u),l.slice(0,c)+je+l.slice(c)+j+_):l+j+(c===-2?h:_)}return[Ye(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},bt=class n{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,o=0,h=t.length-1,l=this.parts,[u,g]=Bn(t,e);if(this.el=n.createElement(u,s),X.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=X.nextNode())!==null&&l.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(let c of r.getAttributeNames())if(c.endsWith(je)){let y=g[o++],_=r.getAttribute(c).split(j),$=/([.?@])?(.*)/.exec(y);l.push({type:1,index:i,name:$[2],strings:_,ctor:$[1]==="."?ne:$[1]==="?"?se:$[1]==="@"?re:rt}),r.removeAttribute(c)}else c.startsWith(j)&&(l.push({type:6,index:i}),r.removeAttribute(c));if(Ge.test(r.tagName)){let c=r.textContent.split(j),y=c.length-1;if(y>0){r.textContent=It?It.emptyScript:"";for(let _=0;_<y;_++)r.append(c[_],yt()),X.nextNode(),l.push({type:2,index:++i});r.append(c[y],yt())}}}else if(r.nodeType===8)if(r.data===Ve)l.push({type:2,index:i});else{let c=-1;for(;(c=r.data.indexOf(j,c+1))!==-1;)l.push({type:7,index:i}),c+=j.length-1}i++}}static createElement(t,e){let s=Z.createElement("template");return s.innerHTML=t,s}};function st(n,t,e=n,s){if(t===Q)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,i=_t(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(n),r._$AT(n,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=st(n,r._$AS(n,t.values),r,s)),t}var ee=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??Z).importNode(e,!0);X.currentNode=r;let i=X.nextNode(),o=0,h=0,l=s[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new vt(i,i.nextSibling,this,t):l.type===1?u=new l.ctor(i,l.name,l.strings,this,t):l.type===6&&(u=new ie(i,this,t)),this._$AV.push(u),l=s[++h]}o!==l?.index&&(i=X.nextNode(),o++)}return X.currentNode=Z,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},vt=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=st(this,t,e),_t(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==Q&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Hn(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==f&&_t(this._$AH)?this._$AA.nextSibling.data=t:this.T(Z.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=bt.createElement(Ye(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new ee(r,this),o=i.u(this.options);i.p(e),this.T(o),this._$AH=i}}_$AC(t){let e=We.get(t.strings);return e===void 0&&We.set(t.strings,e=new bt(t)),e}k(t){oe(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let i of t)r===e.length?e.push(s=new n(this.O(yt()),this.O(yt()),this,this.options)):s=e[r],s._$AI(i),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=ke(t).nextSibling;ke(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},rt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,i){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=f}_$AI(t,e=this,s,r){let i=this.strings,o=!1;if(i===void 0)t=st(this,t,e,0),o=!_t(t)||t!==this._$AH&&t!==Q,o&&(this._$AH=t);else{let h=t,l,u;for(t=i[0],l=0;l<i.length-1;l++)u=st(this,h[s+l],e,l),u===Q&&(u=this._$AH[l]),o||=!_t(u)||u!==this._$AH[l],u===f?t=f:t!==f&&(t+=(u??"")+i[l+1]),this._$AH[l]=u}o&&!r&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ne=class extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},se=class extends rt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},re=class extends rt{constructor(t,e,s,r,i){super(t,e,s,r,i),this.type=5}_$AI(t,e=this){if((t=st(this,t,e,0)??f)===Q)return;let s=this._$AH,r=t===f&&s!==f||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==f&&(s===f||r);r&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ie=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){st(this,t)}};var zn=kt.litHtmlPolyfillSupport;zn?.(bt,vt),(kt.litHtmlVersions??=[]).push("3.3.3");var Ke=(n,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let i=e?.renderBefore??null;s._$litPart$=r=new vt(t.insertBefore(yt(),i),i,void 0,e??{})}return r._$AI(n),r};var le=globalThis,V=class extends H{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ke(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Q}};V._$litElement$=!0,V.finalized=!0,le.litElementHydrateSupport?.({LitElement:V});var Wn=le.litElementPolyfillSupport;Wn?.({LitElement:V});(le.litElementVersions??=[]).push("4.2.2");var jn="2.0.1";var Vn=Symbol.for("nish-ui.runtime.v1");function Gn(){let n=globalThis;return n[Vn]??={versions:new Set,slots:{}}}function Yn(n){n.versions.add(jn),n.versions.size>1&&!n.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(n.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...n.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var qe=!1;function Ut(n,t){let e=Gn();return qe||(qe=!0,Yn(e)),n in e.slots||(e.slots[n]=t()),e.slots[n]}var Je={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:n=>`${n} result${n===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:n=>`${n} active`,remove:"Remove",removeNamed:n=>`Remove ${n}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:n=>`${n}: no data`,seriesNumber:n=>`Series ${n}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark"};function he(){return Ut("element-strings",()=>({values:{...Je},listeners:new Set}))}function Kn(n){let t=he(),e={...t.values};for(let[s,r]of Object.entries(n))r!==void 0&&Object.hasOwn(Je,s)&&(e[s]=r);t.values=e;for(let s of Array.from(t.listeners))s()}function it(){return he().values}function Xe(n){let t=he().listeners;return t.add(n),()=>{t.delete(n)}}var $t=class extends V{#t=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#t??=Xe(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#t?.(),this.#t=null}stringsChanged(){this.requestUpdate()}};function St(n,t){customElements.get(n)||customElements.define(n,t)}var Et="\u2013",de="\u2212",ue="en-US",qn=Ut("format",()=>({locale:ue})),Ze=new Map;function Jn(n){let t=Ze.get(n);if(t===void 0){try{t=Intl.getCanonicalLocales(n)[0]??ue}catch{t=ue}Ze.set(n,t)}return t}function xt(n){return n?.locale?Jn(n.locale):qn.locale}function en(n){return n==="en"||n==="en-US"}var Qe=new Map;function nn(n,t){let e=Qe.get(n);return e===void 0&&(e=t(),Qe.set(n,e)),e}function Xn(n,t,e){return nn(`n|${n}|${t}|${e}`,()=>new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:e}))}function tt(n,t,e,s){return nn(`d|${n}|${t}|${s??""}`,()=>new Intl.DateTimeFormat(n,s?{...e,timeZone:s}:e))}function pe(n){return typeof n=="number"&&Number.isFinite(n)}function G(n,t,e,s){return Xn(s,t,e).format(n)}var ce=[[1e12,"T"],[1e9,"B"],[1e6,"M"],[1e3,"k"]];function sn(n,t,e){for(let s=0;s<ce.length;s++){let[r,i]=ce[s];if(!(n<r)){if(s>0&&Number((n/r).toFixed(t))>=1e3){let[o,h]=ce[s-1];return G(n/o,0,t,e)+h}return G(n/r,0,t,e)+i}}return G(n,0,t,e)}function rn(n,t){return Number(Math.abs(n).toFixed(t))===0}var tn=new Map;function Zn(n,t){let e=`${t}|${n}`,s=tn.get(e);if(s===void 0){try{s=new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??n}catch{s=n+" "}tn.set(e,s)}return s}function Qn(n,t,e){let s=Zn(t.currency??"USD",e);if(t.compact&&n>=1e3)return s+sn(n,1,e);let r=t.cents??"auto",i=Math.round(n*100)%100!==0,o=r==="always"||r==="auto"&&(n<1e3||i);return s+(o?G(n,2,2,e):G(n,0,0,e))}function on(n,t={}){if(!pe(n))return Et;let e=Qn(Math.abs(n),t,xt(t));return n<0&&Math.round(Math.abs(n)*100)>0?de+e:e}function an(n,t={}){if(!pe(n))return Et;let e=t.digits??1,s=t.fromRatio??!0?n*100:n,r=G(Math.abs(s),e,e,xt(t))+"%";return rn(s,e)?r:s<0?de+r:t.signed?"+"+r:r}function ln(n,t={}){if(!pe(n))return Et;let e=xt(t),s=n<0&&!rn(n,t.digits??2)?de:"",r=Math.abs(n);return t.compact&&r>=1e3?s+sn(r,t.digits??1,e):s+(t.digits===void 0?G(r,0,2,e):G(r,t.digits,t.digits,e))}var ts=/^(\d{4})-(\d{2})-(\d{2})$/;function hn(n){if(n==null)return null;let t,e=!1;if(n instanceof Date)t=n;else if(typeof n=="number")t=new Date(n);else{let s=ts.exec(n.trim());e=!!s,t=s?new Date(Number(s[1]),Number(s[2])-1,Number(s[3])):new Date(n)}return Number.isNaN(t.getTime())?null:{d:t,dayOnly:e}}function cn(n,t){return n.dayOnly?void 0:t.timeZone}function Ft(n){return n.replace(/[\u202f\u00a0]/g," ")}var Sr=[[60,"minute","m"],[3600,"hour","h"],[86400,"day","d"],[86400*30,"month","mo"],[86400*365,"year","y"]];var es={month:"short",day:"numeric",year:"numeric"},ns={weekday:"long",month:"long",day:"numeric",year:"numeric"},ss={month:"short",day:"numeric"},rs={weekday:"short"},is={month:"numeric",day:"numeric"},os={hour:"numeric",minute:"2-digit"},as={hour:"numeric",minute:"2-digit",hour12:!0},ls={year:"numeric",month:"numeric",day:"numeric"};function hs(n,t){if(!t)return{year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()};let e={year:0,month:0,day:0};for(let s of tt("en-US","ymd",ls,t).formatToParts(n))(s.type==="year"||s.type==="month"||s.type==="day")&&(e[s.type]=Number(s.value));return e}function cs(n,t,e,s){let r=cn(n,e);switch(t){case"medium":return Ft(tt(s,"medium",es,r).format(n.d));case"long":return Ft(tt(s,"long",ns,r).format(n.d));case"weekday":{let i=tt(s,"weekday",rs,r).format(n.d);if(!en(s))return`${i} ${tt(s,"md",is,r).format(n.d)}`;let o=hs(n.d,r);return`${i} ${o.month}/${o.day}`}default:return Ft(tt(s,"short",ss,r).format(n.d))}}function un(n,t="short",e={}){let s=hn(n);return s?cs(s,t,e,xt(e)):Et}function us(n,t,e){let s=en(e);return Ft(tt(e,s?"time12":"time",s?as:os,cn(n,t)).format(n.d))}function dn(n,t={}){let e=hn(n);return e?us(e,t,xt(t)):Et}var pn={ok:"var(--nish-ok-fill)",warn:"var(--nish-warn-fill)",loss:"var(--nish-loss-fill)",info:"var(--nish-info-fill)",accent:"var(--nish-accent)"};function B(n,t){return n&&Object.hasOwn(pn,n)?pn[n]:n&&/^chart-[1-8]$/.test(n)?`var(--nish-${n})`:`var(--nish-chart-${(Math.trunc(t)%8+8)%8+1})`}var D={grid:"var(--nish-line)",axis:"var(--nish-line-strong)",zero:"var(--nish-hi3)",text:"var(--nish-hi3)"},mn,ds=n=>Math.abs(n)<1e3?String(Math.round(n*100)/100):(mn??=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),mn.format(n));function ot(n,t=ds){let e=(n??"").trim();if(!e)return t;let s=e.indexOf(":"),r=(s<0?e:e.slice(0,s)).toLowerCase(),i=s<0?"":e.slice(s+1).trim();switch(r){case"number":return o=>ln(o);case"percent":{let o=i!==""&&Number.isInteger(Number(i))&&Number(i)>=0&&Number(i)<=10?Number(i):1;return h=>an(h,{digits:o})}case"currency":return o=>on(o,{currency:i||"USD"});case"date":{let o=i==="medium"||i==="long"||i==="weekday"?i:"short";return h=>un(h,o)}case"time":return o=>dn(o);default:return t}}function me(n,t,e){let s=Math.max(2,Math.floor(e));return Array.from({length:s},(r,i)=>n+(t-n)*i/(s-1))}function gn(n,t){if(n===t){let s=Math.abs(n)*.05||1;return[n-s,t+s]}let e=(t-n)*.06;return[n-e,t+e]}function yn(n,t){let e=0,s=n.length-1;for(;s-e>1;){let r=e+s>>1;n[r]<t?e=r:s=r}return Math.abs(n[e]-t)<=Math.abs(n[s]-t)?e:s}function Y(n){if(n==null||n==="")return null;let t=typeof n=="number"?n:Number(n);return Number.isFinite(t)?t:null}function fe(n){if(!Array.isArray(n))return[];let t=[];return n.forEach((e,s)=>{if(Array.isArray(e)){let r=Y(e[0]);r!==null&&t.push({x:r,y:Y(e[1])})}else if(e&&typeof e=="object"){let r=e,i=Y(r.x);i!==null&&t.push({x:i,y:Y(r.y)})}else t.push({x:s,y:Y(e)})}),t}function _n(n){return Array.isArray(n)?n.map((t,e)=>{let s=t&&typeof t=="object"?t:{};return{label:typeof s.label=="string"&&s.label?s.label:it().seriesNumber(e+1),tone:typeof s.tone=="string"?s.tone:void 0,points:fe(s.points??s.data)}}):[]}function bn(n){return Array.isArray(n)?n.map((t,e)=>{if(Array.isArray(t))return{label:String(t[0]??""),value:Y(t[1])??0};if(t&&typeof t=="object"){let s=t;return{label:s.label==null?String(e+1):String(s.label),value:Y(s.value)??0}}return{label:String(e+1),value:Y(t)??0}}):[]}var wt={fromAttribute(n){if(!n)return[];try{let t=JSON.parse(n);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute(n){try{return JSON.stringify(n)}catch{return""}}},K=class extends $t{static properties={label:{type:String,reflect:!0},height:{type:Number,reflect:!0},tone:{type:String,reflect:!0},empty:{type:String,reflect:!0},yFormat:{type:String,attribute:"y-format",reflect:!0},xFormat:{type:String,attribute:"x-format",reflect:!0},width:{state:!0}};ro=null;themeObserver=null;constructor(){super(),this.label="",this.tone="",this.empty="",this.yFormat="",this.xFormat="",this.width=0}connectedCallback(){super.connectedCallback(),getComputedStyle(this).display==="inline"&&(this.style.display="block"),this.width=this.clientWidth,typeof ResizeObserver<"u"&&(this.ro=new ResizeObserver(()=>{this.clientWidth!==this.width&&(this.width=this.clientWidth)}),this.ro.observe(this)),this.themeObserver=new MutationObserver(()=>this.requestUpdate()),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]})}disconnectedCallback(){super.disconnectedCallback(),this.ro?.disconnect(),this.ro=null,this.themeObserver?.disconnect(),this.themeObserver=null}get plotHeight(){return this.height>0?this.height:200}},fn=0;function vn(){return fn+=1,`nish-chart-${fn}`}var Ht="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";var $n=18,ps=22,Bt=class extends K{static properties={...K.properties,data:{converter:wt},xTicks:{type:String,attribute:"x-ticks",reflect:!0},showValues:{type:Boolean,attribute:"show-values",reflect:!0},selected:{state:!0},coarse:{state:!0}};mq=null;onCoarse=()=>{this.coarse=!!this.mq?.matches};constructor(){super(),this.data=[],this.height=140,this.xTicks="ends",this.showValues=!1,this.selected=null,this.coarse=!1}connectedCallback(){super.connectedCallback(),typeof window<"u"&&window.matchMedia&&(this.mq=window.matchMedia("(pointer: coarse)"),this.coarse=this.mq.matches,this.mq.addEventListener("change",this.onCoarse))}disconnectedCallback(){super.disconnectedCallback(),this.mq?.removeEventListener("change",this.onCoarse),this.mq=null}render(){let t=it(),e=this.label,s=this.height>0?this.height:140,r=bn(this.data),i=ot(this.yFormat),o=ot(this.xFormat,d=>String(d)),h=d=>this.xFormat&&d.trim()!==""&&Number.isFinite(Number(d))?o(Number(d)):d;if(!r.length)return w`<div class="nish-chart">
5
+ <div class="nish-empty" role="img" aria-label=${t.noDataNamed(e)} style="height:${s}px;box-sizing:border-box">${this.empty||t.noDataYet}</div>
6
+ </div>`;let l=this.width,u=B(this.tone,0),g=r.map(d=>Number.isFinite(d.value)?d.value:0),c=Math.max(0,...g),y=Math.min(0,...g),_=c-y||1,$=Math.max(0,s-$n-ps),C=$n+c/_*$,m=l/r.length,A=Math.max(1,m*.72),S=this.showValues,N=S||this.coarse,et=this.xTicks==="all",I=this.selected!=null&&this.selected<r.length?this.selected:null,O=d=>{let v=d.currentTarget.getBoundingClientRect(),M=Math.floor((d.clientX-v.left)/(v.width||1)*r.length);this.selected=Math.min(r.length-1,Math.max(0,M))},at=d=>{if(d.key==="ArrowLeft"||d.key==="ArrowRight"){d.preventDefault();let v=d.key==="ArrowRight"?1:-1,M=this.selected;this.selected=M==null?v>0?0:r.length-1:Math.min(r.length-1,Math.max(0,M+v))}else d.key==="Escape"&&(this.selected=null)},At=l>0?w`<svg
7
+ width=${l}
8
+ height=${s}
9
9
  role="img"
10
10
  tabindex="0"
11
11
  aria-label=${e}
12
12
  style="display:block;touch-action:pan-y"
13
- @pointerdown=${L}
14
- @pointermove=${u=>{(u.pointerType==="mouse"||u.buttons)&&L(u)}}
15
- @pointerleave=${u=>{u.pointerType==="mouse"&&(this.selected=null)}}
16
- @keydown=${se}
13
+ @pointerdown=${O}
14
+ @pointermove=${d=>{(d.pointerType==="mouse"||d.buttons)&&O(d)}}
15
+ @pointerleave=${d=>{d.pointerType==="mouse"&&(this.selected=null)}}
16
+ @keydown=${at}
17
17
  >
18
- <line class="nish-chart-grid" x1="0" x2=${h} y1=${A} y2=${A} stroke=${k.grid} stroke-width="1"></line>
19
- ${p.map((u,$)=>{let C=Math.max(2,Math.abs(u)/_*b),W=u<0?A:A-C,N=$*S+(S-g)/2,D=U===$,Se=D||M&&(y||S>=26);return T`<g>
20
- <rect x=${N} y=${W} width=${g} height=${C} rx="2" fill=${l} opacity=${U==null||D?1:.55}></rect>
21
- ${Se?T`<text class="nish-chart-axis" x=${N+g/2} y=${u<0?W+C+11:Math.max(11,W-4)} text-anchor="middle" font-size="11" fill=${k.text} style="font-variant-numeric:tabular-nums">${s(u)}</text>`:f}
18
+ <line class="nish-chart-grid" x1="0" x2=${l} y1=${C} y2=${C} stroke=${D.grid} stroke-width="1"></line>
19
+ ${g.map((d,v)=>{let M=Math.max(2,Math.abs(d)/_*$),z=d<0?C:C-M,P=v*m+(m-A)/2,k=I===v,Rt=k||N&&(S||m>=26);return T`<g>
20
+ <rect x=${P} y=${z} width=${A} height=${M} rx="2" fill=${u} opacity=${I==null||k?1:.55}></rect>
21
+ ${Rt?T`<text class="nish-chart-axis" x=${P+A/2} y=${d<0?z+M+11:Math.max(11,z-4)} text-anchor="middle" font-size="11" fill=${D.text} style="font-variant-numeric:tabular-nums">${i(d)}</text>`:f}
22
22
  </g>`})}
23
- ${n.map((u,$)=>{if(!(P||$===0||$===n.length-1))return f;let C=P?"middle":$===0?"start":"end",W=P?$*S+S/2:$===0?0:h;return T`<text class="nish-chart-axis" x=${W} y=${t-6} text-anchor=${C} font-size="11" fill=${k.text}>${o(u.label)}</text>`})}
23
+ ${r.map((d,v)=>{if(!(et||v===0||v===r.length-1))return f;let M=et?"middle":v===0?"start":"end",z=et?v*m+m/2:v===0?0:l;return T`<text class="nish-chart-axis" x=${z} y=${s-6} text-anchor=${M} font-size="11" fill=${D.text}>${h(d.label)}</text>`})}
24
24
  </svg>`:f;return w`<div class="nish-chart" style="position:relative;width:100%">
25
- ${$e}
26
- <div aria-live="polite" style="margin-top:4px;min-height:20px;font-size:14px;font-variant-numeric:tabular-nums;color:var(--nish-hi2)">${U!=null?`${o(n[U].label)}: ${s(p[U])}`:""}</div>
27
- <table style=${Oe}>
25
+ ${At}
26
+ <div aria-live="polite" style="margin-top:4px;min-height:20px;font-size:14px;font-variant-numeric:tabular-nums;color:var(--nish-hi2)">${I!=null?`${h(r[I].label)}: ${i(g[I])}`:""}</div>
27
+ <table style=${Ht}>
28
28
  <caption>${e}</caption>
29
29
  <tbody>
30
- ${n.map((u,$)=>w`<tr><th scope="row">${o(u.label)}</th><td>${s(p[$])}</td></tr>`)}
30
+ ${r.map((d,v)=>w`<tr><th scope="row">${h(d.label)}</th><td>${i(g[v])}</td></tr>`)}
31
31
  </tbody>
32
32
  </table>
33
- </div>`}};ye("nish-bar-chart",ke);var Ue=10,Mn=24,Cn=12,Pn="position:absolute;top:4px;z-index:10;pointer-events:none;white-space:nowrap;padding:4px 8px;font-variant-numeric:tabular-nums;background:var(--nish-elevated);border:1px solid var(--nish-line-strong);border-radius:var(--nish-radius-sm);box-shadow:var(--nish-shadow-pop);color:var(--nish-hi);font-size:12px",De=class extends q{static properties={...q.properties,data:{converter:ve},series:{converter:ve},area:{type:Boolean,reflect:!0},baseline:{type:Number,reflect:!0},yTicks:{type:Number,attribute:"y-ticks",reflect:!0},xTicks:{type:Number,attribute:"x-ticks",reflect:!0},active:{state:!0}};fromKey=!1;listening=!1;gradId=en();constructor(){super(),this.data=[],this.series=[],this.area=!1,this.height=200,this.yTicks=4,this.xTicks=4,this.active=null}onDocPointerDown=e=>{this.contains(e.target)||(this.active=null)};disconnectedCallback(){super.disconnectedCallback(),this.stopListening()}stopListening(){this.listening&&(document.removeEventListener("pointerdown",this.onDocPointerDown),this.listening=!1)}updated(){this.active!=null&&!this.listening?(document.addEventListener("pointerdown",this.onDocPointerDown),this.listening=!0):this.active==null&&this.stopListening()}lines(){let e=Xt(this.series);if(e.length)return e;let t=ot(this.data);return t.length?[{label:this.label,tone:this.tone||void 0,points:t}]:[]}moveTo(e,t,n,s,r,o,h){let l=t.getBoundingClientRect(),p=o+(e-l.left-s)/(r||1)*(h-o);this.active=Jt(n,p)}render(){let e=this.label,t=this.plotHeight,n=this.lines(),s=ie(this.yFormat),r=ie(this.xFormat),o=a=>a.y!=null&&Number.isFinite(a.y)&&Number.isFinite(a.x),h=new Set;for(let a of n)for(let d of a.points)o(d)&&h.add(d.x);let l=[...h].sort((a,d)=>a-d);if(!l.length)return w`<div class="nish-chart">
34
- <div class="nish-empty" role="img" aria-label="${e}: no data" style="height:${t}px;box-sizing:border-box">${this.empty||"No data yet"}</div>
35
- </div>`;let p=n.map(a=>new Map(a.points.filter(o).map(d=>[d.x,d.y]))),m=1/0,c=-1/0;for(let a of n)for(let d of a.points)o(d)&&(m=Math.min(m,d.y),c=Math.max(c,d.y));let _=this.baseline!=null&&Number.isFinite(this.baseline)?this.baseline:void 0;_!==void 0&&(m=Math.min(m,_),c=Math.max(c,_)),[m,c]=Zt(m,c);let b=l[0],A=l[l.length-1]===b?b+1:l[l.length-1],S=this.width,g=rt(m,c,this.yTicks||4).map(a=>({v:a,text:s(a)})),y=Math.ceil(Math.max(...g.map(a=>a.text.length))*6.6)+10,M=Math.max(0,S-y-Cn),P=Math.max(0,t-Ue-Mn),U=a=>y+(a-b)/(A-b)*M,L=a=>Ue+(1-(a-m)/(c-m))*P,se=Ue+P,$e=n.map(a=>{let d=[],E=[];for(let Ie of[...a.points].sort((an,ln)=>an.x-ln.x))o(Ie)?E.push([Number(U(Ie.x).toFixed(1)),Number(L(Ie.y).toFixed(1))]):(E.length&&d.push(E),E=[]);return E.length&&d.push(E),d}),u=a=>a.map(d=>`${d[0]},${d[1]}`).join(" "),$=Math.min(this.xTicks||4,Math.max(2,Math.floor(M/72))),C=rt(b,A,$),W=this.active!=null&&this.active<l.length?this.active:null,N=W!=null?l[W]:null,D=N!=null?U(N):0,Se=N!=null?n.map((a,d)=>({s:a,i:d,y:p[d].get(N)})).filter(a=>a.y!=null):[],nn=D<S/2,at=a=>{this.fromKey=!1,this.moveTo(a.clientX,a.currentTarget,l,y,M,b,A)},sn=a=>{if(a.key==="ArrowLeft"||a.key==="ArrowRight"){a.preventDefault(),this.fromKey=!0;let d=a.key==="ArrowRight"?1:-1,E=this.active;this.active=E==null?d>0?0:l.length-1:Math.min(l.length-1,Math.max(0,E+d))}else a.key==="Escape"&&(this.active=null)},lt=n[0],ht=F(lt?.tone,0),rn=S>0?w`<svg
36
- width=${S}
37
- height=${t}
33
+ </div>`}};St("nish-bar-chart",Bt);var zt=10,ms=24,fs=12,gs="position:absolute;top:4px;z-index:10;pointer-events:none;white-space:nowrap;padding:4px 8px;font-variant-numeric:tabular-nums;background:var(--nish-elevated);border:1px solid var(--nish-line-strong);border-radius:var(--nish-radius-sm);box-shadow:var(--nish-shadow-pop);color:var(--nish-hi);font-size:12px",Wt=class extends K{static properties={...K.properties,data:{converter:wt},series:{converter:wt},area:{type:Boolean,reflect:!0},baseline:{type:Number,reflect:!0},yTicks:{type:Number,attribute:"y-ticks",reflect:!0},xTicks:{type:Number,attribute:"x-ticks",reflect:!0},active:{state:!0}};fromKey=!1;listening=!1;gradId=vn();constructor(){super(),this.data=[],this.series=[],this.area=!1,this.height=200,this.yTicks=4,this.xTicks=4,this.active=null}onDocPointerDown=t=>{this.contains(t.target)||(this.active=null)};disconnectedCallback(){super.disconnectedCallback(),this.stopListening()}stopListening(){this.listening&&(document.removeEventListener("pointerdown",this.onDocPointerDown),this.listening=!1)}updated(){this.active!=null&&!this.listening?(document.addEventListener("pointerdown",this.onDocPointerDown),this.listening=!0):this.active==null&&this.stopListening()}lines(){let t=_n(this.series);if(t.length)return t;let e=fe(this.data);return e.length?[{label:this.label,tone:this.tone||void 0,points:e}]:[]}moveTo(t,e,s,r,i,o,h){let l=e.getBoundingClientRect(),u=o+(t-l.left-r)/(i||1)*(h-o);this.active=yn(s,u)}render(){let t=it(),e=this.label,s=this.plotHeight,r=this.lines(),i=ot(this.yFormat),o=ot(this.xFormat),h=a=>a.y!=null&&Number.isFinite(a.y)&&Number.isFinite(a.x),l=new Set;for(let a of r)for(let p of a.points)h(p)&&l.add(p.x);let u=[...l].sort((a,p)=>a-p);if(!u.length)return w`<div class="nish-chart">
34
+ <div class="nish-empty" role="img" aria-label=${t.noDataNamed(e)} style="height:${s}px;box-sizing:border-box">${this.empty||t.noDataYet}</div>
35
+ </div>`;let g=r.map(a=>new Map(a.points.filter(h).map(p=>[p.x,p.y]))),c=1/0,y=-1/0;for(let a of r)for(let p of a.points)h(p)&&(c=Math.min(c,p.y),y=Math.max(y,p.y));let _=this.baseline!=null&&Number.isFinite(this.baseline)?this.baseline:void 0;_!==void 0&&(c=Math.min(c,_),y=Math.max(y,_)),[c,y]=gn(c,y);let $=u[0],C=u[u.length-1]===$?$+1:u[u.length-1],m=this.width,A=me(c,y,this.yTicks||4).map(a=>({v:a,text:i(a)})),S=Math.ceil(Math.max(...A.map(a=>a.text.length))*6.6)+10,N=Math.max(0,m-S-fs),et=Math.max(0,s-zt-ms),I=a=>S+(a-$)/(C-$)*N,O=a=>zt+(1-(a-c)/(y-c))*et,at=zt+et,At=r.map(a=>{let p=[],E=[];for(let jt of[...a.points].sort((An,Rn)=>An.x-Rn.x))h(jt)?E.push([Number(I(jt.x).toFixed(1)),Number(O(jt.y).toFixed(1))]):(E.length&&p.push(E),E=[]);return E.length&&p.push(E),p}),d=a=>a.map(p=>`${p[0]},${p[1]}`).join(" "),v=Math.min(this.xTicks||4,Math.max(2,Math.floor(N/72))),M=me($,C,v),z=this.active!=null&&this.active<u.length?this.active:null,P=z!=null?u[z]:null,k=P!=null?I(P):0,Rt=P!=null?r.map((a,p)=>({s:a,i:p,y:g[p].get(P)})).filter(a=>a.y!=null):[],Sn=k<m/2,ge=a=>{this.fromKey=!1,this.moveTo(a.clientX,a.currentTarget,u,S,N,$,C)},En=a=>{if(a.key==="ArrowLeft"||a.key==="ArrowRight"){a.preventDefault(),this.fromKey=!0;let p=a.key==="ArrowRight"?1:-1,E=this.active;this.active=E==null?p>0?0:u.length-1:Math.min(u.length-1,Math.max(0,E+p))}else a.key==="Escape"&&(this.active=null)},ye=r[0],_e=B(ye?.tone,0),xn=m>0?w`<svg
36
+ width=${m}
37
+ height=${s}
38
38
  role="img"
39
39
  tabindex="0"
40
40
  aria-label=${e}
41
41
  style="display:block;touch-action:pan-y"
42
- @pointerdown=${at}
43
- @pointermove=${at}
42
+ @pointerdown=${ge}
43
+ @pointermove=${ge}
44
44
  @pointerleave=${a=>{a.pointerType==="mouse"&&(this.active=null)}}
45
- @keydown=${sn}
45
+ @keydown=${En}
46
46
  @blur=${()=>{this.fromKey&&(this.active=null)}}
47
47
  >
48
- ${this.area&&lt?T`<defs><linearGradient id=${this.gradId} x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color=${ht} stop-opacity="0.2"></stop><stop offset="100%" stop-color=${ht} stop-opacity="0"></stop></linearGradient></defs>`:f}
49
- ${g.map(a=>T`<g>
50
- <line class="nish-chart-grid" x1=${y} x2=${y+M} y1=${L(a.v)} y2=${L(a.v)} stroke=${k.grid} stroke-width="1"></line>
51
- <text class="nish-chart-axis" x=${y-6} y=${L(a.v)} text-anchor="end" dominant-baseline="middle" font-size="11" fill=${k.text} style="font-variant-numeric:tabular-nums">${a.text}</text>
48
+ ${this.area&&ye?T`<defs><linearGradient id=${this.gradId} x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color=${_e} stop-opacity="0.2"></stop><stop offset="100%" stop-color=${_e} stop-opacity="0"></stop></linearGradient></defs>`:f}
49
+ ${A.map(a=>T`<g>
50
+ <line class="nish-chart-grid" x1=${S} x2=${S+N} y1=${O(a.v)} y2=${O(a.v)} stroke=${D.grid} stroke-width="1"></line>
51
+ <text class="nish-chart-axis" x=${S-6} y=${O(a.v)} text-anchor="end" dominant-baseline="middle" font-size="11" fill=${D.text} style="font-variant-numeric:tabular-nums">${a.text}</text>
52
52
  </g>`)}
53
- ${C.map((a,d)=>T`<text class="nish-chart-axis" x=${U(a)} y=${t-6} text-anchor=${d===0?"start":d===C.length-1?"end":"middle"} font-size="11" fill=${k.text} style="font-variant-numeric:tabular-nums">${r(a)}</text>`)}
54
- ${_!==void 0?T`<line x1=${y} x2=${y+M} y1=${L(_)} y2=${L(_)} stroke=${k.zero} stroke-width="1" stroke-dasharray="4 4"></line>`:f}
55
- ${this.area?($e[0]??[]).map(a=>T`<polygon points="${a[0][0]},${se} ${u(a)} ${a[a.length-1][0]},${se}" fill="url(#${this.gradId})"></polygon>`):f}
56
- ${$e.map((a,d)=>a.map(E=>E.length===1?T`<circle cx=${E[0][0]} cy=${E[0][1]} r="2" fill=${F(n[d].tone,d)}></circle>`:T`<polyline points=${u(E)} fill="none" stroke=${F(n[d].tone,d)} stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></polyline>`))}
57
- ${N!=null?T`<g pointer-events="none">
58
- <line x1=${D} x2=${D} y1=${Ue} y2=${se} stroke=${k.axis} stroke-width="1"></line>
59
- ${Se.map(a=>T`<circle cx=${D} cy=${L(a.y)} r="4" fill=${F(a.s.tone,a.i)} stroke="var(--nish-surface)" stroke-width="2"></circle>`)}
53
+ ${M.map((a,p)=>T`<text class="nish-chart-axis" x=${I(a)} y=${s-6} text-anchor=${p===0?"start":p===M.length-1?"end":"middle"} font-size="11" fill=${D.text} style="font-variant-numeric:tabular-nums">${o(a)}</text>`)}
54
+ ${_!==void 0?T`<line x1=${S} x2=${S+N} y1=${O(_)} y2=${O(_)} stroke=${D.zero} stroke-width="1" stroke-dasharray="4 4"></line>`:f}
55
+ ${this.area?(At[0]??[]).map(a=>T`<polygon points="${a[0][0]},${at} ${d(a)} ${a[a.length-1][0]},${at}" fill="url(#${this.gradId})"></polygon>`):f}
56
+ ${At.map((a,p)=>a.map(E=>E.length===1?T`<circle cx=${E[0][0]} cy=${E[0][1]} r="2" fill=${B(r[p].tone,p)}></circle>`:T`<polyline points=${d(E)} fill="none" stroke=${B(r[p].tone,p)} stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></polyline>`))}
57
+ ${P!=null?T`<g pointer-events="none">
58
+ <line x1=${k} x2=${k} y1=${zt} y2=${at} stroke=${D.axis} stroke-width="1"></line>
59
+ ${Rt.map(a=>T`<circle cx=${k} cy=${O(a.y)} r="4" fill=${B(a.s.tone,a.i)} stroke="var(--nish-surface)" stroke-width="2"></circle>`)}
60
60
  </g>`:f}
61
- </svg>`:f,on=N!=null&&S>0?w`<div class="nish-chart-tooltip" style="${Pn};${nn?`left:${D+10}px`:`right:${S-D+10}px`}">
62
- <div style="color:var(--nish-hi3)">${r(N)}</div>
63
- ${Se.map(a=>w`<div style="display:flex;align-items:center;gap:6px">
64
- <span aria-hidden="true" style="display:inline-block;width:8px;height:8px;border-radius:50%;background:${F(a.s.tone,a.i)}"></span>
65
- ${n.length>1?w`<span style="color:var(--nish-hi3)">${a.s.label}</span>`:f}
66
- <span style="font-weight:500">${s(a.y)}</span>
61
+ </svg>`:f,wn=P!=null&&m>0?w`<div class="nish-chart-tooltip" style="${gs};${Sn?`left:${k+10}px`:`right:${m-k+10}px`}">
62
+ <div style="color:var(--nish-hi3)">${o(P)}</div>
63
+ ${Rt.map(a=>w`<div style="display:flex;align-items:center;gap:6px">
64
+ <span aria-hidden="true" style="display:inline-block;width:8px;height:8px;border-radius:50%;background:${B(a.s.tone,a.i)}"></span>
65
+ ${r.length>1?w`<span style="color:var(--nish-hi3)">${a.s.label}</span>`:f}
66
+ <span style="font-weight:500">${i(a.y)}</span>
67
67
  </div>`)}
68
68
  </div>`:f;return w`<div class="nish-chart" style="position:relative;width:100%;user-select:none">
69
- <div style="position:relative;height:${t}px">
70
- ${rn}${on}
71
- <table style=${Oe}>
69
+ <div style="position:relative;height:${s}px">
70
+ ${xn}${wn}
71
+ <table style=${Ht}>
72
72
  <caption>${e}</caption>
73
73
  <thead>
74
74
  <tr>
75
75
  <th scope="col">x</th>
76
- ${n.map(a=>w`<th scope="col">${a.label}</th>`)}
76
+ ${r.map(a=>w`<th scope="col">${a.label}</th>`)}
77
77
  </tr>
78
78
  </thead>
79
79
  <tbody>
80
- ${l.slice(0,200).map(a=>w`<tr>
81
- <th scope="row">${r(a)}</th>
82
- ${n.map((d,E)=>w`<td>${p[E].has(a)?s(p[E].get(a)):""}</td>`)}
80
+ ${u.slice(0,200).map(a=>w`<tr>
81
+ <th scope="row">${o(a)}</th>
82
+ ${r.map((p,E)=>w`<td>${g[E].has(a)?i(g[E].get(a)):""}</td>`)}
83
83
  </tr>`)}
84
84
  </tbody>
85
85
  </table>
86
86
  </div>
87
- ${n.length>1?w`<ul class="nish-legend" aria-label="Legend">
88
- ${n.map((a,d)=>w`<li class="nish-legend-item" style="--c: ${F(a.tone,d)}"><i class="nish-legend-swatch" aria-hidden="true"></i>${a.label}</li>`)}
87
+ ${r.length>1?w`<ul class="nish-legend" aria-label=${t.legend}>
88
+ ${r.map((a,p)=>w`<li class="nish-legend-item" style="--c: ${B(a.tone,p)}"><i class="nish-legend-swatch" aria-hidden="true"></i>${a.label}</li>`)}
89
89
  </ul>`:f}
90
- </div>`}};ye("nish-line-chart",De);export{ke as NishBarChart,be as NishElement,De as NishLineChart,ye as define};
90
+ </div>`}};St("nish-line-chart",Wt);export{Bt as NishBarChart,$t as NishElement,Wt as NishLineChart,Kn as configureStrings,St as define};
91
91
  /*! Bundled license information:
92
92
 
93
93
  @lit-labs/ssr-dom-shim/lib/element-internals.js:
@@ -129,4 +129,3 @@ lit-html/node/is-server.js:
129
129
  * SPDX-License-Identifier: BSD-3-Clause
130
130
  *)
131
131
  */
132
- //# sourceMappingURL=elements-charts.js.map
@@ -8,6 +8,77 @@ export declare class NishElement extends HTMLElement {
8
8
  requestUpdate(): void;
9
9
  }
10
10
 
11
+ /** The words the custom elements show. Key names match `NishStrings` (the React side) where the
12
+ * same text exists there. */
13
+ export interface NishElementStrings {
14
+ /** nish-command-palette, nish-filter-bar: close button label. */
15
+ close: string;
16
+ /** nish-search (default placeholder and aria-label), nish-command-palette (dialog name). */
17
+ search: string;
18
+ /** nish-command-palette: input placeholder and its accessible name. */
19
+ searchPlaceholder: string;
20
+ /** nish-command-palette: nothing found. */
21
+ noResults: string;
22
+ /** nish-command-palette: listbox label. */
23
+ results: string;
24
+ /** nish-command-palette, nish-combobox: live-region text for a count of matches. */
25
+ resultCount: (count: number) => string;
26
+ /** nish-combobox: empty list. */
27
+ noMatches: string;
28
+ /** nish-combobox: loading row and live-region text. */
29
+ searching: string;
30
+ /** nish-search, nish-combobox, nish-filter-bar: clear button. */
31
+ clear: string;
32
+ /** nish-copy-button: idle label. */
33
+ copy: string;
34
+ /** nish-copy-button: label after copying. */
35
+ copied: string;
36
+ /** nish-copy-button: label while the clipboard is refused and the text is selected. */
37
+ copyManual: string;
38
+ /** nish-field: tag for a non-required field. */
39
+ optional: string;
40
+ /** nish-bottom-nav, nish-nav-rail, nish-section-nav: default landmark label. */
41
+ sections: string;
42
+ /** nish-filter-bar: sheet title and the button that opens it. */
43
+ filters: string;
44
+ /** nish-filter-bar: wide-layout clear button. */
45
+ clearFilters: string;
46
+ /** nish-filter-bar: sheet button that closes it. */
47
+ showResults: string;
48
+ /** nish-filter-bar: label of the active-filter count badge. */
49
+ activeCount: (count: number) => string;
50
+ /** nish-chip-group: remove button without a chip name. */
51
+ remove: string;
52
+ /** nish-chip-group: remove button for a named chip. */
53
+ removeNamed: (name: string) => string;
54
+ /** nish-split: divider label in a row split. */
55
+ resizeColumns: string;
56
+ /** nish-split: divider label in a column split. */
57
+ resizeRows: string;
58
+ /** nish-line-chart: legend landmark. */
59
+ legend: string;
60
+ /** nish-line-chart, nish-bar-chart: text of the empty state. */
61
+ noDataYet: string;
62
+ /** nish-line-chart, nish-bar-chart, nish-sparkline: accessible name of a chart with no data. */
63
+ noDataNamed: (label: string) => string;
64
+ /** nish-line-chart: name of a series without a label (1-based position). */
65
+ seriesNumber: (n: number) => string;
66
+ /** nish-sparkline: accessible name when no `label` is set. */
67
+ trend: string;
68
+ /** nish-theme-toggle: name of the system mode. */
69
+ themeSystem: string;
70
+ /** nish-theme-toggle: name of the light mode. */
71
+ themeLight: string;
72
+ /** nish-theme-toggle: name of the dark mode. */
73
+ themeDark: string;
74
+ }
75
+
76
+ /** Set the words the elements show, once, for the whole page (one store shared by every entry and
77
+ * every copy of the package). Keys you leave out keep their current value (English by default).
78
+ * Elements already on the page update at once. A per-element attribute (`label`, `placeholder`,
79
+ * `empty-text`, ...) always wins over a configured string. */
80
+ export declare function configureStrings(partial: Partial<NishElementStrings>): void;
81
+
11
82
  /** Register a custom element unless the tag is already defined. */
12
83
  export declare function define(tag: string, ctor: CustomElementConstructor): void;
13
84