!/**
 * 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,function(t){return function(){"use strict";var e,r,a={944:function(e){e.exports=t}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var r=n[t]={exports:{}};return a[t](r,r.exports,o),r.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var i={};o.d(i,{default:function(){return c}});var h=o(944),s=o.n(h),d=s().composed,u=s().deg2rad;e=s().SVGElement,(0,h.pushUnique)(d,"TextPath")&&((0,h.addEvent)(e,"afterGetBBox",function(t){var e,r=t.bBox,a=null==(e=this.element)?void 0:e.querySelector("textPath");if(a){for(var n=[],o=this.renderer.fontMetrics(this.element),i=o.b,h=o.h-i,s=RegExp('(<tspan>|<tspan(?!\\sclass="highcharts-br")[^>]*>|<\\/tspan>)',"g"),d=a.innerHTML.replace(s,"").split(/<tspan class="highcharts-br"[^>]*>/),c=d.length,f=function(t,e){var r=e.x,n=e.y,o=(a.getRotationOfChar(t)-90)*u,s=Math.cos(o),d=Math.sin(o);return[[r-h*s,n-h*d],[r+i*s,n+i*d]]},l=0,p=0;p<c;p++){for(var x=d[p].length,b=0;b<x;b+=5)try{var g=l+b+p,v=f(g,a.getStartPositionOfChar(g)),y=v[0],P=v[1];0===b?(n.push(P),n.push(y)):(0===p&&n.unshift(P),p===c-1&&n.push(y))}catch(t){break}l+=x-1;try{var g=l+p,m=a.getEndPositionOfChar(g),T=f(g,m),y=T[0],P=T[1];n.unshift(P),n.unshift(y)}catch(t){break}}n.length&&n.push(n[0].slice()),r.polygon=n}return r}),(0,h.addEvent)(e,"beforeAddingDataLabel",function(t){var e,r=t.labelOptions,a=t.point,n=r[a.formatPrefix+"TextPath"]||r.textPath;n&&!r.useHTML&&(this.setTextPath((null==(e=a.getDataLabelPath)?void 0:e.call(a,this))||a.graphic,n),a.dataLabelPath&&!n.enabled&&(a.dataLabelPath=a.dataLabelPath.destroy()))}),e.prototype.setTextPath=null!=(r=e.prototype.setTextPath)?r:function(t,e){var r=this,a=this.renderer.url,n=this.text||this,o=n.textPath,i=(0,h.merge)({enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e),s=i.attributes,d=i.enabled;if(t=t||o&&o.path,null==o||o.undo(),t&&d){var u=(0,h.addEvent)(n,"afterModifyTree",function(e){if(t&&d){var o=t.attr("id");o||t.attr("id",o=(0,h.uniqueKey)());var i={x:0,y:0};(0,h.defined)(s.dx)&&(i.dx=s.dx,delete s.dx),(0,h.defined)(s.dy)&&(i.dy=s.dy,delete s.dy),n.attr(i),r.attr({transform:""}),r.box&&(r.box=r.box.destroy());var u=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:(0,h.extend)(s,{"text-anchor":s.textAnchor,href:""+a+"#".concat(o)}),children:u}}});n.textPath={path:t,undo:u}}else n.attr({dx:0,dy:0}),delete n.textPath;return this.added&&(n.textCache="",this.renderer.buildText(n)),this});var c=s();return i.default}()});