import{g as e}from"./index-B1MHyEgd.js";function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}})}),Object.freeze(e)}var r,n={exports:{}};var o,s=r?n.exports:(r=1,o="undefined"==typeof window?n.exports:window,n.exports=((e,t,r,n)=>(()=>{var o={512:e=>{e.exports=n},608:e=>{e.exports=r},620:e=>{e.exports=t},944:t=>{t.exports=e}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var p={};i.d(p,{default:()=>A});var l=i(944),a=i.n(l);let{deg2rad:h}=a(),{pick:u}=a();var y=i(620),c=i.n(y),d=i(608),x=i.n(d);let{parse:f}=c(),{Element3D:g}=x().getRendererType().prototype,z=class extends g{constructor(){super(...arguments),this.parts=["top","bottom","front","back"],this.pathType="cylinder"}fillSetter(e){return this.singleSetterForParts("fill",null,{front:e,back:e,top:f(e).brighten(.1).get(),bottom:f(e).brighten(-.1).get()}),this.color=this.fill=e,this}},{charts:C,deg2rad:b}=a(),{perspective:v}={perspective:function(e,t,r,n){let o=t.options.chart.options3d,s=u(n,!!r&&t.inverted),i={x:t.plotWidth/2,y:t.plotHeight/2,z:o.depth/2,vd:u(o.depth,1)*u(o.viewDistance,0)},p=t.scale3d||1,l=h*o.beta*(s?-1:1),a=h*o.alpha*(s?-1:1),y=Math.cos(a),c=Math.cos(-l),d=Math.sin(a),x=Math.sin(-l);return r||(i.x+=t.plotLeft,i.y+=t.plotTop),e.map(function(e){var t,r,n;let o=(t=(s?e.y:e.x)-i.x,r=(s?e.x:e.y)-i.y,n=(e.z||0)-i.z,{x:c*t-x*n,y:-d*x*t+y*r-c*d*n,z:y*x*t+d*r+y*c*n}),l=function(e,t,r){let n=r>0&&r<Number.POSITIVE_INFINITY?r/(e.z+t.z+r):1;return{x:e.x*n,y:e.y*n}}(o,i,i.vd);return l.x=l.x*p+i.x,l.y=l.y*p+i.y,l.z=o.z*p+i.z,{x:s?l.y:l.x,y:s?l.x:l.y,z:l.z}})}},{extend:m,pick:M}=a();function O(e){return!e.some(e=>"C"===e[0])}function P(e){return this.element3d("cylinder",e)}function T(e){let t=C[this.chartIndex],r=this.cuboidPath(e),n=!r.isTop,o=!r.isFront,s=this.getCylinderEnd(t,e),i=this.getCylinderEnd(t,e,!0);return{front:this.getCylinderFront(s,i),back:this.getCylinderBack(s,i),top:s,bottom:i,zIndexes:{top:3*!!n,bottom:3*!n,front:o?2:1,back:o?1:2,group:r.zIndexes.group}}}function _(e){let t=[["M",e[0].x,e[0].y]],r=e.length-2;for(let n=1;n<r;n+=3)t.push(["C",e[n].x,e[n].y,e[n+1].x,e[n+1].y,e[n+2].x,e[n+2].y]);return t}function k(e,t){let r=[];if(O(e)){let t=e[0],n=e[2];"M"===t[0]&&"L"===n[0]&&(r.push(["M",n[1],n[2]]),r.push(e[3]),r.push(["L",t[1],t[2]]))}else"C"===e[2][0]&&r.push(["M",e[2][5],e[2][6]]),r.push(e[3],e[4]);if(O(t)){let e=t[0];"M"===e[0]&&(r.push(["L",e[1],e[2]]),r.push(t[3]),r.push(t[2]))}else{let e=t[2],n=t[3],o=t[4];"C"===e[0]&&"C"===n[0]&&"C"===o[0]&&(r.push(["L",o[5],o[6]]),r.push(["C",o[3],o[4],o[1],o[2],n[5],n[6]]),r.push(["C",n[3],n[4],n[1],n[2],e[5],e[6]]))}return r.push(["Z"]),r}function w(e,t,r){let n,o,{width:s=0,height:i=0,alphaCorrection:p=0}=t,l=M(t.depth,s,0),a=Math.min(s,l)/2,h=b*(e.options.chart.options3d.beta-90+p),u=(t.y||0)+(r?i:0),y=.5519*a,c=s/2+(t.x||0),d=l/2+(t.z||0),x=[{x:0,y:u,z:a},{x:y,y:u,z:a},{x:a,y:u,z:y},{x:a,y:u,z:0},{x:a,y:u,z:-y},{x:y,y:u,z:-a},{x:0,y:u,z:-a},{x:-y,y:u,z:-a},{x:-a,y:u,z:-y},{x:-a,y:u,z:0},{x:-a,y:u,z:y},{x:-y,y:u,z:a},{x:0,y:u,z:a}],f=Math.cos(h),g=Math.sin(h);for(let e of x)n=e.x,o=e.z,e.x=n*f-o*g+c,e.z=o*f+n*g+d;let z=v(x,e,!0);return 2.5>Math.abs(z[3].y-z[9].y)&&2.5>Math.abs(z[0].y-z[6].y)?this.toLinePath([z[0],z[3],z[6],z[9]],!0):this.getCurvedPath(z)}function E(e,t){let r=e.slice(0,3);if(O(t)){let e=t[0];"M"===e[0]&&(r.push(t[2]),r.push(t[1]),r.push(["L",e[1],e[2]]))}else{let e=t[0],n=t[1],o=t[2];"M"===e[0]&&"C"===n[0]&&"C"===o[0]&&(r.push(["L",o[5],o[6]]),r.push(["C",o[3],o[4],o[1],o[2],n[5],n[6]]),r.push(["C",n[3],n[4],n[1],n[2],e[1],e[2]]))}return r.push(["Z"]),r}var I=i(512),L=i.n(I);let{column:{prototype:{pointClass:j}}}=L().seriesTypes,{extend:F}=a();class H extends j{}F(H.prototype,{shapeType:"cylinder"});let{column:R}=L().seriesTypes,{extend:S,merge:D}=a();class N extends R{}N.compose=function(e){let t=e.prototype;t.cylinder||(t.Element3D.types.cylinder=z,m(t,{cylinder:P,cylinderPath:T,getCurvedPath:_,getCylinderBack:k,getCylinderEnd:w,getCylinderFront:E}))},N.defaultOptions=D(R.defaultOptions,{}),S(N.prototype,{pointClass:H}),L().registerSeriesType("cylinder",N),N.compose(x().getRendererType());let A=a();return p.default})())(o._Highcharts,o._Highcharts.Color,o._Highcharts.RendererRegistry,o._Highcharts.SeriesRegistry)),i=t({__proto__:null,default:e(s)},[s]);export{i as c};
//# sourceMappingURL=cylinder-e-HaAtPz.js.map
