Icard/angular-clarity-master(work.../node_modules/highcharts/modules/offline-exporting.js

9 lines
9.5 KiB
JavaScript
Raw Normal View History

2024-07-16 14:55:36 +00:00
!/**
* Highcharts JS v11.4.1 (2024-04-04)
*
* Client side exporting module
*
* (c) 2015-2024 Torstein Honsi / Oystein Moseng
*
* License: www.highcharts.com/license
*/function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/offline-exporting",["highcharts","highcharts/modules/exporting"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function o(t,e,o,n){t.hasOwnProperty(e)||(t[e]=n.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Extensions/DownloadURL.js",[e["Core/Globals.js"]],function(t){let{isSafari:e,win:o,win:{document:n}}=t,i=o.URL||o.webkitURL||o;function r(t){let e=t.replace(/filename=.*;/,"").match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/);if(e&&e.length>3&&o.atob&&o.ArrayBuffer&&o.Uint8Array&&o.Blob&&i.createObjectURL){let t=o.atob(e[3]),n=new o.ArrayBuffer(t.length),r=new o.Uint8Array(n);for(let e=0;e<r.length;++e)r[e]=t.charCodeAt(e);return i.createObjectURL(new o.Blob([r],{type:e[1]}))}}return{dataURLtoBlob:r,downloadURL:function(t,i){let l=o.navigator,a=n.createElement("a");if("string"!=typeof t&&!(t instanceof String)&&l.msSaveOrOpenBlob){l.msSaveOrOpenBlob(t,i);return}t=""+t;let s=/Edge\/\d+/.test(l.userAgent);if((e&&"string"==typeof t&&0===t.indexOf("data:application/pdf")||s||t.length>2e6)&&!(t=r(t)||""))throw Error("Failed to convert to blob");if(void 0!==a.download)a.href=t,a.download=i,n.body.appendChild(a),a.click(),n.body.removeChild(a);else try{if(!o.open(t,"chart"))throw Error("Failed to open window")}catch{o.location.href=t}}}}),o(e,"Extensions/OfflineExporting/OfflineExportingDefaults.js",[],function(){return{libURL:"https://code.highcharts.com/11.4.1/lib/",menuItemDefinitions:{downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChartLocal()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChartLocal({type:"image/jpeg"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChartLocal({type:"image/svg+xml"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChartLocal({type:"application/pdf"})}}}}}),o(e,"Extensions/OfflineExporting/OfflineExporting.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Chart/Chart.js"],e["Core/Defaults.js"],e["Extensions/DownloadURL.js"],e["Extensions/Exporting/Exporting.js"],e["Core/Globals.js"],e["Core/HttpUtilities.js"],e["Extensions/OfflineExporting/OfflineExportingDefaults.js"],e["Core/Utilities.js"]],function(t,e,o,n,i,r,l,a,s){var c;let{defaultOptions:d}=o,{downloadURL:f}=n,{doc:g,win:h}=r,{ajax:p}=l,{addEvent:u,error:m,extend:y,fireEvent:x,merge:b}=s;return t.allowedAttributes.push("data-z-index","fill-opacity","filter","rx","ry","stroke-dasharray","stroke-linejoin","stroke-opacity","text-anchor","transform","version","viewBox","visibility","xmlns","xmlns:xlink"),t.allowedTags.push("desc","clippath","g"),function(e){function o(t,o){let n=this,l=b(n.options.exporting,t),a=function(t){!1===l.fallbackToExportServer?l.error?l.error(l,t):m(28,!0):n.exportChart(l)};if(r.isMS&&n.styledMode&&!i.inlineAllowlist.length&&i.inlineAllowlist.push(/^blockSize/,/^border/,/^caretColor/,/^color/,/^columnRule/,/^columnRuleColor/,/^cssFloat/,/^cursor/,/^fill$/,/^fillOpacity/,/^font/,/^inlineSize/,/^length/,/^lineHeight/,/^opacity/,/^outline/,/^parentRule/,/^rx$/,/^ry$/,/^stroke/,/^textAlign/,/^textAnchor/,/^textDecoration/,/^transform/,/^vectorEffect/,/^visibility/,/^x$/,/^y$/),r.isMS&&("application/pdf"===l.type||n.container.getElementsByTagName("image").length&&"image/svg+xml"!==l.type)||"application/pdf"===l.type&&[].some.call(n.container.getElementsByTagName("image"),function(t){let e=t.getAttribute("href");return""!==e&&"string"==typeof e&&0!==e.indexOf("data:")})){a(Error("Image type not supported for this chart/browser."));return}n.getSVGForLocalExport(l,o||{},a,function(t){t.indexOf("<foreignObject")>-1&&"image/svg+xml"!==l.type&&(r.isMS||"application/pdf"===l.type)?a(Error("Image type not supported for charts with embedded HTML")):e.downloadSVGLocal(t,y({filename:n.getFilename()},l),a,()=>x(n