@oliasoft-open-source/charts-library 5.1.1 → 5.1.2-beta-2
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.
- package/dist/assets/{Color-YHDXOIA2-BMZgyHAN.js → Color-YHDXOIA2-D1T4LLq8.js} +1 -1
- package/dist/assets/{DocsRenderer-CFRXHY34-CbvfojdO.js → DocsRenderer-CFRXHY34-D6Q7Fl4L.js} +4 -4
- package/dist/assets/bar-chart.stories-5CuN6VFG.js +136 -0
- package/dist/assets/chunk-XP5HYGXS-D5tuasO7.js +1 -0
- package/dist/assets/{client-9BU5HM4U.js → client-DnE3718B.js} +1 -1
- package/dist/assets/entry-preview-D2nZ6Uy3.js +2 -0
- package/dist/assets/{entry-preview-docs-z3mMcuG4.js → entry-preview-docs-Cet2djRm.js} +1 -1
- package/dist/assets/{get-draggableData-6sYCK0Sg.js → get-draggableData-eD2Xdq-6.js} +2 -2
- package/dist/assets/{iframe-BMP-xuj2.js → iframe-BRmCfBZj.js} +15 -15
- package/dist/assets/{index-D3-0uUTW.js → index-BhTLYoCu.js} +1 -1
- package/dist/assets/{index-B-BONL6g.js → index-CgYGpm1H.js} +1 -1
- package/dist/assets/index-DHw5ixvP.js +1 -0
- package/dist/assets/index-YTOF1_EJ.js +9 -0
- package/dist/assets/{index-CVdx34fM.js → index-uDG1oqxT.js} +1 -1
- package/dist/assets/jsx-runtime-W3oueGCa.js +9 -0
- package/dist/assets/legend-Cgq98xea.js +1367 -0
- package/dist/assets/{legend-context-CuYQJx0k.js → legend-context-PSa8HhGj.js} +22 -22
- package/dist/assets/line-chart-DQPiqg-c.js +1 -0
- package/dist/assets/{line-chart.stories-CCmSDSVh.js → line-chart.stories-yZbOjEZw.js} +16 -13
- package/dist/assets/{line-chart.test-case.stories-tBreUWeJ.js → line-chart.test-case.stories-KRbhVyto.js} +1 -1
- package/dist/assets/{pie-chart.stories-cGmfyrjX.js → pie-chart.stories-C3l9VGYJ.js} +1 -1
- package/dist/assets/{preview-DjxCxm3j.js → preview-OTEdgn42.js} +2 -2
- package/dist/assets/{preview-cjTsgsnd.js → preview-THptAU8l.js} +1 -1
- package/dist/assets/{react-18-DZY5LW1V.js → react-18-BdgjDjvZ.js} +1 -1
- package/dist/assets/{scatter-chart.stories-BK0zwTCK.js → scatter-chart.stories-U-tLziOZ.js} +6 -6
- package/dist/assets/test-utils-BBHUGUfi.js +9 -0
- package/dist/iframe.html +1 -1
- package/dist/index.js +34 -110
- package/dist/line-chart/hooks/use-chart-state.d.ts +1 -5
- package/dist/line-chart/state/initial-state.d.ts +0 -3
- package/dist/line-chart/utils/axis-scales/axis-scales.d.ts +1 -3
- package/dist/line-chart/utils/line-chart-utils.d.ts +6 -1
- package/dist/project.json +1 -1
- package/dist/sb-manager/globals-runtime.js +1 -1
- package/dist/src/components/line-chart/hooks/use-chart-state.d.ts +1 -5
- package/dist/src/components/line-chart/utils/axis-scales/axis-scales.d.ts +1 -3
- package/dist/src/components/line-chart/utils/line-chart-utils.d.ts +6 -1
- package/package.json +1 -1
- package/dist/assets/bar-chart.stories-BxoeoHbp.js +0 -153
- package/dist/assets/entry-preview-BsyjCx5f.js +0 -10
- package/dist/assets/index-BGqSdrBK.js +0 -1
- package/dist/assets/index-eCxJ45ll.js +0 -9
- package/dist/assets/jsx-runtime-Y5Ju2SGo.js +0 -9
- package/dist/assets/legend-DOpGXAxK.js +0 -1346
- package/dist/assets/line-chart-BWgI7lqL.js +0 -1
- package/dist/assets/react-CxVRKATl.js +0 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import{j as S}from"./jsx-runtime-W3oueGCa.js";import{r as Me}from"./index-YTOF1_EJ.js";import{g as hr}from"./get-custom-legend-plugin-example-Bx2dNJXg.js";import{h as Gn,w as fr,C as V,g as Zn,x as pr,y as mr,z as Ue,B as k,S as we,E as br,F as xr,A as z,G as Ie,H as Ke,I as vr,T as yr,L as Je,a as _r,J as qn,K as Ar,M as Qe,d as Cr,r as Sr,N as wr,O as Lr,f as Br,P as kr,b as Pr,s as Dr,Q as Tr,R as jr,U as Er,i as Nr,V as Or,W as Mr,j as Ir,k as Rr,X as Hr,p as zr,m as Xr,n as Yr,o as Wr,q as Ur,t as $r}from"./legend-context-PSa8HhGj.js";import{u as Vr,j as Fr,t as Gr,k as Zr,B as qr,l as Kr,H as Jr,L as Qr,m as ea,n as ta}from"./legend-Cgq98xea.js";import{f as et,a as na,b as ra,C as aa,c as sa}from"./get-draggableData-eD2Xdq-6.js";import{D as oa,a as ia}from"./bar-chart-const-Cgj9sgUU.js";import"./index-CgYGpm1H.js";import"./index-DHw5ixvP.js";import"./index-BhTLYoCu.js";var la={value:()=>{}};function Kn(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new ke(r)}function ke(e){this._=e}function ca(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",s=n.indexOf(".");if(s>=0&&(r=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}function ua(e,t){for(var n,r=0,s=e.length;r<s;++r)if((n=e[r]).name===t)return n.value}function tt(e,t,n){for(var r=0,s=e.length;r<s;++r)if(e[r].name===t){e[r]=la,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}ke.prototype=Kn.prototype={constructor:ke,on:function(e,t){var n,r=this._,s=ca(e+"",r),a=-1,o=s.length;if(!(arguments.length<2)){if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(n=(e=s[a]).type)r[n]=tt(r[n],e.name,t);else if(t==null)for(n in r)r[n]=tt(r[n],e.name,null);return this}for(;++a<o;)if((n=(e=s[a]).type)&&(n=ua(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ke(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,s=new Array(n),a=0;a<n;++a)s[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,s)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],s=0,a=r.length;s<a;++s)r[s].value.apply(t,n)}};var Re="http://www.w3.org/1999/xhtml",nt={svg:"http://www.w3.org/2000/svg",xhtml:Re,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jn(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nt.hasOwnProperty(t)?{space:nt[t],local:e}:e}function da(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Re&&t.documentElement.namespaceURI===Re?t.createElement(e):t.createElementNS(n,e)}}function ga(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rt(e){var t=Jn(e);return(t.local?ga:da)(t)}function ha(){}function at(e){return e==null?ha:function(){return this.querySelector(e)}}function fa(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function pa(){return[]}function st(e){return function(t){return t.matches(e)}}var ma=Array.prototype.find;function ba(){return this.firstElementChild}var xa=Array.prototype.filter;function va(){return Array.from(this.children)}function ot(e){return new Array(e.length)}function Pe(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function ya(e){return function(){return e}}function _a(e,t,n,r,s,a){for(var o,i=0,l=t.length,c=a.length;i<c;++i)(o=t[i])?(o.__data__=a[i],r[i]=o):n[i]=new Pe(e,a[i]);for(;i<l;++i)(o=t[i])&&(s[i]=o)}function Aa(e,t,n,r,s,a,o){var i,l,c,d=new Map,h=t.length,g=a.length,b=new Array(h);for(i=0;i<h;++i)(l=t[i])&&(b[i]=c=o.call(l,l.__data__,i,t)+"",d.has(c)?s[i]=l:d.set(c,l));for(i=0;i<g;++i)c=o.call(e,a[i],i,a)+"",(l=d.get(c))?(r[i]=l,l.__data__=a[i],d.delete(c)):n[i]=new Pe(e,a[i]);for(i=0;i<h;++i)(l=t[i])&&d.get(b[i])===l&&(s[i]=l)}function Ca(e){return e.__data__}function Sa(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function wa(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function La(e){return function(){this.removeAttribute(e)}}function Ba(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ka(e,t){return function(){this.setAttribute(e,t)}}function Pa(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Da(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ta(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Qn(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ja(e){return function(){this.style.removeProperty(e)}}function Ea(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Na(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Oa(e,t){return e.style.getPropertyValue(t)||Qn(e).getComputedStyle(e,null).getPropertyValue(t)}function Ma(e){return function(){delete this[e]}}function Ia(e,t){return function(){this[e]=t}}function Ra(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function er(e){return e.trim().split(/^|\s+/)}function $e(e){return e.classList||new tr(e)}function tr(e){this._node=e,this._names=er(e.getAttribute("class")||"")}function nr(e,t){for(var n=$e(e),r=-1,s=t.length;++r<s;)n.add(t[r])}function rr(e,t){for(var n=$e(e),r=-1,s=t.length;++r<s;)n.remove(t[r])}function Ha(e){return function(){nr(this,e)}}function za(e){return function(){rr(this,e)}}function Xa(e,t){return function(){(t.apply(this,arguments)?nr:rr)(this,e)}}function Ya(){this.textContent=""}function Wa(e){return function(){this.textContent=e}}function Ua(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function $a(){this.innerHTML=""}function Va(e){return function(){this.innerHTML=e}}function Fa(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ga(){this.nextSibling&&this.parentNode.appendChild(this)}function Za(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qa(){return null}function Ka(){var e=this.parentNode;e&&e.removeChild(this)}function Ja(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Qa(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function es(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function ts(e){return function(){var t=this.__on;if(t){for(var n,r=0,s=-1,a=t.length;r<a;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++s]=n:this.removeEventListener(n.type,n.listener,n.options);++s?t.length=s:delete this.__on}}}function ns(e,t,n){return function(){var r,s=this.__on,a=function(l){return function(c){l.call(this,c,this.__data__)}}(t);if(s){for(var o=0,i=s.length;o<i;++o)if((r=s[o]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=t)}this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},s?s.push(r):this.__on=[r]}}function ar(e,t,n){var r=Qn(e),s=r.CustomEvent;typeof s=="function"?s=new s(t,n):(s=r.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function rs(e,t){return function(){return ar(this,e,t)}}function as(e,t){return function(){return ar(this,e,t.apply(this,arguments))}}Pe.prototype={constructor:Pe,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},tr.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var ss=[null];function j(e,t){this._groups=e,this._parents=t}function G(e){return typeof e=="string"?new j([[document.querySelector(e)]],[document.documentElement]):new j([[e]],ss)}function it(e,t){if(e=function(a){let o;for(;o=a.sourceEvent;)a=o;return a}(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}j.prototype={constructor:j,select:function(e){typeof e!="function"&&(e=at(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var a,o,i=t[s],l=i.length,c=r[s]=new Array(l),d=0;d<l;++d)(a=i[d])&&(o=e.call(a,a.__data__,d,i))&&("__data__"in a&&(o.__data__=a.__data__),c[d]=o);return new j(r,this._parents)},selectAll:function(e){e=typeof e=="function"?function(d){return function(){return fa(d.apply(this,arguments))}}(e):function(d){return d==null?pa:function(){return this.querySelectorAll(d)}}(e);for(var t=this._groups,n=t.length,r=[],s=[],a=0;a<n;++a)for(var o,i=t[a],l=i.length,c=0;c<l;++c)(o=i[c])&&(r.push(e.call(o,o.__data__,c,i)),s.push(o));return new j(r,s)},selectChild:function(e){return this.select(e==null?ba:function(t){return function(){return ma.call(this.children,t)}}(typeof e=="function"?e:st(e)))},selectChildren:function(e){return this.selectAll(e==null?va:function(t){return function(){return xa.call(this.children,t)}}(typeof e=="function"?e:st(e)))},filter:function(e){typeof e!="function"&&(e=function(d){return function(){return this.matches(d)}}(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var a,o=t[s],i=o.length,l=r[s]=[],c=0;c<i;++c)(a=o[c])&&e.call(a,a.__data__,c,o)&&l.push(a);return new j(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Ca);var n=t?Aa:_a,r=this._parents,s=this._groups;typeof e!="function"&&(e=ya(e));for(var a=s.length,o=new Array(a),i=new Array(a),l=new Array(a),c=0;c<a;++c){var d=r[c],h=s[c],g=h.length,b=Sa(e.call(d,d&&d.__data__,c,r)),p=b.length,C=i[c]=new Array(p),w=o[c]=new Array(p),L=l[c]=new Array(g);n(d,h,C,w,L,b,t);for(var P,v,u=0,m=0;u<p;++u)if(P=C[u]){for(u>=m&&(m=u+1);!(v=w[m])&&++m<p;);P._next=v||null}}return(o=new j(o,r))._enter=i,o._exit=l,o},enter:function(){return new j(this._enter||this._groups.map(ot),this._parents)},exit:function(){return new j(this._exit||this._groups.map(ot),this._parents)},join:function(e,t,n){var r=this.enter(),s=this,a=this.exit();return typeof e=="function"?(r=e(r))&&(r=r.selection()):r=r.append(e+""),t!=null&&(s=t(s))&&(s=s.selection()),n==null?a.remove():n(a),r&&s?r.merge(s).order():s},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,s=n.length,a=r.length,o=Math.min(s,a),i=new Array(s),l=0;l<o;++l)for(var c,d=n[l],h=r[l],g=d.length,b=i[l]=new Array(g),p=0;p<g;++p)(c=d[p]||h[p])&&(b[p]=c);for(;l<s;++l)i[l]=n[l];return new j(i,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,s=e[t],a=s.length-1,o=s[a];--a>=0;)(r=s[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(h,g){return h&&g?e(h.__data__,g.__data__):!h-!g}e||(e=wa);for(var n=this._groups,r=n.length,s=new Array(r),a=0;a<r;++a){for(var o,i=n[a],l=i.length,c=s[a]=new Array(l),d=0;d<l;++d)(o=i[d])&&(c[d]=o);c.sort(t)}return new j(s,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,a=r.length;s<a;++s){var o=r[s];if(o)return o}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var s,a=t[n],o=0,i=a.length;o<i;++o)(s=a[o])&&e.call(s,s.__data__,o,a);return this},attr:function(e,t){var n=Jn(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Ba:La:typeof t=="function"?n.local?Ta:Da:n.local?Pa:ka)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((t==null?ja:typeof t=="function"?Na:Ea)(e,t,n??"")):Oa(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((t==null?Ma:typeof t=="function"?Ra:Ia)(e,t)):this.node()[e]},classed:function(e,t){var n=er(e+"");if(arguments.length<2){for(var r=$e(this.node()),s=-1,a=n.length;++s<a;)if(!r.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?Xa:t?Ha:za)(n,t))},text:function(e){return arguments.length?this.each(e==null?Ya:(typeof e=="function"?Ua:Wa)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(e==null?$a:(typeof e=="function"?Fa:Va)(e)):this.node().innerHTML},raise:function(){return this.each(Ga)},lower:function(){return this.each(Za)},append:function(e){var t=typeof e=="function"?e:rt(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n=typeof e=="function"?e:rt(e),r=t==null?qa:typeof t=="function"?t:at(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Ka)},clone:function(e){return this.select(e?Qa:Ja)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,s,a=es(e+""),o=a.length;if(!(arguments.length<2)){for(i=t?ns:ts,r=0;r<o;++r)this.each(i(a[r],t,n));return this}var i=this.node().__on;if(i){for(var l,c=0,d=i.length;c<d;++c)for(r=0,l=i[c];r<o;++r)if((s=a[r]).type===l.type&&s.name===l.name)return l.value}},dispatch:function(e,t){return this.each((typeof t=="function"?as:rs)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,s=e[t],a=0,o=s.length;a<o;++a)(r=s[a])&&(yield r)}};const os={passive:!1},F={capture:!0,passive:!1};function Ne(e){e.stopImmediatePropagation()}function U(e){e.preventDefault(),e.stopImmediatePropagation()}var Le=e=>()=>e;function He(e,{sourceEvent:t,subject:n,target:r,identifier:s,active:a,x:o,y:i,dx:l,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:i,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}function is(e){return!e.ctrlKey&&!e.button}function ls(){return this.parentNode}function cs(e,t){return t??{x:e.x,y:e.y}}function us(){return navigator.maxTouchPoints||"ontouchstart"in this}function ds(){var e,t,n,r,s=is,a=ls,o=cs,i=us,l={},c=Kn("start","drag","end"),d=0,h=0;function g(u){u.on("mousedown.drag",b).filter(i).on("touchstart.drag",w).on("touchmove.drag",L,os).on("touchend.drag touchcancel.drag",P).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(u,m){if(!r&&s.call(this,u,m)){var f=v(this,a.call(this,u,m),u,m,"mouse");f&&(G(u.view).on("mousemove.drag",p,F).on("mouseup.drag",C,F),function(x){var y=x.document.documentElement,E=G(x).on("dragstart.drag",U,F);"onselectstart"in y?E.on("selectstart.drag",U,F):(y.__noselect=y.style.MozUserSelect,y.style.MozUserSelect="none")}(u.view),Ne(u),n=!1,e=u.clientX,t=u.clientY,f("start",u))}}function p(u){if(U(u),!n){var m=u.clientX-e,f=u.clientY-t;n=m*m+f*f>h}l.mouse("drag",u)}function C(u){G(u.view).on("mousemove.drag mouseup.drag",null),function(m,f){var x=m.document.documentElement,y=G(m).on("dragstart.drag",null);f&&(y.on("click.drag",U,F),setTimeout(function(){y.on("click.drag",null)},0)),"onselectstart"in x?y.on("selectstart.drag",null):(x.style.MozUserSelect=x.__noselect,delete x.__noselect)}(u.view,n),U(u),l.mouse("end",u)}function w(u,m){if(s.call(this,u,m)){var f,x,y=u.changedTouches,E=a.call(this,u,m),M=y.length;for(f=0;f<M;++f)(x=v(this,E,u,m,y[f].identifier,y[f]))&&(Ne(u),x("start",u,y[f]))}}function L(u){var m,f,x=u.changedTouches,y=x.length;for(m=0;m<y;++m)(f=l[x[m].identifier])&&(U(u),f("drag",u,x[m]))}function P(u){var m,f,x=u.changedTouches,y=x.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),m=0;m<y;++m)(f=l[x[m].identifier])&&(Ne(u),f("end",u,x[m]))}function v(u,m,f,x,y,E){var M,R,H,Y=c.copy(),D=it(E||f,m);if((H=o.call(u,new He("beforestart",{sourceEvent:f,target:g,identifier:y,active:d,x:D[0],y:D[1],dx:0,dy:0,dispatch:Y}),x))!=null)return M=H.x-D[0]||0,R=H.y-D[1]||0,function Ge(W,Ze,gr){var Ee,qe=D;switch(W){case"start":l[y]=Ge,Ee=d++;break;case"end":delete l[y],--d;case"drag":D=it(gr||Ze,m),Ee=d}Y.call(W,u,new He(W,{sourceEvent:Ze,subject:H,target:g,identifier:y,active:Ee,x:D[0]+M,y:D[1]+R,dx:D[0]-qe[0],dy:D[1]-qe[1],dispatch:Y}),x)}}return g.filter=function(u){return arguments.length?(s=typeof u=="function"?u:Le(!!u),g):s},g.container=function(u){return arguments.length?(a=typeof u=="function"?u:Le(u),g):a},g.subject=function(u){return arguments.length?(o=typeof u=="function"?u:Le(u),g):o},g.touchable=function(u){return arguments.length?(i=typeof u=="function"?u:Le(!!u),g):i},g.on=function(){var u=c.on.apply(c,arguments);return u===c?g:u},g.clickDistance=function(u){return arguments.length?(h=(u=+u)*u,g):Math.sqrt(h)},g}let T,O,N,I,De,sr,or,ir,$,X,lt;He.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};let ze=!1;function Te(e,t){return isNaN(t)?e:Math.round(e*Math.pow(10,t))/Math.pow(10,t)}function Xe(e,t,n,r,s){let a,o;const i=t.data.datasets[n].data[r];if(e.touches?(a=t.scales[N].getValueForPixel(e.touches[0].clientX-t.canvas.getBoundingClientRect().left),o=t.scales[O].getValueForPixel(e.touches[0].clientY-t.canvas.getBoundingClientRect().top)):(a=t.scales[N].getValueForPixel(e.clientX-t.canvas.getBoundingClientRect().left),o=t.scales[O].getValueForPixel(e.clientY-t.canvas.getBoundingClientRect().top)),a=Te(a,t.config.options.plugins.dragData.round),o=Te(o,t.config.options.plugins.dragData.round),a=a>t.scales[N].max?t.scales[N].max:a,a=a<t.scales[N].min?t.scales[N].min:a,o=o>t.scales[O].max?t.scales[O].max:o,o=o<t.scales[O].min?t.scales[O].min:o,or){let l;return l=t.config.options.indexAxis==="y"?a:o,Math.abs(l-i[0])<=Math.abs(l-i[1])?[l,i[1]]:[i[0],l]}return i.x!==void 0&&t.config.options.plugins.dragData.dragX&&(i.x=a),i.y!==void 0?(t.config.options.plugins.dragData.dragY!==!1&&(i.y=o),i):t.config.options.indexAxis==="y"?a:o}const gs=(e,t,n,r)=>{if(T){$=T.datasetIndex,X=T.index,ze=!0;let s=t.data.datasets[$].data[X];De==="radar"||De==="polarArea"?s=function(a,o){let i,l,c;a.touches?(i=a.touches[0].clientX-o.canvas.getBoundingClientRect().left,l=a.touches[0].clientY-o.canvas.getBoundingClientRect().top):(i=a.clientX-o.canvas.getBoundingClientRect().left,l=a.clientY-o.canvas.getBoundingClientRect().top);let d=o.scales[I],h=Math.sqrt(Math.pow(i-d.xCenter,2)+Math.pow(l-d.yCenter,2)),g=d.drawingArea/(d.max-d.min);return c=d.options.ticks.reverse?d.max-h/g:d.min+h/g,c=Te(c,o.config.options.plugins.dragData.round),c=c>o.scales[I].max?o.scales[I].max:c,c=c<o.scales[I].min?o.scales[I].min:c,c}(e,t):sr?s=Te(Xe(e,t,$,X)-ir,n.round):s=Xe(e,t,$,X),(!r||typeof r=="function"&&r(e,$,X,s)!==!1)&&(t.data.datasets[$].data[X]=s,t.update("none"))}},lr={id:"dragdata",afterInit:function(e){if(e.config.options.plugins&&e.config.options.plugins.dragData){const t=e.config.options.plugins.dragData;G(e.canvas).call(ds().container(e.canvas).on("start",n=>((r,s,a)=>{if(T=s.getElementsAtEventForMode(r,"nearest",{intersect:!0},!1)[0],De=s.config.type,T){let o=T.datasetIndex,i=T.index;lt=function(h){try{return h()}catch{return""}}(()=>s.config.options.plugins.tooltip.animation);const l=s.data.datasets[o],c=s.getDatasetMeta(o);let d=l.data[i];if(N=c.xAxisID,O=c.yAxisID,I=c.rAxisID,l.dragData===!1||s.config.options.scales[N]&&s.config.options.scales[N].dragData===!1||s.config.options.scales[O]&&s.config.options.scales[O].dragData===!1||s.config.options.scales[I]&&s.config.options.scales[I].rAxisID===!1||l.data[T.index].dragData===!1)return void(T=null);if(De==="bar"){sr=s.config.options.scales[N].stacked;const h=s.data.datasets[0].data[0];or=h!==null&&Array.isArray(h)&&h.length==2,ir=Xe(r,s,o,i)-d}(s.config.options.plugins.dragData.showTooltip===void 0||s.config.options.plugins.dragData.showTooltip)&&(s.config.options.plugins.tooltip||(s.config.options.plugins.tooltip={}),s.config.options.plugins.tooltip.animation=!1),typeof a=="function"&&T&&a(r,o,i,d)===!1&&(T=null)}})(n.sourceEvent,e,t.onDragStart)).on("drag",n=>gs(n.sourceEvent,e,t,t.onDrag)).on("end",n=>((r,s,a)=>{if(X=void 0,ze=!1,s.config.options.plugins.tooltip&&(s.config.options.plugins.tooltip.animation=lt,s.update("none")),typeof a=="function"&&T){const o=T.datasetIndex,i=T.index;let l=function(c,d,h){const g=c.config.options.plugins.dragData;if(!g.magnet)return c.data.datasets[d].data[h];{const b=g.magnet;if(b.to&&typeof b.to=="function"){let p=c.data.datasets[d].data[h];return p=b.to(p),c.data.datasets[d].data[h]=p,c.update("none"),p}}}(s,o,i);return a(r,o,i,l)}})(n.sourceEvent,e,t.onDragEnd)))}},beforeEvent:function(e){if(ze)return e.tooltip&&e.tooltip.update(),!1}};Gn.register(lr);const cr=(e,t)=>{var d;const{options:n}=t??{},{interactions:r}=n??{},[s,a]=Me.useState(!1),i=(({datasets:h,options:g})=>{const{annotations:{controlAnnotation:b,showAnnotations:p,annotationsData:C}={}}=g,w=b&&p&&(C!=null&&C.length)?C.map((v,u)=>({isAnnotation:!0,label:v==null?void 0:v.label,annotationIndex:u,backgroundColor:(v==null?void 0:v.color)||V[u],borderColor:(v==null?void 0:v.color)||V[u],data:[],type:fr.Bar})):[],L=[...h,...w];return(L==null?void 0:L.map((v,u)=>{var E;const m=V,f=(E=v==null?void 0:v.data)==null?void 0:E.map(M=>{const R=(h==null?void 0:h.length)>1?u:0;return(m==null?void 0:m[R])||Zn(V)}),x=(v==null?void 0:v.backgroundColor)||(f==null?void 0:f.map(M=>M+pr)),y="borderWidth"in L?{borderWidth:parseFloat(String(L==null?void 0:L.borderWidth))??1}:{};return{...v,...y,borderColor:(v==null?void 0:v.borderColor)||(f==null?void 0:f[u]),backgroundColor:x}}))||[]})({datasets:(d=t==null?void 0:t.data)==null?void 0:d.datasets,options:n}),l=(h,g,b)=>{b.resetZoom()},c=(h,g)=>{if(s&&!(g!=null&&g.length)&&(a(!1),r!=null&&r.onUnhover&&(r==null||r.onUnhover(h))),!s&&(g!=null&&g.length)&&(a(!0),r.onHover)){const{index:b,datasetIndex:p}=(g==null?void 0:g[0])??{},C=i;r==null||r.onHover(h,p,b,C)}};return Me.useMemo(()=>({generatedDatasets:i,onClick:l,onHover:c}),[e,t])},hs=(e,{stacked:t,stackedX:n,stackedY:r})=>e===k.X?n??t:e===k.Y?r??t:t,Ye=({chart:e,axisType:t=k.X,currentScale:n,i:r})=>{var b,p,C,w,L,P,v,u,m;const{data:s,options:a}=e??{},o=Ue(a.direction),i=n||((p=(b=a==null?void 0:a.axes)==null?void 0:b[t])==null?void 0:p[0]),l=o&&t===k.Y||!o&&t===k.X,c=(i==null?void 0:i.gridLines)||{},d=()=>{var y;const f=s.labels?we.Category:we.Linear,x=o?k.X:k.Y;return t===x?f:(y=a==null?void 0:a.additionalAxesOptions)==null?void 0:y.chartScaleType},h=()=>{var x;const f=o?k.Y:k.X;return t===f?(x=a==null?void 0:a.additionalAxesOptions)==null?void 0:x.reverse:!1},g=()=>{var H,Y;const f=a==null?void 0:a.additionalAxesOptions,x=(Y=(H=a==null?void 0:a.scales)==null?void 0:H[`${r===0?t:t+r}`])==null?void 0:Y.ticks,y=l&&(f==null?void 0:f.chartScaleType)===we.Logarithmic,E=(D,Ge,W)=>y?xr.includes(Number(D))?et(D,W):"":et(D,W),R={...y?{}:{stepSize:i.stepSize??(t===k.Y?f==null?void 0:f.stepSize:null)},includeBounds:!1,...x,font:{size:br}};return(f==null?void 0:f.chartScaleType)===we.Logarithmic&&(R.callback=E),R};return{type:d(),position:i==null?void 0:i.position,beginAtZero:(C=a==null?void 0:a.additionalAxesOptions)==null?void 0:C.beginAtZero,reverse:h(),suggestedMax:(w=a==null?void 0:a.additionalAxesOptions)==null?void 0:w.suggestedMax,suggestedMin:(L=a==null?void 0:a.additionalAxesOptions)==null?void 0:L.suggestedMin,min:l?(P=a==null?void 0:a.additionalAxesOptions)==null?void 0:P.min:void 0,max:l?(v=a==null?void 0:a.additionalAxesOptions)==null?void 0:v.max:void 0,title:{display:((u=i==null?void 0:i.label)==null?void 0:u.length)||((m=i==null?void 0:i.unit)==null?void 0:m.length),text:(i==null?void 0:i.label)||(i==null?void 0:i.unit),padding:0},ticks:g(),grid:{...c},stacked:hs(t,a==null?void 0:a.additionalAxesOptions)}},ct=(e,t)=>{var s,a;return(((a=(s=e==null?void 0:e.options)==null?void 0:s.axes)==null?void 0:a[t])||[]).reduce((o,i,l)=>{const c=i,d=i.color||V[l]||Zn(V);c.color=d,c.position=i.position||mr(t,l);const h=Ye({chart:e,axisType:t,currentScale:c}),g=l===0?t:`${t}${l+1}`;return{...o,[g]:h}},{})},fs=e=>{var a,o;const t=((a=e.options.axes.x)==null?void 0:a.length)>1,n=((o=e.options.axes.y)==null?void 0:o.length)>1,r=t?ct(e,k.X):{x:Ye({chart:e,axisType:k.X})},s=n?ct(e,k.Y):{y:Ye({chart:e,axisType:k.Y})};return{...r,...s}},ps=e=>{var o;const{beginAtZero:t,reverse:n}=(e==null?void 0:e.additionalAxesOptions)||{},r=(i,l)=>{const{datasetIndex:c,dataIndex:d}=l,g=l.chart.data.datasets[c].data[d];let b="";if(typeof g=="number"&&(b=Number.isInteger(g)?g:g.toFixed(2)),Array.isArray(g))if(g.length===2){const p=g[1]-g[0];b=p<0?Ke(p,2):`+${Ke(p,2)}`}else b=g.reduce((p,C,w)=>w===0?`${p} ${C}`:`${p}, ${C}`,"");return b},s=n?z.End:z.Start,a=n?z.Start:z.End;return(o=e==null?void 0:e.graph)!=null&&o.showDataLabels?{display:Ie,align:t?z.Center:s,anchor:t?z.Center:a,formatter:r}:{display:!1}},ms=e=>{var a;const t=o=>{var C,w;const i=Ue(e.direction),l=Array.isArray((C=e.axes)==null?void 0:C.x)?e.axes.x:[],c=Array.isArray((w=e.axes)==null?void 0:w.y)?e.axes.y:[],d=L=>{if(!L)return 0;const P=L.match(/\d+$/);return P?parseInt(P[0],10)-1:0},h=d(o==null?void 0:o.xAxisID),g=d(o==null?void 0:o.yAxisID),b=i?l[h]:c[g],p=i?c[g]:l[h];return{titleAxisLabel:(b==null?void 0:b.label)||"",valueAxisLabel:(p==null?void 0:p.label)||"",titleLabel:Qe.X,valueLabel:Qe.Y,titleUnit:(b==null?void 0:b.unit)||"",valueUnit:(p==null?void 0:p.unit)||""}},n=(o,i)=>{var b,p;const l=((b=o==null?void 0:o[0])==null?void 0:b.label)||"",c=t((p=o==null?void 0:o[0])==null?void 0:p.dataset),{titleAxisLabel:d,titleUnit:h}=c;return(!d&&!h?"":`${d||h}: `)+l},r=o=>{var l;let i={};return(l=e==null?void 0:e.tooltip)!=null&&l.scientificNotation?(Math.abs(o)<oa||Math.abs(o)>ia)&&(i={roundScientificCoefficient:3}):i={scientific:!1},Cr(Sr(o),i)},s=o=>{var P;const{showLabelsInTooltips:i=!1}=(e==null?void 0:e.tooltip)||{};let l=((P=o.dataset)==null?void 0:P.label)||"";const c=t(o.dataset),{valueUnit:d,valueAxisLabel:h}=c,g=()=>{const v=o==null?void 0:o.raw,u=typeof v=="number"?r(v):"";let m="";return typeof o.raw=="number"&&(m=u),Array.isArray(o.raw)?m=o.raw.reduce((f,x,y)=>y===0?`${f} ${x}`:`${f}, ${x}`,""):typeof o.raw=="object"&&(m=u),m},b=l===h||h.includes(l),p=g(),C=d?`[${d}] `:"",w=b?"":h,L=Ar(o,i);return`${l}: ${p} ${C}${w}${L}`};return{enabled:(a=e==null?void 0:e.tooltip)==null?void 0:a.tooltips,mode:qn.Nearest,intersect:!0,padding:_r,boxWidth:Je,boxHeight:Je,boxPadding:yr,callbacks:{title:n,label:s,afterLabel:vr}}},bs=({chart:e,chartRef:t})=>{const{options:n}=e,{chartStyling:r,dragData:s}=n,{state:a}=Vr(),{annotation:o}=a,{onClick:i,onHover:l}=cr(t,e),{legend:c,customLegendPlugin:d}=Fr({chartRef:t,options:n});return{onClick:i,onHover:l,indexAxis:Ue(n.direction)?k.X:k.Y,maintainAspectRatio:r.maintainAspectRatio,animation:r.performanceMode&&{duration:Br.FAST},hover:{mode:qn.Nearest,intersect:!0},scales:fs(e),plugins:{title:Lr(n),datalabels:ps(n),annotation:Gr(o),tooltip:ms(n),legend:{...c,display:!1,events:[]},customLegendPlugin:d,chartAreaBorder:{borderColor:wr},dragData:(s==null?void 0:s.enableDragData)&&na(n)}}},xs="_chart_x1sru_1",vs="_canvas_x1sru_10",ys="_fixedHeight_x1sru_19",_s="_stretchHeight_x1sru_25",As="_actions_x1sru_57",Oe={chart:xs,canvas:vs,fixedHeight:ys,stretchHeight:_s,actions:As},Cs=e=>({x:(e==null?void 0:e.x)||[{}],y:(e==null?void 0:e.y)||[{}]}),Ss=e=>({chartScaleType:(e==null?void 0:e.chartScaleType)||"linear",reverse:(e==null?void 0:e.reverse)||!1,stacked:(e==null?void 0:e.stacked)||!1,beginAtZero:(e==null?void 0:e.beginAtZero)??!0,stepSize:e==null?void 0:e.stepSize,suggestedMin:e==null?void 0:e.suggestedMin,suggestedMax:e==null?void 0:e.suggestedMax,min:e==null?void 0:e.min,max:e==null?void 0:e.max,stackedX:e==null?void 0:e.stackedX,stackedY:e==null?void 0:e.stackedY}),ws=e=>({width:e==null?void 0:e.width,height:e==null?void 0:e.height,maintainAspectRatio:(e==null?void 0:e.maintainAspectRatio)||!1,staticChartHeight:(e==null?void 0:e.staticChartHeight)||!1,performanceMode:(e==null?void 0:e.performanceMode)??!0}),Ls=e=>({tooltips:(e==null?void 0:e.tooltips)??!0,showLabelsInTooltips:(e==null?void 0:e.showLabelsInTooltips)||!1,scientificNotation:(e==null?void 0:e.scientificNotation)??!0}),Bs=e=>({showDataLabels:(e==null?void 0:e.showDataLabels)||!1,showMinorGridlines:(e==null?void 0:e.showMinorGridlines)||!1}),ks=e=>e?e.map(t=>({...t,display:(t==null?void 0:t.display)??!0})):[],Ps=e=>({showAnnotations:(e==null?void 0:e.showAnnotations)??!0,controlAnnotation:(e==null?void 0:e.controlAnnotation)||!1,annotationsData:ks(e==null?void 0:e.annotationsData)}),Ds=e=>({display:(e==null?void 0:e.display)??!0,position:(e==null?void 0:e.position)||kr.TopLeft,align:(e==null?void 0:e.align)||z.Center,customLegend:(e==null?void 0:e.customLegend)||{customLegendPlugin:null,customLegendContainerID:""}}),Ts=e=>({enableZoom:(e==null?void 0:e.enableZoom)||!1,enablePan:(e==null?void 0:e.enablePan)||!1}),js=e=>({onLegendClick:e==null?void 0:e.onLegendClick,onHover:e==null?void 0:e.onHover,onUnhover:e==null?void 0:e.onUnhover}),Es=e=>({enableDragData:(e==null?void 0:e.enableDragData)??!1,showTooltip:(e==null?void 0:e.showTooltip)??!0,roundPoints:(e==null?void 0:e.roundPoints)??!0,dragX:(e==null?void 0:e.dragX)??!0,dragY:(e==null?void 0:e.dragY)??!0,onDragStart:e==null?void 0:e.onDragStart,onDrag:e==null?void 0:e.onDrag,onDragEnd:e==null?void 0:e.onDragEnd}),ur=e=>{const t=(e==null?void 0:e.chart)||{},n=(t==null?void 0:t.options)||{};return{testId:(t==null?void 0:t.testId)??"",controlsPortalId:(t==null?void 0:t.controlsPortalId)??"",data:t==null?void 0:t.data,options:{title:(n==null?void 0:n.title)||"",direction:(n==null?void 0:n.direction)||"vertical",axes:Cs(n==null?void 0:n.axes),additionalAxesOptions:Ss(n==null?void 0:n.additionalAxesOptions),chartStyling:ws(n==null?void 0:n.chartStyling),tooltip:Ls(n==null?void 0:n.tooltip),graph:Bs(n==null?void 0:n.graph),annotations:Ps(n==null?void 0:n.annotations),legend:Ds(n==null?void 0:n.legend),chartOptions:Ts(n==null?void 0:n.chartOptions),interactions:js(n==null?void 0:n.interactions),dragData:Es(n==null?void 0:n.dragData)}}};Gn.register(Nr,Or,Mr,Ir,Rr,Hr,zr,Xr,Yr,Wr,Ur,$r,ta,lr);const Ns=e=>{var b,p,C,w;Dr();const t=Me.useRef(null),n=ur(e),{translations:r,languageKey:s}=ra(),{options:a,testId:o,controlsPortalId:i}=n,{chartStyling:l,graph:c}=a,{generatedDatasets:d}=cr(t,n),h=bs({chart:n,chartRef:t}),g=!((p=(b=a==null?void 0:a.legend)==null?void 0:b.customLegend)!=null&&p.customLegendContainerID);return S.jsxs("div",{className:Tr(l,Oe),style:{width:l.width||Ie,height:l.height||Ie},"data-testid":o,children:[S.jsx(aa,{controlsPortalId:i,children:S.jsx("div",{className:Oe.actions,children:S.jsx(Zr,{text:r.downloadAsPNG,placement:"bottom-end",children:S.jsx(qr,{small:!0,basic:!0,colored:"muted",round:!0,icon:"download",onClick:()=>sa(t)})})})}),S.jsx(Kr,{backend:Jr,context:window,children:S.jsxs("div",{className:Oe.canvas,id:"canvas",children:[S.jsx(jr,{ref:t,data:{labels:(w=(C=n==null?void 0:n.data)==null?void 0:C.labels)!=null&&w.length?n.data.labels:[""],datasets:d},options:h,plugins:Er(c,a.legend)}),g&&!!d.length&&S.jsx(Qr,{chartRef:t,legendConfig:{options:a,generatedDatasets:d,chartType:ea.BAR}})]})})]},s)},Se=e=>{const{options:t}=ur(e);return S.jsx(Pr,{options:t,children:S.jsx(Ns,{...e})})};Se.__docgenInfo={description:"",methods:[],displayName:"BarChartWithLegend",props:{chart:{required:!0,tsType:{name:"IBarChartData"},description:""}}};const A=["United Kingdom","Norway","France"],B={label:"Cats",data:[3.12,8,7]},Ve={label:"Dogs",data:[1,2,3]},dr={label:"Parrots",data:[5,0,4]},Os={label:"Cats",data:[3,8,7],yAxisID:"y"},Ms={label:"Dogs",data:[1,2,3],yAxisID:"y2"},Is={label:"Parrots",data:[5,0,4],yAxisID:"y2"},Rs={label:"Cats",data:[3,8,7],stack:1},Hs={label:"Dogs",data:[1,2,3],stack:1},zs={label:"Parrots",data:[5,0,4],stack:2},ut={label:"Cats",data:[1e3,2e3,3e3],stack:1},Xs={label:"Dogs",data:[4e3,5e3,6e3],stack:1},je={label:"Cats",data:[42,57,64]},Ys={label:"Cats",data:[210,333,248]},Ws={label:"Income",data:[100,[100,120],[120,130],[130,80],80],backgroundColor:["lightGray","lightGreen","lightGreen","pink","lightGray"]},Fe={data:{labels:A,datasets:[B]}},Us={data:{labels:A,datasets:[{...B,label:"Men",backgroundColor:"lightblue"},{...Ve,label:"Women",backgroundColor:"pink"}]}},$s={data:{labels:A,datasets:[{...B,backgroundColor:["gray","red","gray"]}]}},Vs={data:{labels:A,datasets:[B,Ve,dr]}},Fs={data:{labels:A,datasets:[B,Ve,dr]},options:{title:"Stacked",additionalAxesOptions:{stacked:!0}}},Gs={data:{labels:A,datasets:[Os,Ms,Is]},options:{title:"Multiple y axes",axes:{y:[{},{gridLines:{drawOnChartArea:!1}}]}}},Zs={data:{labels:A,datasets:[Rs,Hs,zs]},options:{title:"Grouped stacked",additionalAxesOptions:{stacked:!0}}},qs={data:{labels:A,datasets:[B]},options:{title:"reversed vertical",additionalAxesOptions:{reverse:!0}}},Ks={data:{labels:A,datasets:[B]},options:{title:"horizontal",direction:"horizontal"}},Js={data:{labels:A,datasets:[B]},options:{title:"reversed horizontal",direction:"horizontal",additionalAxesOptions:{reverse:!0}}},Qs={data:{labels:A,datasets:[B]},options:{title:"With axes labels",axes:{x:[{label:"Country"}],y:[{label:"Number of pets"}]}}},eo={data:{labels:A,datasets:[B]},options:{title:["x axis on top","y axis on right"],axes:{x:[{position:"top"}],y:[{position:"right"}]}}},to={data:{labels:A,datasets:[B]},options:{title:"Not beginning at zero",additionalAxesOptions:{beginAtZero:!1}}},no={data:{labels:A,datasets:[B]},options:{title:"With step size of 2",additionalAxesOptions:{stepSize:2}}},ro={data:{labels:A,datasets:[B]},options:{title:"With suggested range",additionalAxesOptions:{beginAtZero:!1,suggestedMin:2,suggestedMax:12}}},ao={data:{labels:A,datasets:[B]},options:{title:"With logarithmic scale",additionalAxesOptions:{chartScaleType:"logarithmic"}}},so={data:{labels:A,datasets:[Ys]},options:{title:"With value as datalabels",graph:{showDataLabels:!0}}},oo={data:{labels:A,datasets:[{...B,backgroundColor:"rgba(255, 99, 132, 0.2)",borderColor:"black",borderWidth:1}]}},io={data:{labels:A,datasets:[je]},options:{title:"Annotation Y Axis",annotations:{showAnnotations:!0,annotationsData:[{annotationAxis:"y",label:"Horizontal Annotation",value:53,color:"rgba(96, 32, 196, 0.5)"}]}}},lo={data:{labels:A,datasets:[je]},options:{title:"Annotation X Axis",annotations:{showAnnotations:!0,annotationsData:[{annotationAxis:"x",label:"Vertical Annotation",value:.5,color:"green"}]}}},co={data:{labels:A,datasets:[je]},options:{title:"Diagonal Annotation",annotations:{showAnnotations:!0,annotationsData:[{annotationAxis:"y",label:"Diagonal Annotation",value:40,endValue:67,color:"rgba(123, 16, 32, 0.8)"}]}}},uo={data:{labels:A,datasets:[je]},options:{title:"Control annotations in legend",annotations:{showAnnotations:!0,controlAnnotation:!0,annotationsData:[{annotationAxis:"y",label:"Diagonal Annotation",value:40,endValue:67,color:"rgba(123, 16, 32, 0.8)"},{annotationAxis:"y",label:"Horizontal Annotation",value:53,color:"rgba(96, 32, 196, 0.5)"}]}}},go={data:{labels:A,datasets:[B]},options:{title:"Legend to the right",legend:{position:"right"}}},ho={data:{labels:A,datasets:[B]},options:{chartStyling:{performanceMode:!1}}},fo={data:{labels:A,datasets:[B]},options:{dragData:{enableDragData:!0,showTooltip:!0,roundPoints:!0,onDragStart:(e,t)=>{},onDrag:(e,t,n,r)=>{},onDragEnd:(e,t,n,r)=>{}}}},po={data:{labels:A,datasets:[ut,ut,Xs]}},mo={data:{labels:["Week 1","Week 2","Week 3","Week 4","Week 5","Week 6"],datasets:[{label:"Budget Sales",data:[200,1e3,800,700,900,1600],backgroundColor:"rgba(128, 128, 128, 0.5)",borderColor:"rgba(128, 128, 128, 1)",barThickness:40},{label:"Actual Sales",data:[300,600,400,500,700,1200],backgroundColor:"rgba(64, 64, 64, 0.5)",borderColor:"rgba(64, 64, 64, 1)",barThickness:60},{label:"Units",data:[20,40,30,50,70,90],type:"line",backgroundColor:"rgba(255, 165, 0, 0.5)",borderColor:"rgba(255, 165, 0, 1)",yAxisID:"y-axis-units"}]},options:{title:"Specific axis stacked",additionalAxesOptions:{stackedX:!0,stackedY:!1}}},bo={data:{labels:["original","change 1","change 2","change 3","result"],datasets:[Ws]},options:{title:"Waterfall chart",graph:{showDataLabels:!0}}},Po={title:"BarChart",component:Se,args:{chart:Fe}},_=e=>S.jsx(Se,{...e}),We="custom-legend-container",xo=e=>S.jsxs(S.Fragment,{children:[S.jsx(Se,{...e}),S.jsx("div",{id:We})]}),Be=_.bind({}),Z=_.bind({});Z.args={chart:Us};const q=_.bind({});q.args={chart:$s};const K=_.bind({});K.args={chart:Vs};const J=_.bind({});J.args={chart:Fs};const Q=_.bind({});Q.args={chart:Zs};const ee=_.bind({});ee.args={chart:Gs};const te=_.bind({});te.args={chart:Ks};const ne=_.bind({});ne.args={chart:qs};const re=_.bind({});re.args={chart:Js};const ae=_.bind({});ae.args={chart:Qs};const se=_.bind({});se.args={chart:eo};const oe=_.bind({});oe.args={chart:to};const ie=_.bind({});ie.args={chart:ro};const le=_.bind({});le.args={chart:no};const ce=_.bind({});ce.args={chart:ao};const ue=_.bind({});ue.args={chart:so};const de=_.bind({});de.args={chart:go};const ge=_.bind({});ge.args={chart:oo};const he=_.bind({});he.args={chart:io};const fe=_.bind({});fe.args={chart:lo};const pe=_.bind({});pe.args={chart:co};const me=_.bind({});me.args={chart:uo};const be=_.bind({});be.args={chart:ho};const xe=xo.bind({});xe.args={chart:{...Fe,options:{title:"Custom HTML legend",legend:{customLegend:{customLegendPlugin:hr(We),customLegendContainerID:We}}}}};const ve=_.bind({});ve.args={chart:fo};const ye=_.bind({});ye.args={chart:po};const _e=_.bind({});_e.args={chart:mo};const Ae=_.bind({});Ae.args={chart:bo};const Ce=()=>{const e="controls-portal-container";return S.jsxs(S.Fragment,{children:[S.jsxs("div",{style:{padding:20,border:"1px solid red"},children:["This div is outside the BarChart component",S.jsx("div",{id:e})]}),S.jsx(Se,{chart:{...Fe,controlsPortalId:e}})]})};Ce.__docgenInfo={description:"",methods:[],displayName:"ControlsPortal"};var dt,gt,ht;Be.parameters={...Be.parameters,docs:{...(dt=Be.parameters)==null?void 0:dt.docs,source:{originalSource:`args => {
|
|
2
|
+
return <BarChart
|
|
3
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
4
|
+
{...args} />;
|
|
5
|
+
}`,...(ht=(gt=Be.parameters)==null?void 0:gt.docs)==null?void 0:ht.source}}};var ft,pt,mt;Z.parameters={...Z.parameters,docs:{...(ft=Z.parameters)==null?void 0:ft.docs,source:{originalSource:`args => {
|
|
6
|
+
return <BarChart
|
|
7
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
8
|
+
{...args} />;
|
|
9
|
+
}`,...(mt=(pt=Z.parameters)==null?void 0:pt.docs)==null?void 0:mt.source}}};var bt,xt,vt;q.parameters={...q.parameters,docs:{...(bt=q.parameters)==null?void 0:bt.docs,source:{originalSource:`args => {
|
|
10
|
+
return <BarChart
|
|
11
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
12
|
+
{...args} />;
|
|
13
|
+
}`,...(vt=(xt=q.parameters)==null?void 0:xt.docs)==null?void 0:vt.source}}};var yt,_t,At;K.parameters={...K.parameters,docs:{...(yt=K.parameters)==null?void 0:yt.docs,source:{originalSource:`args => {
|
|
14
|
+
return <BarChart
|
|
15
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
16
|
+
{...args} />;
|
|
17
|
+
}`,...(At=(_t=K.parameters)==null?void 0:_t.docs)==null?void 0:At.source}}};var Ct,St,wt;J.parameters={...J.parameters,docs:{...(Ct=J.parameters)==null?void 0:Ct.docs,source:{originalSource:`args => {
|
|
18
|
+
return <BarChart
|
|
19
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
20
|
+
{...args} />;
|
|
21
|
+
}`,...(wt=(St=J.parameters)==null?void 0:St.docs)==null?void 0:wt.source}}};var Lt,Bt,kt;Q.parameters={...Q.parameters,docs:{...(Lt=Q.parameters)==null?void 0:Lt.docs,source:{originalSource:`args => {
|
|
22
|
+
return <BarChart
|
|
23
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
24
|
+
{...args} />;
|
|
25
|
+
}`,...(kt=(Bt=Q.parameters)==null?void 0:Bt.docs)==null?void 0:kt.source}}};var Pt,Dt,Tt;ee.parameters={...ee.parameters,docs:{...(Pt=ee.parameters)==null?void 0:Pt.docs,source:{originalSource:`args => {
|
|
26
|
+
return <BarChart
|
|
27
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
28
|
+
{...args} />;
|
|
29
|
+
}`,...(Tt=(Dt=ee.parameters)==null?void 0:Dt.docs)==null?void 0:Tt.source}}};var jt,Et,Nt;te.parameters={...te.parameters,docs:{...(jt=te.parameters)==null?void 0:jt.docs,source:{originalSource:`args => {
|
|
30
|
+
return <BarChart
|
|
31
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
32
|
+
{...args} />;
|
|
33
|
+
}`,...(Nt=(Et=te.parameters)==null?void 0:Et.docs)==null?void 0:Nt.source}}};var Ot,Mt,It;ne.parameters={...ne.parameters,docs:{...(Ot=ne.parameters)==null?void 0:Ot.docs,source:{originalSource:`args => {
|
|
34
|
+
return <BarChart
|
|
35
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
36
|
+
{...args} />;
|
|
37
|
+
}`,...(It=(Mt=ne.parameters)==null?void 0:Mt.docs)==null?void 0:It.source}}};var Rt,Ht,zt;re.parameters={...re.parameters,docs:{...(Rt=re.parameters)==null?void 0:Rt.docs,source:{originalSource:`args => {
|
|
38
|
+
return <BarChart
|
|
39
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
40
|
+
{...args} />;
|
|
41
|
+
}`,...(zt=(Ht=re.parameters)==null?void 0:Ht.docs)==null?void 0:zt.source}}};var Xt,Yt,Wt;ae.parameters={...ae.parameters,docs:{...(Xt=ae.parameters)==null?void 0:Xt.docs,source:{originalSource:`args => {
|
|
42
|
+
return <BarChart
|
|
43
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
44
|
+
{...args} />;
|
|
45
|
+
}`,...(Wt=(Yt=ae.parameters)==null?void 0:Yt.docs)==null?void 0:Wt.source}}};var Ut,$t,Vt;se.parameters={...se.parameters,docs:{...(Ut=se.parameters)==null?void 0:Ut.docs,source:{originalSource:`args => {
|
|
46
|
+
return <BarChart
|
|
47
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
48
|
+
{...args} />;
|
|
49
|
+
}`,...(Vt=($t=se.parameters)==null?void 0:$t.docs)==null?void 0:Vt.source}}};var Ft,Gt,Zt;oe.parameters={...oe.parameters,docs:{...(Ft=oe.parameters)==null?void 0:Ft.docs,source:{originalSource:`args => {
|
|
50
|
+
return <BarChart
|
|
51
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
52
|
+
{...args} />;
|
|
53
|
+
}`,...(Zt=(Gt=oe.parameters)==null?void 0:Gt.docs)==null?void 0:Zt.source}}};var qt,Kt,Jt;ie.parameters={...ie.parameters,docs:{...(qt=ie.parameters)==null?void 0:qt.docs,source:{originalSource:`args => {
|
|
54
|
+
return <BarChart
|
|
55
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
56
|
+
{...args} />;
|
|
57
|
+
}`,...(Jt=(Kt=ie.parameters)==null?void 0:Kt.docs)==null?void 0:Jt.source}}};var Qt,en,tn;le.parameters={...le.parameters,docs:{...(Qt=le.parameters)==null?void 0:Qt.docs,source:{originalSource:`args => {
|
|
58
|
+
return <BarChart
|
|
59
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
60
|
+
{...args} />;
|
|
61
|
+
}`,...(tn=(en=le.parameters)==null?void 0:en.docs)==null?void 0:tn.source}}};var nn,rn,an;ce.parameters={...ce.parameters,docs:{...(nn=ce.parameters)==null?void 0:nn.docs,source:{originalSource:`args => {
|
|
62
|
+
return <BarChart
|
|
63
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
64
|
+
{...args} />;
|
|
65
|
+
}`,...(an=(rn=ce.parameters)==null?void 0:rn.docs)==null?void 0:an.source}}};var sn,on,ln;ue.parameters={...ue.parameters,docs:{...(sn=ue.parameters)==null?void 0:sn.docs,source:{originalSource:`args => {
|
|
66
|
+
return <BarChart
|
|
67
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
68
|
+
{...args} />;
|
|
69
|
+
}`,...(ln=(on=ue.parameters)==null?void 0:on.docs)==null?void 0:ln.source}}};var cn,un,dn;de.parameters={...de.parameters,docs:{...(cn=de.parameters)==null?void 0:cn.docs,source:{originalSource:`args => {
|
|
70
|
+
return <BarChart
|
|
71
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
72
|
+
{...args} />;
|
|
73
|
+
}`,...(dn=(un=de.parameters)==null?void 0:un.docs)==null?void 0:dn.source}}};var gn,hn,fn;ge.parameters={...ge.parameters,docs:{...(gn=ge.parameters)==null?void 0:gn.docs,source:{originalSource:`args => {
|
|
74
|
+
return <BarChart
|
|
75
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
76
|
+
{...args} />;
|
|
77
|
+
}`,...(fn=(hn=ge.parameters)==null?void 0:hn.docs)==null?void 0:fn.source}}};var pn,mn,bn;he.parameters={...he.parameters,docs:{...(pn=he.parameters)==null?void 0:pn.docs,source:{originalSource:`args => {
|
|
78
|
+
return <BarChart
|
|
79
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
80
|
+
{...args} />;
|
|
81
|
+
}`,...(bn=(mn=he.parameters)==null?void 0:mn.docs)==null?void 0:bn.source}}};var xn,vn,yn;fe.parameters={...fe.parameters,docs:{...(xn=fe.parameters)==null?void 0:xn.docs,source:{originalSource:`args => {
|
|
82
|
+
return <BarChart
|
|
83
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
84
|
+
{...args} />;
|
|
85
|
+
}`,...(yn=(vn=fe.parameters)==null?void 0:vn.docs)==null?void 0:yn.source}}};var _n,An,Cn;pe.parameters={...pe.parameters,docs:{...(_n=pe.parameters)==null?void 0:_n.docs,source:{originalSource:`args => {
|
|
86
|
+
return <BarChart
|
|
87
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
88
|
+
{...args} />;
|
|
89
|
+
}`,...(Cn=(An=pe.parameters)==null?void 0:An.docs)==null?void 0:Cn.source}}};var Sn,wn,Ln;me.parameters={...me.parameters,docs:{...(Sn=me.parameters)==null?void 0:Sn.docs,source:{originalSource:`args => {
|
|
90
|
+
return <BarChart
|
|
91
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
92
|
+
{...args} />;
|
|
93
|
+
}`,...(Ln=(wn=me.parameters)==null?void 0:wn.docs)==null?void 0:Ln.source}}};var Bn,kn,Pn;be.parameters={...be.parameters,docs:{...(Bn=be.parameters)==null?void 0:Bn.docs,source:{originalSource:`args => {
|
|
94
|
+
return <BarChart
|
|
95
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
96
|
+
{...args} />;
|
|
97
|
+
}`,...(Pn=(kn=be.parameters)==null?void 0:kn.docs)==null?void 0:Pn.source}}};var Dn,Tn,jn;xe.parameters={...xe.parameters,docs:{...(Dn=xe.parameters)==null?void 0:Dn.docs,source:{originalSource:`args => {
|
|
98
|
+
return <>
|
|
99
|
+
<BarChart
|
|
100
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
101
|
+
{...args} />
|
|
102
|
+
<div id={customLegendContainerID}></div>
|
|
103
|
+
</>;
|
|
104
|
+
}`,...(jn=(Tn=xe.parameters)==null?void 0:Tn.docs)==null?void 0:jn.source}}};var En,Nn,On;ve.parameters={...ve.parameters,docs:{...(En=ve.parameters)==null?void 0:En.docs,source:{originalSource:`args => {
|
|
105
|
+
return <BarChart
|
|
106
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
107
|
+
{...args} />;
|
|
108
|
+
}`,...(On=(Nn=ve.parameters)==null?void 0:Nn.docs)==null?void 0:On.source}}};var Mn,In,Rn;ye.parameters={...ye.parameters,docs:{...(Mn=ye.parameters)==null?void 0:Mn.docs,source:{originalSource:`args => {
|
|
109
|
+
return <BarChart
|
|
110
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
111
|
+
{...args} />;
|
|
112
|
+
}`,...(Rn=(In=ye.parameters)==null?void 0:In.docs)==null?void 0:Rn.source}}};var Hn,zn,Xn;_e.parameters={..._e.parameters,docs:{...(Hn=_e.parameters)==null?void 0:Hn.docs,source:{originalSource:`args => {
|
|
113
|
+
return <BarChart
|
|
114
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
115
|
+
{...args} />;
|
|
116
|
+
}`,...(Xn=(zn=_e.parameters)==null?void 0:zn.docs)==null?void 0:Xn.source}}};var Yn,Wn,Un;Ae.parameters={...Ae.parameters,docs:{...(Yn=Ae.parameters)==null?void 0:Yn.docs,source:{originalSource:`args => {
|
|
117
|
+
return <BarChart
|
|
118
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
119
|
+
{...args} />;
|
|
120
|
+
}`,...(Un=(Wn=Ae.parameters)==null?void 0:Wn.docs)==null?void 0:Un.source}}};var $n,Vn,Fn;Ce.parameters={...Ce.parameters,docs:{...($n=Ce.parameters)==null?void 0:$n.docs,source:{originalSource:`() => {
|
|
121
|
+
const controlsPortalId = 'controls-portal-container';
|
|
122
|
+
return <>
|
|
123
|
+
<div style={{
|
|
124
|
+
padding: 20,
|
|
125
|
+
border: '1px solid red'
|
|
126
|
+
}}>
|
|
127
|
+
This div is outside the BarChart component
|
|
128
|
+
<div id={controlsPortalId} />
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<BarChart chart={{
|
|
132
|
+
...singleChart,
|
|
133
|
+
controlsPortalId
|
|
134
|
+
}} />
|
|
135
|
+
</>;
|
|
136
|
+
}`,...(Fn=(Vn=Ce.parameters)==null?void 0:Vn.docs)==null?void 0:Fn.source}}};const Do=["Default","CustomColors","CustomColorsArray","MultipleSets","Stacked","StackedGrouped","MultipleYAxes","Horizontal","Reversed","HorizontalReversed","AxesLabels","AxesPositions","NonZeroStart","CustomRange","CustomStepSize","LogarithmicScale","Datalabels","LegendOnRight","Border","AnnotationYAxis","AnnotationXAxis","AnnotationDiagonal","AnnotationsInLegend","Animated","CustomLegend","DragDataChart","PrettyLabelsTooltips","StackedSelectedAxis","WaterfallChart","ControlsPortal"];export{be as Animated,pe as AnnotationDiagonal,fe as AnnotationXAxis,he as AnnotationYAxis,me as AnnotationsInLegend,ae as AxesLabels,se as AxesPositions,ge as Border,Ce as ControlsPortal,Z as CustomColors,q as CustomColorsArray,xe as CustomLegend,ie as CustomRange,le as CustomStepSize,ue as Datalabels,Be as Default,ve as DragDataChart,te as Horizontal,re as HorizontalReversed,de as LegendOnRight,ce as LogarithmicScale,K as MultipleSets,ee as MultipleYAxes,oe as NonZeroStart,ye as PrettyLabelsTooltips,ne as Reversed,J as Stacked,Q as StackedGrouped,_e as StackedSelectedAxis,Ae as WaterfallChart,Do as __namedExportsOrder,Po as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,c=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,l=(e,r)=>function(){return e&&(r=(0,e[o(e)[0]])(e=0)),r},v=(e,r)=>function(){return r||(0,e[o(e)[0]])((r={exports:{}}).exports,r),r.exports},b=(e,r)=>{for(var t in r)a(e,t,{get:r[t],enumerable:!0})},n=(e,r,t,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let _ of o(r))!O.call(e,_)&&_!==t&&a(e,_,{get:()=>r[_],enumerable:!(p=s(r,_))||p.enumerable});return e},P=(e,r,t)=>(t=e!=null?u(c(e)):{},n(!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),y=e=>n(a({},"__esModule",{value:!0}),e);export{P as _,v as a,l as b,y as c,b as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o}from"./index-
|
|
1
|
+
import{r as o}from"./index-BhTLYoCu.js";var r={},t;function a(){if(t)return r;t=1;var e=o();return r.createRoot=e.createRoot,r.hydrateRoot=e.hydrateRoot,r}var n=a();export{n as c};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./test-utils-BBHUGUfi.js","./index-YTOF1_EJ.js","./index-BhTLYoCu.js","./react-18-BdgjDjvZ.js","./client-DnE3718B.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as Ee}from"./iframe-BRmCfBZj.js";import{_ as Ae,a as O,d as ge}from"./chunk-XP5HYGXS-D5tuasO7.js";import{r as k,R as Y,b as we}from"./index-YTOF1_EJ.js";var ne={};const{global:xe}=__STORYBOOK_MODULE_GLOBAL__;var Q=O({"../../node_modules/semver/internal/constants.js"(c,l){var r="2.0.0",i=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,t=250,p=["major","premajor","minor","preminor","patch","prepatch","prerelease"];l.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:t,MAX_SAFE_INTEGER:i,RELEASE_TYPES:p,SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}}),Z=O({"../../node_modules/semver/internal/debug.js"(c,l){var r=typeof process=="object"&&ne&&ne.NODE_DEBUG&&/\bsemver\b/i.test(ne.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{};l.exports=r}}),z=O({"../../node_modules/semver/internal/re.js"(c,l){var{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:n}=Q(),t=Z();c=l.exports={};var p=c.re=[],h=c.safeRe=[],e=c.src=[],f=c.safeSrc=[],a=c.t={},v=0,s="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",n],[s,i]],E=I=>{for(let[T,A]of u)I=I.split(`${T}*`).join(`${T}{0,${A}}`).split(`${T}+`).join(`${T}{1,${A}}`);return I},o=(I,T,A)=>{let y=E(T),D=v++;t(I,D,T),a[I]=D,e[D]=T,f[D]=y,p[D]=new RegExp(T,A?"g":void 0),h[D]=new RegExp(y,A?"g":void 0)};o("NUMERICIDENTIFIER","0|[1-9]\\d*"),o("NUMERICIDENTIFIERLOOSE","\\d+"),o("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${s}*`),o("MAINVERSION",`(${e[a.NUMERICIDENTIFIER]})\\.(${e[a.NUMERICIDENTIFIER]})\\.(${e[a.NUMERICIDENTIFIER]})`),o("MAINVERSIONLOOSE",`(${e[a.NUMERICIDENTIFIERLOOSE]})\\.(${e[a.NUMERICIDENTIFIERLOOSE]})\\.(${e[a.NUMERICIDENTIFIERLOOSE]})`),o("PRERELEASEIDENTIFIER",`(?:${e[a.NUMERICIDENTIFIER]}|${e[a.NONNUMERICIDENTIFIER]})`),o("PRERELEASEIDENTIFIERLOOSE",`(?:${e[a.NUMERICIDENTIFIERLOOSE]}|${e[a.NONNUMERICIDENTIFIER]})`),o("PRERELEASE",`(?:-(${e[a.PRERELEASEIDENTIFIER]}(?:\\.${e[a.PRERELEASEIDENTIFIER]})*))`),o("PRERELEASELOOSE",`(?:-?(${e[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${e[a.PRERELEASEIDENTIFIERLOOSE]})*))`),o("BUILDIDENTIFIER",`${s}+`),o("BUILD",`(?:\\+(${e[a.BUILDIDENTIFIER]}(?:\\.${e[a.BUILDIDENTIFIER]})*))`),o("FULLPLAIN",`v?${e[a.MAINVERSION]}${e[a.PRERELEASE]}?${e[a.BUILD]}?`),o("FULL",`^${e[a.FULLPLAIN]}$`),o("LOOSEPLAIN",`[v=\\s]*${e[a.MAINVERSIONLOOSE]}${e[a.PRERELEASELOOSE]}?${e[a.BUILD]}?`),o("LOOSE",`^${e[a.LOOSEPLAIN]}$`),o("GTLT","((?:<|>)?=?)"),o("XRANGEIDENTIFIERLOOSE",`${e[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),o("XRANGEIDENTIFIER",`${e[a.NUMERICIDENTIFIER]}|x|X|\\*`),o("XRANGEPLAIN",`[v=\\s]*(${e[a.XRANGEIDENTIFIER]})(?:\\.(${e[a.XRANGEIDENTIFIER]})(?:\\.(${e[a.XRANGEIDENTIFIER]})(?:${e[a.PRERELEASE]})?${e[a.BUILD]}?)?)?`),o("XRANGEPLAINLOOSE",`[v=\\s]*(${e[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${e[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${e[a.XRANGEIDENTIFIERLOOSE]})(?:${e[a.PRERELEASELOOSE]})?${e[a.BUILD]}?)?)?`),o("XRANGE",`^${e[a.GTLT]}\\s*${e[a.XRANGEPLAIN]}$`),o("XRANGELOOSE",`^${e[a.GTLT]}\\s*${e[a.XRANGEPLAINLOOSE]}$`),o("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),o("COERCE",`${e[a.COERCEPLAIN]}(?:$|[^\\d])`),o("COERCEFULL",e[a.COERCEPLAIN]+`(?:${e[a.PRERELEASE]})?(?:${e[a.BUILD]})?(?:$|[^\\d])`),o("COERCERTL",e[a.COERCE],!0),o("COERCERTLFULL",e[a.COERCEFULL],!0),o("LONETILDE","(?:~>?)"),o("TILDETRIM",`(\\s*)${e[a.LONETILDE]}\\s+`,!0),c.tildeTrimReplace="$1~",o("TILDE",`^${e[a.LONETILDE]}${e[a.XRANGEPLAIN]}$`),o("TILDELOOSE",`^${e[a.LONETILDE]}${e[a.XRANGEPLAINLOOSE]}$`),o("LONECARET","(?:\\^)"),o("CARETTRIM",`(\\s*)${e[a.LONECARET]}\\s+`,!0),c.caretTrimReplace="$1^",o("CARET",`^${e[a.LONECARET]}${e[a.XRANGEPLAIN]}$`),o("CARETLOOSE",`^${e[a.LONECARET]}${e[a.XRANGEPLAINLOOSE]}$`),o("COMPARATORLOOSE",`^${e[a.GTLT]}\\s*(${e[a.LOOSEPLAIN]})$|^$`),o("COMPARATOR",`^${e[a.GTLT]}\\s*(${e[a.FULLPLAIN]})$|^$`),o("COMPARATORTRIM",`(\\s*)${e[a.GTLT]}\\s*(${e[a.LOOSEPLAIN]}|${e[a.XRANGEPLAIN]})`,!0),c.comparatorTrimReplace="$1$2$3",o("HYPHENRANGE",`^\\s*(${e[a.XRANGEPLAIN]})\\s+-\\s+(${e[a.XRANGEPLAIN]})\\s*$`),o("HYPHENRANGELOOSE",`^\\s*(${e[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${e[a.XRANGEPLAINLOOSE]})\\s*$`),o("STAR","(<|>)?=?\\s*\\*"),o("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),o("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}),ce=O({"../../node_modules/semver/internal/parse-options.js"(c,l){var r=Object.freeze({loose:!0}),i=Object.freeze({}),n=t=>t?typeof t!="object"?r:t:i;l.exports=n}}),Le=O({"../../node_modules/semver/internal/identifiers.js"(c,l){var r=/^[0-9]+$/,i=(t,p)=>{let h=r.test(t),e=r.test(p);return h&&e&&(t=+t,p=+p),t===p?0:h&&!e?-1:e&&!h?1:t<p?-1:1},n=(t,p)=>i(p,t);l.exports={compareIdentifiers:i,rcompareIdentifiers:n}}}),q=O({"../../node_modules/semver/classes/semver.js"(c,l){var r=Z(),{MAX_LENGTH:i,MAX_SAFE_INTEGER:n}=Q(),{safeRe:t,safeSrc:p,t:h}=z(),e=ce(),{compareIdentifiers:f}=Le(),a=class b{constructor(s,u){if(u=e(u),s instanceof b){if(s.loose===!!u.loose&&s.includePrerelease===!!u.includePrerelease)return s;s=s.version}else if(typeof s!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof s}".`);if(s.length>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",s,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;let E=s.trim().match(u.loose?t[h.LOOSE]:t[h.FULL]);if(!E)throw new TypeError(`Invalid Version: ${s}`);if(this.raw=s,this.major=+E[1],this.minor=+E[2],this.patch=+E[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");E[4]?this.prerelease=E[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let I=+o;if(I>=0&&I<n)return I}return o}):this.prerelease=[],this.build=E[5]?E[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(s){if(r("SemVer.compare",this.version,this.options,s),!(s instanceof b)){if(typeof s=="string"&&s===this.version)return 0;s=new b(s,this.options)}return s.version===this.version?0:this.compareMain(s)||this.comparePre(s)}compareMain(s){return s instanceof b||(s=new b(s,this.options)),f(this.major,s.major)||f(this.minor,s.minor)||f(this.patch,s.patch)}comparePre(s){if(s instanceof b||(s=new b(s,this.options)),this.prerelease.length&&!s.prerelease.length)return-1;if(!this.prerelease.length&&s.prerelease.length)return 1;if(!this.prerelease.length&&!s.prerelease.length)return 0;let u=0;do{let E=this.prerelease[u],o=s.prerelease[u];if(r("prerelease compare",u,E,o),E===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(E===void 0)return-1;if(E!==o)return f(E,o)}while(++u)}compareBuild(s){s instanceof b||(s=new b(s,this.options));let u=0;do{let E=this.build[u],o=s.build[u];if(r("build compare",u,E,o),E===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(E===void 0)return-1;if(E!==o)return f(E,o)}while(++u)}inc(s,u,E){if(s.startsWith("pre")){if(!u&&E===!1)throw new Error("invalid increment argument: identifier is empty");if(u){let o=new RegExp(`^${this.options.loose?p[h.PRERELEASELOOSE]:p[h.PRERELEASE]}$`),I=`-${u}`.match(o);if(!I||I[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(s){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,E);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",u,E);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,E),this.inc("pre",u,E);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,E),this.inc("pre",u,E);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let o=Number(E)?1:0;if(this.prerelease.length===0)this.prerelease=[o];else{let I=this.prerelease.length;for(;--I>=0;)typeof this.prerelease[I]=="number"&&(this.prerelease[I]++,I=-2);if(I===-1){if(u===this.prerelease.join(".")&&E===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(u){let I=[u,o];E===!1&&(I=[u]),f(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=I):this.prerelease=I}break}default:throw new Error(`invalid increment argument: ${s}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};l.exports=a}}),H=O({"../../node_modules/semver/functions/parse.js"(c,l){var r=q(),i=(n,t,p=!1)=>{if(n instanceof r)return n;try{return new r(n,t)}catch(h){if(!p)return null;throw h}};l.exports=i}}),je=O({"../../node_modules/semver/functions/valid.js"(c,l){var r=H(),i=(n,t)=>{let p=r(n,t);return p?p.version:null};l.exports=i}}),Pe=O({"../../node_modules/semver/functions/clean.js"(c,l){var r=H(),i=(n,t)=>{let p=r(n.trim().replace(/^[=v]+/,""),t);return p?p.version:null};l.exports=i}}),Ce=O({"../../node_modules/semver/functions/inc.js"(c,l){var r=q(),i=(n,t,p,h,e)=>{typeof p=="string"&&(e=h,h=p,p=void 0);try{return new r(n instanceof r?n.version:n,p).inc(t,h,e).version}catch{return null}};l.exports=i}}),ye=O({"../../node_modules/semver/functions/diff.js"(c,l){var r=H(),i=(n,t)=>{let p=r(n,null,!0),h=r(t,null,!0),e=p.compare(h);if(e===0)return null;let f=e>0,a=f?p:h,v=f?h:p,s=!!a.prerelease.length;if(v.prerelease.length&&!s){if(!v.patch&&!v.minor)return"major";if(v.compareMain(a)===0)return v.minor&&!v.patch?"minor":"patch"}let u=s?"pre":"";return p.major!==h.major?u+"major":p.minor!==h.minor?u+"minor":p.patch!==h.patch?u+"patch":"prerelease"};l.exports=i}}),De=O({"../../node_modules/semver/functions/major.js"(c,l){var r=q(),i=(n,t)=>new r(n,t).major;l.exports=i}}),Ge=O({"../../node_modules/semver/functions/minor.js"(c,l){var r=q(),i=(n,t)=>new r(n,t).minor;l.exports=i}}),qe=O({"../../node_modules/semver/functions/patch.js"(c,l){var r=q(),i=(n,t)=>new r(n,t).patch;l.exports=i}}),Fe=O({"../../node_modules/semver/functions/prerelease.js"(c,l){var r=H(),i=(n,t)=>{let p=r(n,t);return p&&p.prerelease.length?p.prerelease:null};l.exports=i}}),V=O({"../../node_modules/semver/functions/compare.js"(c,l){var r=q(),i=(n,t,p)=>new r(n,p).compare(new r(t,p));l.exports=i}}),Ve=O({"../../node_modules/semver/functions/rcompare.js"(c,l){var r=V(),i=(n,t,p)=>r(t,n,p);l.exports=i}}),Ue=O({"../../node_modules/semver/functions/compare-loose.js"(c,l){var r=V(),i=(n,t)=>r(n,t,!0);l.exports=i}}),me=O({"../../node_modules/semver/functions/compare-build.js"(c,l){var r=q(),i=(n,t,p)=>{let h=new r(n,p),e=new r(t,p);return h.compare(e)||h.compareBuild(e)};l.exports=i}}),be=O({"../../node_modules/semver/functions/sort.js"(c,l){var r=me(),i=(n,t)=>n.sort((p,h)=>r(p,h,t));l.exports=i}}),Xe=O({"../../node_modules/semver/functions/rsort.js"(c,l){var r=me(),i=(n,t)=>n.sort((p,h)=>r(h,p,t));l.exports=i}}),J=O({"../../node_modules/semver/functions/gt.js"(c,l){var r=V(),i=(n,t,p)=>r(n,t,p)>0;l.exports=i}}),he=O({"../../node_modules/semver/functions/lt.js"(c,l){var r=V(),i=(n,t,p)=>r(n,t,p)<0;l.exports=i}}),_e=O({"../../node_modules/semver/functions/eq.js"(c,l){var r=V(),i=(n,t,p)=>r(n,t,p)===0;l.exports=i}}),Ne=O({"../../node_modules/semver/functions/neq.js"(c,l){var r=V(),i=(n,t,p)=>r(n,t,p)!==0;l.exports=i}}),fe=O({"../../node_modules/semver/functions/gte.js"(c,l){var r=V(),i=(n,t,p)=>r(n,t,p)>=0;l.exports=i}}),ve=O({"../../node_modules/semver/functions/lte.js"(c,l){var r=V(),i=(n,t,p)=>r(n,t,p)<=0;l.exports=i}}),Oe=O({"../../node_modules/semver/functions/cmp.js"(c,l){var r=_e(),i=Ne(),n=J(),t=fe(),p=he(),h=ve(),e=(f,a,v,s)=>{switch(a){case"===":return typeof f=="object"&&(f=f.version),typeof v=="object"&&(v=v.version),f===v;case"!==":return typeof f=="object"&&(f=f.version),typeof v=="object"&&(v=v.version),f!==v;case"":case"=":case"==":return r(f,v,s);case"!=":return i(f,v,s);case">":return n(f,v,s);case">=":return t(f,v,s);case"<":return p(f,v,s);case"<=":return h(f,v,s);default:throw new TypeError(`Invalid operator: ${a}`)}};l.exports=e}}),ke=O({"../../node_modules/semver/functions/coerce.js"(c,l){var r=q(),i=H(),{safeRe:n,t}=z(),p=(h,e)=>{if(h instanceof r)return h;if(typeof h=="number"&&(h=String(h)),typeof h!="string")return null;e=e||{};let f=null;if(!e.rtl)f=h.match(e.includePrerelease?n[t.COERCEFULL]:n[t.COERCE]);else{let o=e.includePrerelease?n[t.COERCERTLFULL]:n[t.COERCERTL],I;for(;(I=o.exec(h))&&(!f||f.index+f[0].length!==h.length);)(!f||I.index+I[0].length!==f.index+f[0].length)&&(f=I),o.lastIndex=I.index+I[1].length+I[2].length;o.lastIndex=-1}if(f===null)return null;let a=f[2],v=f[3]||"0",s=f[4]||"0",u=e.includePrerelease&&f[5]?`-${f[5]}`:"",E=e.includePrerelease&&f[6]?`+${f[6]}`:"";return i(`${a}.${v}.${s}${u}${E}`,e)};l.exports=p}}),Me=O({"../../node_modules/semver/internal/lrucache.js"(c,l){var r=class{constructor(){this.max=1e3,this.map=new Map}get(i){let n=this.map.get(i);if(n!==void 0)return this.map.delete(i),this.map.set(i,n),n}delete(i){return this.map.delete(i)}set(i,n){if(!this.delete(i)&&n!==void 0){if(this.map.size>=this.max){let t=this.map.keys().next().value;this.delete(t)}this.map.set(i,n)}return this}};l.exports=r}}),U=O({"../../node_modules/semver/classes/range.js"(c,l){var r=/\s+/g,i=class K{constructor(m,L){if(L=p(L),m instanceof K)return m.loose===!!L.loose&&m.includePrerelease===!!L.includePrerelease?m:new K(m.raw,L);if(m instanceof h)return this.raw=m.value,this.set=[[m]],this.formatted=void 0,this;if(this.options=L,this.loose=!!L.loose,this.includePrerelease=!!L.includePrerelease,this.raw=m.trim().replace(r," "),this.set=this.raw.split("||").map(R=>this.parseRange(R.trim())).filter(R=>R.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let R=this.set[0];if(this.set=this.set.filter(_=>!T(_[0])),this.set.length===0)this.set=[R];else if(this.set.length>1){for(let _ of this.set)if(_.length===1&&A(_[0])){this.set=[_];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let m=0;m<this.set.length;m++){m>0&&(this.formatted+="||");let L=this.set[m];for(let R=0;R<L.length;R++)R>0&&(this.formatted+=" "),this.formatted+=L[R].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(m){let L=((this.options.includePrerelease&&o)|(this.options.loose&&I))+":"+m,R=t.get(L);if(R)return R;let _=this.options.loose,$=_?a[v.HYPHENRANGELOOSE]:a[v.HYPHENRANGE];m=m.replace($,ae(this.options.includePrerelease)),e("hyphen replace",m),m=m.replace(a[v.COMPARATORTRIM],s),e("comparator trim",m),m=m.replace(a[v.TILDETRIM],u),e("tilde trim",m),m=m.replace(a[v.CARETTRIM],E),e("caret trim",m);let N=m.split(" ").map(j=>D(j,this.options)).join(" ").split(/\s+/).map(j=>se(j,this.options));_&&(N=N.filter(j=>(e("loose invalid filter",j,this.options),!!j.match(a[v.COMPARATORLOOSE])))),e("range list",N);let w=new Map,g=N.map(j=>new h(j,this.options));for(let j of g){if(T(j))return[j];w.set(j.value,j)}w.size>1&&w.has("")&&w.delete("");let x=[...w.values()];return t.set(L,x),x}intersects(m,L){if(!(m instanceof K))throw new TypeError("a Range is required");return this.set.some(R=>y(R,L)&&m.set.some(_=>y(_,L)&&R.every($=>_.every(N=>$.intersects(N,L)))))}test(m){if(!m)return!1;if(typeof m=="string")try{m=new f(m,this.options)}catch{return!1}for(let L=0;L<this.set.length;L++)if(ie(this.set[L],m,this.options))return!0;return!1}};l.exports=i;var n=Me(),t=new n,p=ce(),h=ee(),e=Z(),f=q(),{safeRe:a,t:v,comparatorTrimReplace:s,tildeTrimReplace:u,caretTrimReplace:E}=z(),{FLAG_INCLUDE_PRERELEASE:o,FLAG_LOOSE:I}=Q(),T=d=>d.value==="<0.0.0-0",A=d=>d.value==="",y=(d,m)=>{let L=!0,R=d.slice(),_=R.pop();for(;L&&R.length;)L=R.every($=>_.intersects($,m)),_=R.pop();return L},D=(d,m)=>(e("comp",d,m),d=C(d,m),e("caret",d),d=X(d,m),e("tildes",d),d=S(d,m),e("xrange",d),d=te(d,m),e("stars",d),d),P=d=>!d||d.toLowerCase()==="x"||d==="*",X=(d,m)=>d.trim().split(/\s+/).map(L=>F(L,m)).join(" "),F=(d,m)=>{let L=m.loose?a[v.TILDELOOSE]:a[v.TILDE];return d.replace(L,(R,_,$,N,w)=>{e("tilde",d,R,_,$,N,w);let g;return P(_)?g="":P($)?g=`>=${_}.0.0 <${+_+1}.0.0-0`:P(N)?g=`>=${_}.${$}.0 <${_}.${+$+1}.0-0`:w?(e("replaceTilde pr",w),g=`>=${_}.${$}.${N}-${w} <${_}.${+$+1}.0-0`):g=`>=${_}.${$}.${N} <${_}.${+$+1}.0-0`,e("tilde return",g),g})},C=(d,m)=>d.trim().split(/\s+/).map(L=>G(L,m)).join(" "),G=(d,m)=>{e("caret",d,m);let L=m.loose?a[v.CARETLOOSE]:a[v.CARET],R=m.includePrerelease?"-0":"";return d.replace(L,(_,$,N,w,g)=>{e("caret",d,_,$,N,w,g);let x;return P($)?x="":P(N)?x=`>=${$}.0.0${R} <${+$+1}.0.0-0`:P(w)?$==="0"?x=`>=${$}.${N}.0${R} <${$}.${+N+1}.0-0`:x=`>=${$}.${N}.0${R} <${+$+1}.0.0-0`:g?(e("replaceCaret pr",g),$==="0"?N==="0"?x=`>=${$}.${N}.${w}-${g} <${$}.${N}.${+w+1}-0`:x=`>=${$}.${N}.${w}-${g} <${$}.${+N+1}.0-0`:x=`>=${$}.${N}.${w}-${g} <${+$+1}.0.0-0`):(e("no pr"),$==="0"?N==="0"?x=`>=${$}.${N}.${w}${R} <${$}.${N}.${+w+1}-0`:x=`>=${$}.${N}.${w}${R} <${$}.${+N+1}.0-0`:x=`>=${$}.${N}.${w} <${+$+1}.0.0-0`),e("caret return",x),x})},S=(d,m)=>(e("replaceXRanges",d,m),d.split(/\s+/).map(L=>B(L,m)).join(" ")),B=(d,m)=>{d=d.trim();let L=m.loose?a[v.XRANGELOOSE]:a[v.XRANGE];return d.replace(L,(R,_,$,N,w,g)=>{e("xRange",d,R,_,$,N,w,g);let x=P($),j=x||P(N),M=j||P(w),W=M;return _==="="&&W&&(_=""),g=m.includePrerelease?"-0":"",x?_===">"||_==="<"?R="<0.0.0-0":R="*":_&&W?(j&&(N=0),w=0,_===">"?(_=">=",j?($=+$+1,N=0,w=0):(N=+N+1,w=0)):_==="<="&&(_="<",j?$=+$+1:N=+N+1),_==="<"&&(g="-0"),R=`${_+$}.${N}.${w}${g}`):j?R=`>=${$}.0.0${g} <${+$+1}.0.0-0`:M&&(R=`>=${$}.${N}.0${g} <${$}.${+N+1}.0-0`),e("xRange return",R),R})},te=(d,m)=>(e("replaceStars",d,m),d.trim().replace(a[v.STAR],"")),se=(d,m)=>(e("replaceGTE0",d,m),d.trim().replace(a[m.includePrerelease?v.GTE0PRE:v.GTE0],"")),ae=d=>(m,L,R,_,$,N,w,g,x,j,M,W)=>(P(R)?L="":P(_)?L=`>=${R}.0.0${d?"-0":""}`:P($)?L=`>=${R}.${_}.0${d?"-0":""}`:N?L=`>=${L}`:L=`>=${L}${d?"-0":""}`,P(x)?g="":P(j)?g=`<${+x+1}.0.0-0`:P(M)?g=`<${x}.${+j+1}.0-0`:W?g=`<=${x}.${j}.${M}-${W}`:d?g=`<${x}.${j}.${+M+1}-0`:g=`<=${g}`,`${L} ${g}`.trim()),ie=(d,m,L)=>{for(let R=0;R<d.length;R++)if(!d[R].test(m))return!1;if(m.prerelease.length&&!L.includePrerelease){for(let R=0;R<d.length;R++)if(e(d[R].semver),d[R].semver!==h.ANY&&d[R].semver.prerelease.length>0){let _=d[R].semver;if(_.major===m.major&&_.minor===m.minor&&_.patch===m.patch)return!0}return!1}return!0}}}),ee=O({"../../node_modules/semver/classes/comparator.js"(c,l){var r=Symbol("SemVer ANY"),i=class ue{static get ANY(){return r}constructor(s,u){if(u=n(u),s instanceof ue){if(s.loose===!!u.loose)return s;s=s.value}s=s.trim().split(/\s+/).join(" "),e("comparator",s,u),this.options=u,this.loose=!!u.loose,this.parse(s),this.semver===r?this.value="":this.value=this.operator+this.semver.version,e("comp",this)}parse(s){let u=this.options.loose?t[p.COMPARATORLOOSE]:t[p.COMPARATOR],E=s.match(u);if(!E)throw new TypeError(`Invalid comparator: ${s}`);this.operator=E[1]!==void 0?E[1]:"",this.operator==="="&&(this.operator=""),E[2]?this.semver=new f(E[2],this.options.loose):this.semver=r}toString(){return this.value}test(s){if(e("Comparator.test",s,this.options.loose),this.semver===r||s===r)return!0;if(typeof s=="string")try{s=new f(s,this.options)}catch{return!1}return h(s,this.operator,this.semver,this.options)}intersects(s,u){if(!(s instanceof ue))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(s.value,u).test(this.value):s.operator===""?s.value===""?!0:new a(this.value,u).test(s.semver):(u=n(u),u.includePrerelease&&(this.value==="<0.0.0-0"||s.value==="<0.0.0-0")||!u.includePrerelease&&(this.value.startsWith("<0.0.0")||s.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&s.operator.startsWith(">")||this.operator.startsWith("<")&&s.operator.startsWith("<")||this.semver.version===s.semver.version&&this.operator.includes("=")&&s.operator.includes("=")||h(this.semver,"<",s.semver,u)&&this.operator.startsWith(">")&&s.operator.startsWith("<")||h(this.semver,">",s.semver,u)&&this.operator.startsWith("<")&&s.operator.startsWith(">")))}};l.exports=i;var n=ce(),{safeRe:t,t:p}=z(),h=Oe(),e=Z(),f=q(),a=U()}}),re=O({"../../node_modules/semver/functions/satisfies.js"(c,l){var r=U(),i=(n,t,p)=>{try{t=new r(t,p)}catch{return!1}return t.test(n)};l.exports=i}}),He=O({"../../node_modules/semver/ranges/to-comparators.js"(c,l){var r=U(),i=(n,t)=>new r(n,t).set.map(p=>p.map(h=>h.value).join(" ").trim().split(" "));l.exports=i}}),Be=O({"../../node_modules/semver/ranges/max-satisfying.js"(c,l){var r=q(),i=U(),n=(t,p,h)=>{let e=null,f=null,a=null;try{a=new i(p,h)}catch{return null}return t.forEach(v=>{a.test(v)&&(!e||f.compare(v)===-1)&&(e=v,f=new r(e,h))}),e};l.exports=n}}),We=O({"../../node_modules/semver/ranges/min-satisfying.js"(c,l){var r=q(),i=U(),n=(t,p,h)=>{let e=null,f=null,a=null;try{a=new i(p,h)}catch{return null}return t.forEach(v=>{a.test(v)&&(!e||f.compare(v)===1)&&(e=v,f=new r(e,h))}),e};l.exports=n}}),Ye=O({"../../node_modules/semver/ranges/min-version.js"(c,l){var r=q(),i=U(),n=J(),t=(p,h)=>{p=new i(p,h);let e=new r("0.0.0");if(p.test(e)||(e=new r("0.0.0-0"),p.test(e)))return e;e=null;for(let f=0;f<p.set.length;++f){let a=p.set[f],v=null;a.forEach(s=>{let u=new r(s.semver.version);switch(s.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!v||n(u,v))&&(v=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),v&&(!e||n(e,v))&&(e=v)}return e&&p.test(e)?e:null};l.exports=t}}),ze=O({"../../node_modules/semver/ranges/valid.js"(c,l){var r=U(),i=(n,t)=>{try{return new r(n,t).range||"*"}catch{return null}};l.exports=i}}),de=O({"../../node_modules/semver/ranges/outside.js"(c,l){var r=q(),i=ee(),{ANY:n}=i,t=U(),p=re(),h=J(),e=he(),f=ve(),a=fe(),v=(s,u,E,o)=>{s=new r(s,o),u=new t(u,o);let I,T,A,y,D;switch(E){case">":I=h,T=f,A=e,y=">",D=">=";break;case"<":I=e,T=a,A=h,y="<",D="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(p(s,u,o))return!1;for(let P=0;P<u.set.length;++P){let X=u.set[P],F=null,C=null;if(X.forEach(G=>{G.semver===n&&(G=new i(">=0.0.0")),F=F||G,C=C||G,I(G.semver,F.semver,o)?F=G:A(G.semver,C.semver,o)&&(C=G)}),F.operator===y||F.operator===D||(!C.operator||C.operator===y)&&T(s,C.semver)||C.operator===D&&A(s,C.semver))return!1}return!0};l.exports=v}}),Ke=O({"../../node_modules/semver/ranges/gtr.js"(c,l){var r=de(),i=(n,t,p)=>r(n,t,">",p);l.exports=i}}),Qe=O({"../../node_modules/semver/ranges/ltr.js"(c,l){var r=de(),i=(n,t,p)=>r(n,t,"<",p);l.exports=i}}),Ze=O({"../../node_modules/semver/ranges/intersects.js"(c,l){var r=U(),i=(n,t,p)=>(n=new r(n,p),t=new r(t,p),n.intersects(t,p));l.exports=i}}),Je=O({"../../node_modules/semver/ranges/simplify.js"(c,l){var r=re(),i=V();l.exports=(n,t,p)=>{let h=[],e=null,f=null,a=n.sort((E,o)=>i(E,o,p));for(let E of a)r(E,t,p)?(f=E,e||(e=E)):(f&&h.push([e,f]),f=null,e=null);e&&h.push([e,null]);let v=[];for(let[E,o]of h)E===o?v.push(E):!o&&E===a[0]?v.push("*"):o?E===a[0]?v.push(`<=${o}`):v.push(`${E} - ${o}`):v.push(`>=${E}`);let s=v.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return s.length<u.length?s:t}}}),er=O({"../../node_modules/semver/ranges/subset.js"(c,l){var r=U(),i=ee(),{ANY:n}=i,t=re(),p=V(),h=(u,E,o={})=>{if(u===E)return!0;u=new r(u,o),E=new r(E,o);let I=!1;e:for(let T of u.set){for(let A of E.set){let y=a(T,A,o);if(I=I||y!==null,y)continue e}if(I)return!1}return!0},e=[new i(">=0.0.0-0")],f=[new i(">=0.0.0")],a=(u,E,o)=>{if(u===E)return!0;if(u.length===1&&u[0].semver===n){if(E.length===1&&E[0].semver===n)return!0;o.includePrerelease?u=e:u=f}if(E.length===1&&E[0].semver===n){if(o.includePrerelease)return!0;E=f}let I=new Set,T,A;for(let S of u)S.operator===">"||S.operator===">="?T=v(T,S,o):S.operator==="<"||S.operator==="<="?A=s(A,S,o):I.add(S.semver);if(I.size>1)return null;let y;if(T&&A&&(y=p(T.semver,A.semver,o),y>0||y===0&&(T.operator!==">="||A.operator!=="<=")))return null;for(let S of I){if(T&&!t(S,String(T),o)||A&&!t(S,String(A),o))return null;for(let B of E)if(!t(S,String(B),o))return!1;return!0}let D,P,X,F,C=A&&!o.includePrerelease&&A.semver.prerelease.length?A.semver:!1,G=T&&!o.includePrerelease&&T.semver.prerelease.length?T.semver:!1;C&&C.prerelease.length===1&&A.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(let S of E){if(F=F||S.operator===">"||S.operator===">=",X=X||S.operator==="<"||S.operator==="<=",T){if(G&&S.semver.prerelease&&S.semver.prerelease.length&&S.semver.major===G.major&&S.semver.minor===G.minor&&S.semver.patch===G.patch&&(G=!1),S.operator===">"||S.operator===">="){if(D=v(T,S,o),D===S&&D!==T)return!1}else if(T.operator===">="&&!t(T.semver,String(S),o))return!1}if(A){if(C&&S.semver.prerelease&&S.semver.prerelease.length&&S.semver.major===C.major&&S.semver.minor===C.minor&&S.semver.patch===C.patch&&(C=!1),S.operator==="<"||S.operator==="<="){if(P=s(A,S,o),P===S&&P!==A)return!1}else if(A.operator==="<="&&!t(A.semver,String(S),o))return!1}if(!S.operator&&(A||T)&&y!==0)return!1}return!(T&&X&&!A&&y!==0||A&&F&&!T&&y!==0||G||C)},v=(u,E,o)=>{if(!u)return E;let I=p(u.semver,E.semver,o);return I>0?u:I<0||E.operator===">"&&u.operator===">="?E:u},s=(u,E,o)=>{if(!u)return E;let I=p(u.semver,E.semver,o);return I<0?u:I>0||E.operator==="<"&&u.operator==="<="?E:u};l.exports=h}}),rr=O({"../../node_modules/semver/index.js"(c,l){var r=z(),i=Q(),n=q(),t=Le(),p=H(),h=je(),e=Pe(),f=Ce(),a=ye(),v=De(),s=Ge(),u=qe(),E=Fe(),o=V(),I=Ve(),T=Ue(),A=me(),y=be(),D=Xe(),P=J(),X=he(),F=_e(),C=Ne(),G=fe(),S=ve(),B=Oe(),te=ke(),se=ee(),ae=U(),ie=re(),d=He(),m=Be(),L=We(),R=Ye(),_=ze(),$=de(),N=Ke(),w=Qe(),g=Ze(),x=Je(),j=er();l.exports={parse:p,valid:h,clean:e,inc:f,diff:a,major:v,minor:s,patch:u,prerelease:E,compare:o,rcompare:I,compareLoose:T,compareBuild:A,sort:y,rsort:D,gt:P,lt:X,eq:F,neq:C,gte:G,lte:S,cmp:B,coerce:te,Comparator:se,Range:ae,satisfies:ie,toComparators:d,maxSatisfying:m,minSatisfying:L,minVersion:R,validRange:_,outside:$,gtr:N,ltr:w,intersects:g,simplifyRange:x,subset:j,SemVer:n,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:t.compareIdentifiers,rcompareIdentifiers:t.rcompareIdentifiers}}}),tr={};ge(tr,{beforeAll:()=>Er,decorators:()=>pr,mount:()=>or,parameters:()=>ur,render:()=>ir,renderToCanvas:()=>lr});var Re=Ae(rr()),sr={...we};function $e(c){globalThis.IS_REACT_ACT_ENVIRONMENT=c}function ar(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var Se=async()=>{var c;if(typeof sr.act!="function"){let l=await Ee(()=>import("./test-utils-BBHUGUfi.js").then(r=>r.t),__vite__mapDeps([0,1,2]),import.meta.url);((c=l==null?void 0:l.default)==null?void 0:c.act)??l.act}return l=>l()},ir=(c,l)=>{let{id:r,component:i}=l;if(!i)throw new Error(`Unable to render story ${r} as the component annotation is missing from the default export`);return Y.createElement(i,{...c})},{FRAMEWORK_OPTIONS:le}=xe,nr=class extends k.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidMount(){let{hasError:c}=this.state,{showMain:l}=this.props;c||l()}componentDidCatch(c){let{showException:l}=this.props;l(c)}render(){let{hasError:c}=this.state,{children:l}=this.props;return c?null:l}},Ie=le!=null&&le.strictMode?k.StrictMode:k.Fragment,pe=[],oe=!1,Te=async()=>{if(oe||pe.length===0)return;oe=!0;let c=pe.shift();c&&await c(),oe=!1,Te()};async function lr({storyContext:c,unboundStoryFn:l,showMain:r,showException:i,forceRemount:n},t){let{renderElement:p,unmountElement:h}=await Ee(async()=>{const{renderElement:s,unmountElement:u}=await import("./react-18-BdgjDjvZ.js");return{renderElement:s,unmountElement:u}},__vite__mapDeps([3,1,4,2]),import.meta.url),e=l,f=c.parameters.__isPortableStory?Y.createElement(e,{...c}):Y.createElement(nr,{showMain:r,showException:i},Y.createElement(e,{...c})),a=Ie?Y.createElement(Ie,null,f):f;n&&h(t);let v=await Se();return await new Promise(async(s,u)=>{pe.push(async()=>{try{await v(async()=>{var E,o;await p(a,t,(o=(E=c==null?void 0:c.parameters)==null?void 0:E.react)==null?void 0:o.rootOptions)}),s()}catch(E){u(E)}}),Te()}),async()=>{await v(()=>{h(t)})}}var or=c=>async l=>(l!=null&&(c.originalStoryFn=()=>l),await c.renderToCanvas(),c.canvas),ur={renderer:"react"},pr=[(c,l)=>{var n,t;if(!((t=(n=l.parameters)==null?void 0:n.react)!=null&&t.rsc))return c();let r=Re.default.major(k.version),i=Re.default.minor(k.version);if(r<18||r===18&&i<3)throw new Error("React Server Components require React >= 18.3");return k.createElement(k.Suspense,null,c())}],Er=async()=>{try{let{configure:c}=await Ee(async()=>{const{configure:r}=await Promise.resolve().then(()=>mr);return{configure:r}},void 0,import.meta.url),l=await Se();c({unstable_advanceTimersWrapper:r=>l(r),asyncWrapper:async r=>{let i=ar();$e(!1);try{let n=await r();return await new Promise(t=>{setTimeout(()=>{t()},0),cr()&&jest.advanceTimersByTime(0)}),n}finally{$e(i)}},eventWrapper:r=>{let i;return l(()=>(i=r(),i)),i}})}catch{}};function cr(){return typeof jest<"u"&&jest!==null?setTimeout._isMockFunction===!0||Object.prototype.hasOwnProperty.call(setTimeout,"clock"):!1}const mr=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{Er as beforeAll,pr as decorators,or as mount,ur as parameters,ir as render,lr as renderToCanvas};
|