!/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/textpath
 * @requires highcharts
 *
 * (c) 2009-2026 Highsoft AS
 * Author: Torstein Hønsi
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts):"function"==typeof define&&define.amd?define("highcharts/modules/textpath",["highcharts/highcharts"],function(t){return e(t)}):"object"==typeof exports?exports["highcharts/modules/textpath"]=e(t._Highcharts):t.Highcharts=e(t.Highcharts)}("u"<typeof window?this:window,t=>(()=>{"use strict";var e,r={944:e=>{e.exports=t}},a={};function h(t){var e=a[t];if(void 0!==e)return e.exports;var s=a[t]={exports:{}};return r[t](s,s.exports,h),s.exports}h.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return h.d(e,{a:e}),e},h.d=(t,e)=>{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};h.d(s,{default:()=>l});var n=h(944),o=h.n(n);let{composed:i,deg2rad:d}=o();e=o().SVGElement,(0,n.pushUnique)(i,"TextPath")&&((0,n.addEvent)(e,"afterGetBBox",function(t){let e=t.bBox,r=this.element?.querySelector("textPath");if(r){let t=[],{b:a,h}=this.renderer.fontMetrics(this.element),s=h-a,n=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),o=r.innerHTML.replace(n,"").split(/<tspan class="highcharts-br"[^>]*>/),i=o.length,l=(t,e)=>{let{x:h,y:n}=e,o=(r.getRotationOfChar(t)-90)*d,i=Math.cos(o),l=Math.sin(o);return[[h-s*i,n-s*l],[h+a*i,n+a*l]]};for(let e=0,a=0;a<i;a++){let h=o[a].length;for(let s=0;s<h;s+=5)try{let h=e+s+a,[n,o]=l(h,r.getStartPositionOfChar(h));0===s?(t.push(o),t.push(n)):(0===a&&t.unshift(o),a===i-1&&t.push(n))}catch{break}e+=h-1;try{let h=e+a,s=r.getEndPositionOfChar(h),[n,o]=l(h,s);t.unshift(o),t.unshift(n)}catch{break}}t.length&&t.push(t[0].slice()),e.polygon=t}return e}),(0,n.addEvent)(e,"beforeAddingDataLabel",function(t){let e=t.labelOptions,r=t.point,a=e[r.formatPrefix+"TextPath"]||e.textPath;a&&!e.useHTML&&(this.setTextPath(r.getDataLabelPath?.(this)||r.graphic,a),r.dataLabelPath&&!a.enabled&&(r.dataLabelPath=r.dataLabelPath.destroy()))}),e.prototype.setTextPath=e.prototype.setTextPath??function(t,e){let r=this.renderer.url,a=this.text||this,h=a.textPath,{attributes:s,enabled:o}=(0,n.merge)({enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);if(t=t||h&&h.path,h?.undo(),t&&o){let e=(0,n.addEvent)(a,"afterModifyTree",e=>{if(t&&o){let h=t.attr("id");h||t.attr("id",h=(0,n.uniqueKey)());let o={x:0,y:0};(0,n.defined)(s.dx)&&(o.dx=s.dx,delete s.dx),(0,n.defined)(s.dy)&&(o.dy=s.dy,delete s.dy),a.attr(o),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let i=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:(0,n.extend)(s,{"text-anchor":s.textAnchor,href:`${r}#${h}`}),children:i}}});a.textPath={path:t,undo:e}}else a.attr({dx:0,dy:0}),delete a.textPath;return this.added&&(a.textCache="",this.renderer.buildText(a)),this});let l=o();return s.default})());