!/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/offline-exporting
 * @requires highcharts
 * @requires highcharts/modules/exporting
 *
 * Client side exporting module
 *
 * (c) 2015-2026 Highsoft AS
 * Author: Torstein Hønsi / Øystein Moseng
 *
 * 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,t._Highcharts.AST,t._Highcharts.Chart):"function"==typeof define&&define.amd?define("highcharts/modules/offline-exporting",["highcharts/highcharts"],function(t){return e(t,t.AST,t.Chart)}):"object"==typeof exports?exports["highcharts/modules/offline-exporting"]=e(t._Highcharts,t._Highcharts.AST,t._Highcharts.Chart):t.Highcharts=e(t.Highcharts,t.Highcharts.AST,t.Highcharts.Chart)}("u"<typeof window?this:window,(t,e,r)=>(()=>{"use strict";var o,n={660:t=>{t.exports=e},944:e=>{e.exports=t},960:t=>{t.exports=r}},a={};function i(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={exports:{}};return n[t](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var l={};i.d(l,{default:()=>R});var s=i(944),d=i.n(s);let{isSafari:c,win:f,win:{document:h}}=d(),p=f.URL||f.webkitURL||f;function u(t){let e=t.replace(/filename=.*;/,"").match(/data:([^;]*)(;base64)?,([A-Z+\d\/]+)/i);if(e&&e.length>3&&f.atob&&f.ArrayBuffer&&f.Uint8Array&&f.Blob&&p.createObjectURL){let t=f.atob(e[3]),r=new f.ArrayBuffer(t.length),o=new f.Uint8Array(r);for(let e=0;e<o.length;++e)o[e]=t.charCodeAt(e);return p.createObjectURL(new f.Blob([o],{type:e[1]}))}}function g(t,e){let r=f.navigator,o=h.createElement("a");if("string"!=typeof t&&!(t instanceof String)&&r.msSaveOrOpenBlob)return void r.msSaveOrOpenBlob(t,e);if(t=""+t,r.userAgent.length>1e3)throw Error("Input too long");let n=/Edge\/\d+/.test(r.userAgent);if((c&&"string"==typeof t&&0===t.indexOf("data:application/pdf")||n||t.length>2e6)&&!(t=u(t)||""))throw Error("Failed to convert to blob");if(void 0!==o.download)o.href=t,o.download=e,h.body.appendChild(o),o.click(),h.body.removeChild(o);else try{if(!f.open(t,"chart"))throw Error("Failed to open window")}catch{f.location.href=t}}function y(t){return new Promise((e,r)=>{let o=h.getElementsByTagName("head")[0],n=h.createElement("script");n.type="text/javascript",n.src=t,n.onload=()=>{e()},n.onerror=()=>{let e=`Error loading script ${t}`;(0,s.error)(e),r(Error(e))},o.appendChild(n)})}var w=i(660),m=i.n(w),b=i(960),v=i.n(b);let x={exporting:{}},{getOptions:E,setOptions:F}=d(),{composed:L,doc:A,win:S}=d();!function(t){let e="Invalid exporting.libURL:";function r(){return!!(S&&S.jspdf?.jsPDF&&S.svg2pdf)}async function o(t,e,r,o){var i,l;let s,d,c,f,h,p=(i=t,l=o,c=A.createElement("div"),m().setElementHTML(c,i),f=c.getElementsByTagName("text"),h=function(t,e){let r=t;for(;r&&r!==c;){if(r.style[e]){let o=r.style[e];"fontSize"===e&&/em$/.test(o)&&(o=Math.round(16*parseFloat(o))+"px"),t.style[e]=o;break}r=r.parentNode}},[].forEach.call(f,function(t){for(["fontFamily","fontSize"].forEach(e=>{h(t,e)}),t.style.fontFamily=l?.normal?"HighchartsFont":String(t.style.fontFamily&&t.style.fontFamily.split(" ").splice(-1)),s=t.getElementsByTagName("title"),[].forEach.call(s,function(e){t.removeChild(e)}),d=t.getElementsByClassName("highcharts-text-outline");d.length>0;){let t=d[0];t.parentNode&&t.parentNode.removeChild(t)}}),c.querySelector("svg"));p&&(await n(p,o),g(await a(p,0,e),r))}async function n(t,e){let r,o,n=(t,e)=>{S.jspdf.jsPDF.API.events.push(["initialized",function(){this.addFileToVFS(t,e),this.addFont(t,"HighchartsFont",t),this.getFontList()?.HighchartsFont||this.setFont("HighchartsFont")}])};for(let a of(e&&(o=t.textContent||"",!/[^\u0000-\u007F\u200B]+/.test(o))&&(e=void 0),["normal","italic","bold","bolditalic"])){let t=e?.[a];if(t)try{let e=await S.fetch(t);if(!e.ok)throw Error(`Failed to fetch font: ${t}`);let o=await e.blob(),i=new FileReader,l=await new Promise((t,e)=>{i.onloadend=()=>{"string"==typeof i.result?t(i.result.split(",")[1]):e(Error("Failed to read font as base64"))},i.onerror=e,i.readAsDataURL(o)});n(a,l),"normal"===a&&(r=l)}catch{}else r&&n(a,r)}}async function a(t,e,r){let o=(Number(t.getAttribute("width"))+2*e)*r,n=(Number(t.getAttribute("height"))+2*e)*r,a=new S.jspdf.jsPDF(n>o?"p":"l","pt",[o,n]);[].forEach.call(t.querySelectorAll('*[visibility="hidden"]'),function(t){t.parentNode.removeChild(t)});let i=t.querySelectorAll("linearGradient");for(let t=0;t<i.length;t++){let e=i[t].querySelectorAll("stop"),r=0;for(;r<e.length&&"0"===e[r].getAttribute("offset")&&"0"===e[r+1].getAttribute("offset");)e[r].remove(),r++}return[].forEach.call(t.querySelectorAll("tspan"),t=>{"​"===t.textContent&&(t.textContent=" ",t.setAttribute("dx",-5))}),await a.svg(t,{x:0,y:0,width:o,height:n,removeInvalid:!0}),a.output("datauristring")}t.compose=function(t){if((0,s.addEvent)(t,"downloadSVG",async function(t){let{svg:n,exportingOptions:a,exporting:i,preventDefault:l}=t,c=i?.chart;if(a?.type==="application/pdf"){l?.();try{let{type:t,filename:i,scale:l}=d().Exporting.prepareImageOptions(a),s=a.libURL||c?.options.exporting?.libURL,f=function(t){let r;if(!t)return;let o="/"!==t.slice(-1)?t+"/":t;if(S.URL?.canParse)r=S.URL.canParse(o,A.baseURI);else try{r=!!new S.URL(o,A.baseURI).href}catch{r=!1}if(!r)throw Error(`${e} "${t}". Provide a valid URL or path to the jsPDF and svg2pdf scripts.`);return o}(s);if("application/pdf"===t){if(!r()){if(!f)throw Error("PDF export requires jsPDF and svg2pdf.");S.jspdf?.jsPDF||await y(`${f}jspdf.js`),S.svg2pdf||await y(`${f}svg2pdf.js`)}await o(n,l,i,a?.pdfFont)}}catch(t){a?.fallbackToExportServer!==!1&&0===t.message.indexOf(e)&&(0,s.error)(`${t.message} Falling back to export server.`,!1,c),await i?.fallbackToServer(a,t)}}}),!(0,s.pushUnique)(L,"OfflineExporting"))return;(0,s.addEvent)(v(),"load",function(){!(this.renderer.forExport||r())&&(this.options.exporting?.libURL||(0,s.error)("Warning: exporting.libURL not defined, PDF client side export will not work",!1,this))}),(0,s.extend)(v().prototype,{exportChartLocal:async function(t,e){await this.exporting?.exportChart(t,e)}}),F(x);let n=E().exporting?.buttons?.contextButton?.menuItems;n?.push("downloadPDF")},t.downloadSVGLocal=async function(t,e){await d().Exporting.prototype.downloadSVG.call(void 0,t,e)}}(o||(o={}));let U=o,j=d();j.dataURLtoBlob=j.dataURLtoBlob||u,j.downloadSVGLocal=U.downloadSVGLocal,j.downloadURL=j.downloadURL||g,U.compose(j.Exporting);let R=d();return l.default})());