import{M as B}from"./entry.783d4ced.js";function F(g,c){for(var o=0;o<c.length;o++){const d=c[o];if(typeof d!="string"&&!Array.isArray(d)){for(const p in d)if(p!=="default"&&!(p in g)){const l=Object.getOwnPropertyDescriptor(d,p);l&&Object.defineProperty(g,p,l.get?l:{enumerable:!0,get:()=>d[p]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var S={exports:{}};(function(g){(function(c){g.exports?(c.default=c,g.exports=c):c(typeof Highcharts<"u"?Highcharts:void 0)})(function(c){var o=c?c._modules:{};function d(p,l,x,w){p.hasOwnProperty(l)||(p[l]=w.apply(null,x),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:l,module:p[l]}})))}d(o,"Extensions/PatternFill.js",[o["Core/Animation/AnimationUtilities.js"],o["Core/Chart/Chart.js"],o["Core/Globals.js"],o["Core/Defaults.js"],o["Core/Series/Point.js"],o["Core/Series/Series.js"],o["Core/Renderer/SVG/SVGRenderer.js"],o["Core/Utilities.js"]],function(p,l,x,w,M,_,C,b){let{animObject:P}=p,{getOptions:R}=w,{addEvent:m,defined:k,erase:T,merge:A,pick:y,removeEvent:D,wrap:H}=b,O=x.patterns=(()=>{let t=[],e=R().colors;return["M 0 0 L 5 5 M 4.5 -0.5 L 5.5 0.5 M -0.5 4.5 L 0.5 5.5","M 0 5 L 5 0 M -0.5 0.5 L 0.5 -0.5 M 4.5 5.5 L 5.5 4.5","M 2 0 L 2 5 M 4 0 L 4 5","M 0 2 L 5 2 M 0 4 L 5 4","M 0 1.5 L 2.5 1.5 L 2.5 0 M 2.5 5 L 2.5 3.5 L 5 3.5"].forEach((r,i)=>{t.push({path:r,color:e[i],width:5,height:5,patternTransform:"scale(1.4 1.4)"})}),["M 0 0 L 5 10 L 10 0","M 3 3 L 8 3 L 8 8 L 3 8 Z","M 5 5 m -4 0 a 4 4 0 1 1 8 0 a 4 4 0 1 1 -8 0","M 0 0 L 10 10 M 9 -1 L 11 1 M -1 9 L 1 11","M 0 10 L 10 0 M -1 1 L 1 -1 M 9 11 L 11 9"].forEach((r,i)=>{t.push({path:r,color:e[i+5],width:10,height:10})}),t})();function j(t,e){let r=JSON.stringify(t),i=r.length||0,n=0,a=0,s;if(e){s=Math.max(Math.floor(i/500),1);for(let h=0;h<i;h+=s)n+=r.charCodeAt(h);n&=n}for(;a<i;++a)n=(n<<5)-n+r.charCodeAt(a),n&=n;return n.toString(16).replace("-","1")}M.prototype.calculatePatternDimensions=function(t){if(t.width&&t.height)return;let e=this.graphic&&(this.graphic.getBBox&&this.graphic.getBBox(!0)||this.graphic.element&&this.graphic.element.getBBox())||{},r=this.shapeArgs;if(r&&(e.width=r.width||e.width,e.height=r.height||e.height,e.x=r.x||e.x,e.y=r.y||e.y),t.image){if(!e.width||!e.height){t._width="defer",t._height="defer";let i=this.series.chart.mapView&&this.series.chart.mapView.getSVGTransform().scaleY;k(i)&&i<0&&(t._inverted=!0);return}t.aspectRatio&&(e.aspectRatio=e.width/e.height,t.aspectRatio>e.aspectRatio?e.aspectWidth=e.height*t.aspectRatio:e.aspectHeight=e.width/t.aspectRatio),t._width=t.width||Math.ceil(e.aspectWidth||e.width),t._height=t.height||Math.ceil(e.aspectHeight||e.height)}t.width||(t._x=t.x||0,t._x+=e.x-Math.round(e.aspectWidth?Math.abs(e.aspectWidth-e.width)/2:0)),t.height||(t._y=t.y||0,t._y+=e.y-Math.round(e.aspectHeight?Math.abs(e.aspectHeight-e.height)/2:0))},C.prototype.addPattern=function(t,e){let r,i=y(e,!0),n=P(i),a,s=t.width||t._width||32,h=t.height||t._height||32,v=t.color||"#343434",f=t.id,U=this,u;if(!f&&(this.idCounter=this.idCounter||0,f="highcharts-pattern-"+this.idCounter+"-"+(this.chartIndex||0),++this.idCounter),this.forExport&&(f+="-export"),this.defIds=this.defIds||[],this.defIds.indexOf(f)>-1)return;this.defIds.push(f);let E={id:f,patternUnits:"userSpaceOnUse",patternContentUnits:t.patternContentUnits||"userSpaceOnUse",width:s,height:h,x:t._x||t.x||0,y:t._y||t.y||0};return t._inverted&&(E.patternTransform="scale(1, -1)",t.patternTransform&&(t.patternTransform+=" scale(1, -1)")),t.patternTransform&&(E.patternTransform=t.patternTransform),(r=this.createElement("pattern").attr(E).add(this.defs)).id=f,t.path?(a=b.isObject(t.path)?t.path:{d:t.path},t.backgroundColor&&function(L){U.rect(0,0,s,h).attr({fill:L}).add(r)}(t.backgroundColor),u={d:a.d},this.styledMode||(u.stroke=a.stroke||v,u["stroke-width"]=y(a.strokeWidth,2),u.fill=a.fill||"none"),a.transform&&(u.transform=a.transform),this.createElement("path").attr(u).add(r),r.color=v):t.image&&(i?this.image(t.image,0,0,s,h,function(){this.animate({opacity:y(t.opacity,1)},n),D(this.element,"load")}).attr({opacity:0}).add(r):this.image(t.image,0,0,s,h).add(r)),t.image&&i||t.opacity===void 0||[].forEach.call(r.element.childNodes,function(L){L.setAttribute("opacity",t.opacity)}),this.patternElements=this.patternElements||{},this.patternElements[f]=r,r},H(_.prototype,"getColor",function(t){let e=this.options.color;e&&e.pattern&&!e.pattern.color?(delete this.options.color,t.apply(this,Array.prototype.slice.call(arguments,1)),e.pattern.color=this.color,this.color=this.options.color=e):t.apply(this,Array.prototype.slice.call(arguments,1))}),m(_,"render",function(){let t=this.chart.isResizing;(this.isDirtyData||t||!this.chart.hasRendered)&&(this.points||[]).forEach(function(e){let r=e.options&&e.options.color;r&&r.pattern&&(t&&!(e.shapeArgs&&e.shapeArgs.width&&e.shapeArgs.height)?(r.pattern._width="defer",r.pattern._height="defer"):e.calculatePatternDimensions(r.pattern))})}),m(M,"afterInit",function(){let t=this.options.color;t&&t.pattern&&(typeof t.pattern.path=="string"&&(t.pattern.path={d:t.pattern.path}),this.color=this.options.color=A(this.series.options.color,t))}),m(C,"complexColor",function(t){let e=t.args[0],r=t.args[1],i=t.args[2],n=this.chartIndex||0,a=e.pattern,s="#343434";if(e.patternIndex!==void 0&&O&&(a=O[e.patternIndex]),!a)return!0;if(a.image||typeof a.path=="string"||a.path&&a.path.d){let h=i.parentNode&&i.parentNode.getAttribute("class");h=h&&h.indexOf("highcharts-legend")>-1,(a._width==="defer"||a._height==="defer")&&M.prototype.calculatePatternDimensions.call({graphic:{element:i}},a),(h||!a.id)&&((a=A({},a)).id="highcharts-pattern-"+n+"-"+j(a)+j(a,!0)),this.addPattern(a,!this.forExport&&y(a.animation,this.globalAnimation,{duration:100})),s=`url(${this.url}#${a.id+(this.forExport?"-export":"")})`}else s=a.color||s;return i.setAttribute(r,s),e.toString=function(){return s},!1}),m(l,"endResize",function(){(this.renderer&&this.renderer.defIds||[]).filter(function(t){return t&&t.indexOf&&t.indexOf("highcharts-pattern-")===0}).length&&(this.series.forEach(function(t){t.visible&&t.points.forEach(function(e){let r=e.options&&e.options.color;r&&r.pattern&&(r.pattern._width="defer",r.pattern._height="defer")})}),this.redraw(!1))}),m(l,"redraw",function(){let t={},e=this.renderer,r=(e.defIds||[]).filter(function(i){return i.indexOf&&i.indexOf("highcharts-pattern-")===0});r.length&&([].forEach.call(this.renderTo.querySelectorAll('[color^="url("], [fill^="url("], [stroke^="url("]'),function(i){let n=i.getAttribute("fill")||i.getAttribute("color")||i.getAttribute("stroke");if(n){let a=n.replace(e.url,"").replace("url(#","").replace(")","");t[a]=!0}}),r.forEach(function(i){!t[i]&&(T(e.defIds,i),e.patternElements[i]&&(e.patternElements[i].destroy(),delete e.patternElements[i]))}))})}),d(o,"masters/modules/pattern-fill.src.js",[],function(){})})})(S);var I=S.exports;const N=B(I),W=F({__proto__:null,default:N},[I]);export{W as p};
