@aquera/data-visualizer-sdk 0.0.3 → 0.0.5
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/chunk-4FNUVR7T.js +1 -0
- package/chunk-4XZ7RFFX.js +1 -0
- package/chunk-5CTM6JVQ.js +1 -0
- package/chunk-5GQQVHN2.js +1 -0
- package/chunk-6HEMJDCI.js +1 -0
- package/chunk-6Q3P5YXE.js +2 -0
- package/chunk-77D6MLBV.js +1 -0
- package/chunk-7IOYSCQD.js +18 -0
- package/chunk-ATIVRRY6.js +2 -0
- package/chunk-ATUZQYGW.js +1 -0
- package/chunk-AYEY6YSX.js +1 -0
- package/chunk-BTDKTIE6.js +2 -0
- package/chunk-DPY4ZJSO.js +1 -0
- package/chunk-DQ2YRLQN.js +1 -0
- package/chunk-ELIOZDZD.js +1 -0
- package/chunk-F6YL5NFN.js +1 -0
- package/chunk-FWRVVJCM.js +1 -0
- package/chunk-GQMRT62M.js +1 -0
- package/chunk-HOS2FAXH.js +1 -0
- package/chunk-I4TM4AGJ.js +1 -0
- package/chunk-INJSG5RK.js +1 -0
- package/chunk-JWVGGQEQ.js +18 -0
- package/chunk-L6I5ELGW.js +1 -0
- package/chunk-LFSX3TZJ.js +1 -0
- package/chunk-LVEGSJBT.js +1 -0
- package/chunk-LVKS7TUK.js +1 -0
- package/chunk-LYEP6PZI.js +1 -0
- package/chunk-MPGDQZRI.js +1 -0
- package/{chunk-S24GYO47.js → chunk-MYNXPNVU.js} +793 -793
- package/chunk-OBIV4S2O.js +1 -0
- package/chunk-OETTICY5.js +1 -0
- package/chunk-OF6NT3W7.js +1 -0
- package/chunk-OREJIV5W.js +1 -0
- package/chunk-QXVITQOV.js +1 -0
- package/chunk-RCWO45CI.js +1 -0
- package/chunk-REQTBAAZ.js +1 -0
- package/chunk-SYVY7IJY.js +4 -0
- package/chunk-T3NXAI3H.js +1 -0
- package/chunk-UVIAZB7Z.js +1 -0
- package/chunk-W25JWAKD.js +1 -0
- package/chunk-W2HKCDVZ.js +1 -0
- package/chunk-WRBHM7X4.js +1 -0
- package/chunk-XCT4UKLK.js +1 -0
- package/chunk-YA4FV3D2.js +2 -0
- package/chunk-YHTLTPEH.js +18 -0
- package/chunk-YPOBCEMA.js +1 -0
- package/main.js +1 -1
- package/package.json +1 -1
- package/chunk-2RUFAZZ3.js +0 -2
- package/chunk-4L6PYIW4.js +0 -1
- package/chunk-O74A6HHW.js +0 -18
- package/chunk-V7RVJSD2.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e as We}from"./chunk-ZW5NV4UO.js";var _e=We((J,ce)=>{(function(H,X){typeof J=="object"&&typeof ce=="object"?ce.exports=X(H._Highcharts,H._Highcharts.AST,H._Highcharts.Chart):typeof define=="function"&&define.amd?define("highcharts/modules/export-data",["highcharts/highcharts"],function($){return X($,$.AST,$.Chart)}):typeof J=="object"?J["highcharts/modules/export-data"]=X(H._Highcharts,H._Highcharts.AST,H._Highcharts.Chart):H.Highcharts=X(H.Highcharts,H.Highcharts.AST,H.Highcharts.Chart)})("u"<typeof window?J:window,(H,X,$)=>(()=>{"use strict";var ne,ye={660:o=>{o.exports=X},944:o=>{o.exports=H},960:o=>{o.exports=$}},de={};function S(o){var c=de[o];if(c!==void 0)return c.exports;var x=de[o]={exports:{}};return ye[o](x,x.exports,S),x.exports}S.n=o=>{var c=o&&o.__esModule?()=>o.default:()=>o;return S.d(c,{a:c}),c},S.d=(o,c)=>{for(var x in c)S.o(c,x)&&!S.o(o,x)&&Object.defineProperty(o,x,{enumerable:!0,get:c[x]})},S.o=(o,c)=>Object.prototype.hasOwnProperty.call(o,c);var pe={};S.d(pe,{default:()=>Fe});var we=S(944),j=S.n(we);let{isSafari:Te,win:g,win:{document:ie}}=j(),{error:$e}=j(),ue=g.URL||g.webkitURL||g;function ge(o){let c=o.replace(/filename=.*;/,"").match(/data:([^;]*)(;base64)?,([A-Z+\d\/]+)/i);if(c&&c.length>3&&g.atob&&g.ArrayBuffer&&g.Uint8Array&&g.Blob&&ue.createObjectURL){let x=g.atob(c[3]),O=new g.ArrayBuffer(x.length),V=new g.Uint8Array(O);for(let W=0;W<V.length;++W)V[W]=x.charCodeAt(W);return ue.createObjectURL(new g.Blob([V],{type:c[1]}))}}function re(o,c){let x=g.navigator,O=ie.createElement("a");if(typeof o!="string"&&!(o instanceof String)&&x.msSaveOrOpenBlob)return void x.msSaveOrOpenBlob(o,c);if(o=""+o,x.userAgent.length>1e3)throw Error("Input too long");let V=/Edge\/\d+/.test(x.userAgent);if((Te&&typeof o=="string"&&o.indexOf("data:application/pdf")===0||V||o.length>2e6)&&!(o=ge(o)||""))throw Error("Failed to convert to blob");if(O.download!==void 0)O.href=o,O.download=c,ie.body.appendChild(O),O.click(),ie.body.removeChild(O);else try{if(!g.open(o,"chart"))throw Error("Failed to open window")}catch{g.location.href=o}}function fe(o,c){let x=g.navigator,O=g.URL||g.webkitURL||g;try{if(x.msSaveOrOpenBlob&&g.MSBlobBuilder){let V=new g.MSBlobBuilder;return V.append(o),V.getBlob("image/svg+xml")}return O.createObjectURL(new g.Blob(["\uFEFF"+o],{type:c}))}catch{}}var ve=S(660),le=S.n(ve),De=S(960),Se=S.n(De);let Ce={exporting:{csv:{annotations:{itemDelimiter:"; ",join:!1},columnHeaderFormatter:null,dateFormat:"%Y-%m-%d %H:%M:%S",decimalPoint:null,itemDelimiter:null,lineDelimiter:`
|
|
2
|
+
`},menuItemDefinitions:{downloadCSV:{textKey:"downloadCSV",onclick:function(){this.exporting?.downloadCSV()}},downloadXLS:{textKey:"downloadXLS",onclick:function(){this.exporting?.downloadXLS()}},viewData:{textKey:"viewData",onclick:function(){this.exporting?.wrapLoading(this.exporting.toggleDataTable)}}},showExportInProgress:!0,showTable:!1,useMultiLevelHeaders:!0,useRowspanHeaders:!0},lang:{downloadCSV:"Download CSV",downloadXLS:"Download XLS",exportData:{annotationHeader:"Annotations",categoryHeader:"Category",categoryDatetimeHeader:"DateTime"},viewData:"View data table",hideData:"Hide data table",exportInProgress:"Exporting..."}},{getOptions:Ee,setOptions:Le}=j(),{composed:Ae,doc:He,win:me}=j(),{addEvent:se,defined:Oe,extend:xe,find:ke,fireEvent:Q,isNumber:Ve,pick:P,pushUnique:Ne}=j();(function(o){function c(){this.wrapLoading(()=>{let i=this.getCSV(!0);re(fe(i,"text/csv")||"data:text/csv,\uFEFF"+encodeURIComponent(i),this.getFilename()+".csv")})}function x(){this.wrapLoading(()=>{let i='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>Ark1</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--><style>td{border:none;font-family: Calibri, sans-serif;} .number{mso-number-format:"0.00";} .text{ mso-number-format:"@";}</style><meta name=ProgId content=Excel.Sheet><meta charset=UTF-8></head><body>'+this.getTable(!0)+"</body></html>";re(fe(i,"application/vnd.ms-excel")||"data:application/vnd.ms-excel;base64,"+me.btoa(unescape(encodeURIComponent(i))),this.getFilename()+".xls")})}function O(i){let l="",r=this.getDataRows(),t=this.options?.csv,a=P(t?.decimalPoint,t?.itemDelimiter!==","&&i?1.1.toLocaleString()[1]:"."),b=P(t?.itemDelimiter,a===","?";":","),p=t?.lineDelimiter;return r.forEach((s,n)=>{let f="",y=s.length;for(;y--;)typeof(f=s[y])=="string"&&(f=`"${f}"`),typeof f=="number"&&a!=="."&&(f=f.toString().replace(".",a)),s[y]=f;s.length=r.length?r[0].length:0,l+=s.join(b),n<r.length-1&&(l+=p)}),l}function V(i){let l,r,t=this.chart,a=t.hasParallelCoordinates,b=t.time,p=this.options?.csv||{},s=t.xAxis,n={},f=[],y=[],N=[],L=t.options.lang.exportData,C=L?.categoryHeader,q=L?.categoryDatetimeHeader,G=function(e,u,v){if(p.columnHeaderFormatter){let D=p.columnHeaderFormatter(e,u,v);if(D!==!1)return D}return!e&&C?C:!e.bindAxes&&q&&C?e.options.title&&e.options.title.text||(e.dateTime?q:C):i?{columnTitle:((v||0)>1?u:e.name)||"",topLevelColumnTitle:e.name}:e.name+((v||0)>1?" ("+u+")":"")},w=function(e,u,v){let D={},Y={};return u.forEach(function(B){let _=(e.keyToAxis&&e.keyToAxis[B]||B)+"Axis",M=Ve(v)?e.chart[_][v]:e[_];D[B]=M&&M.categories||[],Y[B]=M&&M.dateTime}),{categoryMap:D,dateTimeValueAxisMap:Y}},d=function(e,u){let v=e.pointArrayMap||["y"];return e.data.some(D=>D.y!==void 0&&D.name)&&u&&!u.categories&&e.exportKey!=="name"?["x",...v]:v},m=[],E,h,A,k=0,I,F;for(I in t.series.forEach(function(e){let u=e.options.keys,v=e.xAxis,D=u||d(e,v),Y=D.length,B=!e.requireSorting&&{},_=s.indexOf(v),M=w(e,D),be,R;if(e.options.includeInDataExport!==!1&&!e.options.isInternal&&e.visible!==!1){for(ke(m,function(he){return he[0]===_})||m.push([_,k]),R=0;R<Y;)A=G(e,D[R],D.length),N.push(A.columnTitle||A),i&&y.push(A.topLevelColumnTitle||A),R++;be={chart:e.chart,autoIncrement:e.autoIncrement,options:e.options,pointArrayMap:e.pointArrayMap,index:e.index},e.options.data?.forEach(function(he,ee){let T,te,ae,Z={series:be};a&&(M=w(e,D,ee)),e.pointClass.prototype.applyOptions.apply(Z,[he]);let oe=e.data[ee]&&e.data[ee].name;if(T=(Z.x??"")+","+oe,R=0,(!v||e.exportKey==="name"||!a&&v&&v.hasNames&&oe)&&(T=oe),B&&(B[T]&&(T+="|"+ee),B[T]=!0),n[T]){let U=`${T},${n[T].pointers[e.index]}`,z=T;n[T].pointers[e.index]&&(n[U]||(n[U]=[],n[U].xValues=[],n[U].pointers=[]),T=U),n[z].pointers[e.index]+=1}else{n[T]=[],n[T].xValues=[];let U=[];for(let z=0;z<e.chart.series.length;z++)U[z]=0;n[T].pointers=U,n[T].pointers[e.index]=1}for(n[T].x=Z.x,n[T].name=oe,n[T].xValues[_]=Z.x;R<Y;)te=D[R],ae=e.pointClass.prototype.getNestedProperty.apply(Z,[te]),n[T][k+R]=P(M.categoryMap[te][ae],M.dateTimeValueAxisMap[te]?b.dateFormat(p.dateFormat,ae):null,ae),R++}),k+=R}}),n)Object.hasOwnProperty.call(n,I)&&f.push(n[I]);for(h=i?[y,N]:[N],k=m.length;k--;)l=m[k][0],r=m[k][1],E=s[l],f.sort(function(e,u){return e.xValues[l]-u.xValues[l]}),F=G(E),h[0].splice(r,0,F),i&&h[1]&&h[1].splice(r,0,F),f.forEach(function(e){let u=e.name;E&&!Oe(u)&&(E.dateTime?(e.x instanceof Date&&(e.x=e.x.getTime()),u=b.dateFormat(p.dateFormat,e.x)):u=E.categories?P(E.names[e.x],E.categories[e.x],e.x):e.x),e.splice(r,0,u)});return Q(t,"exportData",{dataRows:h=h.concat(f)}),h}function W(i){let l=r=>{if(!r.tagName||r.tagName==="#text")return r.textContent||"";let t=r.attributes,a=`<${r.tagName}`;return t&&Object.keys(t).forEach(b=>{let p=t[b];a+=` ${b}="${p}"`}),a+=">",a+=r.textContent||"",(r.children||[]).forEach(b=>{a+=l(b)}),a+=`</${r.tagName}>`};return l(this.getTableAST(i))}function Ie(i){let l=0,r=[],t=this,a=t.chart,b=a.options,p=i?1.1.toLocaleString()[1]:".",s=P(t.options.useMultiLevelHeaders,!0),n=t.getDataRows(s),f=s?n.shift():null,y=n.shift(),N=function(w,d){let m=w.length;if(d.length!==m)return!1;for(;m--;)if(w[m]!==d[m])return!1;return!0},L=function(w,d,m,E){let h=P(E,""),A="highcharts-text"+(d?" "+d:"");return typeof h=="number"?(h=a.numberFormatter(h,-1,p,w==="th"?"":void 0),A="highcharts-number"):E||(A="highcharts-empty"),{tagName:w,attributes:m=xe({class:A},m),textContent:h}},{tableCaption:C}=t.options||{};C!==!1&&r.push({tagName:"caption",attributes:{class:"highcharts-table-caption"},textContent:typeof C=="string"?C:b.title?.text||b.lang.chartTitle});for(let w=0,d=n.length;w<d;++w)n[w].length>l&&(l=n[w].length);r.push((function(w,d,m){let E=[],h=0,A=m||d&&d.length,k,I=0,F;if(s&&w&&d&&!N(w,d)){let e=[];for(;h<A;++h)if((k=w[h])===w[h+1])++I;else if(I)e.push(L("th","highcharts-table-topheading",{scope:"col",colspan:I+1},k)),I=0;else{k===d[h]?t.options.useRowspanHeaders?(F=2,delete d[h]):(F=1,d[h]=""):F=1;let u=L("th","highcharts-table-topheading",{scope:"col"},k);F>1&&u.attributes&&(u.attributes.valign="top",u.attributes.rowspan=F),e.push(u)}E.push({tagName:"tr",children:e})}if(d){let e=[];for(h=0,A=d.length;h<A;++h)d[h]!==void 0&&e.push(L("th",null,{scope:"col"},d[h]));E.push({tagName:"tr",children:e})}return{tagName:"thead",children:E}})(f,y||[],Math.max(l,y?.length||0)));let q=[];n.forEach(function(w){let d=[];for(let m=0;m<l;m++)d.push(L(m?"td":"th",null,m?{}:{scope:"row"},w[m]));q.push({tagName:"tr",children:d})}),r.push({tagName:"tbody",children:q});let G={tree:{tagName:"table",id:`highcharts-data-table-${a.index}`,children:r}};return Q(a,"afterGetTableAST",G),G.tree}function Be(){this.toggleDataTable(!1)}function Me(i){let l=this.chart,r=(i=P(i,!this.isDataTableVisible))&&!this.dataTableDiv;if(r&&(this.dataTableDiv=He.createElement("div"),this.dataTableDiv.className="highcharts-data-table",l.renderTo.parentNode.insertBefore(this.dataTableDiv,l.renderTo.nextSibling)),this.dataTableDiv){let s=this.dataTableDiv.style,n=s.display;s.display=i?"block":"none",i?(this.dataTableDiv.innerHTML=le().emptyHTML,new(le())([this.getTableAST()]).addToDOM(this.dataTableDiv),Q(l,"afterViewData",{element:this.dataTableDiv,wasHidden:r||n!==s.display})):Q(l,"afterHideData")}this.isDataTableVisible=i;let t=this.divElements,a=this.options,b=a.buttons?.contextButton.menuItems,p=l.options.lang;if(a&&a.menuItemDefinitions&&p&&p.viewData&&p.hideData&&b&&t){let s=t[b.indexOf("viewData")];s&&le().setElementHTML(s,this.isDataTableVisible?p.hideData:p.viewData)}}function Ue(){this.toggleDataTable(!0)}function je(i){let l=this.chart,r=!!this.options.showExportInProgress,t=me.requestAnimationFrame||setTimeout;t(()=>{r&&l.showLoading(l.options.lang.exportInProgress),t(()=>{try{i.call(this)}finally{r&&l.hideLoading()}})})}function Pe(){let i=this.exporting,l=i?.dataTableDiv,r=(t,a)=>t.children[a].textContent;if(l&&i.options.allowTableSorting){let t=l.querySelector("thead tr");t&&t.childNodes.forEach(a=>{let b=l.querySelector("tbody");a.addEventListener("click",function(){let p=[...l.querySelectorAll("tr:not(thead tr)")],s=[...a.parentNode.children];if(i){let n,f;p.sort((n=s.indexOf(a),f=i.ascendingOrderInTable=!i.ascendingOrderInTable,(y,N)=>{let L,C;return L=r(f?y:N,n),C=r(f?N:y,n),L===""||C===""||isNaN(L)||isNaN(C)?L.toString().localeCompare(C):L-C})).forEach(y=>{b?.appendChild(y)}),s.forEach(y=>{["highcharts-sort-ascending","highcharts-sort-descending"].forEach(N=>{y.classList.contains(N)&&y.classList.remove(N)})}),a.classList.add(i.ascendingOrderInTable?"highcharts-sort-ascending":"highcharts-sort-descending")}})})}}function Ke(){this.options?.exporting?.showTable&&!this.options.chart.forExport&&this.exporting?.viewData()}function Xe(){this.exporting?.dataTableDiv?.remove()}o.compose=function(i,l,r){if(!Ne(Ae,"ExportData"))return;xe(Se().prototype,{downloadCSV:function(){return this.exporting?.downloadCSV()},downloadXLS:function(){return this.exporting?.downloadXLS()},getCSV:function(a){return this.exporting?.getCSV(a)},getDataRows:function(a){return this.exporting?.getDataRows(a)},getTable:function(a){return this.exporting?.getTable(a)},getTableAST:function(a){return this.exporting?.getTableAST(a)},hideData:function(){return this.exporting?.hideData()},toggleDataTable:function(a){return this.exporting?.toggleDataTable(a)},viewData:function(){return this.exporting?.viewData()}});let t=l.prototype;if(!t.downloadCSV){se(i,"afterViewData",Pe),se(i,"render",Ke),se(i,"destroy",Xe),t.downloadCSV=c,t.downloadXLS=x,t.getCSV=O,t.getDataRows=V,t.getTable=W,t.getTableAST=Ie,t.hideData=Be,t.toggleDataTable=Me,t.wrapLoading=je,t.viewData=Ue,Le(Ce);let a=Ee().exporting?.buttons?.contextButton?.menuItems;a&&a.push("separator","downloadCSV","downloadXLS","viewData");let{arearange:b,gantt:p,map:s,mapbubble:n,treemap:f,xrange:y}=r.types;b&&(b.prototype.keyToAxis={low:"y",high:"y"}),p&&(p.prototype.exportKey="name",p.prototype.keyToAxis={start:"x",end:"x"}),s&&(s.prototype.exportKey="name"),n&&(n.prototype.exportKey="name"),f&&(f.prototype.exportKey="name"),y&&(y.prototype.keyToAxis={x2:"x"})}}})(ne||(ne={}));let Re=ne,K=j();K.dataURLtoBlob=K.dataURLtoBlob||ge,K.downloadURL=K.downloadURL||re,Re.compose(K.Chart,K.Exporting,K.Series);let Fe=j();return pe.default})())});export default _e();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Q,b as Z,e as Ut}from"./chunk-ZW5NV4UO.js";var Rt=Ut((B,$)=>{(function(O,w){typeof B=="object"&&typeof $=="object"?$.exports=w(O._Highcharts,O._Highcharts.Color,O._Highcharts.SeriesRegistry):typeof define=="function"&&define.amd?define("highcharts/modules/venn",["highcharts/highcharts"],function(E){return w(E,E.Color,E.SeriesRegistry)}):typeof B=="object"?B["highcharts/modules/venn"]=w(O._Highcharts,O._Highcharts.Color,O._Highcharts.SeriesRegistry):O.Highcharts=w(O.Highcharts,O.Highcharts.Color,O.Highcharts.SeriesRegistry)})("u"<typeof window?B:window,(O,w,E)=>(()=>{"use strict";var V,F,U,dt={512:r=>{r.exports=E},620:r=>{r.exports=w},944:r=>{r.exports=O}},tt={};function v(r){var t=tt[r];if(t!==void 0)return t.exports;var n=tt[r]={exports:{}};return dt[r](n,n.exports,v),n.exports}v.n=r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return v.d(t,{a:t}),t},v.d=(r,t)=>{for(var n in t)v.o(t,n)&&!v.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},v.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t);var et={};v.d(et,{default:()=>Ft});var gt=v(944),I=v.n(gt),yt=v(620),xt=v.n(yt);(V=F||(F={})).getCenterOfPoints=function(r){let t=r.reduce((n,a)=>(n.x+=a.x,n.y+=a.y,n),{x:0,y:0});return{x:t.x/r.length,y:t.y/r.length}},V.getDistanceBetweenPoints=function(r,t){return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))},V.getAngleBetweenPoints=function(r,t){return Math.atan2(t.x-r.x,t.y-r.y)},V.pointInPolygon=function({x:r,y:t},n){let a=n.length,c,o,e=!1;for(c=0,o=a-1;c<a;o=c++){let[l,u]=n[c],[i,s]=n[o];u>t!=s>t&&r<(i-l)*(t-u)/(s-u)+l&&(e=!e)}return e};let N=F,{getAngleBetweenPoints:R,getCenterOfPoints:rt,getDistanceBetweenPoints:H}=N,{correctFloat:mt}=I();(function(r){function t(i,s){let f=Math.pow(10,s);return Math.round(i*f)/f}function n(i){if(i<=0)throw Error("radius of circle must be a positive number.");return mt(Math.PI*i*i)}function a(i,s){return i*i*Math.acos(1-s/i)-(i-s)*Math.sqrt(s*(2*i-s))}function c(i,s){let f=H(i,s),h=i.r,p=s.r,C=[];if(f<h+p&&f>Math.abs(h-p)){let x=h*h,g=(x-p*p+f*f)/(2*f),m=Math.sqrt(x-g*g),y=i.x,b=s.x,d=i.y,X=s.y,M=y+g*(b-y)/f,L=d+g*(X-d)/f,T=-(m/f*(X-d)),_=-(m/f*(b-y));C=[{x:t(M+T,14),y:t(L-_,14)},{x:t(M-T,14),y:t(L+_,14)}]}return C}function o(i){return i.reduce((s,f,h,p)=>{let C=p.slice(h+1).reduce((x,g,m)=>{let y=[h,m+h+1];return x.concat(c(f,g).map(b=>(b.indexes=y,b)))},[]);return s.concat(C)},[])}function e(i,s){return H(i,s)<=s.r+1e-10}function l(i,s){return!s.some(function(f){return!e(i,f)})}function u(i){return o(i).filter(function(s){return l(s,i)})}r.round=t,r.getAreaOfCircle=n,r.getCircularSegmentArea=a,r.getOverlapBetweenCircles=function(i,s,f){let h=0;if(f<i+s){if(f<=Math.abs(s-i))h=n(i<s?i:s);else{let p=(i*i-s*s+f*f)/(2*f);h=a(i,i-p)+a(s,s-(f-p))}h=t(h,14)}return h},r.getCircleCircleIntersection=c,r.getCirclesIntersectionPoints=o,r.isCircle1CompletelyOverlappingCircle2=function(i,s){return H(i,s)+s.r<i.r+1e-10},r.isPointInsideCircle=e,r.isPointInsideAllCircles=l,r.isPointOutsideAllCircles=function(i,s){return!s.some(function(f){return e(i,f)})},r.getCirclesIntersectionPolygon=u,r.getAreaOfIntersectionBetweenCircles=function(i){let s=u(i),f;if(s.length>1){let h=rt(s),p=(s=s.map(function(x){return x.angle=R(h,x),x}).sort(function(x,g){return g.angle-x.angle}))[s.length-1],C=s.reduce(function(x,g){let{startPoint:m}=x,y=rt([m,g]),b=g.indexes.filter(function(d){return m.indexes.indexOf(d)>-1}).reduce(function(d,X){let M=i[X],L=R(M,g),T=R(M,m),_=T-L+(T<L?2*Math.PI:0),pt=T-_/2,j=H(y,{x:M.x+M.r*Math.sin(pt),y:M.y+M.r*Math.cos(pt)}),{r:k}=M;return j>2*k&&(j=2*k),(!d||d.width>j)&&(d={r:k,largeArc:+(j>k),width:j,x:g.x,y:g.y}),d},null);if(b){let{r:d}=b;x.arcs.push(["A",d,d,0,b.largeArc,1,b.x,b.y]),x.startPoint=g}return x},{startPoint:p,arcs:[]}).arcs;C.length===0||C.length===1||(C.unshift(["M",p.x,p.y]),f={center:h,d:C})}return f}})(U||(U={}));let W=U,bt=function(r,t){let{animatableAttribs:n,onComplete:a,css:c,renderer:o}=t,e=r.series&&r.series.chart.hasRendered?void 0:r.series&&r.series.options.animation,l=r.graphic;if(t.attribs=Z(Q({},t.attribs),{class:r.getClassName()}),r.shouldDraw())l||(r.graphic=l=t.shapeType==="text"?o.text():t.shapeType==="image"?o.image(t.imageUrl||"").attr(t.shapeArgs||{}):o[t.shapeType](t.shapeArgs||{}),l.add(t.group)),c&&l.css(c),l.attr(t.attribs).animate(n,!t.isNew&&e,a);else if(l){let u=()=>{r.graphic=l=l&&l.destroy(),typeof a=="function"&&a()};Object.keys(n).length?l.animate(n,void 0,()=>u()):u()}};var vt=v(512),q=v.n(vt);let{scatter:{prototype:{pointClass:Ct}}}=q().seriesTypes,{isNumber:Ot}=I(),{getAreaOfCircle:At,getCircleCircleIntersection:Mt,getOverlapBetweenCircles:nt,isPointInsideAllCircles:Pt,isPointInsideCircle:wt,isPointOutsideAllCircles:It}=W,{getDistanceBetweenPoints:Y}=N,{extend:St,isArray:z,isNumber:Tt,isObject:it,isString:Et}=I();function st(r){let t={};return r.filter(n=>n.sets.length===2).forEach(n=>{n.sets.forEach((a,c,o)=>{it(t[a])||(t[a]={totalOverlap:0,overlapping:{}}),t[a]={totalOverlap:(t[a].totalOverlap||0)+n.value,overlapping:Z(Q({},t[a].overlapping||{}),{[o[1-c]]:n.value})}})}),r.filter(D).forEach(n=>{let a=t[n.sets[0]];St(n,a)}),r}function ot(r,t,n,a,c){let o=r(t),e=r(n),l=c||100,u=a||1e-10,i=n-t,s,f,h=1;if(t>=n)throw Error("a must be smaller than b.");if(o*e>0)throw Error("f(a) and f(b) must have opposite signs.");if(o===0)s=t;else if(e===0)s=n;else for(;h++<=l&&f!==0&&i>u;)i=(n-t)/2,o*(f=r(s=t+i))>0?t=s:n=s;return s}function lt(r){let t=r.slice(0,-1),n=t.length,a=[],c=(o,e)=>(o.sum+=e[o.i],o);for(let o=0;o<n;o++)a[o]=t.reduce(c,{sum:0,i:o}).sum/n;return a}function G(r,t,n){let a=r+t;return n<=0?a:At(r<t?r:t)<=n?0:ot(c=>n-nt(r,t,c),0,a)}function D(r){return z(r.sets)&&r.sets.length===1}function at(r){let t={};return it(r)&&Tt(r.value)&&r.value>-1&&z(r.sets)&&r.sets.length>0&&!r.sets.some(function(n){let a=!1;return!t[n]&&Et(n)?t[n]=!0:a=!0,a})}function ct(r,t){return t.reduce(function(n,a){let c=0;if(a.sets.length>1){let o=a.value-(function(e){let l=0;if(e.length===2){let u=e[0],i=e[1];l=nt(u.r,i.r,Y(u,i))}return l})(a.sets.map(function(e){return r[e]}));c=Math.round(o*o*1e11)/1e11}return n+c},0)}function ut(r,t){return t.totalOverlap!==void 0&&r.totalOverlap!==void 0?t.totalOverlap-r.totalOverlap:NaN}let P={geometry:N,geometryCircles:W,addOverlapToSets:st,getCentroid:lt,getDistanceBetweenCirclesByOverlap:G,getLabelWidth:function(r,t,n){let a=t.reduce((e,l)=>Math.min(l.r,e),1/0),c=n.filter(e=>!wt(r,e)),o=function(e,l){return ot(u=>{let i={x:r.x+l*u,y:r.y};return-(e-u)+(Pt(i,t)&&It(i,c)?0:Number.MAX_VALUE)},0,e)};return 2*Math.min(o(a,-1),o(a,1))},getMarginFromCircles:function(r,t,n){let a=t.reduce((c,o)=>{let e=o.r-Y(r,o);return e<=c?e:c},Number.MAX_VALUE);return n.reduce((c,o)=>{let e=Y(r,o)-o.r;return e<=c?e:c},a)},isSet:D,layoutGreedyVenn:function(r){let t=[],n={};r.filter(e=>e.sets.length===1).forEach(e=>{n[e.sets[0]]=e.circle={x:Number.MAX_VALUE,y:Number.MAX_VALUE,r:Math.sqrt(e.value/Math.PI)}});let a=(e,l)=>{let u=e.circle;u&&(u.x=l.x,u.y=l.y),t.push(e)};st(r);let c=r.filter(D).sort(ut);a(c.shift(),{x:0,y:0});let o=r.filter(e=>e.sets.length===2);for(let e of c){let l=e.circle;if(!l)continue;let u=l.r,i=e.overlapping;a(e,t.reduce((s,f,h)=>{let p=f.circle;if(!p||!i)return s;let C=i[f.sets[0]],x=G(u,p.r,C),g=[{x:p.x+x,y:p.y},{x:p.x-x,y:p.y},{x:p.x,y:p.y+x},{x:p.x,y:p.y-x}];for(let m of t.slice(h+1)){let y=m.circle,b=i[m.sets[0]];if(!y)continue;let d=G(u,y.r,b);g=g.concat(Mt({x:p.x,y:p.y,r:x},{x:y.x,y:y.y,r:d}))}for(let m of g){l.x=m.x,l.y=m.y;let y=ct(n,o);y<s.loss&&(s.loss=y,s.coordinates=m)}return s},{loss:Number.MAX_VALUE,coordinates:void 0}).coordinates)}return n},loss:ct,nelderMead:function(r,t){let n=function(u,i){return u.fx-i.fx},a=(u,i,s,f)=>i.map((h,p)=>u*h+s*f[p]),c=(u,i)=>(i.fx=r(i),u[u.length-1]=i,u),o=u=>{let i=u[0];return u.map(s=>{let f=a(.5,i,.5,s);return f.fx=r(f),f})},e=(u,i,s,f)=>{let h=a(s,u,f,i);return h.fx=r(h),h},l=(u=>{let i=u.length,s=Array(i+1);s[0]=u,s[0].fx=r(u);for(let f=0;f<i;++f){let h=u.slice();h[f]=h[f]?1.05*h[f]:.001,h.fx=r(h),s[f+1]=h}return s})(t);for(let u=0;u<100;u++){l.sort(n);let i=l[l.length-1],s=lt(l),f=e(s,i,2,-1);if(f.fx<l[0].fx){let h=e(s,i,3,-2);l=c(l,h.fx<f.fx?h:f)}else if(f.fx>=l[l.length-2].fx){let h;l=f.fx>i.fx?(h=e(s,i,.5,.5)).fx<i.fx?c(l,h):o(l):(h=e(s,i,1.5,-.5)).fx<f.fx?c(l,h):o(l)}else l=c(l,f)}return l[0]},processVennData:function(r,t){let n=z(r)?r:[],a=n.reduce(function(o,e){var l;return e.sets&&at(l=e)&&D(l)&&l.value>0&&o.indexOf(e.sets[0])===-1&&o.push(e.sets[0]),o},[]).sort(),c=n.reduce(function(o,e){return e.sets&&at(e)&&!e.sets.some(function(l){return a.indexOf(l)===-1})&&(o[e.sets.sort().join(t)]={sets:e.sets,value:e.value||0}),o},{});return a.reduce(function(o,e,l,u){return u.slice(l+1).forEach(function(i){o.push(e+t+i)}),o},[]).forEach(function(o){if(!c[o]){let e={sets:o.split(t),value:0};c[o]=e}}),Object.keys(c).map(function(o){return c[o]})},sortByTotalOverlap:ut},{animObject:Lt}=I(),{parse:jt}=xt(),{getAreaOfIntersectionBetweenCircles:Bt,getCirclesIntersectionPolygon:Vt,isCircle1CompletelyOverlappingCircle2:Nt,isPointInsideAllCircles:Ht,isPointOutsideAllCircles:Dt}=W,{getCenterOfPoints:Xt}=N,{scatter:J}=q().seriesTypes,{addEvent:_t,extend:ft,isArray:ht,isNumber:S,isObject:kt,merge:K}=I();class A extends J{static getLabelPosition(t,n){let a=t.reduce((o,e)=>{let l=e.r/2;return[{x:e.x,y:e.y},{x:e.x+l,y:e.y},{x:e.x-l,y:e.y},{x:e.x,y:e.y+l},{x:e.x,y:e.y-l}].reduce((u,i)=>{let s=P.getMarginFromCircles(i,t,n);return u.margin<s&&(u.point=i,u.margin=s),u},o)},{point:void 0,margin:-Number.MAX_VALUE}).point,c=P.nelderMead(o=>-P.getMarginFromCircles({x:o[0],y:o[1]},t,n),[a.x,a.y]);return Ht(a={x:c[0],y:c[1]},t)&&Dt(a,n)||(a=t.length>1?Xt(Vt(t)):{x:t[0].x,y:t[0].y}),a}static getLabelValues(t,n){let a=t.sets,c=n.reduce((l,u)=>{let i=a.indexOf(u.sets[0])>-1;return u.circle&&l[i?"internal":"external"].push(u.circle),l},{internal:[],external:[]});c.external=c.external.filter(l=>c.internal.some(u=>!Nt(l,u)));let o=A.getLabelPosition(c.internal,c.external),e=P.getLabelWidth(o,c.internal,c.external);return{position:o,width:e}}static layout(t){let n={},a={};if(t.length>0){let c=P.layoutGreedyVenn(t),o=t.filter(P.isSet);for(let e of t){let l=e.sets,u=l.join(),i=P.isSet(e)?c[u]:Bt(l.map(s=>c[s]));i&&(n[u]=i,a[u]=A.getLabelValues(e,o))}}return{mapOfIdToShape:n,mapOfIdToLabelValues:a}}static getScale(t,n,a){let c=a.bottom-a.top,o=a.right-a.left,e=(a.right+a.left)/2,l=(a.top+a.bottom)/2,u=Math.min(o>0?1/o*t:1,c>0?1/c*n:1);return{scale:u,centerX:t/2-e*u,centerY:n/2-l*u}}static updateFieldBoundaries(t,n){let a=n.x-n.r,c=n.x+n.r,o=n.y+n.r,e=n.y-n.r;return(!S(t.left)||t.left>a)&&(t.left=a),(!S(t.right)||t.right<c)&&(t.right=c),(!S(t.top)||t.top>e)&&(t.top=e),(!S(t.bottom)||t.bottom<o)&&(t.bottom=o),t}animate(t){if(!t){let n=Lt(this.options.animation);for(let a of this.points){let c=a.shapeArgs;if(a.graphic&&c){let o={},e={};c.d?o.opacity=.001:(o.r=0,e.r=c.r),a.graphic.attr(o).animate(e,n),c.d&&setTimeout(()=>{a?.graphic?.animate({opacity:1})},n.duration)}}}}drawPoints(){let t=this.chart,n=this.group,a=this.points||[],c=t.renderer;for(let o of a){let e={zIndex:ht(o.sets)?o.sets.length:0},l=o.shapeArgs;t.styledMode||ft(e,this.pointAttribs(o,o.state)),bt(o,{isNew:!o.graphic,animatableAttribs:l,attribs:e,group:n,renderer:c,shapeType:l?.d?"path":"circle"})}}init(){J.prototype.init.apply(this,arguments),delete this.opacity}pointAttribs(t,n){let a=this.options||{},c=t?.options||{},o=n&&a.states[n]||{},e=K(a,{color:t?.color},c,o);return{fill:jt(e.color).brighten(e.brightness).get(),opacity:e.opacity,stroke:e.borderColor,"stroke-width":e.borderWidth,dashstyle:e.borderDashStyle}}translate(){let t=this.chart;this.dataTable.modified=this.dataTable,this.generatePoints();let n=P.processVennData(this.options.data,A.splitter),{mapOfIdToShape:a,mapOfIdToLabelValues:c}=A.layout(n),o=Object.keys(a).filter(s=>{let f=a[s];return f&&S(f.r)}).reduce((s,f)=>A.updateFieldBoundaries(s,a[f]),{top:0,bottom:0,left:0,right:0}),e=A.getScale(t.plotWidth,t.plotHeight,o),l=e.scale,u=e.centerX,i=e.centerY;for(let s of this.points){let f=ht(s.sets)?s.sets:[],h=f.join(),p=a[h],C=c[h]||{},x=s.options?.dataLabels,g,m=C.width,y=C.position;if(p){if(p.r)g={x:u+p.x*l,y:i+p.y*l,r:p.r*l};else if(p.d){let b=p.d;b.forEach(d=>{d[0]==="M"?(d[1]=u+d[1]*l,d[2]=i+d[2]*l):d[0]==="A"&&(d[1]=d[1]*l,d[2]=d[2]*l,d[6]=u+d[6]*l,d[7]=i+d[7]*l)}),g={d:b}}y?(y.x=u+y.x*l,y.y=i+y.y*l):y={},S(m)&&(m=Math.round(m*l))}s.shapeArgs=g,y&&g&&(s.plotX=y.x,s.plotY=y.y),m&&g&&(s.dlOptions=K(!0,{style:{width:m}},kt(x,!0)?x:void 0,{zIndex:void 0})),s.name=s.options.name||f.join("\u2229")}}}A.splitter="highcharts-split",A.defaultOptions=K(J.defaultOptions,{borderColor:"#cccccc",borderDashStyle:"solid",borderWidth:1,brighten:0,clip:!1,colorByPoint:!0,dataLabels:{enabled:!0,verticalAlign:"middle",formatter:function(){return this.point.name}},inactiveOtherPoints:!0,marker:!1,opacity:.75,showInLegend:!1,legendType:"point",states:{hover:{opacity:1,borderColor:"#333333"},select:{color:"#cccccc",borderColor:"#000000",animation:!1},inactive:{opacity:.075}},tooltip:{pointFormat:"{point.name}: {point.value}"},legendSymbol:"rectangle"}),ft(A.prototype,{axisTypes:[],directTouch:!0,isCartesian:!1,pointArrayMap:["value"],pointClass:class extends Ct{isValid(){return Ot(this.value)}shouldDraw(){return!!this.shapeArgs}},utils:P}),_t(A,"afterSetOptions",function(r){let t=r.options.states||{};if(this.is("venn"))for(let n of Object.keys(t))t[n].halo=!1}),q().registerSeriesType("venn",A);let Ft=I();return et.default})())});export{Rt as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-5CTM6JVQ.js";import"./chunk-ZW5NV4UO.js";export default a();
|